cft-builder 0.2.283 → 0.2.284

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.
@@ -1591,7 +1591,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1591
1591
  }
1592
1592
  }
1593
1593
  `}}),n8=b.forwardRef(function(t,e){var n=Kn(),r=b.useContext(ar),i=jm.getProps(t,r),a=b.useState(i.id),s=xI(a,2),l=s[0],c=s[1],u=b.useState(i.collapsed),d=xI(u,2),f=d[0],h=d[1],g=i.toggleable?i.onToggle?i.collapsed:f:!1,v=b.useRef(null),m=b.useRef(null),A=l+"_header",w=l+"_content",x=jm.setMetaData({props:i,state:{id:l,collapsed:g}}),S=x.ptm,T=x.cx,C=x.isUnstyled;li(jm.css.styles,C,{name:"fieldset"});var E=function(R){i.toggleable&&(g?_(R):M(R),i.onToggle&&i.onToggle({originalEvent:R,value:!g})),R.preventDefault()},_=function(R){i.onToggle||h(!1),i.onExpand&&i.onExpand(R)},M=function(R){i.onToggle||h(!0),i.onCollapse&&i.onCollapse(R)};Li(function(){i.id||c(So())});var O=function(R){(R.code==="Enter"||R.code==="NumpadEnter"||R.code==="Space")&&(E(R),R.preventDefault())},F=function(){var R=n({className:T("content")},S("content")),ue=n({ref:m,id:w,role:"region","aria-labelledby":A,className:T("toggleableContent")},S("toggleableContent")),Y=n({classNames:T("transition"),timeout:{enter:1e3,exit:450},in:!g,unmountOnExit:!0,options:i.transitionOptions},S("transition"));return b.createElement(Ro,$m({nodeRef:m},Y),b.createElement("div",ue,b.createElement("div",R,i.children)))},P=function(){if(i.toggleable){var R=n({className:T("togglericon")},S("togglericon")),ue=g?i.expandIcon||b.createElement(Mm,R):i.collapseIcon||b.createElement(t8,R),Y=nr.getJSXIcon(ue,R,{props:i});return Y}return null},H=function(){var R=n({className:T("legendTitle")},S("legendTitle")),ue=n({id:A,role:"button","aria-expanded":!g,"aria-controls":w,onKeyDown:O,onClick:E,"aria-label":i.legend,tabIndex:0},S("toggler"));if(i.toggleable){var Y=P();return b.createElement("a",ue,Y,b.createElement("span",R,i.legend),b.createElement(Qt,null))}return b.createElement("span",$m({},R,{id:A}),i.legend)},N=function(){var R=n({className:T("legend")},S("legend"));if(i.legend!=null||i.toggleable){var ue=H();return b.createElement("legend",R,ue)}};b.useImperativeHandle(e,function(){return{props:i,getElement:function(){return v.current},getContent:function(){return m.current}}});var z=n({id:l,ref:v,style:i.style,className:ft(i.className,T("root")),onClick:i.onClick},jm.getOtherProps(i),S("root")),U=N(),ce=F();return b.createElement("fieldset",z,U,ce)});n8.displayName="Fieldset";const TG=t=>o.jsx(cn,{target:`.${t==null?void 0:t.element}`,position:"right",children:o.jsxs("div",{style:{width:400},className:"m-3",children:[o.jsx("div",{className:"text-900 font-medium text-2xl mb-2",children:t==null?void 0:t.label}),o.jsx("div",{children:"Dynamic listing component"}),o.jsx(ga,{}),o.jsxs("div",{className:"p-fluid",children:[o.jsx("div",{className:"mb-2",children:t==null?void 0:t.label}),o.jsxs("div",{children:[o.jsxs(n8,{children:[o.jsx("div",{className:"pi pi-circle",children:" Option 1"}),o.jsx("br",{})]}),o.jsx("br",{}),o.jsx(n8,{children:o.jsx("div",{className:"pi pi-circle",children:" Option 2"})})]})]})]})}),EG=t=>o.jsx(cn,{target:`.${t==null?void 0:t.element}`,position:"right",children:o.jsxs("div",{style:{width:400},className:"m-3",children:[o.jsx("div",{className:"text-900 font-medium text-2xl mb-2",children:t==null?void 0:t.label}),o.jsx("div",{children:"Documents"}),o.jsx(ga,{}),o.jsxs("div",{className:"p-fluid",children:[o.jsx("div",{className:"mb-2",children:t==null?void 0:t.label}),o.jsxs("div",{children:["1.Hr Cv.docx",o.jsx("br",{}),"2.Readme.txt",o.jsx("br",{}),"3.Cover.jpg"]})]})]})}),IG=[{label:"Free form inputs",icon:"pi pi-fw pi-file",expanded:!0,items:[{label:"Text",icon:"pi pi-fw pi-plus",element:"input",schema:gH,uuid:nt(),type:tr,toolTip:t=>YY(t)},{label:"Number",icon:"pi pi-fw pi-trash",element:"number",schema:pH,uuid:nt(),type:tr,toolTip:t=>KY(t)},{label:"Email",icon:"pi pi-fw pi-external-link",element:"email",schema:hH,uuid:nt(),type:tr,toolTip:t=>XY(t)},{label:"Text area",icon:"pi pi-fw pi-external-link",element:"textArea",schema:wH,uuid:nt(),type:tr,toolTip:t=>RY(t)},{label:"Text editor",icon:"pi pi-fw pi-external-link",element:"textHtmlEditor",schema:fH,uuid:nt(),type:tr,toolTip:t=>GY(t)},{label:"Date picker",icon:"pi pi-fw pi-user-plus",element:"date-picker",schema:sH,uuid:nt(),type:tr,toolTip:t=>XK(t)},{label:"Draw signature",icon:"pi pi-fw pi-trash",element:"signature",schema:wx,uuid:nt(),type:tr,toolTip:t=>JK(t)},{label:"Type signature",icon:"pi pi-fw pi-trash",element:"type-signature",schema:SH,uuid:nt(),type:tr,toolTip:t=>ZK(t)},{label:"File upload",icon:"pi pi-fw pi-trash",element:"file-upload",schema:cH,uuid:nt(),type:tr,toolTip:t=>eX(t)},{label:"Phone number",icon:"pi pi-fw pi-trash",element:"phone",schema:vH,uuid:nt(),type:tr,PhoneNumberToolTip:ET,toolTip:t=>ET(t)},{label:"Website url",icon:"pi pi-fw pi-trash",element:"web-url",schema:xH,uuid:nt(),type:tr,toolTip:t=>nX(t)},{label:"Hidden field",icon:"pi pi-fw pi-trash",element:"hidden-field",schema:dH,uuid:nt(),type:tr,toolTip:t=>PX(t)},{label:"Address",icon:"pi pi-fw pi-trash",element:"address",schema:iH,uuid:nt(),type:tr,toolTip:t=>MX(t)},{label:"Grid component",icon:"pi pi-fw pi-trash",element:"grid-component",schema:uH,uuid:nt(),type:tr,toolTip:t=>yG(t)},{label:"Matrix dropdown",icon:"pi pi-fw pi-trash",element:"matrix-dropdown",schema:mH,uuid:nt(),type:tr,toolTip:t=>AG(t)}]},{label:"Controlled inputs",icon:"pi pi-fw pi-pencil",items:[{label:"Countries",icon:"pi pi-fw pi-align-left",element:"country",schema:lx,uuid:nt(),type:tr,toolTip:t=>yI(t)},{label:"Dropdown",icon:"pi pi-fw pi-align-left",element:"select",schema:Ax,uuid:nt(),type:tr,toolTip:t=>AI(t)},{label:"Multi select",icon:"pi pi-fw pi-align-right",element:"multi-select",schema:mx,uuid:nt(),type:tr,toolTip:t=>wI(t)},{label:"Checkbox",icon:"pi pi-fw pi-align-left",element:"checkbox",schema:ox,uuid:nt(),type:tr,toolTip:t=>SI(t)},{label:"Radio button",icon:"pi pi-fw pi-align-left",element:"radio",schema:bx,uuid:nt(),type:tr,toolTip:t=>Z6(t)},{label:"Hierarchal radio",icon:"pi pi-fw pi-align-left",element:"radio-hierarchal",schema:yH,uuid:nt(),type:tr,toolTip:t=>Z6(t)},{label:"Dynamic radio",icon:"pi pi-fw pi-align-left",element:"dynamic-listing",schema:oH,uuid:nt(),type:tr,toolTip:t=>TG(t)}]},{label:"Rating inputs",icon:"pi pi-fw pi-pencil",items:[{label:"Likert scale",icon:"pi pi-fw pi-trash",element:"likert-scale",schema:gx,uuid:nt(),type:tr,toolTip:t=>KT(t)},{label:"Slider",icon:"pi pi-fw pi-trash",element:"slider",schema:Sx,uuid:nt(),type:tr,toolTip:t=>LT(t)},{label:"Rating",icon:"pi pi-fw pi-trash",element:"rating",schema:yx,uuid:nt(),type:tr,toolTip:t=>kT(t)},{label:"Thumbs up and down",icon:"pi pi-fw pi-align-left",element:"thumbs",schema:Cx,uuid:nt(),type:tr,toolTip:t=>FX(t)},{label:"Likert emoji scale",icon:"pi pi-fw pi-align-left",element:"likert-emoji-scale",schema:px,uuid:nt(),type:tr,toolTip:t=>kX(t)}]},{label:"Media",icon:"pi pi-fw pi-user",items:[{label:"Document",icon:"pi pi-fw pi-trash",element:"document",schema:cx,uuid:nt(),type:tr,toolTip:t=>EG(t)}]}],_G=[{label:"HTML",icon:"pi pi-fw pi-file",expanded:!0,items:[{label:"<a>",icon:"pi pi-fw pi-plus",element:"a",schema:fx,uuid:nt(),type:tr},{label:"<p>",icon:"pi pi-fw pi-trash",element:"paragraph",schema:vx,uuid:nt(),type:tr},{label:"<heading>",icon:"pi pi-fw pi-external-link",element:"h",schema:ux,uuid:nt(),type:tr},{label:"<li>",icon:"pi pi-fw pi-external-link",element:"list",schema:CH,uuid:nt(),type:tr},{label:"Divider",icon:"pi pi-fw pi-external-link",element:"hr",schema:dx,uuid:nt(),type:tr},{label:"Image",icon:"pi pi-fw pi-user-plus",element:"image",schema:C9,uuid:nt(),type:tr},{label:"Image gallery",icon:"pi pi-fw pi-user-plus",element:"image-gallery",schema:hx,uuid:nt(),type:tr},{label:"Video",icon:"pi pi-fw pi-user-minus",element:"video",schema:x9,uuid:nt(),type:tr}]}],DG=[{label:"Controlled inputs",icon:"pi pi-fw pi-pencil",items:[{label:"Countries",icon:"pi pi-fw pi-align-left",element:"country",schema:lx,uuid:nt(),type:tr,toolTip:t=>yI(t)},{label:"Dropdown",icon:"pi pi-fw pi-align-left",element:"select",schema:Ax,uuid:nt(),type:tr,toolTip:t=>AI(t)},{label:"Multi select",icon:"pi pi-fw pi-align-right",element:"multi-select",schema:mx,uuid:nt(),type:tr,toolTip:t=>wI(t)},{label:"Checkbox",icon:"pi pi-fw pi-align-left",element:"checkbox",schema:ox,uuid:nt(),type:tr,toolTip:t=>SI(t)},{label:"Radio button",icon:"pi pi-fw pi-align-left",element:"radio",schema:bx,uuid:nt(),type:tr,toolTip:t=>Z6(t)}]},{label:"Rating inputs",icon:"pi pi-fw pi-pencil",items:[{label:"Likert scale",icon:"pi pi-fw pi-trash",element:"likert-scale",schema:gx,uuid:nt(),type:tr,toolTip:t=>KT(t)},{label:"Slider",icon:"pi pi-fw pi-trash",element:"slider",schema:Sx,uuid:nt(),type:tr,toolTip:t=>LT(t)},{label:"Rating",icon:"pi pi-fw pi-trash",element:"rating",schema:yx,uuid:nt(),type:tr,toolTip:t=>kT(t)},{label:"Thumbs up and down",icon:"pi pi-fw pi-align-left",element:"thumbs",schema:Cx,uuid:nt(),type:tr},{label:"Likert emoji scale",icon:"pi pi-fw pi-align-left",element:"likert-emoji-scale",schema:px,uuid:nt(),type:tr}]}],NG=[{label:"Media",icon:"pi pi-fw pi-user",items:[{label:"Image",icon:"pi pi-fw pi-user-plus",element:"image",schema:C9,uuid:nt(),type:tr},{label:"Video",icon:"pi pi-fw pi-user-minus",element:"video",schema:x9,uuid:nt(),type:tr},{label:"Quiz",icon:"pi pi-fw pi-trash",element:"quiz",schema:bH,uuid:nt(),type:tr},{label:"Document",icon:"pi pi-fw pi-trash",element:"document",schema:cx,uuid:nt(),type:tr}]}],OG=[{label:"Left",icon:"pi pi-align-left",value:"left"},{label:"Right",icon:"pi pi-align-right",value:"right"}],FG=[{key:1,language:"English",type:"english"},{key:2,language:"Urdu",type:"urdu"},{key:3,language:"Hindi",type:"hindi"},{key:4,language:"Arabic",type:"arabic"},{key:5,language:"French",type:"french"},{key:6,language:"Italian",type:"italian"},{key:7,language:"Spanish",type:"spanish"}],kG=[{name:"Bad Script",font:"bad-script"},{name:"Bilbo Swash Caps",font:"bilbo-swash-caps"},{name:"caveat",font:"caveat"},{name:"Covered By Your Grace",font:"covered-by-your-grace"},{name:"Dancing Script",font:"dancing-script"},{name:"Gochi Hand",font:"gochi-hand"},{name:"Great Vibes",font:"great-vibes"},{name:"Handlee",font:"handlee"},{name:"Just Another Hand",font:"just-another-hand"},{name:"Kalam",font:"kalam"},{name:"La Belle Aurore",font:"la-belle-aurore"},{name:"Marck Script",font:"marck-script"},{name:"Nothing You Could Do",font:"nothing-you-could-do"},{name:"Qwigley",font:"qwigley"},{name:"Sacramento",font:"sacramento"},{name:"Shadows Into Light",font:"shadows-into-light"},{name:"Stalemate",font:"stalemate"},{name:"Yellowtail",font:"yellowtail"}],zm={type:nx,isCoverPage:!1,margin:{left:0,right:0,top:0,bottom:0},isVisible:!0,isHidden:!1,isValid:!1,displayRules:[],title:{english:"Page 1"}},lf={type:na,showSectionHeader:!1,isVisible:!0,isHidden:!1,isValid:!1,showSectionTitle:!1,showSectionSubTitle:!1,heading:{english:"Section header"},subHeadingText:{english:""},isCollapsed:!1},eu={type:Ao,isHidden:!1,isValid:!1,isRequired:!1,isCollapsed:!1,showRowTitle:!0,showRowSubTitle:!0,heading:{english:""},subHeadingText:{english:""},rowIsRepeatable:!1,repeatableFields:[],repeatableFieldsData:[],isMinimumEntries:!1,minimumEntries:5,addToListButtonLabel:{english:"Save"},reviewerChecklist:[]},wc={type:As,isCollapsed:!1},PG=t=>{let e=t;e={...e,uuid:nt()};const n=e.children.map(r=>({...r,uuid:nt(),children:r.children.map(i=>({...i,uuid:nt(),children:i.children.map(a=>{var s;return{...a,uuid:nt(),...((s=a==null?void 0:a.children)==null?void 0:s.length)>0?{children:a.children.map(l=>{var c;return{...l,uuid:nt(),...((c=l.options)==null?void 0:c.length)>0?{options:l.options.map(u=>({...u,uuid:nt()}))}:{}}})}:{}}})}))}));return e={...e,children:n},e};function MG(t){return e=>{const n={...zm,uuid:nt(),title:{english:`Page ${t+1}`},children:[{...lf,uuid:nt(),children:[{...eu,uuid:nt(),children:[{...wc,uuid:nt(),children:[]}]}]}]};e({type:kC,payLoad:n})}}function LG(t){return e=>{const n=[];for(const[,i]of t.entries())for(const[,a]of i.children.entries())for(const[,s]of a.children.entries())for(const[,l]of s.children.entries())for(const[,c]of l.children.entries())s!=null&&s.rowIsRepeatable||n.push(c);e({type:JC,payLoad:{tableFields:n}})}}function BG(t,e){return(n,r)=>{const i=t;let a=_t.cloneDeep(i);const{layout:s}=r;a={...a,title:{english:`Page ${(s==null?void 0:s.length)+1}`}},a=PG(a),n({type:BC,payLoad:{page:a,pageIndex:e}})}}function VG(t,e){return n=>{n({type:QC,payLoad:{pageIndex:t,page:e}})}}function qG(t){return e=>{e({type:EC,payLoad:{pageIndex:t}})}}const TI=t=>{let e=t;e={...e,uuid:nt()};const n=e.children.map(r=>({...r,uuid:nt(),children:r.children.map(i=>{var a;return{...i,uuid:nt(),...((a=i==null?void 0:i.children)==null?void 0:a.length)>0?{children:i.children.map(s=>{var l;return{...s,uuid:nt(),...((l=s.options)==null?void 0:l.length)>0?{options:s.options.map(c=>({...c,uuid:nt()}))}:{}}})}:{}}})}));return e={...e,children:n},e};function UG(t,e){return n=>{n({type:IC,payLoad:{pageIndex:t,sectionIndex:e}})}}function $G(t){return e=>{const n={...lf,uuid:nt(),children:[{...eu,uuid:nt(),children:[{...wc,uuid:nt(),children:[]}]}]};e({type:PC,payLoad:{pageIndex:t,section:n}})}}function jG(t,e,n){return r=>{const i={type:FC,payLoad:{pageIndex:t,sectionIndex:e,section:_t.cloneDeep(n)}};r(i)}}function zG(t,e,n){return r=>{const i=t;let a=_t.cloneDeep(i);a=TI(a),r({type:VC,payLoad:{section:a,pageIndex:e,sectionIndex:n}})}}function HG(t,e){return n=>{const r=t;let i=_t.cloneDeep(r);i=TI(i),n({type:qC,payLoad:{section:i,pageIndex:e}})}}const YG=t=>{let e=t;e={...e,uuid:nt()};const n=e.children.map(r=>{var i;return{...r,uuid:nt(),...((i=r==null?void 0:r.children)==null?void 0:i.length)>0?{children:r.children.map(a=>{var s;return{...a,uuid:nt(),...((s=a.options)==null?void 0:s.length)>0?{options:a.options.map(l=>({...l,uuid:nt()}))}:{}}})}:{}}});return e={...e,children:n},e};function KG(t,e,n,r){return i=>{const a=t;let s=_t.cloneDeep(a);s=YG(s),i({type:UC,payLoad:{row:s,pageIndex:e,sectionIndex:n,rowIndex:r}})}}function XG(t,e,n,r){return i=>{i({type:A9,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,row:r}})}}function RG(t,e,n){return r=>{r({type:_C,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n}})}}function GG(t,e){return n=>{const r={...eu,uuid:nt(),isCollapsed:!1,children:[{...wc,uuid:nt(),children:[]}]};n({type:MC,payLoad:{pageIndex:t,sectionIndex:e,row:r}})}}function WG(t,e,n,r){return i=>{i({type:HC,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,fieldItem:r}})}}const QG=t=>{var r;let e=t;e={...e,uuid:nt()};const n=((r=e==null?void 0:e.children)==null?void 0:r.length)>0?e.children.map((i,a)=>{var s;return{...i,uuid:nt(),...((s=i.options)==null?void 0:s.length)>0?{options:i.options.map((l,c)=>({...l,uuid:nt()}))}:{}}}):[];return e={...e,children:n},e};function JG(t,e,n){return r=>{const i={...wc,uuid:nt(),children:[]};r({type:LC,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,column:i}})}}function ZG(t,e,n,r,i){return a=>{const s=t;let l=_t.cloneDeep(s);l=QG(l),a({type:$C,payLoad:{column:l,pageIndex:e,sectionIndex:n,rowIndex:r,columnIndex:i}})}}function eW(t,e,n,r){return i=>{i({type:DC,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r}})}}function EI(t,e,n,r){return i=>{i({type:A9,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,row:r}})}}function tW(t,e,n,r,i){return(a,s)=>{var g,v,m,A;const{layout:l,tableFields:c}=s;let u=(g=l[t])==null?void 0:g.children[e].children[n];const d=(A=(m=(v=l[t])==null?void 0:v.children[e])==null?void 0:m.children[n])==null?void 0:A.children[r].children[i];if((u==null?void 0:u.rowIsRepeatable)===!0){const w=[...u.repeatableFields],x=_t.findIndex(w,function(S){return S.uuid===(d==null?void 0:d.uuid)});w.splice(x,1),u={...u,repeatableFields:w},a(EI(t,e,n,u))}const f=_t.findIndex(c,function(w){return w.uuid===(d==null?void 0:d.uuid)});c.splice(f,1),a({type:NC,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i}})}}function nW(t,e,n,r,i,a){return(s,l)=>{var g,v,m,A;const{layout:c,tableFields:u}=l;let d=(g=c[t])==null?void 0:g.children[e].children[n];if((d==null?void 0:d.rowIsRepeatable)===!0){const w=(A=(m=(v=c[t])==null?void 0:v.children[e])==null?void 0:m.children[n])==null?void 0:A.children[r].children[i],x=[...d.repeatableFields],S=_t.findIndex(x,function(T){return T.uuid===(w==null?void 0:w.uuid)});S===-1?x.splice(i,0,a):x[S]=a,x[S]=a,d={...d,repeatableFields:x},s(EI(t,e,n,d))}const f={type:OC,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,field:a}},h=u.findIndex(w=>w.uuid===a.uuid);h>=0&&(u[h]=a),s(f)}}function rW(t,e,n,r,i,a){return s=>{var d;const l=t;let c=_t.cloneDeep(l);if(c={...c,uuid:nt()},c!=null&&c.options&&((d=c==null?void 0:c.options)==null?void 0:d.length)>0){const f=c==null?void 0:c.options.map(h=>({...h,uuid:nt()}));c={...c,options:f}}s({type:jC,payLoad:{field:c,pageIndex:e,sectionIndex:n,rowIndex:r,columnIndex:i,fieldIndex:a}})}}function iW(t,e,n,r,i,a,s,l){return c=>{c({type:YC,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,ruleIndex:a,conditionIndex:s,field:l}})}}function aW(t,e,n,r,i,a,s,l){return c=>{c({type:KC,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,gridColumnIndex:s,gridRowIndex:a,field:l}})}}function sW(t,e,n,r,i,a,s,l,c){return u=>{u({type:GC,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,gridRowIndex:a,gridColumnIndex:s,fieldChildrenIndex:l,field:c}})}}function oW(t,e,n,r,i,a,s,l){return c=>{c({type:WC,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,gridRowIndex:a,gridColumnIndex:s,fieldChildrenIndex:l}})}}function lW(t,e,n,r,i,a,s,l,c){return u=>{u({type:XC,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,ruleIndex:a,conditionIndex:s,inlineFieldIndex:l,field:c}})}}function cW(t,e,n,r,i,a,s,l){return c=>{c({type:RC,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,ruleIndex:a,conditionIndex:s,inlineFieldIndex:l}})}}function uW(t){return e=>{e({type:j1,payLoad:{formSchema:t}})}}function dW(t){return e=>{e({type:j1,payLoad:{layout:t}})}}function fW(t){return(e,n)=>{const{languages:r}=n,i={type:j1,payLoad:{languages:[...r,t]}};e(i)}}function hW(t){return(e,n)=>{const{languages:r}=n,i=_t.findIndex(r,l=>l.key===t.key),a=[...r];a.splice(i,1),e({type:j1,payLoad:{languages:a}})}}function pW(t){return e=>{const n={type:j1,payLoad:{userSelectedLanguage:t.value}};e(n)}}function gW(t){return e=>{e({type:Zg,payLoad:{formType:t}})}}function mW(t){return e=>{e({type:Zg,payLoad:t})}}function vW(t){return e=>{e({type:Zg,payLoad:{editing_by:t}})}}function bW(){return t=>{t({type:zC,payLoad:null})}}const r8={loading:!1,intro:"",editing_by:0,isChangesSaved:!1,enableReviewTask:!1,enableAutoSave:!1,enableAutoSaveBuilderSetting:!1,surveyQuestionSlide:!1,enableFormFluid:!0,showConditionalFields:!0,isAdvanceView:!1,models:[],fieldMappings:[],version_name:null,showIntroTab:!1,published_status:!1,formType:null,randomiseQuestions:!1,randomiseAnswers:!1,enableNoOfAssessmentQuestions:!1,noOfAssessmentQuestions:null,tableFields:[],tableConfiguration:{stripedRows:!1,gridLines:!1,flexScroll:!1,isResponsive:!1,rowReorder:!1},builderTemplateName:"",quizConfiguration:{quizPassMark:75,quizTimeLimit:2,quizMaxAttempts:99,quizSequentialAnswer:0,isAllCorrectMandatory:!0,quizRandomiseQuestions:1,quizUniqueAnswersPerAttempt:"1"},header:[],languages:[{key:1,language:"English",type:"english"}],userSelectedLanguage:{key:1,language:"English",type:"english"},layout:[{uuid:nt(),...zm,children:[{uuid:nt(),...lf,children:[{uuid:nt(),...eu,children:[{uuid:nt(),...wc,children:[]}]}]}]}],conditionalTabsRules:[],conditionalSectionsRules:[]},yW=(t=r8,e)=>{var n,r;switch(e.type){case tH:return{...t,...e.payLoad};case eH:return{...t,...e.payLoad};case zC:return{...t,...r8};case j1:return{...t,...e.payLoad};case Zg:return{...t,...e.payLoad};case EC:{const{pageIndex:i}=e.payLoad;return{...t,layout:t.layout.filter((a,s)=>s!==i)}}case kC:return{...t,layout:[...t.layout,e.payLoad]};case PC:{const{pageIndex:i,section:a}=e.payLoad,s=[...t.layout];return s[i].children=[...s[i].children,a],{...t,layout:s}}case HC:{const{pageIndex:i,sectionIndex:a,rowIndex:s,fieldItem:l}=e.payLoad,c=[...t.layout],u=Array.isArray((n=c[i].children[a].children[s])==null?void 0:n.repeatableFields)?[...((r=c[i].children[a].children[s])==null?void 0:r.repeatableFields)||[],l]:l?[l]:[];return c[i].children[a].children[s]={...c[i].children[a].children[s],repeatableFields:u},{...t,layout:c}}case nH:{const{fieldItem:i}=e.payLoad;let a=[...t.tableFields];return a=[...a,i],{...t,tableFields:a}}case JC:return{...t,...e.payLoad};case MC:{const{pageIndex:i,sectionIndex:a,row:s}=e.payLoad,l=[...t.layout];return l[i].children[a].children=[...l[i].children[a].children,s],{...t,layout:l}}case LC:{const{pageIndex:i,sectionIndex:a,rowIndex:s,column:l}=e.payLoad,c=[...t.layout];return c[i].children[a].children[s].children=[...c[i].children[a].children[s].children,l],{...t,layout:c}}case YC:{const{pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,fieldIndex:c,ruleIndex:u,conditionIndex:d,field:f}=e.payLoad,h=[...t.layout];return h[i].children[a].children[s].children[l].children[c].inlineConditionalRules.rules[u].conditions[d].children=[...h[i].children[a].children[s].children[l].children[c].inlineConditionalRules.rules[u].conditions[d].children,f],{...t,layout:h}}case KC:{const{pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,fieldIndex:c,gridRowIndex:u,gridColumnIndex:d,field:f}=e.payLoad,h=[...t.layout];return h[i].children[a].children[s].children[l].children[c].children.push({[`${u}-${d}`]:f}),{...t,layout:h}}case XC:{const{pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,fieldIndex:c,ruleIndex:u,conditionIndex:d,inlineFieldIndex:f,field:h}=e.payLoad,g=[...t.layout];return g[i].children[a].children[s].children[l].children[c].inlineConditionalRules.rules[u].conditions[d].children[f]=h,{...t,layout:g}}case GC:{const{pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,fieldIndex:c,gridRowIndex:u,gridColumnIndex:d,fieldChildrenIndex:f,field:h}=e.payLoad,g=[...t.layout];return g[i].children[a].children[s].children[l].children[c].children[f]={[`${u}-${d}`]:h},{...t,layout:g}}case RC:{const{pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,fieldIndex:c,ruleIndex:u,conditionIndex:d,inlineFieldIndex:f}=e.payLoad,h=[...t.layout];return h[i].children[a].children[s].children[l].children[c].inlineConditionalRules.rules[u].conditions[d].children.splice(f,1),{...t,layout:h}}case WC:{const{pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,fieldIndex:c,fieldChildrenIndex:u}=e.payLoad,d=[...t.layout];return d[i].children[a].children[s].children[l].children[c].children.splice(u,1),{...t,layout:d}}case IC:{const{pageIndex:i,sectionIndex:a}=e.payLoad,s=[...t.layout];return s[i].children.splice(a,1),{...t,layout:s}}case _C:{const{pageIndex:i,sectionIndex:a,rowIndex:s}=e.payLoad,l=[...t.layout];return l[i].children[a].children.splice(s,1),{...t,layout:l}}case DC:{const{pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l}=e.payLoad,c=[...t.layout];return c[i].children[a].children[s].children.splice(l,1),{...t,layout:c}}case NC:{const{pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,fieldIndex:c}=e.payLoad,u=[...t.layout];return u[i].children[a].children[s].children[l].children.splice(c,1),{...t,layout:u}}case OC:{const{pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,fieldIndex:c,field:u}=e.payLoad,d=[...t.layout];return d[i].children[a].children[s].children[l].children[c]=u,{...t,layout:d}}case FC:{const{pageIndex:i,sectionIndex:a,section:s}=e.payLoad,l=[...t.layout];return l[i].children[a]=s,{...t,layout:l}}case A9:{const{pageIndex:i,sectionIndex:a,rowIndex:s,row:l}=e.payLoad,c=[...t.layout];return c[i].children[a].children[s]=l,{...t,layout:c}}case QC:{const{pageIndex:i,page:a}=e.payLoad,s=[...t.layout];return s[i]=a,{...t,layout:s}}case BC:{const{page:i,pageIndex:a}=e.payLoad,s=[...t.layout];return s.splice(a+1,0,i),{...t,layout:s}}case VC:{const{section:i,pageIndex:a,sectionIndex:s}=e.payLoad,l=[...t.layout];return l[a].children.splice(s+1,0,i),{...t,layout:l}}case qC:{const{section:i,pageIndex:a}=e.payLoad,s=[...t.layout];return s[a].children.push(i),{...t,layout:s}}case UC:{const{row:i,pageIndex:a,sectionIndex:s,rowIndex:l}=e.payLoad,c=[...t.layout];return c[a].children[s].children.splice(l+1,0,i),{...t,layout:c}}case $C:{const{column:i,pageIndex:a,sectionIndex:s,rowIndex:l,columnIndex:c}=e.payLoad,u=[...t.layout];return u[a].children[s].children[l].children.splice(c+1,0,i),{...t,layout:u}}case jC:{const{field:i,pageIndex:a,sectionIndex:s,rowIndex:l,columnIndex:c,fieldIndex:u}=e.payLoad,d=[...t.layout];return d[a].children[s].children[l].children[c].children.splice(u+1,0,i),{...t,layout:d}}}return t},II=k.createContext({dragDropManager:void 0});function tu(t){"@babel/helpers - typeof";return tu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tu(t)}function AW(t,e){if(tu(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(tu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function wW(t){var e=AW(t,"string");return tu(e)=="symbol"?e:e+""}function SW(t,e,n){return(e=wW(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _I(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function DI(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?_I(Object(n),!0).forEach(function(r){SW(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_I(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ql(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var NI=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),i8=function(){return Math.random().toString(36).substring(7).split("").join(".")},OI={INIT:"@@redux/INIT"+i8(),REPLACE:"@@redux/REPLACE"+i8(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+i8()}};function CW(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function xW(t){if(t===void 0)return"undefined";if(t===null)return"null";var e=typeof t;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(t))return"array";if(IW(t))return"date";if(EW(t))return"error";var n=TW(t);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return e.slice(8,-1).toLowerCase().replace(/\s/g,"")}function TW(t){return typeof t.constructor=="function"?t.constructor.name:null}function EW(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function IW(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function cf(t){var e=typeof t;return process.env.NODE_ENV!=="production"&&(e=xW(t)),e}function FI(t,e,n){var r;if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?ql(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?ql(1):"Expected the enhancer to be a function. Instead, received: '"+cf(n)+"'");return n(FI)(t,e)}if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?ql(2):"Expected the root reducer to be a function. Instead, received: '"+cf(t)+"'");var i=t,a=e,s=[],l=s,c=!1;function u(){l===s&&(l=s.slice())}function d(){if(c)throw new Error(process.env.NODE_ENV==="production"?ql(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return a}function f(m){if(typeof m!="function")throw new Error(process.env.NODE_ENV==="production"?ql(4):"Expected the listener to be a function. Instead, received: '"+cf(m)+"'");if(c)throw new Error(process.env.NODE_ENV==="production"?ql(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var A=!0;return u(),l.push(m),function(){if(A){if(c)throw new Error(process.env.NODE_ENV==="production"?ql(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");A=!1,u();var x=l.indexOf(m);l.splice(x,1),s=null}}}function h(m){if(!CW(m))throw new Error(process.env.NODE_ENV==="production"?ql(7):"Actions must be plain objects. Instead, the actual type was: '"+cf(m)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof m.type>"u")throw new Error(process.env.NODE_ENV==="production"?ql(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(c)throw new Error(process.env.NODE_ENV==="production"?ql(9):"Reducers may not dispatch actions.");try{c=!0,a=i(a,m)}finally{c=!1}for(var A=s=l,w=0;w<A.length;w++){var x=A[w];x()}return m}function g(m){if(typeof m!="function")throw new Error(process.env.NODE_ENV==="production"?ql(10):"Expected the nextReducer to be a function. Instead, received: '"+cf(m));i=m,h({type:OI.REPLACE})}function v(){var m,A=f;return m={subscribe:function(x){if(typeof x!="object"||x===null)throw new Error(process.env.NODE_ENV==="production"?ql(11):"Expected the observer to be an object. Instead, received: '"+cf(x)+"'");function S(){x.next&&x.next(d())}S();var T=A(S);return{unsubscribe:T}}},m[NI]=function(){return this},m}return h({type:OI.INIT}),r={dispatch:h,subscribe:f,getState:d,replaceReducer:g},r[NI]=v,r}function Hr(t,e,...n){if(_W()&&e===void 0)throw new Error("invariant requires an error message argument");if(!t){let r;if(e===void 0)r=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let i=0;r=new Error(e.replace(/%s/g,function(){return n[i++]})),r.name="Invariant Violation"}throw r.framesToPop=1,r}}function _W(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function DW(t,e,n){return e.split(".").reduce((r,i)=>r&&r[i]?r[i]:n||null,t)}function NW(t,e){return t.filter(n=>n!==e)}function kI(t){return typeof t=="object"}function OW(t,e){const n=new Map,r=a=>{n.set(a,n.has(a)?n.get(a)+1:1)};t.forEach(r),e.forEach(r);const i=[];return n.forEach((a,s)=>{a===1&&i.push(s)}),i}function FW(t,e){return t.filter(n=>e.indexOf(n)>-1)}const a8="dnd-core/INIT_COORDS",Hm="dnd-core/BEGIN_DRAG",s8="dnd-core/PUBLISH_DRAG_SOURCE",Ym="dnd-core/HOVER",Km="dnd-core/DROP",Xm="dnd-core/END_DRAG";function PI(t,e){return{type:a8,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}const kW={type:a8,payload:{clientOffset:null,sourceClientOffset:null}};function PW(t){return function(n=[],r={publishSource:!0}){const{publishSource:i=!0,clientOffset:a,getSourceClientOffset:s}=r,l=t.getMonitor(),c=t.getRegistry();t.dispatch(PI(a)),MW(n,l,c);const u=VW(n,l);if(u==null){t.dispatch(kW);return}let d=null;if(a){if(!s)throw new Error("getSourceClientOffset must be defined");LW(s),d=s(u)}t.dispatch(PI(a,d));const h=c.getSource(u).beginDrag(l,u);if(h==null)return;BW(h),c.pinSource(u);const g=c.getSourceType(u);return{type:Hm,payload:{itemType:g,item:h,sourceId:u,clientOffset:a||null,sourceClientOffset:d||null,isSourcePublic:!!i}}}}function MW(t,e,n){Hr(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(r){Hr(n.getSource(r),"Expected sourceIds to be registered.")})}function LW(t){Hr(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function BW(t){Hr(kI(t),"Item must be an object.")}function VW(t,e){let n=null;for(let r=t.length-1;r>=0;r--)if(e.canDragSource(t[r])){n=t[r];break}return n}function qW(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function UW(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){qW(t,i,n[i])})}return t}function $W(t){return function(n={}){const r=t.getMonitor(),i=t.getRegistry();jW(r),YW(r).forEach((s,l)=>{const c=zW(s,l,i,r),u={type:Km,payload:{dropResult:UW({},n,c)}};t.dispatch(u)})}}function jW(t){Hr(t.isDragging(),"Cannot call drop while not dragging."),Hr(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function zW(t,e,n,r){const i=n.getTarget(t);let a=i?i.drop(r,t):void 0;return HW(a),typeof a>"u"&&(a=e===0?{}:r.getDropResult()),a}function HW(t){Hr(typeof t>"u"||kI(t),"Drop result must either be an object or undefined.")}function YW(t){const e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function KW(t){return function(){const n=t.getMonitor(),r=t.getRegistry();XW(n);const i=n.getSourceId();return i!=null&&(r.getSource(i,!0).endDrag(n,i),r.unpinSource()),{type:Xm}}}function XW(t){Hr(t.isDragging(),"Cannot call endDrag while not dragging.")}function o8(t,e){return e===null?t===null:Array.isArray(t)?t.some(n=>n===e):t===e}function RW(t){return function(n,{clientOffset:r}={}){GW(n);const i=n.slice(0),a=t.getMonitor(),s=t.getRegistry(),l=a.getItemType();return QW(i,s,l),WW(i,a,s),JW(i,a,s),{type:Ym,payload:{targetIds:i,clientOffset:r||null}}}}function GW(t){Hr(Array.isArray(t),"Expected targetIds to be an array.")}function WW(t,e,n){Hr(e.isDragging(),"Cannot call hover while not dragging."),Hr(!e.didDrop(),"Cannot call hover after drop.");for(let r=0;r<t.length;r++){const i=t[r];Hr(t.lastIndexOf(i)===r,"Expected targetIds to be unique in the passed array.");const a=n.getTarget(i);Hr(a,"Expected targetIds to be registered.")}}function QW(t,e,n){for(let r=t.length-1;r>=0;r--){const i=t[r],a=e.getTargetType(i);o8(a,n)||t.splice(r,1)}}function JW(t,e,n){t.forEach(function(r){n.getTarget(r).hover(e,r)})}function ZW(t){return function(){if(t.getMonitor().isDragging())return{type:s8}}}function eQ(t){return{beginDrag:PW(t),publishDragSource:ZW(t),hover:RW(t),drop:$W(t),endDrag:KW(t)}}class tQ{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:n}=this.store;function r(a){return(...s)=>{const l=a.apply(e,s);typeof l<"u"&&n(l)}}const i=eQ(this);return Object.keys(i).reduce((a,s)=>{const l=i[s];return a[s]=r(l),a},{})}dispatch(e){this.store.dispatch(e)}constructor(e,n){this.isSetUp=!1,this.handleRefCountChange=()=>{const r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=n,e.subscribe(this.handleRefCountChange)}}function nQ(t,e){return{x:t.x+e.x,y:t.y+e.y}}function MI(t,e){return{x:t.x-e.x,y:t.y-e.y}}function rQ(t){const{clientOffset:e,initialClientOffset:n,initialSourceClientOffset:r}=t;return!e||!n||!r?null:MI(nQ(e,r),n)}function iQ(t){const{clientOffset:e,initialClientOffset:n}=t;return!e||!n?null:MI(e,n)}const Ap=[],l8=[];Ap.__IS_NONE__=!0,l8.__IS_ALL__=!0;function aQ(t,e){return t===Ap?!1:t===l8||typeof e>"u"?!0:FW(e,t).length>0}class sQ{subscribeToStateChange(e,n={}){const{handlerIds:r}=n;Hr(typeof e=="function","listener must be a function."),Hr(typeof r>"u"||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let i=this.store.getState().stateId;const a=()=>{const s=this.store.getState(),l=s.stateId;try{l===i||l===i+1&&!aQ(s.dirtyHandlerIds,r)||e()}finally{i=l}};return this.store.subscribe(a)}subscribeToOffsetChange(e){Hr(typeof e=="function","listener must be a function.");let n=this.store.getState().dragOffset;const r=()=>{const i=this.store.getState().dragOffset;i!==n&&(n=i,e())};return this.store.subscribe(r)}canDragSource(e){if(!e)return!1;const n=this.registry.getSource(e);return Hr(n,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:n.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const n=this.registry.getTarget(e);if(Hr(n,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;const r=this.registry.getTargetType(e),i=this.getItemType();return o8(r,i)&&n.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;const n=this.registry.getSource(e,!0);if(Hr(n,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;const r=this.registry.getSourceType(e),i=this.getItemType();return r!==i?!1:n.isDragging(this,e)}isOverTarget(e,n={shallow:!1}){if(!e)return!1;const{shallow:r}=n;if(!this.isDragging())return!1;const i=this.registry.getTargetType(e),a=this.getItemType();if(a&&!o8(i,a))return!1;const s=this.getTargetIds();if(!s.length)return!1;const l=s.indexOf(e);return r?l===s.length-1:l>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return rQ(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return iQ(this.store.getState().dragOffset)}constructor(e,n){this.store=e,this.registry=n}}const LI=typeof global<"u"?global:self,BI=LI.MutationObserver||LI.WebKitMutationObserver;function VI(t){return function(){const n=setTimeout(i,0),r=setInterval(i,50);function i(){clearTimeout(n),clearInterval(r),t()}}}function oQ(t){let e=1;const n=new BI(t),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){e=-e,r.data=e}}const lQ=typeof BI=="function"?oQ:VI;class cQ{enqueueTask(e){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const n=this.index;if(this.index++,e[n].call(),this.index>this.capacity){for(let r=0,i=e.length-this.index;r<i;r++)e[r]=e[r+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=lQ(this.flush),this.requestErrorThrow=VI(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class uQ{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,n){this.onError=e,this.release=n,this.task=null}}class dQ{create(e){const n=this.freeTasks,r=n.length?n.pop():new uQ(this.onError,i=>n[n.length]=i);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}const qI=new cQ,fQ=new dQ(qI.registerPendingError);function hQ(t){qI.enqueueTask(fQ.create(t))}const c8="dnd-core/ADD_SOURCE",u8="dnd-core/ADD_TARGET",d8="dnd-core/REMOVE_SOURCE",Rm="dnd-core/REMOVE_TARGET";function pQ(t){return{type:c8,payload:{sourceId:t}}}function gQ(t){return{type:u8,payload:{targetId:t}}}function mQ(t){return{type:d8,payload:{sourceId:t}}}function vQ(t){return{type:Rm,payload:{targetId:t}}}function bQ(t){Hr(typeof t.canDrag=="function","Expected canDrag to be a function."),Hr(typeof t.beginDrag=="function","Expected beginDrag to be a function."),Hr(typeof t.endDrag=="function","Expected endDrag to be a function.")}function yQ(t){Hr(typeof t.canDrop=="function","Expected canDrop to be a function."),Hr(typeof t.hover=="function","Expected hover to be a function."),Hr(typeof t.drop=="function","Expected beginDrag to be a function.")}function f8(t,e){if(e&&Array.isArray(t)){t.forEach(n=>f8(n,!1));return}Hr(typeof t=="string"||typeof t=="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var Ul;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(Ul||(Ul={}));let AQ=0;function wQ(){return AQ++}function SQ(t){const e=wQ().toString();switch(t){case Ul.SOURCE:return`S${e}`;case Ul.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${t}`)}}function UI(t){switch(t[0]){case"S":return Ul.SOURCE;case"T":return Ul.TARGET;default:throw new Error(`Cannot parse handler ID: ${t}`)}}function $I(t,e){const n=t.entries();let r=!1;do{const{done:i,value:[,a]}=n.next();if(a===e)return!0;r=!!i}while(!r);return!1}class CQ{addSource(e,n){f8(e),bQ(n);const r=this.addHandler(Ul.SOURCE,e,n);return this.store.dispatch(pQ(r)),r}addTarget(e,n){f8(e,!0),yQ(n);const r=this.addHandler(Ul.TARGET,e,n);return this.store.dispatch(gQ(r)),r}containsHandler(e){return $I(this.dragSources,e)||$I(this.dropTargets,e)}getSource(e,n=!1){return Hr(this.isSourceId(e),"Expected a valid source ID."),n&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return Hr(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return Hr(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return Hr(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return UI(e)===Ul.SOURCE}isTargetId(e){return UI(e)===Ul.TARGET}removeSource(e){Hr(this.getSource(e),"Expected an existing source."),this.store.dispatch(mQ(e)),hQ(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){Hr(this.getTarget(e),"Expected an existing target."),this.store.dispatch(vQ(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const n=this.getSource(e);Hr(n,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=n}unpinSource(){Hr(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,n,r){const i=SQ(e);return this.types.set(i,n),e===Ul.SOURCE?this.dragSources.set(i,r):e===Ul.TARGET&&this.dropTargets.set(i,r),i}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const xQ=(t,e)=>t===e;function TQ(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function EQ(t,e,n=xQ){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!n(t[r],e[r]))return!1;return!0}function IQ(t=Ap,e){switch(e.type){case Ym:break;case c8:case u8:case Rm:case d8:return Ap;case Hm:case s8:case Xm:case Km:default:return l8}const{targetIds:n=[],prevTargetIds:r=[]}=e.payload,i=OW(n,r);if(!(i.length>0||!EQ(n,r)))return Ap;const s=r[r.length-1],l=n[n.length-1];return s!==l&&(s&&i.push(s),l&&i.push(l)),i}function _Q(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function DQ(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){_Q(t,i,n[i])})}return t}const jI={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function NQ(t=jI,e){const{payload:n}=e;switch(e.type){case a8:case Hm:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case Ym:return TQ(t.clientOffset,n.clientOffset)?t:DQ({},t,{clientOffset:n.clientOffset});case Xm:case Km:return jI;default:return t}}function OQ(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function uf(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){OQ(t,i,n[i])})}return t}const FQ={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function kQ(t=FQ,e){const{payload:n}=e;switch(e.type){case Hm:return uf({},t,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case s8:return uf({},t,{isSourcePublic:!0});case Ym:return uf({},t,{targetIds:n.targetIds});case Rm:return t.targetIds.indexOf(n.targetId)===-1?t:uf({},t,{targetIds:NW(t.targetIds,n.targetId)});case Km:return uf({},t,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Xm:return uf({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function PQ(t=0,e){switch(e.type){case c8:case u8:return t+1;case d8:case Rm:return t-1;default:return t}}function MQ(t=0){return t+1}function LQ(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function BQ(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){LQ(t,i,n[i])})}return t}function VQ(t={},e){return{dirtyHandlerIds:IQ(t.dirtyHandlerIds,{type:e.type,payload:BQ({},e.payload,{prevTargetIds:DW(t,"dragOperation.targetIds",[])})}),dragOffset:NQ(t.dragOffset,e),refCount:PQ(t.refCount,e),dragOperation:kQ(t.dragOperation,e),stateId:MQ(t.stateId)}}function qQ(t,e=void 0,n={},r=!1){const i=UQ(r),a=new sQ(i,new CQ(i)),s=new tQ(i,a),l=t(s,e,n);return s.receiveBackend(l),s}function UQ(t){const e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return FI(VQ,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}function $Q(t,e){if(t==null)return{};var n=jQ(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function jQ(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}let zI=0;const Gm=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var wp=k.memo(function(e){var{children:n}=e,r=$Q(e,["children"]);const[i,a]=zQ(r);return k.useEffect(()=>{if(a){const s=HI();return++zI,()=>{--zI===0&&(s[Gm]=null)}}},[]),o.jsx(II.Provider,{value:i,children:n})});function zQ(t){if("manager"in t)return[{dragDropManager:t.manager},!1];const e=HQ(t.backend,t.context,t.options,t.debugMode),n=!t.context;return[e,n]}function HQ(t,e=HI(),n,r){const i=e;return i[Gm]||(i[Gm]={dragDropManager:qQ(t,e,n,r)}),i[Gm]}function HI(){return typeof global<"u"?global:window}var YI=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(a=Object.keys(e),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var s=a[i];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n};const YQ=zs(YI),$0=typeof window<"u"?k.useLayoutEffect:k.useEffect;function KQ(t,e,n){const[r,i]=k.useState(()=>e(t)),a=k.useCallback(()=>{const s=e(t);YQ(r,s)||(i(s),n&&n())},[r,t,n]);return $0(a),[r,a]}function XQ(t,e,n){const[r,i]=KQ(t,e,n);return $0(function(){const s=t.getHandlerId();if(s!=null)return t.subscribeToStateChange(i,{handlerIds:[s]})},[t,i]),r}function KI(t,e,n){return XQ(e,t||(()=>({})),()=>n.reconnect())}function XI(t,e){const n=[];return typeof t!="function"&&n.push(t),k.useMemo(()=>typeof t=="function"?t():t,n)}function RQ(t){return k.useMemo(()=>t.hooks.dragSource(),[t])}function GQ(t){return k.useMemo(()=>t.hooks.dragPreview(),[t])}let h8=!1,p8=!1;class WQ{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){Hr(!h8,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return h8=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{h8=!1}}isDragging(){if(!this.sourceId)return!1;Hr(!p8,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return p8=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{p8=!1}}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,n){return this.internalMonitor.isOverTarget(e,n)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let g8=!1;class QQ{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}canDrop(){if(!this.targetId)return!1;Hr(!g8,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return g8=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{g8=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function JQ(t,e,n){const r=n.getRegistry(),i=r.addTarget(t,e);return[i,()=>r.removeTarget(i)]}function ZQ(t,e,n){const r=n.getRegistry(),i=r.addSource(t,e);return[i,()=>r.removeSource(i)]}function m8(t,e,n,r){let i;if(i!==void 0)return!!i;if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;const a=Object.keys(t),s=Object.keys(e);if(a.length!==s.length)return!1;const l=Object.prototype.hasOwnProperty.bind(e);for(let c=0;c<a.length;c++){const u=a[c];if(!l(u))return!1;const d=t[u],f=e[u];if(i=void 0,i===!1||i===void 0&&d!==f)return!1}return!0}function v8(t){return t!==null&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function eJ(t){if(typeof t.type=="string")return;const e=t.type.displayName||t.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${e} into a <div>, or turn it into a drag source or a drop target itself.`)}function tJ(t){return(e=null,n=null)=>{if(!k.isValidElement(e)){const a=e;return t(a,n),a}const r=e;return eJ(r),nJ(r,n?a=>t(a,n):t)}}function RI(t){const e={};return Object.keys(t).forEach(n=>{const r=t[n];if(n.endsWith("Ref"))e[n]=t[n];else{const i=tJ(r);e[n]=()=>i}}),e}function GI(t,e){typeof t=="function"?t(e):t.current=e}function nJ(t,e){const n=t.ref;return Hr(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?k.cloneElement(t,{ref:r=>{GI(n,r),GI(e,r)}}):k.cloneElement(t,{ref:e})}class rJ{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,n=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return n&&this.disconnectDragSource(),this.handlerId?e?(n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),n):(this.lastConnectedDragSource=e,n):n}reconnectDragPreview(e=!1){const n=this.dragPreview,r=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!m8(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!m8(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=RI({dragSource:(n,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,v8(n)?this.dragSourceRef=n:this.dragSourceNode=n,this.reconnectDragSource()},dragPreview:(n,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,v8(n)?this.dragPreviewRef=n:this.dragPreviewNode=n,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}class iJ{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const n=this.dropTarget;if(this.handlerId){if(!n){this.lastConnectedDropTarget=n;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=n,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,n,this.dropTargetOptions))}}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!m8(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=RI({dropTarget:(n,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,v8(n)?this.dropTargetRef=n:this.dropTargetNode=n,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function df(){const{dragDropManager:t}=k.useContext(II);return Hr(t!=null,"Expected drag drop context"),t}function aJ(t,e){const n=df(),r=k.useMemo(()=>new rJ(n.getBackend()),[n]);return $0(()=>(r.dragSourceOptions=t||null,r.reconnect(),()=>r.disconnectDragSource()),[r,t]),$0(()=>(r.dragPreviewOptions=e||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,e]),r}function sJ(){const t=df();return k.useMemo(()=>new WQ(t),[t])}class oJ{beginDrag(){const e=this.spec,n=this.monitor;let r=null;return typeof e.item=="object"?r=e.item:typeof e.item=="function"?r=e.item(n):r={},r??null}canDrag(){const e=this.spec,n=this.monitor;return typeof e.canDrag=="boolean"?e.canDrag:typeof e.canDrag=="function"?e.canDrag(n):!0}isDragging(e,n){const r=this.spec,i=this.monitor,{isDragging:a}=r;return a?a(i):n===e.getSourceId()}endDrag(){const e=this.spec,n=this.monitor,r=this.connector,{end:i}=e;i&&i(n.getItem(),n),r.reconnect()}constructor(e,n,r){this.spec=e,this.monitor=n,this.connector=r}}function lJ(t,e,n){const r=k.useMemo(()=>new oJ(t,e,n),[e,n]);return k.useEffect(()=>{r.spec=t},[t]),r}function cJ(t){return k.useMemo(()=>{const e=t.type;return Hr(e!=null,"spec.type must be defined"),e},[t])}function uJ(t,e,n){const r=df(),i=lJ(t,e,n),a=cJ(t);$0(function(){if(a!=null){const[l,c]=ZQ(a,i,r);return e.receiveHandlerId(l),n.receiveHandlerId(l),c}},[r,e,n,i,a])}function ra(t,e){const n=XI(t);Hr(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=sJ(),i=aJ(n.options,n.previewOptions);return uJ(n,r,i),[KI(n.collect,r,i),RQ(i),GQ(i)]}function dJ(t){return k.useMemo(()=>t.hooks.dropTarget(),[t])}function fJ(t){const e=df(),n=k.useMemo(()=>new iJ(e.getBackend()),[e]);return $0(()=>(n.dropTargetOptions=t||null,n.reconnect(),()=>n.disconnectDropTarget()),[t]),n}function hJ(){const t=df();return k.useMemo(()=>new QQ(t),[t])}function pJ(t){const{accept:e}=t;return k.useMemo(()=>(Hr(t.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]),[e])}class gJ{canDrop(){const e=this.spec,n=this.monitor;return e.canDrop?e.canDrop(n.getItem(),n):!0}hover(){const e=this.spec,n=this.monitor;e.hover&&e.hover(n.getItem(),n)}drop(){const e=this.spec,n=this.monitor;if(e.drop)return e.drop(n.getItem(),n)}constructor(e,n){this.spec=e,this.monitor=n}}function mJ(t,e){const n=k.useMemo(()=>new gJ(t,e),[e]);return k.useEffect(()=>{n.spec=t},[t]),n}function vJ(t,e,n){const r=df(),i=mJ(t,e),a=pJ(t);$0(function(){const[l,c]=JQ(a,i,r);return e.receiveHandlerId(l),n.receiveHandlerId(l),c},[r,e,i,n,a.map(s=>s.toString()).join("|")])}function bJ(t,e){const n=XI(t),r=hJ(),i=fJ(n.options);return vJ(n,r,i),[KI(n.collect,r,i),dJ(i)]}function WI(t){let e=null;return()=>(e==null&&(e=t()),e)}function yJ(t,e){return t.filter(n=>n!==e)}function AJ(t,e){const n=new Set,r=a=>n.add(a);t.forEach(r),e.forEach(r);const i=[];return n.forEach(a=>i.push(a)),i}class wJ{enter(e){const n=this.entered.length,r=i=>this.isNodeInDocument(i)&&(!i.contains||i.contains(e));return this.entered=AJ(this.entered.filter(r),[e]),n===0&&this.entered.length>0}leave(e){const n=this.entered.length;return this.entered=yJ(this.entered.filter(this.isNodeInDocument),e),n>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class SJ{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){const n={};Object.keys(this.config.exposeProperties).forEach(r=>{const i=this.config.exposeProperties[r];i!=null&&(n[r]={value:i(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,n)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,n){return n===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const QI="__NATIVE_FILE__",JI="__NATIVE_URL__",ZI="__NATIVE_TEXT__",e_="__NATIVE_HTML__",t_=Object.freeze(Object.defineProperty({__proto__:null,FILE:QI,HTML:e_,TEXT:ZI,URL:JI},Symbol.toStringTag,{value:"Module"}));function b8(t,e,n){const r=e.reduce((i,a)=>i||t.getData(a),"");return r??n}const y8={[QI]:{exposeProperties:{files:t=>Array.prototype.slice.call(t.files),items:t=>t.items,dataTransfer:t=>t},matchesTypes:["Files"]},[e_]:{exposeProperties:{html:(t,e)=>b8(t,e,""),dataTransfer:t=>t},matchesTypes:["Html","text/html"]},[JI]:{exposeProperties:{urls:(t,e)=>b8(t,e,"").split(`
1594
- `),dataTransfer:t=>t},matchesTypes:["Url","text/uri-list"]},[ZI]:{exposeProperties:{text:(t,e)=>b8(t,e,""),dataTransfer:t=>t},matchesTypes:["Text","text/plain"]}};function CJ(t,e){const n=y8[t];if(!n)throw new Error(`native type ${t} has no configuration`);const r=new SJ(n);return r.loadDataTransfer(e),r}function A8(t){if(!t)return null;const e=Array.prototype.slice.call(t.types||[]);return Object.keys(y8).filter(n=>{const r=y8[n];return r!=null&&r.matchesTypes?r.matchesTypes.some(i=>e.indexOf(i)>-1):!1})[0]||null}const xJ=WI(()=>/firefox/i.test(navigator.userAgent)),n_=WI(()=>!!window.safari);class r_{interpolate(e){const{xs:n,ys:r,c1s:i,c2s:a,c3s:s}=this;let l=n.length-1;if(e===n[l])return r[l];let c=0,u=s.length-1,d;for(;c<=u;){d=Math.floor(.5*(c+u));const g=n[d];if(g<e)c=d+1;else if(g>e)u=d-1;else return r[d]}l=Math.max(0,u);const f=e-n[l],h=f*f;return r[l]+i[l]*f+a[l]*h+s[l]*f*h}constructor(e,n){const{length:r}=e,i=[];for(let g=0;g<r;g++)i.push(g);i.sort((g,v)=>e[g]<e[v]?-1:1);const a=[],s=[];let l,c;for(let g=0;g<r-1;g++)l=e[g+1]-e[g],c=n[g+1]-n[g],a.push(l),s.push(c/l);const u=[s[0]];for(let g=0;g<a.length-1;g++){const v=s[g],m=s[g+1];if(v*m<=0)u.push(0);else{l=a[g];const A=a[g+1],w=l+A;u.push(3*w/((w+A)/v+(w+l)/m))}}u.push(s[s.length-1]);const d=[],f=[];let h;for(let g=0;g<u.length-1;g++){h=s[g];const v=u[g],m=1/a[g],A=v+u[g+1]-h-h;d.push((h-v-A)*m),f.push(A*m*m)}this.xs=e,this.ys=n,this.c1s=u,this.c2s=d,this.c3s=f}}const TJ=1;function i_(t){const e=t.nodeType===TJ?t:t.parentElement;if(!e)return null;const{top:n,left:r}=e.getBoundingClientRect();return{x:r,y:n}}function Wm(t){return{x:t.clientX,y:t.clientY}}function EJ(t){var e;return t.nodeName==="IMG"&&(xJ()||!(!((e=document.documentElement)===null||e===void 0)&&e.contains(t)))}function IJ(t,e,n,r){let i=t?e.width:n,a=t?e.height:r;return n_()&&t&&(a/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:a}}function _J(t,e,n,r,i){const a=EJ(e),l=i_(a?t:e),c={x:n.x-l.x,y:n.y-l.y},{offsetWidth:u,offsetHeight:d}=t,{anchorX:f,anchorY:h}=r,{dragPreviewWidth:g,dragPreviewHeight:v}=IJ(a,e,u,d),m=()=>{let E=new r_([0,.5,1],[c.y,c.y/d*v,c.y+v-d]).interpolate(h);return n_()&&a&&(E+=(window.devicePixelRatio-1)*v),E},A=()=>new r_([0,.5,1],[c.x,c.x/u*g,c.x+g-u]).interpolate(f),{offsetX:w,offsetY:x}=i,S=w===0||w,T=x===0||x;return{x:S?w:A(),y:T?x:m()}}class DJ{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var e;return!((e=this.globalContext)===null||e===void 0)&&e.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return((e=this.optionsArgs)===null||e===void 0?void 0:e.rootElement)||this.window}constructor(e,n){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=n}}function NJ(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a_(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){NJ(t,i,n[i])})}return t}class OJ{profile(){var e,n;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)===null||e===void 0?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((n=this.dragOverTargetIds)===null||n===void 0?void 0:n.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var n;(n=this.window)===null||n===void 0||n.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,n,r){return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,n),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,n,r){this.sourceNodes.set(e,n),this.sourceNodeOptions.set(e,r);const i=s=>this.handleDragStart(s,e),a=s=>this.handleSelectStart(s);return n.setAttribute("draggable","true"),n.addEventListener("dragstart",i),n.addEventListener("selectstart",a),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),n.removeEventListener("dragstart",i),n.removeEventListener("selectstart",a),n.setAttribute("draggable","false")}}connectDropTarget(e,n){const r=s=>this.handleDragEnter(s,e),i=s=>this.handleDragOver(s,e),a=s=>this.handleDrop(s,e);return n.addEventListener("dragenter",r),n.addEventListener("dragover",i),n.addEventListener("drop",a),()=>{n.removeEventListener("dragenter",r),n.removeEventListener("dragover",i),n.removeEventListener("drop",a)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourceNodeOptions.get(e);return a_({dropEffect:this.altKeyPressed?"copy":"move"},n||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourcePreviewNodeOptions.get(e);return a_({anchorX:.5,anchorY:.5,captureDraggingState:!1},n||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(t_).some(n=>t_[n]===e)}beginDragNativeItem(e,n){this.clearCurrentDragSourceNode(),this.currentNativeSource=CJ(e,n),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;const n=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var r;return(r=this.rootElement)===null||r===void 0?void 0:r.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},n)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)===null||e===void 0||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,n){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(n))}handleDragEnter(e,n){this.dragEnterTargetIds.unshift(n)}handleDragOver(e,n){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(n)}handleDrop(e,n){this.dropTargetIds.unshift(n)}constructor(e,n,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=i=>{const a=this.sourceNodes.get(i);return a&&i_(a)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=i=>!!(i&&this.document&&this.document.body&&this.document.body.contains(i)),this.endDragIfSourceWasRemovedFromDOM=()=>{const i=this.currentDragSourceNode;i==null||this.isNodeInDocument(i)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=i=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(i||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=i=>{if(i.defaultPrevented)return;const{dragStartSourceIds:a}=this;this.dragStartSourceIds=null;const s=Wm(i);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(a||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:s});const{dataTransfer:l}=i,c=A8(l);if(this.monitor.isDragging()){if(l&&typeof l.setDragImage=="function"){const d=this.monitor.getSourceId(),f=this.sourceNodes.get(d),h=this.sourcePreviewNodes.get(d)||f;if(h){const{anchorX:g,anchorY:v,offsetX:m,offsetY:A}=this.getCurrentSourcePreviewNodeOptions(),S=_J(f,h,s,{anchorX:g,anchorY:v},{offsetX:m,offsetY:A});l.setDragImage(h,S.x,S.y)}}try{l==null||l.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(i.target);const{captureDraggingState:u}=this.getCurrentSourcePreviewNodeOptions();u?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(c)this.beginDragNativeItem(c);else{if(l&&!l.types&&(i.target&&!i.target.hasAttribute||!i.target.hasAttribute("draggable")))return;i.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=i=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var a;(a=this.currentNativeSource)===null||a===void 0||a.loadDataTransfer(i.dataTransfer)}if(!this.enterLeaveCounter.enter(i.target)||this.monitor.isDragging())return;const{dataTransfer:l}=i,c=A8(l);c&&this.beginDragNativeItem(c,l)},this.handleTopDragEnter=i=>{const{dragEnterTargetIds:a}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=i.altKey,a.length>0&&this.actions.hover(a,{clientOffset:Wm(i)}),a.some(l=>this.monitor.canDropOnTarget(l))&&(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=i=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var a;(a=this.currentNativeSource)===null||a===void 0||a.loadDataTransfer(i.dataTransfer)}},this.handleTopDragOver=i=>{const{dragOverTargetIds:a}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none");return}this.altKeyPressed=i.altKey,this.lastClientOffset=Wm(i),this.scheduleHover(a),(a||[]).some(l=>this.monitor.canDropOnTarget(l))?(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?i.preventDefault():(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=i=>{this.isDraggingNativeItem()&&i.preventDefault(),this.enterLeaveCounter.leave(i.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=i=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var a;i.preventDefault(),(a=this.currentNativeSource)===null||a===void 0||a.loadDataTransfer(i.dataTransfer)}else A8(i.dataTransfer)&&i.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=i=>{const{dropTargetIds:a}=this;this.dropTargetIds=[],this.actions.hover(a,{clientOffset:Wm(i)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=i=>{const a=i.target;typeof a.dragDrop=="function"&&(a.tagName==="INPUT"||a.tagName==="SELECT"||a.tagName==="TEXTAREA"||a.isContentEditable||(i.preventDefault(),a.dragDrop()))},this.options=new DJ(n,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new wJ(this.isNodeInDocument)}}const Sp=function(e,n,r){return new OJ(e,n,r)},s_=k.createContext(void 0),o_=({children:t,option:e,saveFormBuilderSchema:n,templateSchema:r,onChange:i,isHTML5BackendDisabled:a=!1})=>{const{isPreview:s,isAdmin:l,isRenderView:c,isBuilderMode:u,renderType:d,isAdvanceView:f,globalAlignment:h="ltr",emitSocketData:g,media:v,exam:m={},reusableComponent:A,saveFormProgress:w,showSettings:x,training:S,fileUploadParams:T}=e,C={...r8,formType:d,...r},[E,_]=k.useReducer(yW,C);return k.useEffect(()=>{const M=_t.debounce(()=>{n&&n(E)},1e3);return M(),()=>M.cancel()},[E,n]),o.jsx(s_.Provider,{value:{media:v,isBuilderMode:u,isPreview:s,isAdmin:l,isRenderView:c,renderType:d,isAdvanceView:f,globalAlignment:h,exam:m,emitSocketData:g,reusableComponent:A,state:E,dispatch:_,onChange:i,saveFormProgress:w,showSettings:x,training:S,fileUploadParams:T},children:a?o.jsx(o.Fragment,{children:t}):o.jsx(wp,{backend:Sp,children:t})})},l_=()=>k.useContext(s_),FJ=(t,e,n)=>{const r=Array.from(t),[i]=r.splice(e,1);return r.splice(n,0,i),r},kJ=(t,e)=>[...t.slice(0,e),...t.slice(e+1)],PJ=(t,e,n)=>[...t.slice(0,e),n,...t.slice(e)],c_=(t,e,n)=>{if(e.length===1){const c=Number(e[0]),u=Number(n[0]);return FJ(t,u,c)}const r=[...t],i=Number(e.slice(0,1)),a=e.slice(1),s=n.slice(1),l=r[i];return r[i]={...l,children:c_(l.children,a,s)},r},u_=(t,e)=>{if(e.length===1){const s=Number(e[0]);return kJ(t,s)}const n=[...t],r=Number(e.slice(0,1)),i=e.slice(1),a=n[r];return n[r]={...a,children:u_(a.children,i)},n},w8=(t,e,n)=>{if(e.length===1){const l=Number(e[0]);return PJ(t,l,n)}const r=[...t],i=Number(e.slice(0,1)),a=e.slice(1),s=r[i];return r[i]={...s,children:w8(s.children,a,n)},r},MJ=(t,e,n)=>{let r=[...t],i=r[n[fa]].children[n[ha]].children[n[Ca]].children[n[xa]].children[n[Ta]].inlineConditionalRules.rules[n[Fa]].conditions[n[Xo]].children[n[wo]];return r[n[fa]].children[n[ha]].children[n[Ca]].children[n[xa]].children[n[Ta]].inlineConditionalRules.rules[n[Fa]].conditions[n[Xo]].children.splice([n[wo]],1),r[e[fa]].children[e[ha]].children[e[Ca]].children[e[xa]].children[e[Ta]].inlineConditionalRules.rules[e[Fa]].conditions[e[Xo]].children.splice(e[wo],0,i),r},LJ=(t,e,n)=>c_(t,e,n),BJ=t=>{const e=[...t],n={type:As,uuid:nt(),children:[]};return e.map(r=>(r.children.length||(r.children=[n]),r))},d_=(t,e,n,r)=>{var h,g,v,m,A,w;let i;const a={...wc,uuid:nt(),children:[r]},s={...eu,uuid:nt()},l={...eu,uuid:nt(),children:[a]},c={...lf,uuid:nt(),children:[l]},u={...zm,uuid:nt(),children:[c]};switch(e.length){case 1:{r.type===nx?i={...c,children:[r]}:i={...c,children:[s]};break}case 2:{r.type===na?i={...u,children:[c]}:i={...u,children:[c]};break}case 3:{r.type===Ao?i={...c,children:[l]}:i={...eu,uuid:nt(),children:[{...wc,uuid:nt(),children:[r]}]};break}case 4:{r.type===z1?i=a:i=r;break}case 5:{i=r;break}default:i=r}let d=t;return n.length>5?(w=(A=(m=(v=(g=(h=d[n[fa]])==null?void 0:h.children[n[ha]])==null?void 0:g.children[n[Ca]])==null?void 0:v.children[n[xa]])==null?void 0:m.children[n[Ta]])==null?void 0:A.inlineConditionalRules)==null||w.rules[n[Fa]].conditions[n[Xo]].children.splice(n[wo],1):d=u_(d,n),d=BJ(d),d=w8(d,e,i),d},VJ=(t,e,n)=>{let r;switch(e.length){case 1:{r={...zm,uuid:nt(),children:[{...lf,uuid:nt(),children:[{...eu,uuid:nt(),children:[{...wc,uuid:nt(),children:[n]}]}]}]};break}case 2:{r={...lf,uuid:nt(),children:[{...eu,uuid:nt(),children:[{...wc,uuid:nt(),children:[n]}]}]};break}case 3:{r={...eu,uuid:nt(),children:[{...wc,uuid:nt(),children:[n]}]};break}case 4:{r={...wc,uuid:nt(),children:[n]};break}default:r=n}return w8(t,e,r)},sn=()=>{var Be;const{state:t,dispatch:e,onChange:n,saveFormProgress:r}=l_(),{updateGlobalToast:i,emitSocketData:a}=Ht();if(t===void 0)throw new Error("Must be wrapped in builder provider");const s=t.builderTemplateName,l=t.isChangesSaved,c=t.editing_by,u=t.version_name,d=t.loading,f=t.published_status,h=t,g=t,v=t.formType,m=t==null?void 0:t.userSelectedLanguage,A=(Be=t==null?void 0:t.userSelectedLanguage)==null?void 0:Be.type,w=t==null?void 0:t.languages,x=t.layout,S=k.useCallback(Ee=>uW(Ee)(e),[e]),T=k.useCallback(Ee=>LG(Ee)(e),[e]),C=k.useCallback(Ee=>dW(Ee)(e),[e]),E=k.useCallback((Ee,$)=>{var He,ot,rn,nn,Jt,_n,wt,Ke,st;const ge=Ee.path.split("-"),le=ge.slice(0,-1).join("-"),se={uuid:$.uuid,type:$.type,reviewerChecklist:[]},he=0,Se=1,De=2,Me=3,ze=4,tt=5,it=6,ht=8,Ut=7,hn=5,$t=6,mn=8;if($.type===na&&($==null?void 0:$.schema)!==void 0){N(JSON.parse($==null?void 0:$.schema),parseInt(ge[he]));return}if(((He=$==null?void 0:$.schema)==null?void 0:He.componentType)==="question"&&((_n=(Jt=(nn=(rn=(ot=x[0])==null?void 0:ot.children[0])==null?void 0:rn.children[0])==null?void 0:nn.children[0])==null?void 0:Jt.children)!=null&&_n.some(vt=>{var Vt,On,$n;return((Vt=vt==null?void 0:vt.questionText)==null?void 0:Vt[m.type])===(($n=(On=$==null?void 0:$.schema)==null?void 0:On.questionText)==null?void 0:$n[m.type])}))&&((wt=$==null?void 0:$.schema.questionText)==null?void 0:wt.english)!=="Sample Question"){alert("not allow"),i({showToast:!0,toastMessage:"Exist",toastDetail:"Question text cannot be same for more than one element",toastType:"warn"});return}if($.type===tr){let vt={type:z1,reviewerChecklist:[],..._t.cloneDeep($.schema)};if(vt!=null&&vt.options&&(vt={...vt,options:[{uuid:nt(),optionText:{english:"Option 1"},value:"Option1",hyperlinkText:{english:""},abbreviationText:{english:"Option 1"},custom_values:{}},{uuid:nt(),optionText:{english:"Option 2"},value:"Option2",hyperlinkText:{english:""},abbreviationText:{english:"Option 1"},custom_values:{}}]}),vt.componentType==="grid-component"&&(vt={...vt,children:[],options:[{uuid:nt(),custom_values:{}}]}),vt.componentType==="radio-hierarchal"&&(vt={...vt,type:"radio",children:[],options:[{uuid:nt(),label:"Yes",value:null,enableConditionalField:!0,children:[]},{uuid:nt(),label:"No",value:null,enableConditionalField:!0,children:[]}]}),vt={...vt,uuid:nt()},ge.length===ht){pe(parseInt(ge[he]),parseInt(ge[Se]),parseInt(ge[De]),parseInt(ge[Me]),parseInt(ge[ze]),parseInt(ge[tt]),parseInt(ge[it]),vt),a();return}if(ge.length===Ut){_e(parseInt(ge[he]),parseInt(ge[Se]),parseInt(ge[De]),parseInt(ge[Me]),parseInt(ge[ze]),parseInt(ge[hn]),parseInt(ge[$t]),vt),a();return}if((st=(Ke=x[ge[he]].children[ge[Se]])==null?void 0:Ke.children[ge[De]])!=null&&st.rowIsRepeatable&&(vt==null?void 0:vt.componentType)==="editor"){i({showToast:!0,toastMessage:"Forbidden",toastDetail:"This Field cannot be applied in repeatable",toastType:"error"});return}C(VJ(x,ge,vt)),ge.length>1&&fe(ge[he],ge[Se],ge[De],vt);return}const En=$.path.split("-"),Tt=En.slice(0,-1).join("-");if(En.length===ge.length){if(Tt===le){if((En==null?void 0:En.length)===mn){C(MJ(x,ge,En));return}C(LJ(x,ge,En));return}const vt={...se,...$};($==null?void 0:$.id)===void 0&&(vt.id=nt()),C(d_(x,ge,En,vt));return}if((En==null?void 0:En.length)===8){const vt={type:z1,reviewerChecklist:[],...$};_e(parseInt(ge[he]),parseInt(ge[Se]),parseInt(ge[De]),parseInt(ge[Me]),parseInt(ge[ze]),parseInt(ge[hn]),parseInt(ge[$t]),vt),ee(En[fa],En[ha],En[Ca],En[xa],En[Ta],En[hn],En[$t],En[Bl]);return}const je={...se,...$};($==null?void 0:$.id)===void 0&&(je.id=nt()),C(d_(x,ge,En,je))},[x,m.type]),_=k.useCallback(()=>bW()(e),[e]),M=k.useCallback(Ee=>fW(Ee)(e,t),[e]),O=k.useCallback(Ee=>hW(Ee)(e,t),[e]),F=k.useCallback(Ee=>pW(Ee)(e),[e]),P=k.useCallback(Ee=>MG(Ee)(e),[e]),H=k.useCallback(Ee=>$G(Ee)(e),[e]),N=k.useCallback((Ee,$)=>HG(Ee,$)(e),[e]),z=k.useCallback((Ee,$)=>GG(Ee,$)(e),[e]),U=k.useCallback((Ee,$,ge)=>JG(Ee,$,ge)(e),[e]),ce=k.useCallback(Ee=>qG(Ee)(e),[e]),X=k.useCallback((Ee,$)=>UG(Ee,$)(e),[e]),R=k.useCallback((Ee,$,ge)=>RG(Ee,$,ge)(e),[e]),ue=k.useCallback((Ee,$,ge,le)=>eW(Ee,$,ge,le)(e),[e]),Y=k.useCallback((Ee,$,ge,le,se)=>tW(Ee,$,ge,le,se)(e,t),[e]),ie=k.useCallback((Ee,$,ge,le,se,he)=>nW(Ee,$,ge,le,se,he)(e,t),[e]),re=k.useCallback((Ee,$,ge)=>jG(Ee,$,ge)(e),[e]),Z=k.useCallback((Ee,$,ge,le)=>XG(Ee,$,ge,le)(e),[e]),K=k.useCallback((Ee,$)=>VG(Ee,$)(e),[e]),W=k.useCallback((Ee,$,ge,le,se,he)=>rW(Ee,$,ge,le,se,he)(e),[e]),me=k.useCallback((Ee,$,ge,le,se)=>ZG(Ee,$,ge,le,se)(e),[e]),be=k.useCallback((Ee,$,ge,le)=>KG(Ee,$,ge,le)(e),[e]),Te=k.useCallback((Ee,$,ge)=>zG(Ee,$,ge)(e),[e]),ye=k.useCallback((Ee,$)=>BG(Ee,$)(e,t),[e]),fe=k.useCallback((Ee,$,ge,le)=>WG(Ee,$,ge,le)(e),[e]),ne=k.useCallback((Ee,$,ge,le,se,he,Se,De,Me)=>lW(Ee,$,ge,le,se,he,Se,De,Me)(e),[e]),q=k.useCallback((Ee,$,ge,le,se,he,Se,De,Me)=>sW(Ee,$,ge,le,se,he,Se,De,Me)(e),[e]),ee=k.useCallback((Ee,$,ge,le,se,he,Se,De)=>oW(Ee,$,ge,le,se,he,Se,De)(e),[e]),oe=k.useCallback((Ee,$,ge,le,se,he,Se,De)=>cW(Ee,$,ge,le,se,he,Se,De)(e),[e]),pe=k.useCallback((Ee,$,ge,le,se,he,Se,De)=>iW(Ee,$,ge,le,se,he,Se,De)(e),[e]),_e=k.useCallback((Ee,$,ge,le,se,he,Se,De)=>aW(Ee,$,ge,le,se,he,Se,De)(e),[e]),Ne=k.useCallback(Ee=>gW(Ee)(e),[e]),ve=k.useCallback(Ee=>mW(Ee)(e),[e]),Ae=k.useCallback(Ee=>vW(Ee)(e),[e]);return{builderIsChangesSaved:l,builderTemplateName:s,formBuilderFormSchema:h,formBuilderFormLayout:x,formBuilderSchemaLanguages:w,saveFormTemplateNewVersion:g,userSelectedLanguage:m,selectedLanguage:A,formBuilderConfigurationType:v,formBuilderLoading:d,formBuilderPublishedStatus:f,builderEditingBy:c,builderVersionName:u,handleDrop:E,formatTableFieldsHook:T,saveFormBuilderSchema:S,removePage:ce,removeSection:X,removeRow:R,removeColumn:ue,removeField:Y,updateEditingBy:Ae,addTabs:P,addSection:H,addRow:z,addColumn:U,cloneField:W,cloneColumn:me,cloneRow:be,cloneSection:Te,clonePage:ye,sectionImport:N,setLayout:C,fieldSettingUpdate:ie,selectFormBuilderLanguage:M,unselectFormBuilderLanguage:O,updateUserFormSelectedLanguage:F,updateFormType:Ne,schemaBuilderUpdate:ve,pageSettingUpdate:K,saveFormProgress:r,sectionSettingUpdate:re,rowSettingUpdate:Z,clearBuilderSchema:_,addFieldToRowRepeaptable:fe,addFieldToInlineRuleCondtionFields:pe,fieldSettingUpdateInlineConditional:ne,fieldSettingDeleteInlineConditional:oe,addFieldToGridComponentHook:_e,gridComponentFieldSettingUpdate:q,gridComponentFieldDelete:ee}},Ht=()=>{var C,E,_;const{isPreview:t,isAdmin:e,isRenderView:n,renderType:r,isAdvanceView:i,isBuilderMode:a,media:s,exam:l,globalAlignment:c,reusableComponent:u,showSettings:d,training:f,fileUploadParams:h}=l_();if(t===void 0)throw new Error("Must be wrapped in builder provider");const g=r==null?void 0:r.key,{saveComponent:v,componentList:m,sectionsList:A}=u,w=()=>{},x=M=>{d!=null&&d.showToast&&(d==null||d.showToast(M))},S=((C=f==null?void 0:f.quiz)==null?void 0:C.quizList)||[],T=(E=f==null?void 0:f.quiz)!=null&&E.getQuizList?(_=f==null?void 0:f.quiz)==null?void 0:_.getQuizList:()=>{};return{quizlist:S,getQuizList:T,isPreview:t,isAdmin:e,isRenderView:n,renderType:g,isAdvanceView:i,isBuilderMode:a,globalAlignment:c,media:s,exam:l,saveComponent:v,componentList:m,sectionsList:A,fileUploadParams:h,emitSocketData:w,updateGlobalToast:x}},qJ="TASKS_LOADING",UJ="TASKS_ADD",$J="TASKS_GET_PAGINATED_LIST",jJ="TASKS_DELETE",zJ="TASKS_PAGNIATION_UPDATE",HJ="TASKS_UPDATE",YJ="TASKS_SUCCESS_GET",KJ="TASK_GET_TEMPLATE",XJ="TASK_SET_DATA",RJ="TASKS_FORM_SUBMIT",GJ="TASKS_FORM_HTTP_REQUEST",S8="TASK_SET_PROGRESS_VALUE",f_="TASK_SET_MAX_PROGRESS_VALUE",h_="TASK_SET_REGISTER_DATA",p_="TASK_SET_SCHEMA",C8="TASK_UPDATE_USER_FORM_SUBMIT_DATA",g_="CLEAR_TASK",m_="TASK_USER_SUBMIT_FORM_REPEATABLE_ADD",v_="TASK_USER_SUBMIT_FORM_REPEATABLE_REMOVE_INDEX",b_="TASK_USER_TRAINING_DATA",y_="TASK_FIELD_UPDATE",x8=6,Qm=1,Cp="DISPLAY_TYPE_START_DETAILS",Jm="DISPLAY_TYPE_QUIZ",T8="DISPLAY_TYPE_START_TIMER";function WJ(t,e,n,r,i,a){return s=>{s({type:y_,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,field:a}})}}function A_(t){return e=>{const n={type:C8,payLoad:{userTaskSubmitFormData:[...t]}};e(n)}}function QJ(t){return(e,n)=>{const{TasksReducer:r}=n(),{taskData:i}=r,a={type:C8,payLoad:{taskData:{...i,...t}}};e(a)}}function JJ(t,e){return(n,r)=>{const{userTaskSubmitFormData:i}=r,a=_t.findIndex(i,function(l){return l.rowId===t});n({type:v_,payLoad:{userSubmitFormIndex:a,repeatableDataRowIndex:e}})}}function ZJ(t,e){return(n,r)=>{const{userTaskSubmitFormData:i}=r;console.log("rowUuid-",t),console.log("addUserSubmitRepetableSectionData-userTaskSubmitFormData",i);const a=_t.findIndex(i,function(l){return l.rowId===t});if(console.log("addUserSubmitRepetableSectionData-repeatableSectionIndex",a),a<0){alert("No repeatable section found for the given row UUID");return}n({type:m_,payLoad:{userSubmitFormIndex:a,repeatableData:e}})}}function eZ(){return t=>{t({type:g_,payLoad:null})}}const w_=t=>e=>{e({type:S8,payLoad:{progressValue:t}})},tZ=t=>e=>{e({type:S8,payLoad:t})},nZ=t=>e=>{e({type:b_,payLoad:{userTrainingSaveData:t}})},S_=t=>e=>{e({type:h_,payLoad:{registerData:t}})},rZ=(t,e,n)=>(r,i)=>{var u;const{userTaskSubmitFormData:a}=i,s=[...a],l=_t.findIndex(s,function(d){var f;return d.rowId===((f=t==null?void 0:t.row)==null?void 0:f.uuid)});let c=(u=a[l])==null?void 0:u.repeatableFields;c={...c,[e==null?void 0:e.uuid]:`<div>${n}</div>`},s[l]={...s[l],repeatableFields:c},A_(s)(r)},iZ=(t,e,n)=>(r,i)=>{const{userTaskSubmitFormData:a,registerData:s}=i,l=a,c=_t.cloneDeep(s);if(n&&(l==null?void 0:l.length)>0){c[e==null?void 0:e.uuid]=n;for(const d of l)d.fieldId===e.uuid&&(d.postData[0]={postValue:n})}else if((l==null?void 0:l.length)>0){for(const d of l)d.fieldId===e.uuid&&(d.postData[0]={postValue:""});delete c[e==null?void 0:e.uuid]}S_(c)(r);const u=Object.keys(c).length;w_(u)(r)},aZ=t=>e=>{e({type:f_,payLoad:{progressMaxValue:t}})},E8={submitting:!1,httpRequest:!1,taskData:null,taskUpdateLoading:!1,loading:!1,progressLoading:!1,list:[],filter:"",sort:"task.created_at|desc",total_records:0,page:1,per_page:10,success:!1,success_message:"",userTaskSubmitFormData:null,taskSchema:null,progressMaxValue:0,maxTabs:0,registerData:{},progressValue:0,tabNoOfFieldsData:[],noOfTotalElements:0,sortField:null,sortOrder:null,userTrainingSaveData:null,assessmentData:null,task_status:1},sZ=(t=E8,e)=>{var n,r;switch(e.type){case g_:return{...t,...E8,list:[...t.list],page:t.page,per_page:t.per_page,filter:t.filter,sort:t.sort,total_records:t.total_records};case YJ:return{...t,...e.payLoad};case C8:return{...t,...e.payLoad};case p_:return{...t,...e.payLoad};case S8:return{...t,...e.payLoad};case h_:return{...t,registerData:e.payLoad.registerData};case f_:return{...t,...e.payLoad};case qJ:return{...t,...e.payLoad};case RJ:return{...t,...e.payLoad};case GJ:return{...t,...e.payLoad};case UJ:{const{record:i}=e.payLoad;return{...t,list:[...i,...t.list]}}case $J:return{...t,...e.payLoad};case XJ:return{...t,taskData:e.payLoad};case zJ:return{...t,...e.payLoad};case jJ:{const i=t.list.filter(a=>a.task_id!==e.payLoad.task_id);return{...t,list:[...i]}}case b_:return{...t,...e.payLoad};case y_:{const{pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,fieldIndex:c,field:u}=e.payLoad,d=[...t.taskSchema.layout];d[i].children[a].children[s].children[l].children[c]=u;const f={...t.taskSchema,layout:d};return{...t,taskSchema:f}}case m_:{console.log("TASK_USER_SUBMIT_FORM_REPEATABLE_ADD*******",e.payLoad);const{userSubmitFormIndex:i,repeatableData:a}=e.payLoad,s=t.userTaskSubmitFormData[i].repeatableFieldsData?(n=t.userTaskSubmitFormData[i])==null?void 0:n.repeatableFieldsData:[];return s.push(a),t.userTaskSubmitFormData[i].repeatableFieldsData=s,t}case v_:{const{userSubmitFormIndex:i,repeatableDataRowIndex:a}=e.payLoad,s=[...t.userTaskSubmitFormData],l=[...(r=s[i])==null?void 0:r.repeatableFieldsData];return l.splice(a,1),s[i]={...s[i],repeatableFieldsData:l},{...t,userTaskSubmitFormData:s}}case HJ:{const{row:i,eventIndex:a}=e.payLoad,s=t.list[a];return t.list[a]={...s,...i},t}case KJ:return{...t,...e.payLoad}}return t},C_=k.createContext(void 0),oZ=({option:t,taskOptions:e,saveFormBuilderSchema:n,templateSchema:r,taskValue:i,children:a,isHTML5BackendDisabled:s=!1})=>{const[l,c]=k.useReducer(sZ,{...E8,...i}),{progressMaxValue:u=0,progressValue:d=0,registerData:f=null,...h}=i||{};return k.useEffect(()=>{c({type:p_,payLoad:h})},[i]),o.jsx(C_.Provider,{value:{taskOptions:e,state:l,dispatch:c},children:o.jsx(o_,{isHTML5BackendDisabled:s,option:t,saveFormBuilderSchema:n,templateSchema:r,onChange:()=>{},children:a})})},lZ=()=>k.useContext(C_),Ar=()=>{var fe,ne,q,ee,oe,pe,_e,Ne;const{taskOptions:n,state:r,dispatch:i}=lZ();if(r===void 0)throw new Error("Must be wrapped in task render provider");const a=r.task_status,s=r.task_status,l=r.userTaskSubmitFormData,c=r.userTrainingSaveData,u=r.taskSchema,d=r.assessmentData,f=r.progressLoading,h=r.submitting,g=r.httpRequest,v=r.taskData,m=r.progressMaxValue,A=r.maxTabs,w=r.tabNoOfFieldsData,x=r.registerData,S=r.progressValue,T=r.noOfTotalElements,C=r.menuList,E=r.loading,_=r.submitting,M=r.success,O=r.success_message,F=(fe=n==null?void 0:n.exam)!=null&&fe.startQuiz?(ne=n==null?void 0:n.exam)==null?void 0:ne.startQuiz:()=>{},P=(q=n==null?void 0:n.exam)!=null&&q.AddUserAssessmentAnswer?(ee=n==null?void 0:n.exam)==null?void 0:ee.AddUserAssessmentAnswer:()=>{},H=(oe=n==null?void 0:n.exam)!=null&&oe.endQuiz?(pe=n==null?void 0:n.exam)==null?void 0:pe.endQuiz:()=>{},N=(_e=n==null?void 0:n.exam)!=null&&_e.examComplete?(Ne=n==null?void 0:n.exam)==null?void 0:Ne.examComplete:ve=>{},z=n!=null&&n.updateTaskFormData?n==null?void 0:n.updateTaskFormData:(ve,Ae,Be,Ee,$,ge)=>{},U=n!=null&&n.submitTaskFormData?n==null?void 0:n.submitTaskFormData:(ve,Ae,Be)=>{},ce=k.useCallback(ve=>i(QJ(ve)),[i]),X=k.useCallback((ve,Ae,Be)=>{},[i]),R=k.useCallback(()=>eZ()(i),[i]),ue=k.useCallback((ve,Ae)=>ZJ(ve,Ae)(i,r),[i]),Y=k.useCallback((ve,Ae)=>JJ(ve,Ae)(i,r),[i]),ie=k.useCallback(ve=>{w_(ve)(i)},[i]),re=k.useCallback(ve=>{S_(ve)(i)},[i]),Z=k.useCallback(ve=>tZ(ve)(i),[i]),K=k.useCallback(ve=>A_(ve)(i),[i]),W=k.useCallback(ve=>aZ(ve)(i),[i]),me=k.useCallback(ve=>nZ(ve)(i),[i]),be=k.useCallback((ve,Ae,Be)=>rZ(ve,Ae,Be)(i,r),[i]),Te=k.useCallback((ve,Ae,Be)=>iZ(ve,Ae,Be)(i,r),[i]),ye=k.useCallback((ve,Ae,Be,Ee,$,ge)=>i(WJ(ve,Ae,Be,Ee,$,ge)),[i]);return{examComplete:N,taskOptions:n,TASK_PUBLISHED:6,TASK_PENDING:1,taskStatus:s,assessmentData:d,taskSchema:u,taskData:v,TasksList:C,TasksLoading:E,TasksSuccess:M,TasksSuccessMessage:O,taskProgressMaxValue:m,taskRegisterData:x,taskProgressValue:S,taskMaxTabs:A,noOfTotalElements:T,taskTabRequiredFieldsData:w,userTaskSubmitFormData:l,userTrainingSaveData:c,TasksSubmitLoading:_,updateTaskDataSchema:ce,submitTaskFormData:U,updateTaskFormData:z,TasksSubmit:h,TasksHTTPRequest:g,updateTaskRegisterData:re,updateTaskProgressValue:ie,updateTaskProgressMaxValue:W,updateUserFormDataSubmit:K,removeUserDataFormSectionRepeatableData:Y,addUserDataFormSectionRepeatableData:ue,onSetValuetoRepeatableData:be,onSetValuetoPostDataHook:Te,clearTaskSchema:R,taskProgressLoading:f,task_status:a,startQuiz:F,endQuiz:H,AddUserAssessmentAnswer:P,updateUserTraining:me,taskFieldUpdateHook:ye,updateProgressDataValuesHook:Z,saveProgressDataHook:X}};function xp(t){"@babel/helpers - typeof";return xp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xp(t)}function cZ(t,e){if(xp(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(xp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function uZ(t){var e=cZ(t,"string");return xp(e)=="symbol"?e:e+""}function dZ(t,e,n){return(e=uZ(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var fZ={root:function(e){var n=e.props;return ft("p-skeleton p-component",{"p-skeleton-circle":n.shape==="circle","p-skeleton-none":n.animation==="none"})}},hZ=`
1594
+ `),dataTransfer:t=>t},matchesTypes:["Url","text/uri-list"]},[ZI]:{exposeProperties:{text:(t,e)=>b8(t,e,""),dataTransfer:t=>t},matchesTypes:["Text","text/plain"]}};function CJ(t,e){const n=y8[t];if(!n)throw new Error(`native type ${t} has no configuration`);const r=new SJ(n);return r.loadDataTransfer(e),r}function A8(t){if(!t)return null;const e=Array.prototype.slice.call(t.types||[]);return Object.keys(y8).filter(n=>{const r=y8[n];return r!=null&&r.matchesTypes?r.matchesTypes.some(i=>e.indexOf(i)>-1):!1})[0]||null}const xJ=WI(()=>/firefox/i.test(navigator.userAgent)),n_=WI(()=>!!window.safari);class r_{interpolate(e){const{xs:n,ys:r,c1s:i,c2s:a,c3s:s}=this;let l=n.length-1;if(e===n[l])return r[l];let c=0,u=s.length-1,d;for(;c<=u;){d=Math.floor(.5*(c+u));const g=n[d];if(g<e)c=d+1;else if(g>e)u=d-1;else return r[d]}l=Math.max(0,u);const f=e-n[l],h=f*f;return r[l]+i[l]*f+a[l]*h+s[l]*f*h}constructor(e,n){const{length:r}=e,i=[];for(let g=0;g<r;g++)i.push(g);i.sort((g,v)=>e[g]<e[v]?-1:1);const a=[],s=[];let l,c;for(let g=0;g<r-1;g++)l=e[g+1]-e[g],c=n[g+1]-n[g],a.push(l),s.push(c/l);const u=[s[0]];for(let g=0;g<a.length-1;g++){const v=s[g],m=s[g+1];if(v*m<=0)u.push(0);else{l=a[g];const A=a[g+1],w=l+A;u.push(3*w/((w+A)/v+(w+l)/m))}}u.push(s[s.length-1]);const d=[],f=[];let h;for(let g=0;g<u.length-1;g++){h=s[g];const v=u[g],m=1/a[g],A=v+u[g+1]-h-h;d.push((h-v-A)*m),f.push(A*m*m)}this.xs=e,this.ys=n,this.c1s=u,this.c2s=d,this.c3s=f}}const TJ=1;function i_(t){const e=t.nodeType===TJ?t:t.parentElement;if(!e)return null;const{top:n,left:r}=e.getBoundingClientRect();return{x:r,y:n}}function Wm(t){return{x:t.clientX,y:t.clientY}}function EJ(t){var e;return t.nodeName==="IMG"&&(xJ()||!(!((e=document.documentElement)===null||e===void 0)&&e.contains(t)))}function IJ(t,e,n,r){let i=t?e.width:n,a=t?e.height:r;return n_()&&t&&(a/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:a}}function _J(t,e,n,r,i){const a=EJ(e),l=i_(a?t:e),c={x:n.x-l.x,y:n.y-l.y},{offsetWidth:u,offsetHeight:d}=t,{anchorX:f,anchorY:h}=r,{dragPreviewWidth:g,dragPreviewHeight:v}=IJ(a,e,u,d),m=()=>{let E=new r_([0,.5,1],[c.y,c.y/d*v,c.y+v-d]).interpolate(h);return n_()&&a&&(E+=(window.devicePixelRatio-1)*v),E},A=()=>new r_([0,.5,1],[c.x,c.x/u*g,c.x+g-u]).interpolate(f),{offsetX:w,offsetY:x}=i,S=w===0||w,T=x===0||x;return{x:S?w:A(),y:T?x:m()}}class DJ{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var e;return!((e=this.globalContext)===null||e===void 0)&&e.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return((e=this.optionsArgs)===null||e===void 0?void 0:e.rootElement)||this.window}constructor(e,n){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=n}}function NJ(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a_(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){NJ(t,i,n[i])})}return t}class OJ{profile(){var e,n;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)===null||e===void 0?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((n=this.dragOverTargetIds)===null||n===void 0?void 0:n.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var n;(n=this.window)===null||n===void 0||n.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,n,r){return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,n),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,n,r){this.sourceNodes.set(e,n),this.sourceNodeOptions.set(e,r);const i=s=>this.handleDragStart(s,e),a=s=>this.handleSelectStart(s);return n.setAttribute("draggable","true"),n.addEventListener("dragstart",i),n.addEventListener("selectstart",a),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),n.removeEventListener("dragstart",i),n.removeEventListener("selectstart",a),n.setAttribute("draggable","false")}}connectDropTarget(e,n){const r=s=>this.handleDragEnter(s,e),i=s=>this.handleDragOver(s,e),a=s=>this.handleDrop(s,e);return n.addEventListener("dragenter",r),n.addEventListener("dragover",i),n.addEventListener("drop",a),()=>{n.removeEventListener("dragenter",r),n.removeEventListener("dragover",i),n.removeEventListener("drop",a)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourceNodeOptions.get(e);return a_({dropEffect:this.altKeyPressed?"copy":"move"},n||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourcePreviewNodeOptions.get(e);return a_({anchorX:.5,anchorY:.5,captureDraggingState:!1},n||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(t_).some(n=>t_[n]===e)}beginDragNativeItem(e,n){this.clearCurrentDragSourceNode(),this.currentNativeSource=CJ(e,n),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;const n=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var r;return(r=this.rootElement)===null||r===void 0?void 0:r.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},n)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)===null||e===void 0||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,n){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(n))}handleDragEnter(e,n){this.dragEnterTargetIds.unshift(n)}handleDragOver(e,n){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(n)}handleDrop(e,n){this.dropTargetIds.unshift(n)}constructor(e,n,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=i=>{const a=this.sourceNodes.get(i);return a&&i_(a)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=i=>!!(i&&this.document&&this.document.body&&this.document.body.contains(i)),this.endDragIfSourceWasRemovedFromDOM=()=>{const i=this.currentDragSourceNode;i==null||this.isNodeInDocument(i)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=i=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(i||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=i=>{if(i.defaultPrevented)return;const{dragStartSourceIds:a}=this;this.dragStartSourceIds=null;const s=Wm(i);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(a||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:s});const{dataTransfer:l}=i,c=A8(l);if(this.monitor.isDragging()){if(l&&typeof l.setDragImage=="function"){const d=this.monitor.getSourceId(),f=this.sourceNodes.get(d),h=this.sourcePreviewNodes.get(d)||f;if(h){const{anchorX:g,anchorY:v,offsetX:m,offsetY:A}=this.getCurrentSourcePreviewNodeOptions(),S=_J(f,h,s,{anchorX:g,anchorY:v},{offsetX:m,offsetY:A});l.setDragImage(h,S.x,S.y)}}try{l==null||l.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(i.target);const{captureDraggingState:u}=this.getCurrentSourcePreviewNodeOptions();u?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(c)this.beginDragNativeItem(c);else{if(l&&!l.types&&(i.target&&!i.target.hasAttribute||!i.target.hasAttribute("draggable")))return;i.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=i=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var a;(a=this.currentNativeSource)===null||a===void 0||a.loadDataTransfer(i.dataTransfer)}if(!this.enterLeaveCounter.enter(i.target)||this.monitor.isDragging())return;const{dataTransfer:l}=i,c=A8(l);c&&this.beginDragNativeItem(c,l)},this.handleTopDragEnter=i=>{const{dragEnterTargetIds:a}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=i.altKey,a.length>0&&this.actions.hover(a,{clientOffset:Wm(i)}),a.some(l=>this.monitor.canDropOnTarget(l))&&(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=i=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var a;(a=this.currentNativeSource)===null||a===void 0||a.loadDataTransfer(i.dataTransfer)}},this.handleTopDragOver=i=>{const{dragOverTargetIds:a}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none");return}this.altKeyPressed=i.altKey,this.lastClientOffset=Wm(i),this.scheduleHover(a),(a||[]).some(l=>this.monitor.canDropOnTarget(l))?(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?i.preventDefault():(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=i=>{this.isDraggingNativeItem()&&i.preventDefault(),this.enterLeaveCounter.leave(i.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=i=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var a;i.preventDefault(),(a=this.currentNativeSource)===null||a===void 0||a.loadDataTransfer(i.dataTransfer)}else A8(i.dataTransfer)&&i.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=i=>{const{dropTargetIds:a}=this;this.dropTargetIds=[],this.actions.hover(a,{clientOffset:Wm(i)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=i=>{const a=i.target;typeof a.dragDrop=="function"&&(a.tagName==="INPUT"||a.tagName==="SELECT"||a.tagName==="TEXTAREA"||a.isContentEditable||(i.preventDefault(),a.dragDrop()))},this.options=new DJ(n,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new wJ(this.isNodeInDocument)}}const Sp=function(e,n,r){return new OJ(e,n,r)},s_=k.createContext(void 0),o_=({children:t,option:e,saveFormBuilderSchema:n,templateSchema:r,onChange:i,isHTML5BackendDisabled:a=!1})=>{const{isPreview:s,isAdmin:l,isRenderView:c,isBuilderMode:u,renderType:d,isAdvanceView:f,globalAlignment:h="ltr",emitSocketData:g,media:v,exam:m={},reusableComponent:A,saveFormProgress:w,showSettings:x,training:S,fileUploadParams:T}=e,C={...r8,formType:d,...r},[E,_]=k.useReducer(yW,C);return k.useEffect(()=>{const M=_t.debounce(()=>{n&&n(E)},1e3);return M(),()=>M.cancel()},[E,n]),o.jsx(s_.Provider,{value:{media:v,isBuilderMode:u,isPreview:s,isAdmin:l,isRenderView:c,renderType:d,isAdvanceView:f,globalAlignment:h,exam:m,emitSocketData:g,reusableComponent:A,state:E,dispatch:_,onChange:i,saveFormProgress:w,showSettings:x,training:S,fileUploadParams:T},children:a?o.jsx(o.Fragment,{children:t}):o.jsx(wp,{backend:Sp,children:t})})},l_=()=>k.useContext(s_),FJ=(t,e,n)=>{const r=Array.from(t),[i]=r.splice(e,1);return r.splice(n,0,i),r},kJ=(t,e)=>[...t.slice(0,e),...t.slice(e+1)],PJ=(t,e,n)=>[...t.slice(0,e),n,...t.slice(e)],c_=(t,e,n)=>{if(e.length===1){const c=Number(e[0]),u=Number(n[0]);return FJ(t,u,c)}const r=[...t],i=Number(e.slice(0,1)),a=e.slice(1),s=n.slice(1),l=r[i];return r[i]={...l,children:c_(l.children,a,s)},r},u_=(t,e)=>{if(e.length===1){const s=Number(e[0]);return kJ(t,s)}const n=[...t],r=Number(e.slice(0,1)),i=e.slice(1),a=n[r];return n[r]={...a,children:u_(a.children,i)},n},w8=(t,e,n)=>{if(e.length===1){const l=Number(e[0]);return PJ(t,l,n)}const r=[...t],i=Number(e.slice(0,1)),a=e.slice(1),s=r[i];return r[i]={...s,children:w8(s.children,a,n)},r},MJ=(t,e,n)=>{let r=[...t],i=r[n[fa]].children[n[ha]].children[n[Ca]].children[n[xa]].children[n[Ta]].inlineConditionalRules.rules[n[Fa]].conditions[n[Xo]].children[n[wo]];return r[n[fa]].children[n[ha]].children[n[Ca]].children[n[xa]].children[n[Ta]].inlineConditionalRules.rules[n[Fa]].conditions[n[Xo]].children.splice([n[wo]],1),r[e[fa]].children[e[ha]].children[e[Ca]].children[e[xa]].children[e[Ta]].inlineConditionalRules.rules[e[Fa]].conditions[e[Xo]].children.splice(e[wo],0,i),r},LJ=(t,e,n)=>c_(t,e,n),BJ=t=>{const e=[...t],n={type:As,uuid:nt(),children:[]};return e.map(r=>(r.children.length||(r.children=[n]),r))},d_=(t,e,n,r)=>{var h,g,v,m,A,w;let i;const a={...wc,uuid:nt(),children:[r]},s={...eu,uuid:nt()},l={...eu,uuid:nt(),children:[a]},c={...lf,uuid:nt(),children:[l]},u={...zm,uuid:nt(),children:[c]};switch(e.length){case 1:{r.type===nx?i={...c,children:[r]}:i={...c,children:[s]};break}case 2:{r.type===na?i={...u,children:[c]}:i={...u,children:[c]};break}case 3:{r.type===Ao?i={...c,children:[l]}:i={...eu,uuid:nt(),children:[{...wc,uuid:nt(),children:[r]}]};break}case 4:{r.type===z1?i=a:i=r;break}case 5:{i=r;break}default:i=r}let d=t;return n.length>5?(w=(A=(m=(v=(g=(h=d[n[fa]])==null?void 0:h.children[n[ha]])==null?void 0:g.children[n[Ca]])==null?void 0:v.children[n[xa]])==null?void 0:m.children[n[Ta]])==null?void 0:A.inlineConditionalRules)==null||w.rules[n[Fa]].conditions[n[Xo]].children.splice(n[wo],1):d=u_(d,n),d=BJ(d),d=w8(d,e,i),d},VJ=(t,e,n)=>{let r;switch(e.length){case 1:{r={...zm,uuid:nt(),children:[{...lf,uuid:nt(),children:[{...eu,uuid:nt(),children:[{...wc,uuid:nt(),children:[n]}]}]}]};break}case 2:{r={...lf,uuid:nt(),children:[{...eu,uuid:nt(),children:[{...wc,uuid:nt(),children:[n]}]}]};break}case 3:{r={...eu,uuid:nt(),children:[{...wc,uuid:nt(),children:[n]}]};break}case 4:{r={...wc,uuid:nt(),children:[n]};break}default:r=n}return w8(t,e,r)},sn=()=>{var Be;const{state:t,dispatch:e,onChange:n,saveFormProgress:r}=l_(),{updateGlobalToast:i,emitSocketData:a}=Ht();if(t===void 0)throw new Error("Must be wrapped in builder provider");const s=t.builderTemplateName,l=t.isChangesSaved,c=t.editing_by,u=t.version_name,d=t.loading,f=t.published_status,h=t,g=t,v=t.formType,m=t==null?void 0:t.userSelectedLanguage,A=(Be=t==null?void 0:t.userSelectedLanguage)==null?void 0:Be.type,w=t==null?void 0:t.languages,x=t.layout,S=k.useCallback(Ee=>uW(Ee)(e),[e]),T=k.useCallback(Ee=>LG(Ee)(e),[e]),C=k.useCallback(Ee=>dW(Ee)(e),[e]),E=k.useCallback((Ee,$)=>{var He,ot,rn,nn,Jt,_n,wt,Ke,st;const ge=Ee.path.split("-"),le=ge.slice(0,-1).join("-"),se={uuid:$.uuid,type:$.type,reviewerChecklist:[]},he=0,Se=1,De=2,Me=3,ze=4,tt=5,it=6,ht=8,Ut=7,hn=5,$t=6,mn=8;if($.type===na&&($==null?void 0:$.schema)!==void 0){N(JSON.parse($==null?void 0:$.schema),parseInt(ge[he]));return}if(((He=$==null?void 0:$.schema)==null?void 0:He.componentType)==="question"&&((_n=(Jt=(nn=(rn=(ot=x[0])==null?void 0:ot.children[0])==null?void 0:rn.children[0])==null?void 0:nn.children[0])==null?void 0:Jt.children)!=null&&_n.some(vt=>{var Vt,On,$n;return((Vt=vt==null?void 0:vt.questionText)==null?void 0:Vt[m.type])===(($n=(On=$==null?void 0:$.schema)==null?void 0:On.questionText)==null?void 0:$n[m.type])}))&&((wt=$==null?void 0:$.schema.questionText)==null?void 0:wt.english)!=="Sample Question"){alert("not allow"),i({showToast:!0,toastMessage:"Exist",toastDetail:"Question text cannot be same for more than one element",toastType:"warn"});return}if($.type===tr){let vt={type:z1,reviewerChecklist:[],..._t.cloneDeep($.schema)};if(vt!=null&&vt.options&&(vt={...vt,options:[{uuid:nt(),optionText:{english:"Option 1"},value:"Option1",hyperlinkText:{english:""},abbreviationText:{english:"Option 1"},custom_values:{}},{uuid:nt(),optionText:{english:"Option 2"},value:"Option2",hyperlinkText:{english:""},abbreviationText:{english:"Option 1"},custom_values:{}}]}),vt.componentType==="grid-component"&&(vt={...vt,children:[],options:[{uuid:nt(),custom_values:{}}]}),vt.componentType==="radio-hierarchal"&&(vt={...vt,type:"radio",children:[],options:[{uuid:nt(),label:"Yes",value:null,enableConditionalField:!0,children:[]},{uuid:nt(),label:"No",value:null,enableConditionalField:!0,children:[]}]}),vt={...vt,uuid:nt()},ge.length===ht){pe(parseInt(ge[he]),parseInt(ge[Se]),parseInt(ge[De]),parseInt(ge[Me]),parseInt(ge[ze]),parseInt(ge[tt]),parseInt(ge[it]),vt),a();return}if(ge.length===Ut){_e(parseInt(ge[he]),parseInt(ge[Se]),parseInt(ge[De]),parseInt(ge[Me]),parseInt(ge[ze]),parseInt(ge[hn]),parseInt(ge[$t]),vt),a();return}if((st=(Ke=x[ge[he]].children[ge[Se]])==null?void 0:Ke.children[ge[De]])!=null&&st.rowIsRepeatable&&(vt==null?void 0:vt.componentType)==="editor"){i({showToast:!0,toastMessage:"Forbidden",toastDetail:"This Field cannot be applied in repeatable",toastType:"error"});return}C(VJ(x,ge,vt)),ge.length>1&&fe(ge[he],ge[Se],ge[De],vt);return}const En=$.path.split("-"),Tt=En.slice(0,-1).join("-");if(En.length===ge.length){if(Tt===le){if((En==null?void 0:En.length)===mn){C(MJ(x,ge,En));return}C(LJ(x,ge,En));return}const vt={...se,...$};($==null?void 0:$.id)===void 0&&(vt.id=nt()),C(d_(x,ge,En,vt));return}if((En==null?void 0:En.length)===8){const vt={type:z1,reviewerChecklist:[],...$};_e(parseInt(ge[he]),parseInt(ge[Se]),parseInt(ge[De]),parseInt(ge[Me]),parseInt(ge[ze]),parseInt(ge[hn]),parseInt(ge[$t]),vt),ee(En[fa],En[ha],En[Ca],En[xa],En[Ta],En[hn],En[$t],En[Bl]);return}const je={...se,...$};($==null?void 0:$.id)===void 0&&(je.id=nt()),C(d_(x,ge,En,je))},[x,m.type]),_=k.useCallback(()=>bW()(e),[e]),M=k.useCallback(Ee=>fW(Ee)(e,t),[e]),O=k.useCallback(Ee=>hW(Ee)(e,t),[e]),F=k.useCallback(Ee=>pW(Ee)(e),[e]),P=k.useCallback(Ee=>MG(Ee)(e),[e]),H=k.useCallback(Ee=>$G(Ee)(e),[e]),N=k.useCallback((Ee,$)=>HG(Ee,$)(e),[e]),z=k.useCallback((Ee,$)=>GG(Ee,$)(e),[e]),U=k.useCallback((Ee,$,ge)=>JG(Ee,$,ge)(e),[e]),ce=k.useCallback(Ee=>qG(Ee)(e),[e]),X=k.useCallback((Ee,$)=>UG(Ee,$)(e),[e]),R=k.useCallback((Ee,$,ge)=>RG(Ee,$,ge)(e),[e]),ue=k.useCallback((Ee,$,ge,le)=>eW(Ee,$,ge,le)(e),[e]),Y=k.useCallback((Ee,$,ge,le,se)=>tW(Ee,$,ge,le,se)(e,t),[e]),ie=k.useCallback((Ee,$,ge,le,se,he)=>nW(Ee,$,ge,le,se,he)(e,t),[e]),re=k.useCallback((Ee,$,ge)=>jG(Ee,$,ge)(e),[e]),Z=k.useCallback((Ee,$,ge,le)=>XG(Ee,$,ge,le)(e),[e]),K=k.useCallback((Ee,$)=>VG(Ee,$)(e),[e]),W=k.useCallback((Ee,$,ge,le,se,he)=>rW(Ee,$,ge,le,se,he)(e),[e]),me=k.useCallback((Ee,$,ge,le,se)=>ZG(Ee,$,ge,le,se)(e),[e]),be=k.useCallback((Ee,$,ge,le)=>KG(Ee,$,ge,le)(e),[e]),Te=k.useCallback((Ee,$,ge)=>zG(Ee,$,ge)(e),[e]),ye=k.useCallback((Ee,$)=>BG(Ee,$)(e,t),[e]),fe=k.useCallback((Ee,$,ge,le)=>WG(Ee,$,ge,le)(e),[e]),ne=k.useCallback((Ee,$,ge,le,se,he,Se,De,Me)=>lW(Ee,$,ge,le,se,he,Se,De,Me)(e),[e]),q=k.useCallback((Ee,$,ge,le,se,he,Se,De,Me)=>sW(Ee,$,ge,le,se,he,Se,De,Me)(e),[e]),ee=k.useCallback((Ee,$,ge,le,se,he,Se,De)=>oW(Ee,$,ge,le,se,he,Se,De)(e),[e]),oe=k.useCallback((Ee,$,ge,le,se,he,Se,De)=>cW(Ee,$,ge,le,se,he,Se,De)(e),[e]),pe=k.useCallback((Ee,$,ge,le,se,he,Se,De)=>iW(Ee,$,ge,le,se,he,Se,De)(e),[e]),_e=k.useCallback((Ee,$,ge,le,se,he,Se,De)=>aW(Ee,$,ge,le,se,he,Se,De)(e),[e]),Ne=k.useCallback(Ee=>gW(Ee)(e),[e]),ve=k.useCallback(Ee=>mW(Ee)(e),[e]),Ae=k.useCallback(Ee=>vW(Ee)(e),[e]);return{builderIsChangesSaved:l,builderTemplateName:s,formBuilderFormSchema:h,formBuilderFormLayout:x,formBuilderSchemaLanguages:w,saveFormTemplateNewVersion:g,userSelectedLanguage:m,selectedLanguage:A,formBuilderConfigurationType:v,formBuilderLoading:d,formBuilderPublishedStatus:f,builderEditingBy:c,builderVersionName:u,handleDrop:E,formatTableFieldsHook:T,saveFormBuilderSchema:S,removePage:ce,removeSection:X,removeRow:R,removeColumn:ue,removeField:Y,updateEditingBy:Ae,addTabs:P,addSection:H,addRow:z,addColumn:U,cloneField:W,cloneColumn:me,cloneRow:be,cloneSection:Te,clonePage:ye,sectionImport:N,setLayout:C,fieldSettingUpdate:ie,selectFormBuilderLanguage:M,unselectFormBuilderLanguage:O,updateUserFormSelectedLanguage:F,updateFormType:Ne,schemaBuilderUpdate:ve,pageSettingUpdate:K,saveFormProgress:r,sectionSettingUpdate:re,rowSettingUpdate:Z,clearBuilderSchema:_,addFieldToRowRepeaptable:fe,addFieldToInlineRuleCondtionFields:pe,fieldSettingUpdateInlineConditional:ne,fieldSettingDeleteInlineConditional:oe,addFieldToGridComponentHook:_e,gridComponentFieldSettingUpdate:q,gridComponentFieldDelete:ee}},Ht=()=>{var C,E,_;const{isPreview:t,isAdmin:e,isRenderView:n,renderType:r,isAdvanceView:i,isBuilderMode:a,media:s,exam:l,globalAlignment:c,reusableComponent:u,showSettings:d,training:f,fileUploadParams:h}=l_();if(t===void 0)throw new Error("Must be wrapped in builder provider");const g=r==null?void 0:r.key,{saveComponent:v,componentList:m,sectionsList:A}=u,w=()=>{},x=M=>{d!=null&&d.showToast&&(d==null||d.showToast(M))},S=((C=f==null?void 0:f.quiz)==null?void 0:C.quizList)||[],T=(E=f==null?void 0:f.quiz)!=null&&E.getQuizList?(_=f==null?void 0:f.quiz)==null?void 0:_.getQuizList:()=>{};return{quizlist:S,getQuizList:T,isPreview:t,isAdmin:e,isRenderView:n,renderType:g,isAdvanceView:i,isBuilderMode:a,globalAlignment:c,media:s,exam:l,saveComponent:v,componentList:m,sectionsList:A,fileUploadParams:h,emitSocketData:w,updateGlobalToast:x}},qJ="TASKS_LOADING",UJ="TASKS_ADD",$J="TASKS_GET_PAGINATED_LIST",jJ="TASKS_DELETE",zJ="TASKS_PAGNIATION_UPDATE",HJ="TASKS_UPDATE",YJ="TASKS_SUCCESS_GET",KJ="TASK_GET_TEMPLATE",XJ="TASK_SET_DATA",RJ="TASKS_FORM_SUBMIT",GJ="TASKS_FORM_HTTP_REQUEST",S8="TASK_SET_PROGRESS_VALUE",f_="TASK_SET_MAX_PROGRESS_VALUE",h_="TASK_SET_REGISTER_DATA",p_="TASK_SET_SCHEMA",C8="TASK_UPDATE_USER_FORM_SUBMIT_DATA",g_="CLEAR_TASK",m_="TASK_USER_SUBMIT_FORM_REPEATABLE_ADD",v_="TASK_USER_SUBMIT_FORM_REPEATABLE_REMOVE_INDEX",b_="TASK_USER_TRAINING_DATA",y_="TASK_FIELD_UPDATE",x8=6,Qm=1,Cp="DISPLAY_TYPE_START_DETAILS",Jm="DISPLAY_TYPE_QUIZ",T8="DISPLAY_TYPE_START_TIMER";function WJ(t,e,n,r,i,a){return s=>{s({type:y_,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,field:a}})}}function A_(t){return e=>{const n={type:C8,payLoad:{userTaskSubmitFormData:[...t]}};e(n)}}function QJ(t){return(e,n)=>{const{TasksReducer:r}=n(),{taskData:i}=r,a={type:C8,payLoad:{taskData:{...i,...t}}};e(a)}}function JJ(t,e){return(n,r)=>{const{userTaskSubmitFormData:i}=r,a=_t.findIndex(i,function(l){return l.rowId===t});n({type:v_,payLoad:{userSubmitFormIndex:a,repeatableDataRowIndex:e}})}}function ZJ(t,e){return(n,r)=>{const{userTaskSubmitFormData:i}=r;console.log("rowUuid-",t),console.log("addUserSubmitRepetableSectionData-userTaskSubmitFormData",i);const a=_t.findIndex(i,function(l){return l.rowId===t});if(console.log("addUserSubmitRepetableSectionData-repeatableSectionIndex",a),a<0){alert("No repeatable section found for the given row UUID");return}n({type:m_,payLoad:{userSubmitFormIndex:a,repeatableData:e}})}}function eZ(){return t=>{t({type:g_,payLoad:null})}}const w_=t=>e=>{e({type:S8,payLoad:{progressValue:t}})},tZ=t=>e=>{e({type:S8,payLoad:t})},nZ=t=>e=>{e({type:b_,payLoad:{userTrainingSaveData:t}})},S_=t=>e=>{e({type:h_,payLoad:{registerData:t}})},rZ=(t,e,n)=>(r,i)=>{var u;const{userTaskSubmitFormData:a}=i,s=[...a],l=_t.findIndex(s,function(d){var f;return d.rowId===((f=t==null?void 0:t.row)==null?void 0:f.uuid)});let c=(u=a[l])==null?void 0:u.repeatableFields;c={...c,[e==null?void 0:e.uuid]:`<div>${n}</div>`},s[l]={...s[l],repeatableFields:c},A_(s)(r)},iZ=(t,e,n)=>(r,i)=>{const{userTaskSubmitFormData:a,registerData:s}=i,l=a,c=_t.cloneDeep(s);if(n&&(l==null?void 0:l.length)>0){c[e==null?void 0:e.uuid]=n;for(const d of l)d.fieldId===e.uuid&&(d.postData[0]={postValue:n})}else if((l==null?void 0:l.length)>0){for(const d of l)d.fieldId===e.uuid&&(d.postData[0]={postValue:""});delete c[e==null?void 0:e.uuid]}S_(c)(r);const u=Object.keys(c).length;w_(u)(r)},aZ=t=>e=>{e({type:f_,payLoad:{progressMaxValue:t}})},E8={submitting:!1,httpRequest:!1,taskData:null,taskUpdateLoading:!1,loading:!1,progressLoading:!1,list:[],filter:"",sort:"task.created_at|desc",total_records:0,page:1,per_page:10,success:!1,success_message:"",userTaskSubmitFormData:null,taskSchema:null,progressMaxValue:0,maxTabs:0,registerData:{},progressValue:0,tabNoOfFieldsData:[],noOfTotalElements:0,sortField:null,sortOrder:null,userTrainingSaveData:null,assessmentData:null,task_status:1},sZ=(t=E8,e)=>{var n,r;switch(e.type){case g_:return{...t,...E8,list:[...t.list],page:t.page,per_page:t.per_page,filter:t.filter,sort:t.sort,total_records:t.total_records};case YJ:return{...t,...e.payLoad};case C8:return{...t,...e.payLoad};case p_:return{...t,...e.payLoad};case S8:return{...t,...e.payLoad};case h_:return{...t,registerData:e.payLoad.registerData};case f_:return{...t,...e.payLoad};case qJ:return{...t,...e.payLoad};case RJ:return{...t,...e.payLoad};case GJ:return{...t,...e.payLoad};case UJ:{const{record:i}=e.payLoad;return{...t,list:[...i,...t.list]}}case $J:return{...t,...e.payLoad};case XJ:return{...t,taskData:e.payLoad};case zJ:return{...t,...e.payLoad};case jJ:{const i=t.list.filter(a=>a.task_id!==e.payLoad.task_id);return{...t,list:[...i]}}case b_:return{...t,...e.payLoad};case y_:{const{pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,fieldIndex:c,field:u}=e.payLoad,d=[...t.taskSchema.layout];d[i].children[a].children[s].children[l].children[c]=u;const f={...t.taskSchema,layout:d};return{...t,taskSchema:f}}case m_:{console.log("TASK_USER_SUBMIT_FORM_REPEATABLE_ADD*******",e.payLoad);const{userSubmitFormIndex:i,repeatableData:a}=e.payLoad,s=t.userTaskSubmitFormData[i].repeatableFieldsData?(n=t.userTaskSubmitFormData[i])==null?void 0:n.repeatableFieldsData:[];return s.push(a),t.userTaskSubmitFormData[i].repeatableFieldsData=s,t}case v_:{const{userSubmitFormIndex:i,repeatableDataRowIndex:a}=e.payLoad,s=[...t.userTaskSubmitFormData],l=[...(r=s[i])==null?void 0:r.repeatableFieldsData];return l.splice(a,1),s[i]={...s[i],repeatableFieldsData:l},{...t,userTaskSubmitFormData:s}}case HJ:{const{row:i,eventIndex:a}=e.payLoad,s=t.list[a];return t.list[a]={...s,...i},t}case KJ:return{...t,...e.payLoad}}return t},C_=k.createContext(void 0),oZ=({option:t,taskOptions:e,saveFormBuilderSchema:n,templateSchema:r,taskValue:i,children:a,isHTML5BackendDisabled:s=!1})=>{const[l,c]=k.useReducer(sZ,{...E8,...i}),{progressMaxValue:u=0,progressValue:d=0,registerData:f=null,...h}=i||{};return k.useEffect(()=>{c({type:p_,payLoad:h})},[i]),o.jsx(C_.Provider,{value:{taskOptions:e,state:l,dispatch:c},children:o.jsx(o_,{isHTML5BackendDisabled:s,option:t,saveFormBuilderSchema:n,templateSchema:r,onChange:()=>{},children:a})})},lZ=()=>k.useContext(C_),Ar=()=>{var fe,ne,q,ee,oe,pe,_e,Ne;const{taskOptions:n,state:r,dispatch:i}=lZ();if(r===void 0)throw new Error("Must be wrapped in task render provider");const a=r.task_status,s=r.task_status,l=r.userTaskSubmitFormData,c=r.userTrainingSaveData,u=r.taskSchema,d=r.assessmentData,f=r.progressLoading,h=r.submitting,g=r.httpRequest,v=r.taskData,m=r.progressMaxValue,A=r.maxTabs,w=r.tabNoOfFieldsData,x=r.registerData,S=r.progressValue,T=r.noOfTotalElements,C=r.menuList,E=r.loading,_=r.submitting,M=r.success,O=r.success_message,F=(fe=n==null?void 0:n.exam)!=null&&fe.startQuiz?(ne=n==null?void 0:n.exam)==null?void 0:ne.startQuiz:()=>{},P=(q=n==null?void 0:n.exam)!=null&&q.AddUserAssessmentAnswer?(ee=n==null?void 0:n.exam)==null?void 0:ee.AddUserAssessmentAnswer:()=>{},H=(oe=n==null?void 0:n.exam)!=null&&oe.endQuiz?(pe=n==null?void 0:n.exam)==null?void 0:pe.endQuiz:()=>{},N=(_e=n==null?void 0:n.exam)!=null&&_e.examComplete?(Ne=n==null?void 0:n.exam)==null?void 0:Ne.examComplete:ve=>{},z=n!=null&&n.updateTaskFormData?n==null?void 0:n.updateTaskFormData:(ve,Ae,Be,Ee,$,ge)=>{},U=n!=null&&n.submitTaskFormData?n==null?void 0:n.submitTaskFormData:(ve,Ae,Be)=>{},ce=k.useCallback(ve=>i(QJ(ve)),[i]),X=k.useCallback((ve,Ae,Be)=>{},[i]),R=k.useCallback(()=>eZ()(i),[i]),ue=k.useCallback((ve,Ae)=>ZJ(ve,Ae)(i,r),[i,r]),Y=k.useCallback((ve,Ae)=>JJ(ve,Ae)(i,r),[i]),ie=k.useCallback(ve=>{w_(ve)(i)},[i]),re=k.useCallback(ve=>{S_(ve)(i)},[i]),Z=k.useCallback(ve=>tZ(ve)(i),[i]),K=k.useCallback(ve=>A_(ve)(i),[i]),W=k.useCallback(ve=>aZ(ve)(i),[i]),me=k.useCallback(ve=>nZ(ve)(i),[i]),be=k.useCallback((ve,Ae,Be)=>rZ(ve,Ae,Be)(i,r),[i]),Te=k.useCallback((ve,Ae,Be)=>iZ(ve,Ae,Be)(i,r),[i]),ye=k.useCallback((ve,Ae,Be,Ee,$,ge)=>i(WJ(ve,Ae,Be,Ee,$,ge)),[i]);return{examComplete:N,taskOptions:n,TASK_PUBLISHED:6,TASK_PENDING:1,taskStatus:s,assessmentData:d,taskSchema:u,taskData:v,TasksList:C,TasksLoading:E,TasksSuccess:M,TasksSuccessMessage:O,taskProgressMaxValue:m,taskRegisterData:x,taskProgressValue:S,taskMaxTabs:A,noOfTotalElements:T,taskTabRequiredFieldsData:w,userTaskSubmitFormData:l,userTrainingSaveData:c,TasksSubmitLoading:_,updateTaskDataSchema:ce,submitTaskFormData:U,updateTaskFormData:z,TasksSubmit:h,TasksHTTPRequest:g,updateTaskRegisterData:re,updateTaskProgressValue:ie,updateTaskProgressMaxValue:W,updateUserFormDataSubmit:K,removeUserDataFormSectionRepeatableData:Y,addUserDataFormRowRepeatableData:ue,onSetValuetoRepeatableData:be,onSetValuetoPostDataHook:Te,clearTaskSchema:R,taskProgressLoading:f,task_status:a,startQuiz:F,endQuiz:H,AddUserAssessmentAnswer:P,updateUserTraining:me,taskFieldUpdateHook:ye,updateProgressDataValuesHook:Z,saveProgressDataHook:X}};function xp(t){"@babel/helpers - typeof";return xp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xp(t)}function cZ(t,e){if(xp(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(xp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function uZ(t){var e=cZ(t,"string");return xp(e)=="symbol"?e:e+""}function dZ(t,e,n){return(e=uZ(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var fZ={root:function(e){var n=e.props;return ft("p-skeleton p-component",{"p-skeleton-circle":n.shape==="circle","p-skeleton-none":n.animation==="none"})}},hZ=`
1595
1595
  @layer primereact {
1596
1596
  .p-skeleton {
1597
1597
  position: relative;
@@ -2287,7 +2287,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2287
2287
  }
2288
2288
  }
2289
2289
  `}}),ci=b.forwardRef(function(t,e){var n=Kn(),r=b.useContext(ar),i=I3.getProps(t,r),a=b.useState(i.id),s=dN(a,2),l=s[0],c=s[1],u=b.useState(i.collapsed),d=dN(u,2),f=d[0],h=d[1],g=b.useRef(null),v=b.useRef(null),m=i.toggleable?i.onToggle?i.collapsed:f:!1,A=l+"_header",w=l+"_content",x=I3.setMetaData({props:i,state:{id:l,collapsed:m}}),S=x.ptm,T=x.cx,C=x.isUnstyled;li(I3.css.styles,C,{name:"panel"});var E=function(R){i.toggleable&&(m?_(R):M(R),R&&(i.onToggle&&i.onToggle({originalEvent:R,value:!m}),R.preventDefault()))},_=function(R){i.onToggle||h(!1),i.onExpand&&R&&i.onExpand(R)},M=function(R){i.onToggle||h(!0),i.onCollapse&&R&&i.onCollapse(R)};b.useImperativeHandle(e,function(){return{props:i,toggle:E,expand:_,collapse:M,getElement:function(){return g.current},getContent:function(){return v.current}}}),Li(function(){l||c(So())});var O=function(){if(i.toggleable){var R=l+"_label",ue=n({className:T("toggler"),onClick:E,id:R,"aria-controls":w,"aria-expanded":!m,type:"button",role:"button","aria-label":i.header},S("toggler")),Y=n(S("togglericon")),ie=m?i.expandIcon||b.createElement(Mm,Y):i.collapseIcon||b.createElement(t8,Y),re=nr.getJSXIcon(ie,Y,{props:i,collapsed:m});return b.createElement("button",ue,re,b.createElement(Qt,null))}return null},F=function(){var R=ke.getJSXElement(i.header,i),ue=ke.getJSXElement(i.icons,i),Y=O(),ie=n({id:A,className:T("title")},S("title")),re=b.createElement("span",ie,R),Z=n({className:T("icons")},S("icons")),K=b.createElement("div",Z,ue,Y),W=n({className:T("header")},S("header")),me=b.createElement("div",W,re,K);if(i.headerTemplate){var be={className:"p-panel-header",titleClassName:"p-panel-title",iconsClassName:"p-panel-icons",togglerClassName:"p-panel-header-icon p-panel-toggler p-link",onTogglerClick:E,titleElement:re,iconsElement:K,togglerElement:Y,element:me,id:l+"_header",props:i,collapsed:m};return ke.getJSXElement(i.headerTemplate,be)}else if(i.header||i.toggleable)return me;return null},P=function(){var R=ke.getJSXElement(i.footer,i),ue=n({className:T("footer")},S("footer")),Y=b.createElement("div",ue,R);if(i.footerTemplate){var ie={className:T("footer"),element:Y,props:i};return ke.getJSXElement(i.footerTemplate,ie)}else if(i.footer)return Y;return null},H=function(){var R=n({ref:v,className:T("toggleableContent"),"aria-hidden":m,role:"region",id:w,"aria-labelledby":A},S("toggleablecontent")),ue=n({className:T("content")},S("content")),Y=n({classNames:T("transition"),timeout:{enter:1e3,exit:450},in:!m,unmountOnExit:!0,options:i.transitionOptions},S("transition"));return b.createElement(Ro,h7({nodeRef:v},Y),b.createElement("div",R,b.createElement("div",ue,i.children)))},N=n({id:l,ref:g,style:i.style,className:ft(i.className,T("root"))},I3.getOtherProps(i),S("root")),z=F(),U=H(),ce=P();return b.createElement("div",N,z,U,ce)});ci.displayName="Panel";const Gae=t=>{var v;const{fieldState:e,setFieldState:n,pageIndex:r,formBuilderFormLayout:i,pageSettingUpdate:a}=t,s=(m,A)=>{const w=`${m.className} justify-content-start`,x=`${m.titleClassName} pl-1`;return o.jsxs("div",{className:w,children:[o.jsx(Ft,{text:!0,icon:"pi pi-trash",className:m.togglerClassName,onClick:()=>c(A),"aria-label":"Submit"}),o.jsx("span",{className:x,children:`Rule ${A+1}`})]})},l=(m,A)=>{var x;const w=[...((x=e==null?void 0:e.conditionalTabRules)==null?void 0:x.rules)||[]];w[m].conditions=w[m].conditions.filter((S,T)=>A!==T),n(S=>({...S,conditionalTabRules:{...S.conditionalTabRules,rules:w}}))},c=m=>{var S;const A=[...(e==null?void 0:e.conditionalTabRules.rules)||[]],w=A.filter((T,C)=>m!==C);n(T=>({...T,conditionalTabRules:{...T.conditionalTabRules,rules:w}}));const x=A[m];(S=x==null?void 0:x.conditions)==null||S.map(T=>{const C=i?_t.findIndex(i,_=>{var M;return(_==null?void 0:_.uuid)===((M=T==null?void 0:T.tab)==null?void 0:M.uuid)}):-1,E=i[C];E&&(E.isHidden=!1,a(C,E))})};let u=[...i].filter(function(m,A){return A!==r});u.map(m=>({uuid:m==null?void 0:m.uuid,title:m==null?void 0:m.title}));const d=(m,A,w)=>{const x=[...(e==null?void 0:e.conditionalTabRules.rules)||[]];x[A].conditions[w].option=m==null?void 0:m.value,n(S=>({...S,conditionalTabRules:{...S.conditionalTabRules,rules:x}}))},f=(m,A,w)=>{const x=[...(e==null?void 0:e.conditionalTabRules.rules)||[]];x[A].conditions[w].tab=m==null?void 0:m.value,n(C=>({...C,conditionalTabRules:{...C.conditionalTabRules,rules:x}}));const S=_t.findIndex(i,C=>{var E;return(C==null?void 0:C.uuid)===((E=m==null?void 0:m.value)==null?void 0:E.uuid)}),T=i[S];T&&(T.isHidden=!0,a(S,T))},h=()=>{n(m=>({...m,conditionalTabRules:{...m.conditionalTabRules,rules:[...m.conditionalTabRules.rules,{conditions:[]}]}}))},g=m=>{const A=[...(e==null?void 0:e.conditionalTabRules.rules)||[]];A[m].conditions=[...A[m].conditions,{option:null,tab:null}],n(w=>({...w,conditionalTabRules:{...w.conditionalTabRules,rules:[...A]}}))};return o.jsxs("div",{children:[o.jsx("h4",{children:"Conditional Tabs"}),i&&(i==null?void 0:i.length)>1&&((v=e==null?void 0:e.conditionalTabRules)==null?void 0:v.rules.map((m,A)=>o.jsx(ci,{className:"mb-3",header:`Rule ${A+1}`,headerTemplate:w=>s(w,A),children:o.jsxs("div",{children:[m==null?void 0:m.conditions.map((w,x)=>o.jsx("div",{className:"p-field pb-6",children:o.jsxs("div",{className:"grid",children:[o.jsx("div",{className:"col-2",children:o.jsxs("label",{children:["Show tab",w.value]})}),o.jsx("div",{className:"col-3 p-fluid",children:o.jsx(Pa,{value:w.tab,options:u,onChange:S=>f(S,A,x),optionLabel:"title.english",placeholder:"Select option"})}),o.jsx("div",{className:"col-3",children:"when option is selected"}),o.jsx("div",{className:"col-3 p-fluid",children:o.jsx(Pa,{value:w==null?void 0:w.option,options:e==null?void 0:e.options,onChange:S=>d(S,A,x),optionLabel:"optionText.english",placeholder:"Select option"})}),o.jsx("div",{className:"col-1",children:o.jsx(Ft,{text:!0,icon:"pi pi-trash",className:"p-button-danger button-sm",tooltip:"Field Settings",onClick:()=>l(A,x),tooltipOptions:{position:"top"}})})]})},x)),o.jsx(Ft,{text:!0,size:"small",onClick:()=>g(A),icon:"pi pi-plus",className:"p-mt-4",label:"Add Condition"})]})},"conditional_tab_rule"+A))),i&&(i==null?void 0:i.length)>1&&o.jsx(Ft,{text:!0,onClick:()=>h(),className:"p-mt-4",icon:"pi pi-plus",label:"Add Rule",size:"small"}),i&&(i==null?void 0:i.length)<2&&o.jsx("p",{className:"error",children:"Please needs to have two or more tabs to enable the conditional tabs"})]})},Wae=t=>{var S;const{fieldState:e,setFieldState:n,section:r,formBuilderFormLayout:i,sectionSettingUpdate:a,page:s}=t,[l]=k.useState([]),{schemaBuilderUpdate:c,formBuilderFormSchema:u}=sn(),d=(T,C)=>{const E=`${T.className} justify-content-start`,_=`${T.titleClassName} pl-1`;return o.jsxs("div",{className:E,children:[o.jsx(Ft,{text:!0,icon:"pi pi-trash",className:T.togglerClassName,onClick:()=>f(C),"aria-label":"Submit"}),o.jsx("span",{className:_,children:`Rule ${C+1}`})]})},f=T=>{var M;const C=[...(e==null?void 0:e.conditionalSectionRules.rules)||[]],E=C[T];(M=E==null?void 0:E.conditions)==null||M.map(O=>{var H;const F=_t.findIndex(i,N=>{var z;return(N==null?void 0:N.uuid)===((z=O==null?void 0:O.tab)==null?void 0:z.uuid)}),P=i?_t.findIndex(i[F].children,N=>{var z;return(N==null?void 0:N.uuid)===((z=O==null?void 0:O.section)==null?void 0:z.uuid)}):-1;if(P>=0){const N=(H=i[F])==null?void 0:H.children[P];N&&(N.isHidden=!1,a(F,P,N))}});const _=C.filter((O,F)=>T!==F);n(O=>({...O,conditionalSectionRules:{...O.conditionalSectionRules,rules:_}}))},h=T=>{var _;let C=!1;const E=i?i.filter(function(M){return(M==null?void 0:M.uuid)===(T==null?void 0:T.uuid)}):[];return(E==null?void 0:E.length)>0&&((_=E[0].children)==null?void 0:_.length)>1&&(C=!0),C},g=(T,C,E)=>{const _=[...(e==null?void 0:e.conditionalSectionRules.rules)||[]];_[C].conditions[E].option=T==null?void 0:T.value,n(M=>({...M,conditionalSectionRules:{...M.conditionalSectionRules,rules:_}}))},v=(T,C)=>{var M;const E=[...(e==null?void 0:e.conditionalSectionRules.rules)||[]],_=E[T];(M=_==null?void 0:_.conditions)==null||M.map(O=>{var N;const F=_t.findIndex(i,z=>{var U;return(z==null?void 0:z.uuid)===((U=O==null?void 0:O.tab)==null?void 0:U.uuid)}),P=i?_t.findIndex(i[F].children,z=>{var U;return(z==null?void 0:z.uuid)===((U=O==null?void 0:O.section)==null?void 0:U.uuid)}):-1,H=(N=i[F])==null?void 0:N.children[P];console.log("sectionData",H),H&&(H.isHidden=!1,console.log("sectionData",H),a(F,P,H))}),E[T].conditions=E[T].conditions.filter((O,F)=>C!==F),n(O=>({...O,conditionalSectionRules:{...O.conditionalSectionRules,rules:E}}))},m=(T,C,E)=>{var H,N;const _=[...(e==null?void 0:e.conditionalSectionRules.rules)||[]];_[C].conditions[E].section=T==null?void 0:T.value;const M=(N=(H=_[C].conditions[E])==null?void 0:H.tab)==null?void 0:N.uuid,O=_t.findIndex(i,z=>(z==null?void 0:z.uuid)===M);n(z=>({...z,conditionalSectionRules:{...z.conditionalSectionRules,rules:_}}));const F=i?_t.findIndex(i[O].children,z=>{var U;return(z==null?void 0:z.uuid)===((U=T==null?void 0:T.value)==null?void 0:U.uuid)}):-1,P=i[O].children[F];P&&(P.isHidden=!0,a(O,F,P))},A=T=>{const C=[...(e==null?void 0:e.conditionalSectionRules.rules)||[]];C[T].conditions=[...C[T].conditions,{option:null,tab:{title:s==null?void 0:s.title,uuid:s==null?void 0:s.uuid},section:null}],n(E=>({...E,conditionalSectionRules:{...E.conditionalSectionRules,rules:C}}))},w=()=>{n(C=>({...C,conditionalSectionRules:{...C.conditionalSectionRules,rules:[...C.conditionalSectionRules.rules,{uuid:nt(),conditions:[]}]}}));const T=[...(u==null?void 0:u.conditionalSectionsRules)||[]];c({conditionalSectionsRules:[...T,{fieldId:e==null?void 0:e.uuid,uuid:nt(),conditions:[]}]})},x=T=>{var E;const C=i==null?void 0:i.filter(function(_){return(_==null?void 0:_.uuid)===(T==null?void 0:T.uuid)});if(C&&(C==null?void 0:C.length)>0){const _=(E=C[0])==null?void 0:E.children.filter(function(M){return(M==null?void 0:M.uuid)!==(r==null?void 0:r.uuid)});if((_==null?void 0:_.length)>0)return _}return l};return o.jsxs("div",{children:[o.jsx("h4",{children:"Conditional Sections"}),(S=e==null?void 0:e.conditionalSectionRules)==null?void 0:S.rules.map((T,C)=>o.jsx(ci,{className:"mb-3",header:`Rule ${C+1}`,headerTemplate:E=>d(E,C),children:o.jsxs("div",{children:[T==null?void 0:T.conditions.map((E,_)=>{var M,O;return o.jsx("div",{className:"p-field pb-2",children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-3 p-fluid",children:[o.jsx("label",{children:"In Tab"}),o.jsx("p",{children:(O=(M=E==null?void 0:E.tab)==null?void 0:M.title)==null?void 0:O.english})]}),o.jsxs("div",{className:"col-3 p-fluid",children:[o.jsxs("label",{children:["Select section",E.value]}),o.jsx(Pa,{disabled:!h(E==null?void 0:E.tab),value:E.section,options:x(E.tab),onChange:F=>m(F,C,_),optionLabel:"heading.english",placeholder:"Select option"})]}),o.jsxs("div",{className:"col-4 p-fluid",children:["when option is selected",o.jsx(Pa,{disabled:!h(E==null?void 0:E.tab),value:E==null?void 0:E.option,options:e==null?void 0:e.options,onChange:F=>g(F,C,_),optionLabel:"optionText.english",placeholder:"Select option"})]}),o.jsxs("div",{className:"col-1",children:[o.jsx("br",{}),o.jsx(Ft,{text:!0,icon:"pi pi-trash",className:"p-button-danger button-sm",tooltip:"Field Settings",onClick:()=>v(C,_),tooltipOptions:{position:"top"}})]}),!h(E.tab)&&o.jsx("div",{className:"col-12",children:o.jsxs("p",{className:"error",children:[" ","At least two or more sections should exist in a page"]})})]})},_)}),o.jsx("div",{children:o.jsx("div",{className:"flex",children:o.jsx(Ft,{text:!0,className:"btn-sm mt-3 ",label:"+ Add Condition",onClick:()=>A(C),size:"small"})})})]})},C)),o.jsx(Ft,{text:!0,icon:"pi pi-plus",onClick:()=>w(),className:"p-mt-4",label:"Add Rule",size:"small"})]})},Qae=t=>{var u;const{fieldState:e,setFieldState:n}=t,r=d=>{var g;const h=[...((g=e==null?void 0:e.inlineConditionalRules)==null?void 0:g.rules)||[]].filter((v,m)=>d!==m);n(v=>({...v,inlineConditionalRules:{...v.inlineConditionalRules,rules:h}}))},i=(d,f)=>{const h=`${d.className} justify-content-start`,g=`${d.titleClassName} pl-1`;return o.jsxs("div",{className:h,children:[o.jsx(Ft,{text:!0,icon:"pi pi-trash",className:d.togglerClassName,onClick:()=>r(f),"aria-label":"Submit"}),o.jsx("span",{className:g,children:`Rule ${f+1}`})]})},a=(d,f,h)=>{const g=[...(e==null?void 0:e.inlineConditionalRules.rules)||[]];g[f].conditions[h].value=d==null?void 0:d.value,n(v=>({...v,inlineConditionalRules:{...v.inlineConditionalRules,rules:g}}))},s=(d,f)=>{const h=[...(e==null?void 0:e.inlineConditionalRules.rules)||[]];h[d].conditions=h[d].conditions.filter((g,v)=>f!==v),n(g=>({...g,inlineConditionalRules:{...g.inlineConditionalRules,rules:h}}))},l=d=>{const f=[...(e==null?void 0:e.inlineConditionalRules.rules)||[]];f[d].conditions=[...f[d].conditions,{value:"",children:[]}],n(h=>({...h,inlineConditionalRules:{...h.inlineConditionalRules,rules:f}}))},c=()=>{n(d=>({...d,inlineConditionalRules:{...d.inlineConditionalRules,rules:[...d.inlineConditionalRules.rules,{conditions:[]}]}}))};return o.jsxs("div",{children:[o.jsx("h4",{children:"Inline Conditions"}),(u=e==null?void 0:e.inlineConditionalRules)==null?void 0:u.rules.map((d,f)=>o.jsx(ci,{className:"mb-3",header:`Rule ${f+1}`,headerTemplate:h=>i(h,f),children:o.jsxs("div",{children:[d==null?void 0:d.conditions.map((h,g)=>o.jsx("div",{className:"p-field p-pt-2",children:o.jsxs("div",{className:"grid",children:[o.jsx("label",{className:"block",children:"Show when selected option is:"}),o.jsx("div",{className:" p-fluid col-11",children:o.jsx(Pa,{value:h.value,options:e==null?void 0:e.options,onChange:v=>a(v,f,g),optionLabel:"optionText.english",placeholder:"Select option"})}),o.jsx("div",{className:"col-1",children:o.jsx(Ft,{text:!0,icon:"pi pi-trash",className:"p-button-danger button-sm",tooltip:"Field Settings",onClick:()=>s(f,g),tooltipOptions:{position:"top"}})})]})},"inline-rules-"+g)),o.jsx(Ft,{text:!0,onClick:()=>l(f),className:"p-mt-4",icon:"pi pi-plus",label:"Add Condition",size:"small"})]})},f)),o.jsx(Ft,{text:!0,onClick:()=>c(),className:"p-mt-4",icon:"pi pi-plus",label:"Add Rule",size:"small"})]})},Jae=t=>{const{fieldState:e,pageIndex:n,section:r,setFieldState:i,page:a}=t,{pageSettingUpdate:s,formBuilderFormLayout:l,sectionSettingUpdate:c}=sn();return o.jsx(o.Fragment,{children:o.jsxs("div",{className:" scroll-height-250",children:[o.jsx(Qae,{fieldState:e,setFieldState:i}),o.jsx("hr",{}),o.jsx(Gae,{fieldState:e,setFieldState:i,pageIndex:n,formBuilderFormLayout:l,pageSettingUpdate:s}),o.jsx("hr",{}),o.jsx(Wae,{fieldState:e,setFieldState:i,section:r,formBuilderFormLayout:l,sectionSettingUpdate:c,page:a}),o.jsx("hr",{})]})})},Zae=t=>{const{fieldState:e,setFieldState:n}=t,[r,i]=k.useState(""),[a,s]=k.useState([""]),[l,c]=k.useState(!1),[u,d]=k.useState(0),[f,h]=k.useState(!1),{updateGlobalToast:g}=Ht(),v=()=>{h(!0)},m=()=>{var z;const H=((z=e==null?void 0:e.reviewerChecklist)==null?void 0:z.length)>=0?[...e.reviewerChecklist]:[];H.push({uuid:nt(),checklist:r,action:a,agree:null,selectAction:[],other:{isOther:!1,description:""},reviewerComments:""});const N={...e,reviewerChecklist:H};n(U=>({...U,...N})),h(!1),i(""),s([""])},A=()=>{h(!1),i(""),s([""])},w=H=>{const N=[...e.reviewerChecklist];N.splice(H,1);const z={...e,reviewerChecklist:N};n(U=>({...U,...z}))},x=(H,N)=>{c(!0);const{checklist:z,action:U}=H;h(!0),d(N),setTimeout(()=>{i(z),s(U)},1e3)},S=(H,N)=>o.jsxs(o.Fragment,{children:[o.jsx(Ft,{text:!0,type:"button",className:"p-button-info",icon:"pi pi-pencil",onClick:()=>x(H,N==null?void 0:N.rowIndex)}),o.jsx(Ft,{text:!0,type:"button",className:"p-button-danger",icon:"pi pi-trash",onClick:()=>w(N==null?void 0:N.rowIndex)})]}),T=H=>{var N;return o.jsx(o.Fragment,{children:(N=H==null?void 0:H.action)==null?void 0:N.length})},C=H=>{const N=[...a];N.splice(H,1),s(N)},E=()=>{const H=[...e.reviewerChecklist];H[u]={checklist:r,action:a};const N={...e,reviewerChecklist:H};n(z=>({...z,...N})),h(!1),c(!1)},_=()=>o.jsx("div",{children:l?o.jsx(Ft,{text:!0,className:"mb-5 p-button-success",label:"Edit Checklist",onClick:()=>{E()}}):o.jsx(Ft,{text:!0,className:"mb-5 p-button-success",label:"Add Checklist",onClick:()=>{m()}})}),M=H=>{n(N=>({...N,reviewerChecklist:H==null?void 0:H.value}))},O=H=>{navigator.clipboard.writeText(JSON.stringify(H))};function F(H){try{JSON.parse(H)}catch{return!1}return!0}const P=async()=>{var z;const H=await navigator.clipboard.readText();let N="";if(F(H)){const U=JSON.parse(H);if((z=U[0])!=null&&z.checklist){const ce={..._t.cloneDeep(e),reviewerChecklist:U};n(X=>({...X,...ce}));return}else N="Empty or Invalid Schema"}else N="Invalid Schema";g({showToast:!0,toastMessage:N,toastDetail:"",toastType:"error"})};return o.jsxs("div",{children:[o.jsx(Os,{maximizable:!0,header:"Add Checklist",visible:f,style:{width:"30vw"},onHide:()=>A(),footer:_(),children:o.jsxs("div",{className:"scroll-height-500",children:[o.jsx("h5",{children:"Checklist"}),o.jsx(so,{rows:2,cols:50,value:r,onChange:H=>{var N;i((N=H==null?void 0:H.target)==null?void 0:N.value)}}),o.jsx("h5",{children:"Actions when user selects No"}),a.map((H,N)=>o.jsxs("div",{children:[N+1,"."," ",o.jsx(so,{value:H,onChange:z=>{var ce;const U=[...a];U[N]=(ce=z==null?void 0:z.target)==null?void 0:ce.value,s(U)},rows:2,cols:50})," ",o.jsx(Ft,{text:!0,type:"button",icon:"pi pi-trash",className:"p-button-danger",onClick:()=>C(N)}),o.jsx("br",{}),o.jsx("br",{})]},`actionIndex-${N}`)),o.jsx(Ft,{text:!0,className:" p-button-info mr-2",onClick:()=>{s([...a,""])},children:"Add Action"})]})})," ",o.jsx("h5",{children:"Reviewer Checklist"}),o.jsx(Ft,{text:!0,className:"mb-5 mr-2 p-button-success",label:"Add Review Checklist",onClick:()=>{v()}}),o.jsx(Ft,{text:!0,label:"Copy Schema ",onClick:()=>{O([...(e==null?void 0:e.reviewerChecklist)||[]])},className:"mb-5 mr-2"}),o.jsx(Ft,{text:!0,label:"Paste Checklist ",onClick:()=>{P()},className:"mb-5 p-button-info"}),o.jsx("div",{className:"card",children:o.jsxs(ro,{value:e==null?void 0:e.reviewerChecklist,reorderableRows:!0,onRowReorder:M,scrollable:!0,children:[o.jsx(xr,{rowReorder:!0,style:{width:"3em"}}),o.jsx(xr,{field:"checklist",header:"Checklist"}),o.jsx(xr,{field:"actions",header:"Actions",body:H=>T(H)}),o.jsx(xr,{header:"",body:(H,N)=>S(H,N)})]})})]})},ese=t=>{const{onHandleChangeLayoutSettings:e,fieldState:n}=t;return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"isFieldAnFilterOption",checked:(n==null?void 0:n.isFieldAnFilterOption)||!1,onChange:r=>e("isFieldAnFilterOption",r.checked)}),o.jsx("label",{htmlFor:"isFieldAnFilterOption",children:"Is field an filter option to filter data"}),"     ",o.jsx(cn,{target:".isFieldAnFilterOption",content:"Make the field a filter for sorting data"}),o.jsx("i",{className:"isFieldAnFilterOption pi pi-question-circle text-secondary overlay-badge",style:{fontSize:"15px",cursor:"pointer",backgroundColor:"#000",color:"#fff",borderRadius:50}})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"isSortable",checked:(n==null?void 0:n.isSortable)||!1,onChange:r=>e("isSortable",r.checked)}),o.jsx("label",{htmlFor:"isSortable",children:"Enable sortable"}),"     ",o.jsx(cn,{target:".isSortable",content:"Make the field as column sortable"}),o.jsx("i",{className:"isSortable pi pi-question-circle text-secondary overlay-badge",style:{fontSize:"15px",cursor:"pointer",backgroundColor:"#000",color:"#fff",borderRadius:50}})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"isFilterable",checked:(n==null?void 0:n.isFilterable)||!1,onChange:r=>e("isFilterable",r.checked)}),o.jsx("label",{htmlFor:"isFilterable",children:"Enable filter"}),"     ",o.jsx(cn,{target:".isFilterable",content:"Filter the column data"}),o.jsx("i",{className:"isFilterable pi pi-question-circle text-secondary overlay-badge",style:{fontSize:"15px",cursor:"pointer",backgroundColor:"#000",color:"#fff",borderRadius:50}})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"resizableColumns",checked:n==null?void 0:n.resizableColumns,onChange:r=>e("resizableColumns",r.checked)}),o.jsx("label",{htmlFor:"resizableColumns",children:"Enable resizable columns"}),"     ",o.jsx(cn,{target:".resizableColumns",content:"Column width can be increase or decreased by dragging"}),o.jsx("i",{className:"resizableColumns pi pi-question-circle text-secondary overlay-badge",style:{fontSize:"15px",cursor:"pointer",backgroundColor:"#000",color:"#fff",borderRadius:50}})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"reorderableColumns",checked:n==null?void 0:n.reorderableColumns,onChange:r=>e("reorderableColumns",r.checked)}),o.jsx("label",{htmlFor:"reorderableColumns",children:"Enable reorderable columns"}),"     ",o.jsx(cn,{target:".reorderableColumns",content:"Column can ordered to show as first or last"}),o.jsx("i",{className:"reorderableColumns pi pi-question-circle text-secondary overlay-badge",style:{fontSize:"15px",cursor:"pointer",backgroundColor:"#000",color:"#fff",borderRadius:50}})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"colToggle",checked:(n==null?void 0:n.colToggle)||!1,onChange:r=>e("colToggle",r.checked)}),o.jsx("label",{htmlFor:"colToggle",children:"Enable column toggle"}),"     ",o.jsx(cn,{target:".colToggle",content:"Column can be shown and hide by settings by user"}),o.jsx("i",{className:"colToggle pi pi-question-circle text-secondary overlay-badge",style:{fontSize:"15px",cursor:"pointer",backgroundColor:"#000",color:"#fff",borderRadius:50}})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"freezeColumn",checked:(n==null?void 0:n.freezeColumn)||!1,onChange:r=>e("freezeColumn",r.checked)}),o.jsx("label",{htmlFor:"freezeColumn",children:"Enable freeze columns"}),"     ",o.jsx(cn,{target:".freezeColumn",content:"Column can sticky so the important can be in view all the time"}),o.jsx("i",{className:"freezeColumn pi pi-question-circle text-secondary overlay-badge",style:{fontSize:"15px",cursor:"pointer",backgroundColor:"#000",color:"#fff",borderRadius:50}})]})]})},tse=t=>{var c,u,d;const{fieldState:e,setFieldState:n}=t,{formBuilderSchemaLanguages:r}=sn(),i=()=>{n(f=>Object.assign({},f,{options:[...f.options,{uuid:nt(),optionText:{english:""},value:"",score:0,hyperlinkText:{english:""},abbreviationText:{english:""},custom_values:{}}]}))},a=f=>{n(h=>({...h,fieldType:{...h==null?void 0:h.fieldType,type:f}}))},s=(f,h)=>{n(g=>({...g,[f]:h}))},l=[{label:"Employee",api:"/employees/list",availableId:["user_id","employee_id"],optionValue:"employee_id",optionLabel:"first_name"},{label:"Departments",api:"/department/",availableId:["department_id"],optionValue:"department_id",optionLabel:"department_name"}];return o.jsxs("div",{className:"p-fluid",children:[o.jsx("h4",{children:"Render Type"}),o.jsxs("div",{className:"flex flex-wrap gap-3 my-2",children:[o.jsxs("div",{className:"flex align-items-center",children:[o.jsx(ia,{inputId:"renderType1",name:"renderType",value:"radio",onChange:f=>{a(f==null?void 0:f.value)},checked:((c=e==null?void 0:e.fieldType)==null?void 0:c.type)==="radio"}),o.jsx("label",{htmlFor:"ingredient1",className:"ml-2",children:"Radio"})]}),o.jsxs("div",{className:"flex align-items-center",children:[o.jsx(ia,{inputId:"renderType2",name:"renderType",value:"dropdown",onChange:f=>{a(f==null?void 0:f.value)},checked:((u=e==null?void 0:e.fieldType)==null?void 0:u.type)==="dropdown"}),o.jsx("label",{htmlFor:"ingredient2",className:"ml-2",children:"Dropdown"})]})]}),o.jsx("label",{htmlFor:"",className:"pb-2",children:"Data Source"}),o.jsxs("div",{className:"flex flex-wrap gap-3 mt-2",children:[o.jsxs("div",{className:"flex align-items-center",children:[o.jsx(ia,{inputId:"dataSourceType1",name:"dataSourceType",value:"custom",onChange:f=>{s("dataSourceType",f==null?void 0:f.value)},checked:(e==null?void 0:e.dataSourceType)==="custom"}),o.jsx("label",{htmlFor:"ingredient1",className:"ml-2",children:"Custom"})]}),o.jsxs("div",{className:"flex align-items-center",children:[o.jsx(ia,{inputId:"dataSourceType2",name:"dataSourceType",value:"database",onChange:f=>{s("dataSourceType",f==null?void 0:f.value)},checked:(e==null?void 0:e.dataSourceType)==="database"}),o.jsx("label",{htmlFor:"ingredient2",className:"ml-2",children:"Database"})]})]}),(e==null?void 0:e.dataSourceType)==="database"&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:"Select Data Source"}),o.jsx("div",{children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-6",children:[o.jsx("div",{className:"py-2",children:o.jsx("label",{children:"Datasources"})}),o.jsx(Pa,{value:e==null?void 0:e.dataSource,onChange:f=>{var h;s("optionLabel",(h=f.value)==null?void 0:h.optionLabel),s("dataSource",f.value)},options:l,placeholder:"Select a Data Source",className:"w-full "})]}),o.jsxs("div",{className:"col-6",children:[o.jsx("div",{className:"py-2",children:o.jsx("label",{htmlFor:"",className:"py-2",children:"Select Datasource Id"})}),o.jsx(Pa,{value:e==null?void 0:e.optionValue,onChange:f=>s("optionValue",f.value),options:(d=e==null?void 0:e.dataSource)==null?void 0:d.availableId,placeholder:"Source Id",className:"w-full "})]})]})})]}),(e==null?void 0:e.dataSourceType)==="custom"&&o.jsx(o.Fragment,{children:(e==null?void 0:e.options)!==void 0&&e.componentType!=="grid-component"&&e.componentType!=="matrix-dropdown"&&e.componentType!=="table"&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"scroll-height-300 pt-5",children:o.jsx(ao,{activeIndex:0,children:r!=null&&r.length?r.map((f,h)=>o.jsx(io,{tabIndex:h,header:f==null?void 0:f.language,children:o.jsx(cN,{enableCopyPaste:!0,isCustomValue:!0,fieldState:e,setFieldState:n,language:f})},h)):""})}),o.jsx(Ft,{text:!0,className:"mr-3",label:"Add",icon:"pi pi-plus",onClick:()=>i(),"aria-label":"Add"})]})})]})},nse=t=>{var u,d;const{option:e,updateCondtionOption:n,updateChildrenField:r,addChildrenField:i,removeChildrenField:a}=t,{userSelectedLanguage:s}=sn(),l=[{type:"radio",label:"Radio"},{type:"text",label:"Input Text"},{type:"text-area",label:"Text Area"},{type:"date",label:"Date Field"}],c=(f,h)=>{var g;return o.jsxs("div",{onClick:f.onClick,className:f.className,children:[o.jsx("span",{children:f.titleElement}),e.children&&((g=e.children)==null?void 0:g.length)>1&&o.jsx(Ft,{text:!0,icon:"pi pi-trash",size:"small",onClick:()=>{console.log("field",h==null?void 0:h.uuid),a(h==null?void 0:h.uuid)},"aria-label":"Filter"})]})};return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"field-checkbox mt-3",children:[o.jsx(Yr,{inputId:"showConditionalFields",onChange:f=>{n(e==null?void 0:e.uuid,f.checked,{enableConditionalField:f.checked})},checked:e==null?void 0:e.enableConditionalField}),o.jsx("label",{htmlFor:"showConditionalFields",children:"Enable Conditional Field"})]}),(e==null?void 0:e.enableConditionalField)===!0&&o.jsxs(o.Fragment,{children:[o.jsx(Ft,{text:!0,label:"Add Field",onClick:()=>{i(e==null?void 0:e.uuid)}}),o.jsx(ts,{children:((u=e.children)==null?void 0:u.length)&&((d=e.children)==null?void 0:d.map((f,h)=>{var g,v;return o.jsx(wr,{header:(g=f.label)==null?void 0:g[s==null?void 0:s.type],headerTemplate:m=>c(m,f),children:o.jsxs("div",{className:"card",children:[o.jsx("p",{children:"Choose Field Type"}),o.jsx("div",{className:"flex mb-3",children:(l==null?void 0:l.length)&&(l==null?void 0:l.map(m=>o.jsxs("div",{className:"mr-3",children:[o.jsx(ia,{inputId:"ingredient1",name:"fieldType",value:m==null?void 0:m.type,onChange:()=>r(f==null?void 0:f.uuid,{type:m==null?void 0:m.type}),checked:(f==null?void 0:f.type)===(m==null?void 0:m.type)}),o.jsx("label",{htmlFor:"ingredient1",className:"ml-2",children:m==null?void 0:m.label})]},`field_type_${f==null?void 0:f.uuid}`)))}),o.jsxs("div",{className:"field-checkbox mt-3",children:[o.jsx(Yr,{inputId:"isRequired",onChange:m=>{r(f==null?void 0:f.uuid,{attributes:{required:m.checked}})},checked:(v=f==null?void 0:f.attributes)==null?void 0:v.required}),o.jsxs("label",{htmlFor:"showConditionalFields",children:["Is Required"," "]})]}),o.jsxs(ts,{children:[o.jsx(wr,{header:"Text",children:o.jsx(ci,{header:"Text Settings",toggleable:!0,collapsed:!0,children:o.jsx("div",{className:"",children:o.jsx(Z_,{language:s,fieldState:f,onHandleChange:(m,A,w)=>{r(f==null?void 0:f.uuid,{[m]:{[A==null?void 0:A.type]:w}})}})})})}),(f==null?void 0:f.type)==="radio"&&o.jsx(wr,{header:"Radio",children:o.jsx("div",{style:{width:"100%"},children:o.jsx(p7,{option:e,fieldState:f,updateCondtionOption:n,updateChildrenField:r,addChildrenField:i,removeChildrenField:a})})})]})]})},`field-tab-${h}-${f==null?void 0:f.uuid}-${e==null?void 0:e.uuid}`)}))})]})]})},p7=t=>{var s,l;const{fieldState:e,updateCondtionOption:n,updateChildrenField:r,addChildrenField:i,removeChildrenField:a}=t;return o.jsx(o.Fragment,{children:o.jsx(ts,{children:((s=e==null?void 0:e.options)==null?void 0:s.length)&&((l=e==null?void 0:e.options)==null?void 0:l.map((c,u)=>o.jsx(wr,{header:`Option - ${c==null?void 0:c.label}`,children:o.jsx(nse,{option:c,updateCondtionOption:n,updateChildrenField:r,addChildrenField:i,removeChildrenField:a})},`hirarchey-option-${u}`)))})})};var fN={},rse=Fi&&Fi.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),_3=Fi&&Fi.__assign||function(){return _3=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},_3.apply(this,arguments)},ise=Fi&&Fi.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),ase=Fi&&Fi.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),hN=Fi&&Fi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&ise(e,t,n);return ase(e,t),e},sse=Fi&&Fi.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},ose=Fi&&Fi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(fN,"__esModule",{value:!0});var g7=hN(k),lse=ose(YI),Zu=hN(la);function pN(t){return t&&t.replace(/&nbsp;|\u202F|\u00A0/g," ").replace(/<br \/>/g,"<br>")}function cse(t){var e=document.createTextNode("");t.appendChild(e);var n=document.activeElement===t;if(e!==null&&e.nodeValue!==null&&n){var r=window.getSelection();if(r!==null){var i=document.createRange();i.setStart(e,e.nodeValue.length),i.collapse(!0),r.removeAllRanges(),r.addRange(i)}t instanceof HTMLElement&&t.focus()}}var use=function(t){rse(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.lastHtml=n.props.html,n.el=typeof n.props.innerRef=="function"?{current:null}:g7.createRef(),n.getEl=function(){return(n.props.innerRef&&typeof n.props.innerRef!="function"?n.props.innerRef:n.el).current},n.emitChange=function(r){var i=n.getEl();if(i){var a=i.innerHTML;if(n.props.onChange&&a!==n.lastHtml){var s=Object.assign({},r,{target:{value:a}});n.props.onChange(s)}n.lastHtml=a}},n}return e.prototype.render=function(){var n=this,r=this.props,i=r.tagName,a=r.html,s=r.innerRef,l=sse(r,["tagName","html","innerRef"]);return g7.createElement(i||"div",_3(_3({},l),{ref:typeof s=="function"?function(c){s(c),n.el.current=c}:s||this.el,onInput:this.emitChange,onBlur:this.props.onBlur||this.emitChange,onKeyUp:this.props.onKeyUp||this.emitChange,onKeyDown:this.props.onKeyDown||this.emitChange,contentEditable:!this.props.disabled,dangerouslySetInnerHTML:{__html:a}}),this.props.children)},e.prototype.shouldComponentUpdate=function(n){var r=this.props,i=this.getEl();return!i||pN(n.html)!==pN(i.innerHTML)?!0:r.disabled!==n.disabled||r.tagName!==n.tagName||r.className!==n.className||r.innerRef!==n.innerRef||r.placeholder!==n.placeholder||!(0,lse.default)(r.style,n.style)},e.prototype.componentDidUpdate=function(){var n=this.getEl();n&&(this.props.html!==n.innerHTML&&(n.innerHTML=this.props.html),this.lastHtml=this.props.html,cse(n))},e.propTypes={html:Zu.string.isRequired,onChange:Zu.func,disabled:Zu.bool,tagName:Zu.string,className:Zu.string,style:Zu.object,innerRef:Zu.oneOfType([Zu.object,Zu.func])},e}(g7.Component),D3=fN.default=use;const dse=t=>{var w;const e=k.useRef(null),{field:n,fieldIndex:r,pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,path:c}=t,[u,d]=k.useState(n),{userSelectedLanguage:f,fieldSettingUpdate:h,fieldSettingUpdateInlineConditional:g,gridComponentFieldSettingUpdate:v}=sn(),m=(x,S,T)=>{d(C=>({...C,[x]:{...C[x],[S==null?void 0:S.type]:T}}))};k.useEffect(()=>(A(),()=>{}),[u]);const A=()=>{const x=c.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?g(x[fa],x[ha],x[Ca],x[xa],x[Ta],x[Fa],x[Xo],x[wo],u):(x==null?void 0:x.length)>Fa&&(x==null?void 0:x.length)===Bl+1&&(n!=null&&n.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?v(x[fa],x[ha],x[Ca],x[xa],x[Ta],x[5],x[6],x[7],u):h(i,a,s,l,r,{...n,label:u==null?void 0:u.label})};return o.jsx(o.Fragment,{children:o.jsx(D3,{style:{display:"inline-block"},className:"builder-input-label-edit",innerRef:e,html:(w=n==null?void 0:n.label)==null?void 0:w[f==null?void 0:f.type],disabled:!1,onChange:x=>{var S;m("label",f,(S=x==null?void 0:x.target)==null?void 0:S.value)},tagName:"article"})})},ca=t=>{const{sectionIndex:e,fieldIndex:n}=t,{formBuilderFormSchema:r}=sn();return(r==null?void 0:r.enableFieldEnumeration)===!0?o.jsx("span",{className:"mr-2",children:o.jsx(_8,{classes:"font-medium p-1 bg-primary",level:"purple",value:`${e+1}.${n+1}`})}):o.jsx(o.Fragment,{})},m7=t=>{var f,h,g,v,m,A,w,x,S,T,C,E,_,M;const{field:e,update:n,value:r,isFirst:i,isDisabled:a}=t,{isBuilderMode:s,isAdmin:l}=Ht(),{selectedLanguage:c}=sn(),[u,d]=k.useState(0);return k.useEffect(()=>{const O=Gt.addListener("onSubmitUserForm",()=>{var P;(P=e==null?void 0:e.attributes)!=null&&P.required?r!=null&&r[e.uuid]?e.isValid=__:e.isValid=mZ:e.isValid=1}),F=Gt.addListener("OnInvalidFieldCatch",P=>{(e==null?void 0:e.uuid)===(P==null?void 0:P.fieldId)?d(vZ):d(bZ)});return()=>{O.remove(),F.remove()}}),o.jsxs("div",{className:"",children:[(e==null?void 0:e.type)===yZ&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex align-items-center mb-3",children:[" ",i===!0&&o.jsx(ca,{...t}),((f=e==null?void 0:e.attributes)==null?void 0:f.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",s?o.jsx(dse,{...t}):o.jsx("div",{className:"text-gray-900 font-bold text-xl",children:(h=e==null?void 0:e.label)==null?void 0:h[c]})]}),((g=e==null?void 0:e.options)==null?void 0:g.length)&&((v=e==null?void 0:e.options)==null?void 0:v.map(O=>{var F,P;return o.jsxs("div",{children:[o.jsxs("div",{className:"flex align-items-center mb-2",children:[o.jsx(ia,{inputId:O.uuid,name:e==null?void 0:e.uuid,value:O.uuid,onChange:H=>{(!l||!a)&&n(e==null?void 0:e.uuid,H==null?void 0:H.value)},checked:(r==null?void 0:r[e.uuid])===O.uuid,disabled:l||a}),o.jsx("label",{htmlFor:O.uuid,className:"ml-2",children:O.label})]}),(O==null?void 0:O.enableConditionalField)===!0&&(r==null?void 0:r[e==null?void 0:e.uuid])===(O==null?void 0:O.uuid)&&(O==null?void 0:O.children)&&((F=O==null?void 0:O.children)==null?void 0:F.length)>0&&((P=O==null?void 0:O.children)==null?void 0:P.map(()=>o.jsx(m7,{...t},`radio_child_${r==null?void 0:r[e==null?void 0:e.uuid]}`)))]},`${O.uuid}-radio-wrapper-${e==null?void 0:e.uuid}`)}))]}),(e==null?void 0:e.type)===AZ&&o.jsx(o.Fragment,{children:o.jsxs("div",{className:"card p-fluid",children:[o.jsxs("label",{htmlFor:"",children:[" ",((m=e==null?void 0:e.attributes)==null?void 0:m.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",e==null?void 0:e.label[c]]}),o.jsx(wn,{className:"mt-2",onChange:O=>{var F;return n(e==null?void 0:e.uuid,(F=O==null?void 0:O.target)==null?void 0:F.value)},value:r==null?void 0:r.uuid,placeholder:(A=e==null?void 0:e.placeholder)==null?void 0:A[c],disabled:l||a})]})}),(e==null?void 0:e.type)===wZ&&o.jsx(o.Fragment,{children:o.jsxs("div",{className:"card p-fluid",children:[o.jsxs("label",{htmlFor:"",children:[" ",((w=e==null?void 0:e.attributes)==null?void 0:w.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",e==null?void 0:e.label[c]]}),o.jsx(ef,{className:"mt-2",onChange:O=>{var F;return n(e==null?void 0:e.uuid,(F=O==null?void 0:O.target)==null?void 0:F.value)},value:r==null?void 0:r.uuid,placeholder:(x=e==null?void 0:e.placeholder)==null?void 0:x[c],disabled:l||a})]})}),(e==null?void 0:e.type)===SZ&&o.jsx(o.Fragment,{children:o.jsxs("div",{className:"card p-fluid",children:[o.jsxs("label",{htmlFor:"",children:[" ",((S=e==null?void 0:e.attributes)==null?void 0:S.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",e==null?void 0:e.label[c]]}),o.jsx(so,{className:"mt-2",onChange:O=>{var F;return n(e==null?void 0:e.uuid,(F=O==null?void 0:O.target)==null?void 0:F.value)},value:r==null?void 0:r.uuid,placeholder:(T=e==null?void 0:e.placeholder)==null?void 0:T[c],disabled:l||a})]})}),o.jsx("div",{children:((C=e==null?void 0:e.helperText)==null?void 0:C[c])!==""&&o.jsx("small",{children:(E=e==null?void 0:e.helperText)==null?void 0:E[c]})}),o.jsx("div",{children:((_=e==null?void 0:e.attributes)==null?void 0:_.required)&&o.jsx("small",{className:"error",children:u===1&&!(r!=null&&r[e.uuid])?(M=e==null?void 0:e.validationMesssage)==null?void 0:M.language:""})})]},`${e==null?void 0:e.uuid}-radio`)},fse=t=>{const{hirarechicalRadioSchemaState:e}=t,[n,r]=k.useState({});return o.jsx("div",{children:o.jsx(m7,{schema:e,field:e,update:(i,a)=>{const s={...n};s[i]=a,r(s)},value:n,sectionIndex:0,fieldIndex:0,pageIndex:0,rowIndex:0,columnIndex:0,path:""})})},v7={showHeaderText:!1,showHelperText:!1,showToolTip:!1,showLabel:!0,label:{english:"Field label"},abbreviationLabel:{english:""},helperText:{english:"Helper Text"},guidelines:{english:""},headerText:{english:"Header text"},textTable:{english:""},toolTip:{english:""},validationMesssage:{english:"This field is required"},placeholder:{english:""},enableConditionalField:!0},hse={uuid:nt(),...v7,type:"radio",value:null,options:[{uuid:nt(),label:"Yes",value:null,enableConditionalField:!0,children:[]},{uuid:nt(),label:"No",value:null,enableConditionalField:!0,children:[]}]};({uuid:nt(),...v7,options:(nt(),{uuid:nt(),...v7,options:(nt(),nt())},nt())});const pse=t=>{const{fieldState:e,setFieldState:n}=t,r=(f,h,g)=>g==null?void 0:g.map(v=>{var m;return v.uuid===f?{...v,...h}:{...v,children:v!=null&&v.children&&((m=v==null?void 0:v.children)==null?void 0:m.length)>0?[...v.children.map(A=>A.type==="radio"?{...A,options:r(f,h,(A==null?void 0:A.options)||[])}:{...A})]:[]}}),i=(f,h,g)=>{const v=r(f,g,e.options);n(m=>({...m,options:v}))},a=(f,h,g)=>g==null?void 0:g.map(v=>{var m;return{...v,children:v!=null&&v.children&&((m=v==null?void 0:v.children)==null?void 0:m.length)>0?[...v.children.map(A=>A.uuid===f?{...A,...h}:{...A,options:a(f,h,A==null?void 0:A.options)})]:[]}}),s=(f,h)=>{const g=a(f,h,e.options);n(v=>({...v,options:g}))},l=(f,h)=>h==null?void 0:h.map(g=>{var v;return{...g,children:g!=null&&g.children&&((v=g==null?void 0:g.children)==null?void 0:v.length)>0?[...g.children.filter(m=>{if(m.uuid!==f)return{...m,options:l(f,m==null?void 0:m.options)}})]:[]}}),c=(f,h,g)=>g==null?void 0:g.map(v=>{var m;return v.children&&v.uuid===f?{...v,children:[...v.children,h]}:{...v,children:v!=null&&v.children&&((m=v==null?void 0:v.children)==null?void 0:m.length)>0?[...v.children.map(A=>({...A,options:c(f,h,A==null?void 0:A.options)}))]:[]}}),u=f=>{const h=c(f,{...hse,isValid:0,uuid:nt(),options:[{uuid:nt(),label:"Yes",value:null,enableConditionalField:!0,children:[]},{uuid:nt(),label:"No",value:null,enableConditionalField:!0,children:[]}],isPostField:!1,showAlphabetList:!1,showButtonLayout:!1,answerOptions:[],isExternalSource:!1,underLined:!1,noOfMultpleAnswer:void 0,isAllowMultipleAnswer:!1,isIcon:!1,isTodayBtn:!1,resizableColumns:!1,isFilterable:!1,freezeColumn:!1,colToggle:!1,isFieldAnFilterOption:!1,isSortable:!1,reorderableColumns:!1,timeLimit:0,score:0,subject_id:0,course_category_id:0,TextEditorProps:!1,fieldData:void 0},e.options);n(g=>({...g,options:h}))},d=f=>{const h=l(f,e.options);n(g=>({...g,options:h}))};return o.jsx("div",{children:o.jsx("div",{className:" px-4",children:o.jsxs("div",{className:"grid",children:[o.jsx("div",{className:"col-6 scroll-height-200",children:(e==null?void 0:e.isHierarchalCondionalTabEnabled)===!0&&o.jsx(p7,{fieldState:e,updateCondtionOption:i,updateChildrenField:s,addChildrenField:u,removeChildrenField:d})}),o.jsxs("div",{className:"col-6 p-3 scroll-height-200",children:[o.jsx("h4",{className:"flex justify-content-center align-items-center",children:"Preview"}),o.jsx(fse,{hirarechicalRadioSchemaState:e})]})]})})})},Qi=t=>{var Z;const{formBuilderFormSchema:e,fieldSettingUpdate:n,fieldSettingUpdateInlineConditional:r,formBuilderSchemaLanguages:i,pageSettingUpdate:a,formBuilderFormLayout:s,formBuilderPublishedStatus:l,gridComponentFieldSettingUpdate:c}=sn(),{renderType:u}=Ht(),{visibilty:d,field:f,closeSettingFieldSidebar:h,pageIndex:g,sectionIndex:v,rowIndex:m,columnIndex:A,fieldIndex:w,path:x,row:S,typeName:T}=t,{updateGlobalToast:C}=Ht(),[E,_]=k.useState(f),M=x.split("-"),O=()=>{const K=x.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?r(K[fa],K[ha],K[Ca],K[xa],K[Ta],K[Fa],K[Xo],K[wo],E):(K==null?void 0:K.length)>Fa&&(K==null?void 0:K.length)===Bl+1&&(E!=null&&E.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?c(K[fa],K[ha],K[Ca],K[xa],K[Ta],K[5],K[6],K[7],E):(n(g,v,m,A,w,{...E}),setTimeout(()=>{Gt.emit("OnSignatureSettingChange",{})},1e3),setTimeout(()=>{Gt.emit("onUpdateField",{})},1e3)),C({showToast:!0,toastMessage:"Updated",toastDetail:`${T} updated`,toastType:"success"})},F=(K,W,me)=>{_(be=>({...be,[K]:{...be[K],[W==null?void 0:W.type]:me}}))},P=(K,W)=>{_(me=>({...me,attributes:{...me.attributes,[K]:W}}))},H=(K,W)=>{_(me=>({...me,[K]:W}))},N=(K,W)=>{_(me=>({...me,inlineConditional:{...me.inlineConditional,[K]:W}}))},z=()=>{},U=()=>{_(K=>({...K,data:[...K.data,{uuid:nt(),dataKey:"",value:""}]}))},ce=()=>{_(K=>Object.assign({},K,{options:[...K.options,{uuid:nt(),optionText:{english:""},value:"",score:0,hyperlinkText:{english:""},abbreviationText:{english:""},custom_values:{}}]}))},X=()=>{},R=()=>{},ue=()=>{},Y=()=>{},ie=K=>{var Te;const W=[...(E==null?void 0:E.conditionalTabRules.rules)||[]],me=W.filter((ye,fe)=>K!==fe);_(ye=>({...ye,conditionalTabRules:{...ye.conditionalTabRules,rules:me}}));const be=W[K];(Te=be==null?void 0:be.conditions)==null||Te.map(ye=>{const fe=_t.findIndex(s,q=>{var ee;return(q==null?void 0:q.uuid)===((ee=ye==null?void 0:ye.tab)==null?void 0:ee.uuid)}),ne=s[fe];ne&&(ne.isHidden=!1,a(fe,ne))})},re=(K,W)=>{const me=[...(E==null?void 0:E.conditionalTabRules.rules)||[]];me[K].conditions=me[K].conditions.filter((be,Te)=>W!==Te),_(be=>({...be,conditionalTabRules:{...be.conditionalTabRules,rules:me}}))};return o.jsx(o.Fragment,{children:o.jsxs(To,{style:{width:"80vw",zIndex:7e3},visible:d,position:"left",className:"p-sidebar-lg",onHide:()=>h(),header:()=>{var K;return o.jsx("div",{className:"flex align-items-center gap-2 justify-content-between",children:o.jsxs("div",{className:"text-gray-900 font-bold text-2xl",children:[(K=f==null?void 0:f.label)==null?void 0:K.english," "]})})},"aria-label":"Field Setting Sidebar",children:[o.jsx("div",{className:"",children:o.jsxs(ts,{children:[o.jsx(wr,{header:"Text",children:o.jsx("div",{className:"scroll-height-200",children:o.jsx(ao,{activeIndex:0,children:i!=null&&i.length?i.map((K,W)=>o.jsx(io,{tabIndex:W,header:K==null?void 0:K.language,children:o.jsx(Z_,{language:K,fieldState:E,onHandleChange:F,...t})},W)):""})})}),(E==null?void 0:E.isValidationTabEnabled)===!0&&o.jsx(wr,{header:"Validation",children:o.jsx(yte,{fieldState:E,onHandleChangeLayoutSettings:H,onHandleChangeAttributesSetttings:P,...t})}),o.jsx(wr,{header:"Attributes",children:o.jsx("div",{className:"scroll-height-200",children:o.jsx(Ate,{fieldState:E,onHandleChangeLayoutSettings:H,onHandleChangeAttributesSetttings:P})})}),(E==null?void 0:E.isLayoutTabEnabled)===!0&&o.jsx(wr,{header:"Layout",children:o.jsx("div",{className:"scroll-height-200",children:o.jsx(Fte,{fieldState:E,onHandleChangeLayoutSettings:H})})}),(E==null?void 0:E.isDynamicListingTabEnabled)===!0&&o.jsx(wr,{header:"Dynamic Options",children:o.jsx("div",{className:"scroll-height-200",children:o.jsx(tse,{fieldState:E,setFieldState:_})})}),(E==null?void 0:E.options)!==void 0&&(E==null?void 0:E.data)&&o.jsx(wr,{header:"Data",children:o.jsxs("div",{className:"scroll-height-200",children:[o.jsx(kte,{onHandleChangeLayoutSettings:H,fieldState:E,setFieldState:_}),o.jsx(Ft,{className:"mr-3",label:"Data Option",icon:"pi pi-plus",onClick:()=>U(),"aria-label":"Add"})]})}),o.jsx(wr,{header:"Table view options",children:o.jsx(ese,{fieldState:E,onHandleChangeLayoutSettings:H})}),(E==null?void 0:E.componentType)!=="radio-hierarchal"&&(E==null?void 0:E.options)!==void 0&&f.componentType!=="grid-component"&&f.componentType!=="matrix-dropdown"&&f.componentType!=="table"&&o.jsxs(wr,{header:"Options",children:[(E==null?void 0:E.componentType)!=="radio-hierarchal"&&o.jsx("div",{className:"flex justify-content-end",children:o.jsx(Ft,{className:"mr-3 mb-2",label:"Option",icon:"pi pi-plus",onClick:()=>ce(),"aria-label":"Option"})}),o.jsxs("div",{className:"scroll-height-200 px-4",children:[o.jsx(ao,{activeIndex:0,children:i!=null&&i.length?i.map((K,W)=>o.jsx(io,{tabIndex:W,header:K==null?void 0:K.language,children:o.jsx(cN,{enableAbbreviationColumn:(E==null?void 0:E.componentType)!=="radio-hierarchal",enableHyperTextColumn:(E==null?void 0:E.componentType)!=="radio-hierarchal",enableAddNewColumn:(E==null?void 0:E.componentType)!=="radio-hierarchal",enableCopyPaste:(E==null?void 0:E.componentType)!=="radio-hierarchal",isCustomValue:!1,fieldState:E,setFieldState:_,language:K})},W)):""}),(E==null?void 0:E.isHierarchalCondionalTabEnabled)===!0&&o.jsx(p7,{fieldState:E,onHandleChangeLayoutSettings:H,removeChildrenField:Y,addChildrenField:ue,updateChildrenField:R,updateCondtionOption:X})]})]}),(E==null?void 0:E.componentType)==="radio-hierarchal"&&(E==null?void 0:E.options)!==void 0&&f.componentType!=="grid-component"&&f.componentType!=="matrix-dropdown"&&f.componentType!=="table"&&o.jsx(wr,{header:"Hierarchal Options",children:o.jsx(pse,{fieldState:E,setFieldState:_})}),u===e3&&(E==null?void 0:E.inlineConditionalRules)!==void 0&&!(S!=null&&S.rowIsRepeatable)&&(M==null?void 0:M.length)<wo+1&&o.jsx(wr,{header:"Conditional",children:o.jsx(Jae,{handleRemoveConditionalTabRule:ie,handleRemoveConditionalTabRuleCondition:re,onHandleSelectInlineConditionalOption:z,onHandleChangeLayoutSettings:H,onHandleChangeInlineConditionaltSetttings:N,fieldState:E,setFieldState:_,pageIndex:g,sectionIndex:v,...t})}),!((Z=t==null?void 0:t.row)!=null&&Z.rowIsRepeatable)&&(e==null?void 0:e.enableReviewTask)===!0&&o.jsx(wr,{header:"Admin",children:o.jsx(Zae,{fieldState:E,setFieldState:_})})]})}),o.jsx("div",{className:"w-full px-4 py-3 surface-100 sidebar-footer",children:o.jsxs("div",{className:"flex flex-row gap-2 align-items-center justify-content-end",children:[o.jsx(Ft,{text:!0,label:"Close",type:"button",icon:"pi pi-times",onClick:()=>h(),"aria-label":"Close",size:"small",className:"p-button-danger"}),!l&&o.jsx(Ft,{size:"small",label:"Update",type:"button",outlined:!0,onClick:()=>O(),"aria-label":"Update"})]})})]})})},ki=t=>{const[e,n]=k.useState(null),{field:r}=t,{userTaskSubmitFormData:i,updateUserFormDataSubmit:a}=Ar();k.useEffect(()=>{var h,g;if(i!==null&&e===null){let v=0;r!=null&&r.rowIsRepeatable?v=i.findIndex(m=>(m==null?void 0:m.rowId)===(r==null?void 0:r.uuid)):v=i.findIndex(m=>(m==null?void 0:m.fieldId)===(r==null?void 0:r.uuid)),n((h=i[v])!=null&&h.reviewerChecklist?(g=i[v])==null?void 0:g.reviewerChecklist:[])}return()=>{}},[r==null?void 0:r.rowIsRepeatable,r==null?void 0:r.uuid,e,i]);const s=h=>{const g=i.findIndex(m=>(m==null?void 0:m.fieldId)===(r==null?void 0:r.uuid)),v=[...i];v[g]={...v[g],reviewerChecklist:h},a(v)},l=(h,g)=>{const v=e;v[g]={...v[g],agree:h==null?void 0:h.value},n([...v]),s(v)},c=(h,g)=>{const v=e;if(g!=null&&g.checked)v[h].selectAction.push(g==null?void 0:g.value);else{const m=v[h].selectAction.findIndex(A=>A===(g==null?void 0:g.value));v[h].selectAction.splice(m,1)}n([...v]),s(v)},u=(h,g)=>{const v=e;h!=null&&h.checked?v[g]={...v[g],other:{...v[g].other,isOther:!0}}:v[g]={...v[g],other:{...v[g].other,isOther:!1}},n([...v]),s(v)},d=(h,g)=>{var m;const v=e;v[g]={...v[g],other:{...v[g].other,description:(m=h==null?void 0:h.target)==null?void 0:m.value}},n([...v]),s(v)},f=(h,g,v)=>{var A;const m=e;m[v]={...m[v],[g]:(A=h==null?void 0:h.target)==null?void 0:A.value},n([...m]),s(m)};return o.jsx(o.Fragment,{children:e!==null&&(e==null?void 0:e.length)>0?o.jsx("div",{className:"col-12",children:o.jsx(ts,{children:o.jsx(wr,{header:"Admin Review",children:o.jsx("div",{className:"grid",children:e==null?void 0:e.map((h,g)=>{var v,m,A,w,x;return o.jsx("div",{className:"col-4 p-fluid p-3",children:o.jsxs("div",{className:"card",children:[o.jsx("h6",{className:"mb-2",children:h==null?void 0:h.checklist}),o.jsx("br",{}),o.jsxs("div",{className:"field-radiobutton",children:[o.jsx(ia,{inputId:`yes-${g}`,name:"action",value:!0,onChange:S=>{l(S,g)},checked:(h==null?void 0:h.agree)===!0}),o.jsx("label",{htmlFor:`yes-${g}`,children:"Yes"})]}),o.jsxs("div",{className:"field-radiobutton",children:[o.jsx(ia,{inputId:`no-${g}`,name:"action",value:!1,onChange:S=>{l(S,g)},checked:(h==null?void 0:h.agree)===!1}),o.jsx("label",{htmlFor:`no-${g}`,children:"No"})]}),(h==null?void 0:h.agree)===!1&&o.jsxs("div",{className:"px-5 mb-3",children:[(h==null?void 0:h.action)&&Array.isArray(h.action)&&((v=h==null?void 0:h.action)==null?void 0:v.length)>0&&((m=h==null?void 0:h.action)==null?void 0:m.map((S,T)=>{var C;return o.jsxs("div",{children:[o.jsx(Yr,{value:S,checked:((C=h==null?void 0:h.selectAction)==null?void 0:C.length)>0?h==null?void 0:h.selectAction.some(E=>E===S):!1,onChange:E=>{c(g,E)}})," ",S," ",o.jsx("br",{}),o.jsx("br",{})]},`action-${g}-${T}`)})),o.jsx(Yr,{checked:(A=h==null?void 0:h.other)==null?void 0:A.isOther,onChange:S=>{u(S,g)}})," Other ",o.jsx("br",{}),o.jsx("br",{}),((w=h==null?void 0:h.other)==null?void 0:w.isOther)===!0&&o.jsxs("div",{className:"",children:[o.jsx("label",{children:"If other please specify the action point"}),o.jsx("br",{}),o.jsx(so,{className:"mt-3",value:(x=h==null?void 0:h.other)==null?void 0:x.description,onChange:S=>d(S,g)})]})]}),(h==null?void 0:h.agree)===!1&&o.jsxs("div",{className:"",children:[o.jsx("label",{children:"Reviewer Feedback "}),o.jsx("br",{}),o.jsx(so,{className:"mt-3",value:h==null?void 0:h.reviewerFeedback,onChange:S=>f(S,"reviewerFeedback",g)})]}),o.jsxs("div",{className:"",children:[o.jsx("label",{children:"Reviewer Comments / Notes (internal use only)"}),o.jsx("br",{}),o.jsx(so,{className:"mt-3",value:h==null?void 0:h.reviewerComments,onChange:S=>f(S,"reviewerComments",g)})]})]})},`checklistIndex-${g}`)})})})})}):o.jsx(o.Fragment,{})})},xi=t=>{const{isPreview:e,field:n,isAdmin:r,fieldWrap:i}=t,{userSelectedLanguage:a}=sn(),{globalAlignment:s}=Ht(),l=g=>{const v=g.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",m=`${g.className} justify-content-start`,A=`${g.titleClassName} pl-1`;return o.jsxs("div",{className:m,children:[o.jsxs("button",{className:g.togglerClassName,onClick:g.onTogglerClick,children:[o.jsx("span",{className:v}),o.jsx(Qt,{})]}),o.jsx("span",{className:A,children:d})]})},{TASK_PUBLISHED:c,task_status:u}=Ar(),[d,f]=k.useState("");k.useEffect(()=>{var g;f((g=n==null?void 0:n.label)==null?void 0:g[a==null?void 0:a.type])},[n,a==null?void 0:a.type]);const h=()=>{let g="";return e||(g=g+" field-form-builder"),u===c&&r===!0&&(g=g+" card"),g};return o.jsx(o.Fragment,{children:o.jsx("div",{dir:s,className:h(),children:u===c&&r===!0?o.jsx(ci,{headerTemplate:l,toggleable:!0,children:i}):i})})};/*! @license DOMPurify 3.1.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.7/LICENSE */const{entries:gN,setPrototypeOf:mN,isFrozen:gse,getPrototypeOf:mse,getOwnPropertyDescriptor:vse}=Object;let{freeze:Eo,seal:jl,create:vN}=Object,{apply:b7,construct:y7}=typeof Reflect<"u"&&Reflect;Eo||(Eo=function(e){return e}),jl||(jl=function(e){return e}),b7||(b7=function(e,n,r){return e.apply(n,r)}),y7||(y7=function(e,n){return new e(...n)});const N3=ml(Array.prototype.forEach),bN=ml(Array.prototype.pop),Jp=ml(Array.prototype.push),O3=ml(String.prototype.toLowerCase),A7=ml(String.prototype.toString),yN=ml(String.prototype.match),Zp=ml(String.prototype.replace),bse=ml(String.prototype.indexOf),yse=ml(String.prototype.trim),xc=ml(Object.prototype.hasOwnProperty),Io=ml(RegExp.prototype.test),e2=Ase(TypeError);function ml(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return b7(t,e,r)}}function Ase(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return y7(t,n)}}function hi(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:O3;mN&&mN(t,null);let r=e.length;for(;r--;){let i=e[r];if(typeof i=="string"){const a=n(i);a!==i&&(gse(e)||(e[r]=a),i=a)}t[i]=!0}return t}function wse(t){for(let e=0;e<t.length;e++)xc(t,e)||(t[e]=null);return t}function J0(t){const e=vN(null);for(const[n,r]of gN(t))xc(t,n)&&(Array.isArray(r)?e[n]=wse(r):r&&typeof r=="object"&&r.constructor===Object?e[n]=J0(r):e[n]=r);return e}function t2(t,e){for(;t!==null;){const r=vse(t,e);if(r){if(r.get)return ml(r.get);if(typeof r.value=="function")return ml(r.value)}t=mse(t)}function n(){return null}return n}const AN=Eo(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),w7=Eo(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),S7=Eo(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Sse=Eo(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),C7=Eo(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Cse=Eo(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),wN=Eo(["#text"]),SN=Eo(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),x7=Eo(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),CN=Eo(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),F3=Eo(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),xse=jl(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Tse=jl(/<%[\w\W]*|[\w\W]*%>/gm),Ese=jl(/\${[\w\W]*}/gm),Ise=jl(/^data-[\-\w.\u00B7-\uFFFF]/),_se=jl(/^aria-[\-\w]+$/),xN=jl(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Dse=jl(/^(?:\w+script|data):/i),Nse=jl(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),TN=jl(/^html$/i),Ose=jl(/^[a-z][.\w]*(-[.\w]+)+$/i);var EN=Object.freeze({__proto__:null,MUSTACHE_EXPR:xse,ERB_EXPR:Tse,TMPLIT_EXPR:Ese,DATA_ATTR:Ise,ARIA_ATTR:_se,IS_ALLOWED_URI:xN,IS_SCRIPT_OR_DATA:Dse,ATTR_WHITESPACE:Nse,DOCTYPE_NAME:TN,CUSTOM_ELEMENT:Ose});const n2={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Fse=function(){return typeof window>"u"?null:window},kse=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(r=n.getAttribute(i));const a="dompurify"+(r?"#"+r:"");try{return e.createPolicy(a,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function IN(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Fse();const e=It=>IN(It);if(e.version="3.1.7",e.removed=[],!t||!t.document||t.document.nodeType!==n2.document)return e.isSupported=!1,e;let{document:n}=t;const r=n,i=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:l,Element:c,NodeFilter:u,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:f,DOMParser:h,trustedTypes:g}=t,v=c.prototype,m=t2(v,"cloneNode"),A=t2(v,"remove"),w=t2(v,"nextSibling"),x=t2(v,"childNodes"),S=t2(v,"parentNode");if(typeof s=="function"){const It=n.createElement("template");It.content&&It.content.ownerDocument&&(n=It.content.ownerDocument)}let T,C="";const{implementation:E,createNodeIterator:_,createDocumentFragment:M,getElementsByTagName:O}=n,{importNode:F}=r;let P={};e.isSupported=typeof gN=="function"&&typeof S=="function"&&E&&E.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:H,ERB_EXPR:N,TMPLIT_EXPR:z,DATA_ATTR:U,ARIA_ATTR:ce,IS_SCRIPT_OR_DATA:X,ATTR_WHITESPACE:R,CUSTOM_ELEMENT:ue}=EN;let{IS_ALLOWED_URI:Y}=EN,ie=null;const re=hi({},[...AN,...w7,...S7,...C7,...wN]);let Z=null;const K=hi({},[...SN,...x7,...CN,...F3]);let W=Object.seal(vN(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),me=null,be=null,Te=!0,ye=!0,fe=!1,ne=!0,q=!1,ee=!0,oe=!1,pe=!1,_e=!1,Ne=!1,ve=!1,Ae=!1,Be=!0,Ee=!1;const $="user-content-";let ge=!0,le=!1,se={},he=null;const Se=hi({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let De=null;const Me=hi({},["audio","video","img","source","image","track"]);let ze=null;const tt=hi({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),it="http://www.w3.org/1998/Math/MathML",ht="http://www.w3.org/2000/svg",Ut="http://www.w3.org/1999/xhtml";let hn=Ut,$t=!1,mn=null;const En=hi({},[it,ht,Ut],A7);let Tt=null;const je=["application/xhtml+xml","text/html"],He="text/html";let ot=null,rn=null;const nn=n.createElement("form"),Jt=function(Fe){return Fe instanceof RegExp||Fe instanceof Function},_n=function(){let Fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(rn&&rn===Fe)){if((!Fe||typeof Fe!="object")&&(Fe={}),Fe=J0(Fe),Tt=je.indexOf(Fe.PARSER_MEDIA_TYPE)===-1?He:Fe.PARSER_MEDIA_TYPE,ot=Tt==="application/xhtml+xml"?A7:O3,ie=xc(Fe,"ALLOWED_TAGS")?hi({},Fe.ALLOWED_TAGS,ot):re,Z=xc(Fe,"ALLOWED_ATTR")?hi({},Fe.ALLOWED_ATTR,ot):K,mn=xc(Fe,"ALLOWED_NAMESPACES")?hi({},Fe.ALLOWED_NAMESPACES,A7):En,ze=xc(Fe,"ADD_URI_SAFE_ATTR")?hi(J0(tt),Fe.ADD_URI_SAFE_ATTR,ot):tt,De=xc(Fe,"ADD_DATA_URI_TAGS")?hi(J0(Me),Fe.ADD_DATA_URI_TAGS,ot):Me,he=xc(Fe,"FORBID_CONTENTS")?hi({},Fe.FORBID_CONTENTS,ot):Se,me=xc(Fe,"FORBID_TAGS")?hi({},Fe.FORBID_TAGS,ot):{},be=xc(Fe,"FORBID_ATTR")?hi({},Fe.FORBID_ATTR,ot):{},se=xc(Fe,"USE_PROFILES")?Fe.USE_PROFILES:!1,Te=Fe.ALLOW_ARIA_ATTR!==!1,ye=Fe.ALLOW_DATA_ATTR!==!1,fe=Fe.ALLOW_UNKNOWN_PROTOCOLS||!1,ne=Fe.ALLOW_SELF_CLOSE_IN_ATTR!==!1,q=Fe.SAFE_FOR_TEMPLATES||!1,ee=Fe.SAFE_FOR_XML!==!1,oe=Fe.WHOLE_DOCUMENT||!1,Ne=Fe.RETURN_DOM||!1,ve=Fe.RETURN_DOM_FRAGMENT||!1,Ae=Fe.RETURN_TRUSTED_TYPE||!1,_e=Fe.FORCE_BODY||!1,Be=Fe.SANITIZE_DOM!==!1,Ee=Fe.SANITIZE_NAMED_PROPS||!1,ge=Fe.KEEP_CONTENT!==!1,le=Fe.IN_PLACE||!1,Y=Fe.ALLOWED_URI_REGEXP||xN,hn=Fe.NAMESPACE||Ut,W=Fe.CUSTOM_ELEMENT_HANDLING||{},Fe.CUSTOM_ELEMENT_HANDLING&&Jt(Fe.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(W.tagNameCheck=Fe.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Fe.CUSTOM_ELEMENT_HANDLING&&Jt(Fe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(W.attributeNameCheck=Fe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Fe.CUSTOM_ELEMENT_HANDLING&&typeof Fe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(W.allowCustomizedBuiltInElements=Fe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),q&&(ye=!1),ve&&(Ne=!0),se&&(ie=hi({},wN),Z=[],se.html===!0&&(hi(ie,AN),hi(Z,SN)),se.svg===!0&&(hi(ie,w7),hi(Z,x7),hi(Z,F3)),se.svgFilters===!0&&(hi(ie,S7),hi(Z,x7),hi(Z,F3)),se.mathMl===!0&&(hi(ie,C7),hi(Z,CN),hi(Z,F3))),Fe.ADD_TAGS&&(ie===re&&(ie=J0(ie)),hi(ie,Fe.ADD_TAGS,ot)),Fe.ADD_ATTR&&(Z===K&&(Z=J0(Z)),hi(Z,Fe.ADD_ATTR,ot)),Fe.ADD_URI_SAFE_ATTR&&hi(ze,Fe.ADD_URI_SAFE_ATTR,ot),Fe.FORBID_CONTENTS&&(he===Se&&(he=J0(he)),hi(he,Fe.FORBID_CONTENTS,ot)),ge&&(ie["#text"]=!0),oe&&hi(ie,["html","head","body"]),ie.table&&(hi(ie,["tbody"]),delete me.tbody),Fe.TRUSTED_TYPES_POLICY){if(typeof Fe.TRUSTED_TYPES_POLICY.createHTML!="function")throw e2('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Fe.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw e2('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');T=Fe.TRUSTED_TYPES_POLICY,C=T.createHTML("")}else T===void 0&&(T=kse(g,i)),T!==null&&typeof C=="string"&&(C=T.createHTML(""));Eo&&Eo(Fe),rn=Fe}},wt=hi({},["mi","mo","mn","ms","mtext"]),Ke=hi({},["annotation-xml"]),st=hi({},["title","style","font","a","script"]),vt=hi({},[...w7,...S7,...Sse]),Vt=hi({},[...C7,...Cse]),On=function(Fe){let Qe=S(Fe);(!Qe||!Qe.tagName)&&(Qe={namespaceURI:hn,tagName:"template"});const At=O3(Fe.tagName),jt=O3(Qe.tagName);return mn[Fe.namespaceURI]?Fe.namespaceURI===ht?Qe.namespaceURI===Ut?At==="svg":Qe.namespaceURI===it?At==="svg"&&(jt==="annotation-xml"||wt[jt]):!!vt[At]:Fe.namespaceURI===it?Qe.namespaceURI===Ut?At==="math":Qe.namespaceURI===ht?At==="math"&&Ke[jt]:!!Vt[At]:Fe.namespaceURI===Ut?Qe.namespaceURI===ht&&!Ke[jt]||Qe.namespaceURI===it&&!wt[jt]?!1:!Vt[At]&&(st[At]||!vt[At]):!!(Tt==="application/xhtml+xml"&&mn[Fe.namespaceURI]):!1},$n=function(Fe){Jp(e.removed,{element:Fe});try{S(Fe).removeChild(Fe)}catch{A(Fe)}},lr=function(Fe,Qe){try{Jp(e.removed,{attribute:Qe.getAttributeNode(Fe),from:Qe})}catch{Jp(e.removed,{attribute:null,from:Qe})}if(Qe.removeAttribute(Fe),Fe==="is"&&!Z[Fe])if(Ne||ve)try{$n(Qe)}catch{}else try{Qe.setAttribute(Fe,"")}catch{}},Wn=function(Fe){let Qe=null,At=null;if(_e)Fe="<remove></remove>"+Fe;else{const Zt=yN(Fe,/^[\r\n\t ]+/);At=Zt&&Zt[0]}Tt==="application/xhtml+xml"&&hn===Ut&&(Fe='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Fe+"</body></html>");const jt=T?T.createHTML(Fe):Fe;if(hn===Ut)try{Qe=new h().parseFromString(jt,Tt)}catch{}if(!Qe||!Qe.documentElement){Qe=E.createDocument(hn,"template",null);try{Qe.documentElement.innerHTML=$t?C:jt}catch{}}const Xt=Qe.body||Qe.documentElement;return Fe&&At&&Xt.insertBefore(n.createTextNode(At),Xt.childNodes[0]||null),hn===Ut?O.call(Qe,oe?"html":"body")[0]:oe?Qe.documentElement:Xt},vr=function(Fe){return _.call(Fe.ownerDocument||Fe,Fe,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Nr=function(Fe){return Fe instanceof f&&(typeof Fe.nodeName!="string"||typeof Fe.textContent!="string"||typeof Fe.removeChild!="function"||!(Fe.attributes instanceof d)||typeof Fe.removeAttribute!="function"||typeof Fe.setAttribute!="function"||typeof Fe.namespaceURI!="string"||typeof Fe.insertBefore!="function"||typeof Fe.hasChildNodes!="function")},yn=function(Fe){return typeof l=="function"&&Fe instanceof l},lt=function(Fe,Qe,At){P[Fe]&&N3(P[Fe],jt=>{jt.call(e,Qe,At,rn)})},ut=function(Fe){let Qe=null;if(lt("beforeSanitizeElements",Fe,null),Nr(Fe))return $n(Fe),!0;const At=ot(Fe.nodeName);if(lt("uponSanitizeElement",Fe,{tagName:At,allowedTags:ie}),Fe.hasChildNodes()&&!yn(Fe.firstElementChild)&&Io(/<[/\w]/g,Fe.innerHTML)&&Io(/<[/\w]/g,Fe.textContent)||Fe.nodeType===n2.progressingInstruction||ee&&Fe.nodeType===n2.comment&&Io(/<[/\w]/g,Fe.data))return $n(Fe),!0;if(!ie[At]||me[At]){if(!me[At]&&Nt(At)&&(W.tagNameCheck instanceof RegExp&&Io(W.tagNameCheck,At)||W.tagNameCheck instanceof Function&&W.tagNameCheck(At)))return!1;if(ge&&!he[At]){const jt=S(Fe)||Fe.parentNode,Xt=x(Fe)||Fe.childNodes;if(Xt&&jt){const Zt=Xt.length;for(let Sn=Zt-1;Sn>=0;--Sn){const Mn=m(Xt[Sn],!0);Mn.__removalCount=(Fe.__removalCount||0)+1,jt.insertBefore(Mn,w(Fe))}}}return $n(Fe),!0}return Fe instanceof c&&!On(Fe)||(At==="noscript"||At==="noembed"||At==="noframes")&&Io(/<\/no(script|embed|frames)/i,Fe.innerHTML)?($n(Fe),!0):(q&&Fe.nodeType===n2.text&&(Qe=Fe.textContent,N3([H,N,z],jt=>{Qe=Zp(Qe,jt," ")}),Fe.textContent!==Qe&&(Jp(e.removed,{element:Fe.cloneNode()}),Fe.textContent=Qe)),lt("afterSanitizeElements",Fe,null),!1)},yt=function(Fe,Qe,At){if(Be&&(Qe==="id"||Qe==="name")&&(At in n||At in nn))return!1;if(!(ye&&!be[Qe]&&Io(U,Qe))){if(!(Te&&Io(ce,Qe))){if(!Z[Qe]||be[Qe]){if(!(Nt(Fe)&&(W.tagNameCheck instanceof RegExp&&Io(W.tagNameCheck,Fe)||W.tagNameCheck instanceof Function&&W.tagNameCheck(Fe))&&(W.attributeNameCheck instanceof RegExp&&Io(W.attributeNameCheck,Qe)||W.attributeNameCheck instanceof Function&&W.attributeNameCheck(Qe))||Qe==="is"&&W.allowCustomizedBuiltInElements&&(W.tagNameCheck instanceof RegExp&&Io(W.tagNameCheck,At)||W.tagNameCheck instanceof Function&&W.tagNameCheck(At))))return!1}else if(!ze[Qe]){if(!Io(Y,Zp(At,R,""))){if(!((Qe==="src"||Qe==="xlink:href"||Qe==="href")&&Fe!=="script"&&bse(At,"data:")===0&&De[Fe])){if(!(fe&&!Io(X,Zp(At,R,"")))){if(At)return!1}}}}}}return!0},Nt=function(Fe){return Fe!=="annotation-xml"&&yN(Fe,ue)},An=function(Fe){lt("beforeSanitizeAttributes",Fe,null);const{attributes:Qe}=Fe;if(!Qe)return;const At={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Z};let jt=Qe.length;for(;jt--;){const Xt=Qe[jt],{name:Zt,namespaceURI:Sn,value:Mn}=Xt,zn=ot(Zt);let at=Zt==="value"?Mn:yse(Mn);if(At.attrName=zn,At.attrValue=at,At.keepAttr=!0,At.forceKeepAttr=void 0,lt("uponSanitizeAttribute",Fe,At),at=At.attrValue,At.forceKeepAttr||(lr(Zt,Fe),!At.keepAttr))continue;if(!ne&&Io(/\/>/i,at)){lr(Zt,Fe);continue}q&&N3([H,N,z],Pe=>{at=Zp(at,Pe," ")});const ae=ot(Fe.nodeName);if(yt(ae,zn,at)){if(Ee&&(zn==="id"||zn==="name")&&(lr(Zt,Fe),at=$+at),ee&&Io(/((--!?|])>)|<\/(style|title)/i,at)){lr(Zt,Fe);continue}if(T&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!Sn)switch(g.getAttributeType(ae,zn)){case"TrustedHTML":{at=T.createHTML(at);break}case"TrustedScriptURL":{at=T.createScriptURL(at);break}}try{Sn?Fe.setAttributeNS(Sn,Zt,at):Fe.setAttribute(Zt,at),Nr(Fe)?$n(Fe):bN(e.removed)}catch{}}}lt("afterSanitizeAttributes",Fe,null)},Nn=function It(Fe){let Qe=null;const At=vr(Fe);for(lt("beforeSanitizeShadowDOM",Fe,null);Qe=At.nextNode();)lt("uponSanitizeShadowNode",Qe,null),!ut(Qe)&&(Qe.content instanceof a&&It(Qe.content),An(Qe));lt("afterSanitizeShadowDOM",Fe,null)};return e.sanitize=function(It){let Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Qe=null,At=null,jt=null,Xt=null;if($t=!It,$t&&(It="<!-->"),typeof It!="string"&&!yn(It))if(typeof It.toString=="function"){if(It=It.toString(),typeof It!="string")throw e2("dirty is not a string, aborting")}else throw e2("toString is not a function");if(!e.isSupported)return It;if(pe||_n(Fe),e.removed=[],typeof It=="string"&&(le=!1),le){if(It.nodeName){const Mn=ot(It.nodeName);if(!ie[Mn]||me[Mn])throw e2("root node is forbidden and cannot be sanitized in-place")}}else if(It instanceof l)Qe=Wn("<!---->"),At=Qe.ownerDocument.importNode(It,!0),At.nodeType===n2.element&&At.nodeName==="BODY"||At.nodeName==="HTML"?Qe=At:Qe.appendChild(At);else{if(!Ne&&!q&&!oe&&It.indexOf("<")===-1)return T&&Ae?T.createHTML(It):It;if(Qe=Wn(It),!Qe)return Ne?null:Ae?C:""}Qe&&_e&&$n(Qe.firstChild);const Zt=vr(le?It:Qe);for(;jt=Zt.nextNode();)ut(jt)||(jt.content instanceof a&&Nn(jt.content),An(jt));if(le)return It;if(Ne){if(ve)for(Xt=M.call(Qe.ownerDocument);Qe.firstChild;)Xt.appendChild(Qe.firstChild);else Xt=Qe;return(Z.shadowroot||Z.shadowrootmode)&&(Xt=F.call(r,Xt,!0)),Xt}let Sn=oe?Qe.outerHTML:Qe.innerHTML;return oe&&ie["!doctype"]&&Qe.ownerDocument&&Qe.ownerDocument.doctype&&Qe.ownerDocument.doctype.name&&Io(TN,Qe.ownerDocument.doctype.name)&&(Sn="<!DOCTYPE "+Qe.ownerDocument.doctype.name+`>
2290
- `+Sn),q&&N3([H,N,z],Mn=>{Sn=Zp(Sn,Mn," ")}),T&&Ae?T.createHTML(Sn):Sn},e.setConfig=function(){let It=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_n(It),pe=!0},e.clearConfig=function(){rn=null,pe=!1},e.isValidAttribute=function(It,Fe,Qe){rn||_n({});const At=ot(It),jt=ot(Fe);return yt(At,jt,Qe)},e.addHook=function(It,Fe){typeof Fe=="function"&&(P[It]=P[It]||[],Jp(P[It],Fe))},e.removeHook=function(It){if(P[It])return bN(P[It])},e.removeHooks=function(It){P[It]&&(P[It]=[])},e.removeAllHooks=function(){P={}},e}var k3=IN();const aa=t=>{var x;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,path:l}=t,[c,u]=k.useState(e);k.useEffect(()=>{var S;return A((S=e==null?void 0:e.label)==null?void 0:S[d==null?void 0:d.type]),()=>{}},[e]);const{userSelectedLanguage:d,fieldSettingUpdate:f,fieldSettingUpdateInlineConditional:h,gridComponentFieldSettingUpdate:g}=sn(),v=(S,T,C)=>{u(E=>({...E,[S]:{...E[S],[T==null?void 0:T.type]:C}}))},[m,A]=k.useState((x=e==null?void 0:e.label)==null?void 0:x[d==null?void 0:d.type]);k.useEffect(()=>(w(),()=>{}),[c]);const w=()=>{const S=l.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?h(S[fa],S[ha],S[Ca],S[xa],S[Ta],S[Fa],S[Xo],S[wo],c):(S==null?void 0:S.length)>Fa&&(S==null?void 0:S.length)===Bl+1&&(e!=null&&e.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?g(S[fa],S[ha],S[Ca],S[xa],S[Ta],S[5],S[6],S[7],c):f(r,i,a,s,n,{...e,label:c==null?void 0:c.label})};return o.jsx(o.Fragment,{children:o.jsx(D3,{style:{display:"inline-block"},className:"builder-input-label-edit",html:m,disabled:!1,onChange:S=>{var T;A(k3.sanitize((T=S==null?void 0:S.target)==null?void 0:T.value))},onBlur:S=>{var C;const T=k3.sanitize((C=S==null?void 0:S.target)==null?void 0:C.innerText);A(T),v("label",d,T)},tagName:"article"})})},Z0=t=>{const{onLabel:e,offLabel:n,onIcon:r,offIcon:i,onHandleChangeSetttings:a,settingsKey:s,settingsKeyValue:l}=t;return o.jsx(o.Fragment,{children:o.jsx(qp,{checked:l,onLabel:e,onChange:c=>{a(s,c.value)},offLabel:n,onIcon:r,offIcon:i,className:"mr-1 px-1",style:{fontSize:"0.8rem"}})})},Wr=t=>{var ce,X,R,ue;const{field:e,fieldIndex:n,columnIndex:r,sectionIndex:i,rowIndex:a,pageIndex:s,type:l,path:c,handleFieldSettingsSidebar:u,showFieldIcons:d=!0,showSettingsIcon:f=!0}=t,{emitSocketData:h,renderType:g}=Ht(),v=(Y,ie)=>{P(re=>({...re,[Y]:ie}))},{fieldSettingUpdate:m,fieldSettingUpdateInlineConditional:A,cloneField:w,gridComponentFieldSettingUpdate:x,fieldSettingDeleteInlineConditional:S,gridComponentFieldDelete:T,removeField:C}=sn(),{updateGlobalToast:E}=Ht(),_=Y=>{const ie=c.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?A(ie[fa],ie[ha],ie[Ca],ie[xa],ie[Ta],ie[Fa],ie[Xo],ie[wo],Y):(ie==null?void 0:ie.length)>Fa&&(ie==null?void 0:ie.length)===Bl+1&&(Y!=null&&Y.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?x(ie[fa],ie[ha],ie[Ca],ie[xa],ie[Ta],ie[5],ie[6],ie[7],Y):m(s,i,a,r,n,Y),E({showToast:!0,toastMessage:"Updated",toastDetail:"Field updated",toastType:"success"})},[M,O]=k.useState(!1),[F,P]=k.useState({custom_component_title:"",custom_component_description:""}),H=()=>{P(Y=>({...Y,custom_component_schema:e})),O(!0)},N=()=>{const Y=c.split("-").map(Number);l==="inline-conditional"?S(Y[fa],Y[ha],Y[Ca],Y[xa],Y[Ta],Y[Fa],Y[Xo],Y[wo]):(Y==null?void 0:Y.length)>Fa&&(Y==null?void 0:Y.length)===Bl+1&&(e!=null&&e.componentType)&&l==="grid"?T(Y[fa],Y[ha],Y[Ca],Y[xa],Y[Ta],Y[5],Y[6],Y[7]):C(s,i,a,r,n)},z=(Y,ie)=>{const re={...e,attributes:{...e.attributes,[Y]:ie}};_(re)},U=(Y,ie)=>{const re={...e,[Y]:ie};_(re)};return o.jsx(o.Fragment,{children:o.jsxs("div",{className:`${(e==null?void 0:e.componentType)!=="hidden-field"&&(e==null?void 0:e.componentType)!=="image"&&(e==null?void 0:e.componentType)!=="quiz"&&(e==null?void 0:e.componentType)!=="document"&&(e==null?void 0:e.componentType)!=="href"&&(e==null?void 0:e.componentType)!=="paragraph"&&(e==null?void 0:e.componentType)!=="heading"&&(e==null?void 0:e.componentType)!=="list"&&(e==null?void 0:e.componentType)!=="hr"&&(e==null?void 0:e.componentType)!=="image-gallery"&&(e==null?void 0:e.componentType)!=="video"&&(e==null?void 0:e.componentType)!=="question","builder-element-quick-options mb-2 w-3 justify-content-center"} flex quick-setting`,children:[o.jsx(o.Fragment,{children:(e==null?void 0:e.componentType)!=="hidden-field"&&(e==null?void 0:e.componentType)!=="document"&&(e==null?void 0:e.componentType)!=="quiz"&&(e==null?void 0:e.componentType)!=="image"&&(e==null?void 0:e.componentType)!=="href"&&(e==null?void 0:e.componentType)!=="paragraph"&&(e==null?void 0:e.componentType)!=="heading"&&(e==null?void 0:e.componentType)!=="list"&&(e==null?void 0:e.componentType)!=="hr"&&(e==null?void 0:e.componentType)!=="image-gallery"&&(e==null?void 0:e.componentType)!=="video"&&(e==null?void 0:e.componentType)!=="question"&&d===!1&&o.jsxs("div",{className:" ",children:[o.jsx(Z0,{field:e,onHandleChangeSetttings:z,settingsKey:"required",settingsKeyValue:(ce=e==null?void 0:e.attributes)==null?void 0:ce.required,onLabel:"Required",offLabel:"Not Required",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:(X=e==null?void 0:e.attributes)==null?void 0:X.required}),o.jsx(Z0,{field:e,onHandleChangeSetttings:U,settingsKey:"showToolTip",settingsKeyValue:e==null?void 0:e.showToolTip,onLabel:"Tooltip",offLabel:"Tooltip",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:e==null?void 0:e.showToolTip}),o.jsx(Z0,{field:e,onHandleChangeSetttings:U,settingsKey:"showHelperText",settingsKeyValue:e==null?void 0:e.showHelperText,onLabel:"Helper text",offLabel:"Helper text",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:e==null?void 0:e.showHelperText}),o.jsx(Z0,{field:e,onHandleChangeSetttings:U,settingsKey:"showHeaderText",settingsKeyValue:e==null?void 0:e.showHeaderText,onLabel:"Header text",offLabel:"Header text",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:e==null?void 0:e.showHeaderText}),o.jsx(Z0,{field:e,onHandleChangeSetttings:U,settingsKey:"isFluid",settingsKeyValue:e==null?void 0:e.isFluid,onLabel:"Fluid",offLabel:"Fluid",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:e==null?void 0:e.isFluid}),(e==null?void 0:e.componentType)=="radio"&&o.jsxs(o.Fragment,{children:[o.jsx(Z0,{field:e,onHandleChangeSetttings:U,settingsKey:"showAlphabetList",settingsKeyValue:e==null?void 0:e.showAlphabetList,onLabel:"Alpha",offLabel:"Alpha",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:e==null?void 0:e.showAlphabetList}),o.jsx(Z0,{field:e,onHandleChangeSetttings:z,settingsKey:"style",settingsKeyValue:(R=e==null?void 0:e.attributes)==null?void 0:R.style,onLabel:"Style",offLabel:"Style",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:(ue=e==null?void 0:e.attributes)==null?void 0:ue.style})]})]})}),o.jsxs("div",{className:"quick-setting",children:[f===!0&&o.jsxs("span",{className:"p-buttonset",children:[(e==null?void 0:e.componentType)!=="hr"&&o.jsx(Ft,{text:!0,size:"small",tooltip:"Advanced settings",icon:"pi pi-cog",onClick:()=>{u(!0)},className:"mr-3"}),o.jsx(Ft,{size:"small",text:!0,icon:"pi pi-clone",outlined:!0,onClick:()=>{w(e,s,i,a,r,n),h()},tooltip:"Clone"}),o.jsx(Ft,{text:!0,className:"p-button-danger",size:"small",outlined:!0,icon:"pi pi-trash",onClick:()=>{N()},tooltip:"Delete"}),(g===e3||g===k0)&&o.jsx(Ft,{text:!0,size:"small",outlined:!0,icon:"pi pi-file",tooltip:"Save as custom component",onClick:()=>{H()}})]}),o.jsxs(Os,{header:"Custom component save",visible:M,style:{width:"20vw"},footer:()=>o.jsx(o.Fragment,{children:o.jsxs("div",{children:[o.jsx(Ft,{size:"small",text:!0,label:"Close",icon:"pi pi-times",onClick:()=>O(!1),className:"p-button-text"}),(e==null?void 0:e.componentType)!=="hidden-field"&&o.jsx(Ft,{text:!0,label:"Save",icon:"pi pi-check",onClick:()=>{O(!1)},autoFocus:!0})]})}),onHide:()=>O(!1),children:[o.jsxs("span",{className:"p-float-label",children:[o.jsx(wn,{id:"custom_component_title",name:"custom_component_title",className:"w-full",value:(F==null?void 0:F.custom_component_title)||"",onChange:Y=>{var ie;return v("custom_component_title",(ie=Y==null?void 0:Y.target)==null?void 0:ie.value)}}),o.jsx("label",{htmlFor:"username",children:"Custom component title"})]}),o.jsxs("span",{className:"p-float-label mt-5",children:[o.jsx(so,{id:"custom_component_description",name:"custom_component_description",className:"w-full",value:(F==null?void 0:F.custom_component_description)||"",onChange:Y=>{var ie;return v("custom_component_description",(ie=Y==null?void 0:Y.target)==null?void 0:ie.value)}}),o.jsx("label",{htmlFor:"username",children:"Custom component description"})]})]})]})]})})},Pse=t=>{var re,Z,K,W,me,be,Te,ye;const{pageIndex:e,sectionIndex:n,field:r,fieldIndex:i,row:a,rowIndex:s,columnIndex:l,isDisabled:c}=t,{isAdmin:u,isBuilderMode:d}=Ht(),{userSelectedLanguage:f,fieldSettingUpdate:h}=sn(),{taskRegisterData:g,updateTaskRegisterData:v,updateTaskProgressValue:m,updateUserFormDataSubmit:A,userTaskSubmitFormData:w}=Ar(),[x,S]=k.useState(!1),[T,C]=k.useState(!1),[E,_]=k.useState(null),[M,O]=k.useState(0),[F,P]=k.useState(!1),H=()=>{P(!0)},N=()=>{P(!1)},z=fe=>{S(fe)},U=()=>{S(!1)},ce=()=>{var fe,ne,q;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const ee=[...a.repeatableFields],oe=_t.findIndex(ee,function(pe){return pe.uuid===(r==null?void 0:r.uuid)});oe>=0&&ee[oe].fieldData?_(ee[oe].fieldData):(r.isValid=0,_(null))}}else{const ee=w,oe=_t.cloneDeep(g);if(ee!=null&&ee.length){for(const pe of ee)if(pe.fieldId===t.field.uuid&&((fe=pe==null?void 0:pe.postData)!=null&&fe.length)){_((ne=pe==null?void 0:pe.postData[0])==null?void 0:ne.postValue),oe[r==null?void 0:r.uuid]=(q=pe==null?void 0:pe.postData[0])==null?void 0:q.postValue;const _e=Object.keys(oe).length;m(_e);break}}}C(!0)},X=fe=>{var oe;_(fe.target.value);const ne=w,q=_t.cloneDeep(g);if((oe=fe==null?void 0:fe.target)!=null&&oe.value&&(ne==null?void 0:ne.length)>0)for(const pe of ne)pe.fieldId===t.field.uuid&&(q[r==null?void 0:r.uuid]=fe==null?void 0:fe.value,pe.postData[0]={postValue:fe.value});else delete q[r==null?void 0:r.uuid];v(q);const ee=Object.keys(q).length;m(ee)};k.useEffect(()=>{T||ce();const fe=Gt.addListener("clearRepeatableFields",ee=>{ee===(a==null?void 0:a.uuid)&&(_(null),O(0),r.isValid=0,h(e,n,s,l,i,r))}),ne=Gt.addListener("onSubmitUserForm",()=>{var ee;(ee=r==null?void 0:r.attributes)!=null&&ee.required?E!==null||E!==void 0?r.isValid=1:(console.log("Countr field in valid ",E),r.isValid=0):r.isValid=1}),q=Gt.addListener("OnInvalidFieldCatch",ee=>{console.log("OnInvalidFieldCatch listener"),console.log("field.uuid === value?.fieldId",r.uuid===(ee==null?void 0:ee.fieldId)),r.uuid===(ee==null?void 0:ee.fieldId)?O(1):O(0)});return()=>{ne.remove(),q.remove(),fe.remove()}});const R=(fe,ne)=>{var q;if(w){const ee=[...w],oe=_t.findIndex(ee,function(_e){return _e.rowId===(a==null?void 0:a.uuid)});let pe=(q=w[oe])==null?void 0:q.repeatableFields;pe={...pe,[fe==null?void 0:fe.uuid]:ne==null?void 0:ne.name},ee[oe]={...ee[oe],repeatableFields:pe},A(ee)}_(ne),ne!==null?fe.isValid=1:fe.isValid=0},ue=(fe,ne)=>fe?o.jsxs("div",{className:"country-item flex",children:[o.jsx("img",{alt:fe.name,src:fe==null?void 0:fe.image,onError:q=>q.target.src="https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png",style:{width:"20px",marginRight:10}}),o.jsx("div",{children:fe.name})]}):o.jsx("span",{children:ne.placeholder}),Y=fe=>o.jsxs("div",{className:"country-item flex",children:[o.jsx("img",{alt:fe.name,src:fe==null?void 0:fe.image,onError:ne=>ne.target.src="https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png",style:{width:"20px",marginRight:10}}),o.jsx("div",{children:fe.name})]}),ie=o.jsxs("div",{onMouseOver:H,onMouseOut:N,children:[d&&F&&o.jsx(Wr,{handleFieldSettingsSidebar:z,...t}),o.jsxs("div",{className:`field ${d&&" py-3 px-4 builder-element-wrapper "}${(r==null?void 0:r.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:d?"field-form-builder col-12 ":"col-12 ",children:[(r==null?void 0:r.showHeaderText)&&o.jsx("h6",{children:(re=r==null?void 0:r.headerText)==null?void 0:re[f==null?void 0:f.type]}),(r==null?void 0:r.showLabel)&&o.jsxs("label",{htmlFor:i,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((Z=r==null?void 0:r.attributes)==null?void 0:Z.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",d?o.jsx(aa,{...t}):o.jsx(o.Fragment,{children:(K=r==null?void 0:r.label)==null?void 0:K[f==null?void 0:f.type]}),o.jsx("span",{className:"ml-3",children:(r==null?void 0:r.showToolTip)&&o.jsx(zi,{message:(W=r==null?void 0:r.toolTip)==null?void 0:W[f==null?void 0:f.type],position:"right"})})]}),o.jsx(Pa,{className:"country-select-builder-component",onFocus:()=>O(1),onChange:fe=>{a!=null&&a.rowIsRepeatable?R(r,fe.target.value):X(fe)},options:r==null?void 0:r.countries,optionLabel:"name",value:E,placeholder:(me=r==null?void 0:r.placeholder)==null?void 0:me[f==null?void 0:f.type],disabled:c,valueTemplate:ue,itemTemplate:Y,filter:!0,filterBy:"name",showClear:!0}),((be=r==null?void 0:r.attributes)==null?void 0:be.required)&&o.jsx("small",{className:"error",children:M===1&&E===null?((Te=r==null?void 0:r.validationMesssage)==null?void 0:Te[f==null?void 0:f.type])||"field is required":""}),o.jsx("div",{children:(r==null?void 0:r.showHelperText)&&o.jsx("small",{children:(ye=r==null?void 0:r.helperText)==null?void 0:ye[f==null?void 0:f.type]})})]})}),u&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[x===!0&&o.jsx(Qi,{visibilty:x,closeSettingFieldSidebar:U,...t},r==null?void 0:r.uuid),o.jsx(xi,{...t,fieldWrap:ie})]})},Mse=t=>{var re,Z,K,W,me,be,Te,ye,fe,ne,q,ee,oe,pe,_e;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a}=Ar(),{userSelectedLanguage:s,fieldSettingUpdate:l}=sn(),{field:c,fieldIndex:u,sectionIndex:d,pageIndex:f,row:h,rowIndex:g,columnIndex:v,isDisabled:m}=t,{isAdmin:A,isBuilderMode:w}=Ht(),[x,S]=k.useState(!1),[T,C]=k.useState(""),[E,_]=k.useState(null),[M,O]=k.useState(0),[F,P]=k.useState(!1),[H,N]=k.useState(!1),z=()=>{N(!0)},U=()=>{N(!1)},ce=()=>{var Ne,ve,Ae;if(h!=null&&h.rowIsRepeatable){if(h!=null&&h.repeatableFields){const Be=[...h.repeatableFields],Ee=_t.findIndex(Be,function($){return $.uuid===(c==null?void 0:c.uuid)});Ee>=0&&Be[Ee].fieldData?C(Be[Ee].fieldData):C("")}}else{const Be=a;if(Be!=null&&Be.length){for(const Ee of Be)if(Ee.fieldId===t.field.uuid&&((Ne=Ee==null?void 0:Ee.postData[0])==null?void 0:Ne.postValue)!==""&&((ve=Ee==null?void 0:Ee.postData[0])!=null&&ve.postValue)){C((Ae=Ee==null?void 0:Ee.postData[0])==null?void 0:Ae.postValue);break}}}P(!0)};k.useEffect(()=>{F||ce();const Ne=Gt.addListener("clearRepeatableFields",$=>{$===(h==null?void 0:h.uuid)&&(C(""),O(0),c.isValid=0,l(f,d,g,v,u,c))}),ve=Gt.addListener("onSubmitUserForm",()=>{var $,ge;($=c==null?void 0:c.attributes)!=null&&$.required?T&&T.length&&(T==null?void 0:T.length)<((ge=c==null?void 0:c.attributes)==null?void 0:ge.minLength)?c.isValid=1:c.isValid=0:c.isValid=1}),Ae=Gt.addListener("OnInvalidFieldCatch",$=>{c.uuid===($==null?void 0:$.fieldId)?O(1):O(0)}),Be=Gt.addListener("OnGetFieldValue",$=>{var le;const ge=(le=$==null?void 0:$.repeatableColumn)==null?void 0:le.filter(se=>(se==null?void 0:se.fieldUuid)===(c==null?void 0:c.uuid));ge!=null&&ge.length}),Ee=Gt.addListener("formFieldAdded",$=>{E===null&&_($==null?void 0:$.uuid)});return()=>{ve.remove(),Ae.remove(),Be.remove(),Ne.remove(),Ee.remove()}}),k.useEffect(()=>(E!==null&&setTimeout(()=>{_(null)},1e3),()=>{}),[E]);const X=Ne=>{S(Ne)},R=()=>{S(!1)},ue=Ne=>{var Be,Ee;C(Ne.target.value);const ve=a,Ae=_t.cloneDeep(e);if(ve!==null){if((Be=Ne==null?void 0:Ne.target)!=null&&Be.value){if(Ae[c==null?void 0:c.uuid]=(Ee=Ne==null?void 0:Ne.target)==null?void 0:Ee.value,(ve==null?void 0:ve.length)>0)for(const $ of ve)$.fieldId===t.field.uuid&&($.postData[0]={postValue:Ne.target.value})}else if(delete Ae[c==null?void 0:c.uuid],(ve==null?void 0:ve.length)>0)for(const $ of ve)$.fieldId===t.field.uuid&&($.postData[0]={postValue:""})}if(!(h!=null&&h.rowIsRepeatable)){n(Ae);const $=Object.keys(Ae).length;r($)}},Y=(Ne,ve)=>{var Ae;if(a){const Be=[...a],Ee=_t.findIndex(Be,function(ge){return ge.rowId===(h==null?void 0:h.uuid)});let $=(Ae=a[Ee])==null?void 0:Ae.repeatableFields;$={...$,[Ne==null?void 0:Ne.uuid]:ve},Be[Ee]={...Be[Ee],repeatableFields:$},i(Be)}C(ve),ve!==""?Ne.isValid=1:Ne.isValid=0},ie=o.jsxs("div",{onMouseOver:z,onMouseOut:U,children:[w&&H&&o.jsx(Wr,{handleFieldSettingsSidebar:X,...t}),o.jsxs("div",{className:`field ${w&&" py-3 px-4 builder-element-wrapper "} ${(c==null?void 0:c.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:A?"col-6 ":"col-12 p-fluid",children:[(c==null?void 0:c.showHeaderText)&&o.jsx("h6",{children:(re=c==null?void 0:c.headerText)==null?void 0:re[s==null?void 0:s.type]}),(c==null?void 0:c.showLabel)&&o.jsxs("label",{htmlFor:c==null?void 0:c.uuid,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((Z=c==null?void 0:c.attributes)==null?void 0:Z.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",w===!1?o.jsx(o.Fragment,{children:(K=c==null?void 0:c.label)==null?void 0:K[s==null?void 0:s.type]}):o.jsx(aa,{...t}),(c==null?void 0:c.showToolTip)&&o.jsx("span",{className:"ml-3",children:o.jsx(zi,{message:(W=c==null?void 0:c.toolTip)==null?void 0:W[s==null?void 0:s.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs("span",{className:"p-input-icon-"+(c==null?void 0:c.iconAlignment),children:[(c==null?void 0:c.showIcon)&&o.jsx("i",{className:"pi pi-"+((be=(me=c==null?void 0:c.icon)==null?void 0:me.properties)==null?void 0:be.name)}),o.jsx(wn,{"data-component":"text-input",id:c==null?void 0:c.uuid,placeholder:(Te=c==null?void 0:c.placeholder)==null?void 0:Te[s==null?void 0:s.type],minLength:(ye=c==null?void 0:c.attributes)==null?void 0:ye.minLength,maxLength:(fe=c==null?void 0:c.attributes)==null?void 0:fe.maxLength,value:T,onFocus:()=>O(1),onChange:Ne=>{h!=null&&h.rowIsRepeatable?Y(c,Ne.target.value):ue(Ne)},className:M===1&&((ne=c==null?void 0:c.attributes)!=null&&ne.required)?T?"valid":"invalid":"valid'",readOnly:m,disabled:A})]}),o.jsx("div",{children:((q=c==null?void 0:c.attributes)==null?void 0:q.required)&&o.jsxs(o.Fragment,{children:[o.jsx("small",{className:"error",children:M===1&&!T?(ee=c==null?void 0:c.validationMesssage)==null?void 0:ee.english:""}),o.jsx("small",{className:"error",children:M===1&&T.length&&(T==null?void 0:T.length)<((oe=c==null?void 0:c.attributes)==null?void 0:oe.minLength)?`Mini length ${(pe=c==null?void 0:c.attributes)==null?void 0:pe.minLength}`:""})]})}),o.jsx("div",{children:(c==null?void 0:c.showHelperText)&&o.jsx("small",{children:(_e=c==null?void 0:c.helperText)==null?void 0:_e[s==null?void 0:s.type]})})]})]})}),A&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[x===!0&&o.jsx(Qi,{visibilty:x,closeSettingFieldSidebar:R,...t}),o.jsx(xi,{...t,fieldWrap:ie})]})},Lse=t=>{var i,a;const{language:e,onHandleChange:n,fieldState:r}=t;return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Hyperlink text"}),o.jsx(wn,{value:(i=r==null?void 0:r.text)==null?void 0:i[e==null?void 0:e.type],onChange:s=>n("text",e,s.target.value)})]}),o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Hyperlink"}),o.jsx(wn,{value:(a=r==null?void 0:r.hrefLink)==null?void 0:a[e==null?void 0:e.type],onChange:s=>n("hrefLink",e,s.target.value)})]})]})},Bse=t=>{var r;const{onHandleChangeStyling:e,fieldState:n}=t;return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field",children:[o.jsx("label",{className:"mr-2",children:"Hyperlink color"}),o.jsx(m3,{value:n==null?void 0:n.color,onChange:i=>{e("color",i.value)}})]}),o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Font Size"}),o.jsx(wn,{type:"number",maxLength:2,placeholder:"eg 20px",value:(r=Number(n==null?void 0:n.fontSize))==null?void 0:r.toFixed(0),onChange:i=>{e("fontSize",i.target.value)}})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{checked:n==null?void 0:n.underLined,onChange:i=>{e("underLined",i.checked)}}),o.jsx("label",{children:"Underline link"})]})]})},Vse=t=>{const{visibilty:e,field:n,closeSettingFieldSidebar:r,pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,fieldIndex:c,typeName:u}=t,[d,f]=k.useState(n),{fieldSettingUpdate:h,formBuilderSchemaLanguages:g,formBuilderPublishedStatus:v}=sn(),{updateGlobalToast:m}=Ht(),A=(S,T,C)=>{f(E=>({...E,[S]:{...E[S],[T==null?void 0:T.type]:C}}))},w=(S,T)=>{f(C=>({...C,[S]:T}))},x=()=>{h(i,a,s,l,c,d),m({showToast:!0,toastMessage:"Updated",toastDetail:`${u} updated`,toastType:"success"})};return o.jsx(o.Fragment,{children:o.jsxs(To,{visible:e,position:"left",className:"p-sidebar-lg",onHide:()=>r(),header:()=>{var S,T;return o.jsx("div",{className:"flex align-items-center gap-2 justify-content-between",children:o.jsxs("div",{className:"text-gray-900 font-bold text-2xl",children:[t==null?void 0:t.typeName," settings"," ",(S=n==null?void 0:n.label)!=null&&S.english?`- ${(T=n==null?void 0:n.label)==null?void 0:T.english}`:""," "]})})},children:[o.jsxs(ts,{children:[o.jsx(wr,{header:"Text",children:o.jsx(ao,{activeIndex:0,children:g!=null&&g.length?g.map((S,T)=>o.jsx(io,{tabIndex:T,header:S==null?void 0:S.language,children:o.jsx(Lse,{language:S,fieldState:d,onHandleChange:A,...t})},T)):""})}),o.jsx(wr,{header:"Styling",children:o.jsx(Bse,{fieldState:d,onHandleChangeStyling:w,...t})})]}),o.jsx("div",{className:"w-full px-4 py-3 surface-100 sidebar-footer",children:o.jsxs("div",{className:"flex flex-row gap-2 align-items-center justify-content-end",children:[!v&&o.jsx(Ft,{size:"small",label:"Update",type:"button",outlined:!0,onClick:()=>x(),"aria-label":"Update"}),o.jsx(Ft,{label:"Close",type:"button",onClick:()=>r(),"aria-label":"Close",size:"small",className:"p-button-danger"})]})})]})})},qse=t=>{var g,v,m,A,w,x,S,T,C;const{field:e}=t,{userSelectedLanguage:n}=sn(),{isBuilderMode:r}=Ht(),[i,a]=k.useState(!1),[s,l]=k.useState(!1),c=()=>{l(!0)},u=()=>{l(!1)},d=E=>{a(E)},f=()=>{a(!1)};k.useEffect(()=>{},[e]);const h=o.jsxs("div",{className:r?"builder-element-wrapper":"",onMouseOver:c,onMouseOut:u,children:[r&&s&&o.jsx(Wr,{handleFieldSettingsSidebar:d,...t}),o.jsxs("div",{className:r?"field-form-builder px-4":" px-4",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(g=e==null?void 0:e.headerText)==null?void 0:g[n==null?void 0:n.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:e.uuid,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[((v=e==null?void 0:e.attributes)==null?void 0:v.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",r?o.jsx(aa,{...t}):o.jsx(o.Fragment,{children:(m=e==null?void 0:e.label)==null?void 0:m[n==null?void 0:n.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(zi,{message:(A=e==null?void 0:e.toolTip)==null?void 0:A[n==null?void 0:n.type],position:"right"})})]}),o.jsx("a",{style:{fontSize:parseInt(e==null?void 0:e.fontSize),color:`#${e==null?void 0:e.color}`,textDecoration:e!=null&&e.underLined?"underline":"none"},className:"atag-style",href:(w=e==null?void 0:e.hrefLink)==null?void 0:w[n==null?void 0:n.type],children:(x=e==null?void 0:e.text)==null?void 0:x[n==null?void 0:n.type]}),((S=e==null?void 0:e.attributes)==null?void 0:S.required)&&o.jsx("small",{className:"error",children:(T=e==null?void 0:e.validationMesssage)==null?void 0:T[n==null?void 0:n.type]}),(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(C=e==null?void 0:e.helperText)==null?void 0:C[n==null?void 0:n.type]})]})]});return o.jsxs(o.Fragment,{children:[i&&o.jsx(Vse,{visibilty:i,closeSettingFieldSidebar:f,...t}),o.jsx(xi,{...t,fieldWrap:h})]})},Use=t=>{var K,W,me,be,Te,ye,fe,ne,q,ee,oe,pe,_e,Ne,ve,Ae,Be,Ee,$,ge,le;const{field:e,fieldIndex:n,sectionIndex:r,pageIndex:i,row:a,rowIndex:s,columnIndex:l,isDisabled:c}=t,{isAdmin:u,isBuilderMode:d}=Ht(),{taskRegisterData:f,updateTaskRegisterData:h,updateTaskProgressValue:g,updateUserFormDataSubmit:v,userTaskSubmitFormData:m,TASK_PUBLISHED:A,task_status:w}=Ar(),{userSelectedLanguage:x,fieldSettingUpdate:S}=sn(),[T,C]=k.useState(null),[E,_]=k.useState(!1),[M,O]=k.useState(null),[F,P]=k.useState(0),[H,N]=k.useState(!1),[z,U]=k.useState(!1),ce=()=>{U(!0)},X=()=>{U(!1)},R=()=>{var se,he;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const Se=[...a.repeatableFields],De=_t.findIndex(Se,function(Me){return Me.uuid===(e==null?void 0:e.uuid)});De>=0&&Se[De].fieldData?O(Number(Se[De].fieldData)||null):O(null)}}else{const Se=m;if(Se!=null&&Se.length){for(const De of Se)if(De.fieldId===t.field.uuid&&((se=De==null?void 0:De.postData)!=null&&se.length)){O(Number((he=De==null?void 0:De.postData[0])==null?void 0:he.postValue)||null);break}}}N(!0)};k.useEffect(()=>{H||R();const se=Gt.addListener("clearRepeatableFields",ze=>{ze===(a==null?void 0:a.uuid)&&(O(null),P(0),e.isValid=0,S(i,r,s,l,n,e))}),he=Gt.addListener("onSubmitUserForm",()=>{var ze;(ze=e==null?void 0:e.attributes)!=null&&ze.required?M?e.isValid=1:e.isValid=0:e.isValid=1}),Se=Gt.addListener("OnInvalidFieldCatch",ze=>{e.uuid===(ze==null?void 0:ze.fieldId)?P(1):P(0)}),De=Gt.addListener("OnGetFieldValue",ze=>{var it;const tt=(it=ze==null?void 0:ze.repeatableColumn)==null?void 0:it.filter(ht=>(ht==null?void 0:ht.fieldUuid)===(e==null?void 0:e.uuid));tt!=null&&tt.length}),Me=Gt.addListener("formFieldAdded",ze=>{T===null&&C(ze.uuid)});return()=>{he.remove(),Se.remove(),De.remove(),se.remove(),Me.remove()}}),k.useEffect(()=>(T!==null&&setTimeout(()=>{C(null)},1e3),()=>{}),[T]);const ue=se=>{_(se)},Y=()=>{_(!1)},ie=se=>{const he=m,Se=_t.cloneDeep(f);if(he!==null){if(se){if(Se[e==null?void 0:e.uuid]=se,(he==null?void 0:he.length)>0)for(const De of he)De.fieldId===t.field.uuid&&(De.postData[0]={postValue:se})}else if(delete Se[e==null?void 0:e.uuid],(he==null?void 0:he.length)>0)for(const De of he)De.fieldId===t.field.uuid&&(De.postData[0]={postValue:""})}if(!(a!=null&&a.rowIsRepeatable)){h(Se);const De=Object.keys(Se).length;g(De)}},re=(se,he)=>{var Se;if(m!=null&&m.length){const De=[...m],Me=_t.findIndex(De,function(tt){return tt.rowId===(a==null?void 0:a.uuid)});let ze=(Se=m[Me])==null?void 0:Se.repeatableFields;ze={...ze,[se==null?void 0:se.uuid]:he},De[Me]={...De[Me],repeatableFields:ze},v(De)}O(he),he!==""?se.isValid=1:se.isValid=0},Z=o.jsxs("div",{onMouseOver:ce,onMouseOut:X,children:[d===!0&&z===!0&&o.jsx(Wr,{handleFieldSettingsSidebar:ue,...t}),o.jsxs("div",{className:`field ${d===!0&&" py-3 px-4 builder-element-wrapper "} ${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:u?"col-6 ":"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(K=e==null?void 0:e.headerText)==null?void 0:K[x==null?void 0:x.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:e.uuid,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((W=e==null?void 0:e.attributes)==null?void 0:W.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",d?o.jsx(aa,{...t}):o.jsx(o.Fragment,{children:(me=e==null?void 0:e.label)==null?void 0:me[x==null?void 0:x.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(zi,{message:(be=e==null?void 0:e.toolTip)==null?void 0:be[x==null?void 0:x.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs("span",{className:"p-input-icon-"+(e==null?void 0:e.iconAlignment),children:[(e==null?void 0:e.showIcon)&&o.jsx("i",{className:"pi pi-"+((ye=(Te=e==null?void 0:e.icon)==null?void 0:Te.properties)==null?void 0:ye.name)}),o.jsx(eo,{readOnly:c,id:e==null?void 0:e.uuid,disabled:u||c,placeholder:(fe=e==null?void 0:e.placeholder)==null?void 0:fe[x==null?void 0:x.type],value:M,min:(ne=e==null?void 0:e.attributes)==null?void 0:ne.min,max:e==null?void 0:e.attributes.max,suffix:e==null?void 0:e.attributes.suffix,prefix:(q=e==null?void 0:e.attributes)==null?void 0:q.prefix,showButtons:(ee=e==null?void 0:e.attributes)==null?void 0:ee.showButtons,pt:{incrementButton:{className:"bg-teal-500 border-teal-500"},decrementButton:{className:"bg-orange-500 border-orange-500"}},minFractionDigits:(oe=e==null?void 0:e.attributes)==null?void 0:oe.minFractionDigits,maxFractionDigits:(pe=e==null?void 0:e.attributes)==null?void 0:pe.maxFractionDigits,locale:(_e=e==null?void 0:e.attributes)==null?void 0:_e.locale,mode:(Ne=e==null?void 0:e.attributes)==null?void 0:Ne.mode,currency:(ve=e==null?void 0:e.attributes)==null?void 0:ve.currency,currencyDisplay:(Ae=e==null?void 0:e.attributes)==null?void 0:Ae.currencyDisplay,useGrouping:(Be=e==null?void 0:e.attributes)==null?void 0:Be.useGrouping,onFocus:()=>P(1),onChange:se=>{a!=null&&a.rowIsRepeatable?re(e,se.value):ie(se.value)},className:F===1&&((Ee=e==null?void 0:e.attributes)!=null&&Ee.required)?M?"valid":"invalid":"valid'"})]}),o.jsx("div",{children:(($=e==null?void 0:e.attributes)==null?void 0:$.required)&&o.jsx("small",{className:"error",children:F===1&&!M?(ge=e==null?void 0:e.validationMesssage)==null?void 0:ge.english:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(le=e==null?void 0:e.helperText)==null?void 0:le[x==null?void 0:x.type]})})]})]})}),u&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[E===!0&&d===!0&&o.jsx(Qi,{visibilty:E,closeSettingFieldSidebar:Y,...t}),o.jsx(xi,{...t,fieldWrap:Z})]})};//! moment.js
2290
+ `+Sn),q&&N3([H,N,z],Mn=>{Sn=Zp(Sn,Mn," ")}),T&&Ae?T.createHTML(Sn):Sn},e.setConfig=function(){let It=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_n(It),pe=!0},e.clearConfig=function(){rn=null,pe=!1},e.isValidAttribute=function(It,Fe,Qe){rn||_n({});const At=ot(It),jt=ot(Fe);return yt(At,jt,Qe)},e.addHook=function(It,Fe){typeof Fe=="function"&&(P[It]=P[It]||[],Jp(P[It],Fe))},e.removeHook=function(It){if(P[It])return bN(P[It])},e.removeHooks=function(It){P[It]&&(P[It]=[])},e.removeAllHooks=function(){P={}},e}var k3=IN();const aa=t=>{var x;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,path:l}=t,[c,u]=k.useState(e);k.useEffect(()=>{var S;return A((S=e==null?void 0:e.label)==null?void 0:S[d==null?void 0:d.type]),()=>{}},[e]);const{userSelectedLanguage:d,fieldSettingUpdate:f,fieldSettingUpdateInlineConditional:h,gridComponentFieldSettingUpdate:g}=sn(),v=(S,T,C)=>{u(E=>({...E,[S]:{...E[S],[T==null?void 0:T.type]:C}}))},[m,A]=k.useState((x=e==null?void 0:e.label)==null?void 0:x[d==null?void 0:d.type]);k.useEffect(()=>(w(),()=>{}),[c]);const w=()=>{const S=l.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?h(S[fa],S[ha],S[Ca],S[xa],S[Ta],S[Fa],S[Xo],S[wo],c):(S==null?void 0:S.length)>Fa&&(S==null?void 0:S.length)===Bl+1&&(e!=null&&e.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?g(S[fa],S[ha],S[Ca],S[xa],S[Ta],S[5],S[6],S[7],c):f(r,i,a,s,n,{...e,label:c==null?void 0:c.label})};return o.jsx(o.Fragment,{children:o.jsx(D3,{style:{display:"inline-block"},className:"builder-input-label-edit",html:m,disabled:!1,onChange:S=>{var T;A(k3.sanitize((T=S==null?void 0:S.target)==null?void 0:T.value))},onBlur:S=>{var C;const T=k3.sanitize((C=S==null?void 0:S.target)==null?void 0:C.innerText);A(T),v("label",d,T)},tagName:"article"})})},Z0=t=>{const{onLabel:e,offLabel:n,onIcon:r,offIcon:i,onHandleChangeSetttings:a,settingsKey:s,settingsKeyValue:l}=t;return o.jsx(o.Fragment,{children:o.jsx(qp,{checked:l,onLabel:e,onChange:c=>{a(s,c.value)},offLabel:n,onIcon:r,offIcon:i,className:"mr-1 px-1",style:{fontSize:"0.8rem"}})})},Wr=t=>{var ce,X,R,ue;const{field:e,fieldIndex:n,columnIndex:r,sectionIndex:i,rowIndex:a,pageIndex:s,type:l,path:c,handleFieldSettingsSidebar:u,showFieldIcons:d=!0,showSettingsIcon:f=!0}=t,{emitSocketData:h,renderType:g}=Ht(),v=(Y,ie)=>{P(re=>({...re,[Y]:ie}))},{fieldSettingUpdate:m,fieldSettingUpdateInlineConditional:A,cloneField:w,gridComponentFieldSettingUpdate:x,fieldSettingDeleteInlineConditional:S,gridComponentFieldDelete:T,removeField:C}=sn(),{updateGlobalToast:E}=Ht(),_=Y=>{const ie=c.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?A(ie[fa],ie[ha],ie[Ca],ie[xa],ie[Ta],ie[Fa],ie[Xo],ie[wo],Y):(ie==null?void 0:ie.length)>Fa&&(ie==null?void 0:ie.length)===Bl+1&&(Y!=null&&Y.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?x(ie[fa],ie[ha],ie[Ca],ie[xa],ie[Ta],ie[5],ie[6],ie[7],Y):m(s,i,a,r,n,Y),E({showToast:!0,toastMessage:"Updated",toastDetail:"Field updated",toastType:"success"})},[M,O]=k.useState(!1),[F,P]=k.useState({custom_component_title:"",custom_component_description:""}),H=()=>{P(Y=>({...Y,custom_component_schema:e})),O(!0)},N=()=>{const Y=c.split("-").map(Number);l==="inline-conditional"?S(Y[fa],Y[ha],Y[Ca],Y[xa],Y[Ta],Y[Fa],Y[Xo],Y[wo]):(Y==null?void 0:Y.length)>Fa&&(Y==null?void 0:Y.length)===Bl+1&&(e!=null&&e.componentType)&&l==="grid"?T(Y[fa],Y[ha],Y[Ca],Y[xa],Y[Ta],Y[5],Y[6],Y[7]):C(s,i,a,r,n)},z=(Y,ie)=>{const re={...e,attributes:{...e.attributes,[Y]:ie}};_(re)},U=(Y,ie)=>{const re={...e,[Y]:ie};_(re)};return o.jsx(o.Fragment,{children:o.jsxs("div",{className:`${(e==null?void 0:e.componentType)!=="hidden-field"&&(e==null?void 0:e.componentType)!=="image"&&(e==null?void 0:e.componentType)!=="quiz"&&(e==null?void 0:e.componentType)!=="document"&&(e==null?void 0:e.componentType)!=="href"&&(e==null?void 0:e.componentType)!=="paragraph"&&(e==null?void 0:e.componentType)!=="heading"&&(e==null?void 0:e.componentType)!=="list"&&(e==null?void 0:e.componentType)!=="hr"&&(e==null?void 0:e.componentType)!=="image-gallery"&&(e==null?void 0:e.componentType)!=="video"&&(e==null?void 0:e.componentType)!=="question","builder-element-quick-options mb-2 w-3 justify-content-center"} flex quick-setting`,children:[o.jsx(o.Fragment,{children:(e==null?void 0:e.componentType)!=="hidden-field"&&(e==null?void 0:e.componentType)!=="document"&&(e==null?void 0:e.componentType)!=="quiz"&&(e==null?void 0:e.componentType)!=="image"&&(e==null?void 0:e.componentType)!=="href"&&(e==null?void 0:e.componentType)!=="paragraph"&&(e==null?void 0:e.componentType)!=="heading"&&(e==null?void 0:e.componentType)!=="list"&&(e==null?void 0:e.componentType)!=="hr"&&(e==null?void 0:e.componentType)!=="image-gallery"&&(e==null?void 0:e.componentType)!=="video"&&(e==null?void 0:e.componentType)!=="question"&&d===!1&&o.jsxs("div",{className:" ",children:[o.jsx(Z0,{field:e,onHandleChangeSetttings:z,settingsKey:"required",settingsKeyValue:(ce=e==null?void 0:e.attributes)==null?void 0:ce.required,onLabel:"Required",offLabel:"Not Required",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:(X=e==null?void 0:e.attributes)==null?void 0:X.required}),o.jsx(Z0,{field:e,onHandleChangeSetttings:U,settingsKey:"showToolTip",settingsKeyValue:e==null?void 0:e.showToolTip,onLabel:"Tooltip",offLabel:"Tooltip",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:e==null?void 0:e.showToolTip}),o.jsx(Z0,{field:e,onHandleChangeSetttings:U,settingsKey:"showHelperText",settingsKeyValue:e==null?void 0:e.showHelperText,onLabel:"Helper text",offLabel:"Helper text",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:e==null?void 0:e.showHelperText}),o.jsx(Z0,{field:e,onHandleChangeSetttings:U,settingsKey:"showHeaderText",settingsKeyValue:e==null?void 0:e.showHeaderText,onLabel:"Header text",offLabel:"Header text",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:e==null?void 0:e.showHeaderText}),o.jsx(Z0,{field:e,onHandleChangeSetttings:U,settingsKey:"isFluid",settingsKeyValue:e==null?void 0:e.isFluid,onLabel:"Fluid",offLabel:"Fluid",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:e==null?void 0:e.isFluid}),(e==null?void 0:e.componentType)=="radio"&&o.jsxs(o.Fragment,{children:[o.jsx(Z0,{field:e,onHandleChangeSetttings:U,settingsKey:"showAlphabetList",settingsKeyValue:e==null?void 0:e.showAlphabetList,onLabel:"Alpha",offLabel:"Alpha",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:e==null?void 0:e.showAlphabetList}),o.jsx(Z0,{field:e,onHandleChangeSetttings:z,settingsKey:"style",settingsKeyValue:(R=e==null?void 0:e.attributes)==null?void 0:R.style,onLabel:"Style",offLabel:"Style",onIcon:"pi pi-eye",offIcon:"pi pi-eye-slash",defaultState:(ue=e==null?void 0:e.attributes)==null?void 0:ue.style})]})]})}),o.jsxs("div",{className:"quick-setting",children:[f===!0&&o.jsxs("span",{className:"p-buttonset",children:[(e==null?void 0:e.componentType)!=="hr"&&o.jsx(Ft,{text:!0,size:"small",tooltip:"Advanced settings",icon:"pi pi-cog",onClick:()=>{u(!0)},className:"mr-3"}),o.jsx(Ft,{size:"small",text:!0,icon:"pi pi-clone",outlined:!0,onClick:()=>{w(e,s,i,a,r,n),h()},tooltip:"Clone"}),o.jsx(Ft,{text:!0,className:"p-button-danger",size:"small",outlined:!0,icon:"pi pi-trash",onClick:()=>{N()},tooltip:"Delete"}),(g===e3||g===k0)&&o.jsx(Ft,{text:!0,size:"small",outlined:!0,icon:"pi pi-file",tooltip:"Save as custom component",onClick:()=>{H()}})]}),o.jsxs(Os,{header:"Custom component save",visible:M,style:{width:"20vw"},footer:()=>o.jsx(o.Fragment,{children:o.jsxs("div",{children:[o.jsx(Ft,{size:"small",text:!0,label:"Close",icon:"pi pi-times",onClick:()=>O(!1),className:"p-button-text"}),(e==null?void 0:e.componentType)!=="hidden-field"&&o.jsx(Ft,{text:!0,label:"Save",icon:"pi pi-check",onClick:()=>{O(!1)},autoFocus:!0})]})}),onHide:()=>O(!1),children:[o.jsxs("span",{className:"p-float-label",children:[o.jsx(wn,{id:"custom_component_title",name:"custom_component_title",className:"w-full",value:(F==null?void 0:F.custom_component_title)||"",onChange:Y=>{var ie;return v("custom_component_title",(ie=Y==null?void 0:Y.target)==null?void 0:ie.value)}}),o.jsx("label",{htmlFor:"username",children:"Custom component title"})]}),o.jsxs("span",{className:"p-float-label mt-5",children:[o.jsx(so,{id:"custom_component_description",name:"custom_component_description",className:"w-full",value:(F==null?void 0:F.custom_component_description)||"",onChange:Y=>{var ie;return v("custom_component_description",(ie=Y==null?void 0:Y.target)==null?void 0:ie.value)}}),o.jsx("label",{htmlFor:"username",children:"Custom component description"})]})]})]})]})})},Pse=t=>{var re,Z,K,W,me,be,Te,ye;const{pageIndex:e,sectionIndex:n,field:r,fieldIndex:i,row:a,rowIndex:s,columnIndex:l,isDisabled:c}=t,{isAdmin:u,isBuilderMode:d}=Ht(),{userSelectedLanguage:f,fieldSettingUpdate:h}=sn(),{taskRegisterData:g,updateTaskRegisterData:v,updateTaskProgressValue:m,updateUserFormDataSubmit:A,userTaskSubmitFormData:w}=Ar(),[x,S]=k.useState(!1),[T,C]=k.useState(!1),[E,_]=k.useState(null),[M,O]=k.useState(0),[F,P]=k.useState(!1),H=()=>{P(!0)},N=()=>{P(!1)},z=fe=>{S(fe)},U=()=>{S(!1)},ce=()=>{var fe,ne,q;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const ee=[...a.repeatableFields],oe=_t.findIndex(ee,function(pe){return pe.uuid===(r==null?void 0:r.uuid)});oe>=0&&ee[oe].fieldData?_(ee[oe].fieldData):(r.isValid=0,_(null))}}else{const ee=w,oe=_t.cloneDeep(g);if(ee!=null&&ee.length){for(const pe of ee)if(pe.fieldId===t.field.uuid&&((fe=pe==null?void 0:pe.postData)!=null&&fe.length)){_((ne=pe==null?void 0:pe.postData[0])==null?void 0:ne.postValue),oe[r==null?void 0:r.uuid]=(q=pe==null?void 0:pe.postData[0])==null?void 0:q.postValue;const _e=Object.keys(oe).length;m(_e);break}}}C(!0)},X=fe=>{var oe;_(fe.target.value);const ne=w,q=_t.cloneDeep(g);if((oe=fe==null?void 0:fe.target)!=null&&oe.value&&(ne==null?void 0:ne.length)>0)for(const pe of ne)pe.fieldId===t.field.uuid&&(q[r==null?void 0:r.uuid]=fe==null?void 0:fe.value,pe.postData[0]={postValue:fe.value});else delete q[r==null?void 0:r.uuid];v(q);const ee=Object.keys(q).length;m(ee)};k.useEffect(()=>{T||ce();const fe=Gt.addListener("clearRepeatableFields",ee=>{ee===(a==null?void 0:a.uuid)&&(_(null),O(0),r.isValid=0,h(e,n,s,l,i,r))}),ne=Gt.addListener("onSubmitUserForm",()=>{var ee;(ee=r==null?void 0:r.attributes)!=null&&ee.required?E!==null||E!==void 0?r.isValid=1:(console.log("Countr field in valid ",E),r.isValid=0):r.isValid=1}),q=Gt.addListener("OnInvalidFieldCatch",ee=>{console.log("OnInvalidFieldCatch listener"),console.log("field.uuid === value?.fieldId",r.uuid===(ee==null?void 0:ee.fieldId)),r.uuid===(ee==null?void 0:ee.fieldId)?O(1):O(0)});return()=>{ne.remove(),q.remove(),fe.remove()}});const R=(fe,ne)=>{var q;if(w){const ee=[...w],oe=_t.findIndex(ee,function(_e){return _e.rowId===(a==null?void 0:a.uuid)});let pe=(q=w[oe])==null?void 0:q.repeatableFields;pe={...pe,[fe==null?void 0:fe.uuid]:ne==null?void 0:ne.name},ee[oe]={...ee[oe],repeatableFields:pe},A(ee)}_(ne),console.log("value !== null country",ne!==null),ne!==null?fe.isValid=1:fe.isValid=0},ue=(fe,ne)=>fe?o.jsxs("div",{className:"country-item flex",children:[o.jsx("img",{alt:fe.name,src:fe==null?void 0:fe.image,onError:q=>q.target.src="https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png",style:{width:"20px",marginRight:10}}),o.jsx("div",{children:fe.name})]}):o.jsx("span",{children:ne.placeholder}),Y=fe=>o.jsxs("div",{className:"country-item flex",children:[o.jsx("img",{alt:fe.name,src:fe==null?void 0:fe.image,onError:ne=>ne.target.src="https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png",style:{width:"20px",marginRight:10}}),o.jsx("div",{children:fe.name})]}),ie=o.jsxs("div",{onMouseOver:H,onMouseOut:N,children:[d&&F&&o.jsx(Wr,{handleFieldSettingsSidebar:z,...t}),o.jsxs("div",{className:`field ${d&&" py-3 px-4 builder-element-wrapper "}${(r==null?void 0:r.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:d?"field-form-builder col-12 ":"col-12 ",children:[(r==null?void 0:r.showHeaderText)&&o.jsx("h6",{children:(re=r==null?void 0:r.headerText)==null?void 0:re[f==null?void 0:f.type]}),(r==null?void 0:r.showLabel)&&o.jsxs("label",{htmlFor:i,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((Z=r==null?void 0:r.attributes)==null?void 0:Z.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",d?o.jsx(aa,{...t}):o.jsx(o.Fragment,{children:(K=r==null?void 0:r.label)==null?void 0:K[f==null?void 0:f.type]}),o.jsx("span",{className:"ml-3",children:(r==null?void 0:r.showToolTip)&&o.jsx(zi,{message:(W=r==null?void 0:r.toolTip)==null?void 0:W[f==null?void 0:f.type],position:"right"})})]}),o.jsx(Pa,{className:"country-select-builder-component",onFocus:()=>O(1),onChange:fe=>{a!=null&&a.rowIsRepeatable?R(r,fe.target.value):X(fe)},options:r==null?void 0:r.countries,optionLabel:"name",value:E,placeholder:(me=r==null?void 0:r.placeholder)==null?void 0:me[f==null?void 0:f.type],disabled:c,valueTemplate:ue,itemTemplate:Y,filter:!0,filterBy:"name",showClear:!0}),((be=r==null?void 0:r.attributes)==null?void 0:be.required)&&o.jsx("small",{className:"error",children:M===1&&E===null?((Te=r==null?void 0:r.validationMesssage)==null?void 0:Te[f==null?void 0:f.type])||"field is required":""}),o.jsx("div",{children:(r==null?void 0:r.showHelperText)&&o.jsx("small",{children:(ye=r==null?void 0:r.helperText)==null?void 0:ye[f==null?void 0:f.type]})})]})}),u&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[x===!0&&o.jsx(Qi,{visibilty:x,closeSettingFieldSidebar:U,...t},r==null?void 0:r.uuid),o.jsx(xi,{...t,fieldWrap:ie})]})},Mse=t=>{var re,Z,K,W,me,be,Te,ye,fe,ne,q,ee,oe,pe,_e;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a}=Ar(),{userSelectedLanguage:s,fieldSettingUpdate:l}=sn(),{field:c,fieldIndex:u,sectionIndex:d,pageIndex:f,row:h,rowIndex:g,columnIndex:v,isDisabled:m}=t,{isAdmin:A,isBuilderMode:w}=Ht(),[x,S]=k.useState(!1),[T,C]=k.useState(""),[E,_]=k.useState(null),[M,O]=k.useState(0),[F,P]=k.useState(!1),[H,N]=k.useState(!1),z=()=>{N(!0)},U=()=>{N(!1)},ce=()=>{var Ne,ve,Ae;if(h!=null&&h.rowIsRepeatable){if(h!=null&&h.repeatableFields){const Be=[...h.repeatableFields],Ee=_t.findIndex(Be,function($){return $.uuid===(c==null?void 0:c.uuid)});Ee>=0&&Be[Ee].fieldData?C(Be[Ee].fieldData):C("")}}else{const Be=a;if(Be!=null&&Be.length){for(const Ee of Be)if(Ee.fieldId===t.field.uuid&&((Ne=Ee==null?void 0:Ee.postData[0])==null?void 0:Ne.postValue)!==""&&((ve=Ee==null?void 0:Ee.postData[0])!=null&&ve.postValue)){C((Ae=Ee==null?void 0:Ee.postData[0])==null?void 0:Ae.postValue);break}}}P(!0)};k.useEffect(()=>{F||ce();const Ne=Gt.addListener("clearRepeatableFields",$=>{$===(h==null?void 0:h.uuid)&&(C(""),O(0),c.isValid=0,l(f,d,g,v,u,c))}),ve=Gt.addListener("onSubmitUserForm",()=>{var $,ge;($=c==null?void 0:c.attributes)!=null&&$.required?T&&T.length&&(T==null?void 0:T.length)<((ge=c==null?void 0:c.attributes)==null?void 0:ge.minLength)?c.isValid=1:c.isValid=0:c.isValid=1}),Ae=Gt.addListener("OnInvalidFieldCatch",$=>{c.uuid===($==null?void 0:$.fieldId)?O(1):O(0)}),Be=Gt.addListener("OnGetFieldValue",$=>{var le;const ge=(le=$==null?void 0:$.repeatableColumn)==null?void 0:le.filter(se=>(se==null?void 0:se.fieldUuid)===(c==null?void 0:c.uuid));ge!=null&&ge.length}),Ee=Gt.addListener("formFieldAdded",$=>{E===null&&_($==null?void 0:$.uuid)});return()=>{ve.remove(),Ae.remove(),Be.remove(),Ne.remove(),Ee.remove()}}),k.useEffect(()=>(E!==null&&setTimeout(()=>{_(null)},1e3),()=>{}),[E]);const X=Ne=>{S(Ne)},R=()=>{S(!1)},ue=Ne=>{var Be,Ee;C(Ne.target.value);const ve=a,Ae=_t.cloneDeep(e);if(ve!==null){if((Be=Ne==null?void 0:Ne.target)!=null&&Be.value){if(Ae[c==null?void 0:c.uuid]=(Ee=Ne==null?void 0:Ne.target)==null?void 0:Ee.value,(ve==null?void 0:ve.length)>0)for(const $ of ve)$.fieldId===t.field.uuid&&($.postData[0]={postValue:Ne.target.value})}else if(delete Ae[c==null?void 0:c.uuid],(ve==null?void 0:ve.length)>0)for(const $ of ve)$.fieldId===t.field.uuid&&($.postData[0]={postValue:""})}if(!(h!=null&&h.rowIsRepeatable)){n(Ae);const $=Object.keys(Ae).length;r($)}},Y=(Ne,ve)=>{var Ae;if(a){const Be=[...a],Ee=_t.findIndex(Be,function(ge){return ge.rowId===(h==null?void 0:h.uuid)});let $=(Ae=a[Ee])==null?void 0:Ae.repeatableFields;$={...$,[Ne==null?void 0:Ne.uuid]:ve},Be[Ee]={...Be[Ee],repeatableFields:$},i(Be)}C(ve),ve!==""?Ne.isValid=1:Ne.isValid=0},ie=o.jsxs("div",{onMouseOver:z,onMouseOut:U,children:[w&&H&&o.jsx(Wr,{handleFieldSettingsSidebar:X,...t}),o.jsxs("div",{className:`field ${w&&" py-3 px-4 builder-element-wrapper "} ${(c==null?void 0:c.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:A?"col-6 ":"col-12 p-fluid",children:[(c==null?void 0:c.showHeaderText)&&o.jsx("h6",{children:(re=c==null?void 0:c.headerText)==null?void 0:re[s==null?void 0:s.type]}),(c==null?void 0:c.showLabel)&&o.jsxs("label",{htmlFor:c==null?void 0:c.uuid,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((Z=c==null?void 0:c.attributes)==null?void 0:Z.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",w===!1?o.jsx(o.Fragment,{children:(K=c==null?void 0:c.label)==null?void 0:K[s==null?void 0:s.type]}):o.jsx(aa,{...t}),(c==null?void 0:c.showToolTip)&&o.jsx("span",{className:"ml-3",children:o.jsx(zi,{message:(W=c==null?void 0:c.toolTip)==null?void 0:W[s==null?void 0:s.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs("span",{className:"p-input-icon-"+(c==null?void 0:c.iconAlignment),children:[(c==null?void 0:c.showIcon)&&o.jsx("i",{className:"pi pi-"+((be=(me=c==null?void 0:c.icon)==null?void 0:me.properties)==null?void 0:be.name)}),o.jsx(wn,{"data-component":"text-input",id:c==null?void 0:c.uuid,placeholder:(Te=c==null?void 0:c.placeholder)==null?void 0:Te[s==null?void 0:s.type],minLength:(ye=c==null?void 0:c.attributes)==null?void 0:ye.minLength,maxLength:(fe=c==null?void 0:c.attributes)==null?void 0:fe.maxLength,value:T,onFocus:()=>O(1),onChange:Ne=>{h!=null&&h.rowIsRepeatable?Y(c,Ne.target.value):ue(Ne)},className:M===1&&((ne=c==null?void 0:c.attributes)!=null&&ne.required)?T?"valid":"invalid":"valid'",readOnly:m,disabled:A})]}),o.jsx("div",{children:((q=c==null?void 0:c.attributes)==null?void 0:q.required)&&o.jsxs(o.Fragment,{children:[o.jsx("small",{className:"error",children:M===1&&!T?(ee=c==null?void 0:c.validationMesssage)==null?void 0:ee.english:""}),o.jsx("small",{className:"error",children:M===1&&T.length&&(T==null?void 0:T.length)<((oe=c==null?void 0:c.attributes)==null?void 0:oe.minLength)?`Mini length ${(pe=c==null?void 0:c.attributes)==null?void 0:pe.minLength}`:""})]})}),o.jsx("div",{children:(c==null?void 0:c.showHelperText)&&o.jsx("small",{children:(_e=c==null?void 0:c.helperText)==null?void 0:_e[s==null?void 0:s.type]})})]})]})}),A&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[x===!0&&o.jsx(Qi,{visibilty:x,closeSettingFieldSidebar:R,...t}),o.jsx(xi,{...t,fieldWrap:ie})]})},Lse=t=>{var i,a;const{language:e,onHandleChange:n,fieldState:r}=t;return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Hyperlink text"}),o.jsx(wn,{value:(i=r==null?void 0:r.text)==null?void 0:i[e==null?void 0:e.type],onChange:s=>n("text",e,s.target.value)})]}),o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Hyperlink"}),o.jsx(wn,{value:(a=r==null?void 0:r.hrefLink)==null?void 0:a[e==null?void 0:e.type],onChange:s=>n("hrefLink",e,s.target.value)})]})]})},Bse=t=>{var r;const{onHandleChangeStyling:e,fieldState:n}=t;return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field",children:[o.jsx("label",{className:"mr-2",children:"Hyperlink color"}),o.jsx(m3,{value:n==null?void 0:n.color,onChange:i=>{e("color",i.value)}})]}),o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Font Size"}),o.jsx(wn,{type:"number",maxLength:2,placeholder:"eg 20px",value:(r=Number(n==null?void 0:n.fontSize))==null?void 0:r.toFixed(0),onChange:i=>{e("fontSize",i.target.value)}})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{checked:n==null?void 0:n.underLined,onChange:i=>{e("underLined",i.checked)}}),o.jsx("label",{children:"Underline link"})]})]})},Vse=t=>{const{visibilty:e,field:n,closeSettingFieldSidebar:r,pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,fieldIndex:c,typeName:u}=t,[d,f]=k.useState(n),{fieldSettingUpdate:h,formBuilderSchemaLanguages:g,formBuilderPublishedStatus:v}=sn(),{updateGlobalToast:m}=Ht(),A=(S,T,C)=>{f(E=>({...E,[S]:{...E[S],[T==null?void 0:T.type]:C}}))},w=(S,T)=>{f(C=>({...C,[S]:T}))},x=()=>{h(i,a,s,l,c,d),m({showToast:!0,toastMessage:"Updated",toastDetail:`${u} updated`,toastType:"success"})};return o.jsx(o.Fragment,{children:o.jsxs(To,{visible:e,position:"left",className:"p-sidebar-lg",onHide:()=>r(),header:()=>{var S,T;return o.jsx("div",{className:"flex align-items-center gap-2 justify-content-between",children:o.jsxs("div",{className:"text-gray-900 font-bold text-2xl",children:[t==null?void 0:t.typeName," settings"," ",(S=n==null?void 0:n.label)!=null&&S.english?`- ${(T=n==null?void 0:n.label)==null?void 0:T.english}`:""," "]})})},children:[o.jsxs(ts,{children:[o.jsx(wr,{header:"Text",children:o.jsx(ao,{activeIndex:0,children:g!=null&&g.length?g.map((S,T)=>o.jsx(io,{tabIndex:T,header:S==null?void 0:S.language,children:o.jsx(Lse,{language:S,fieldState:d,onHandleChange:A,...t})},T)):""})}),o.jsx(wr,{header:"Styling",children:o.jsx(Bse,{fieldState:d,onHandleChangeStyling:w,...t})})]}),o.jsx("div",{className:"w-full px-4 py-3 surface-100 sidebar-footer",children:o.jsxs("div",{className:"flex flex-row gap-2 align-items-center justify-content-end",children:[!v&&o.jsx(Ft,{size:"small",label:"Update",type:"button",outlined:!0,onClick:()=>x(),"aria-label":"Update"}),o.jsx(Ft,{label:"Close",type:"button",onClick:()=>r(),"aria-label":"Close",size:"small",className:"p-button-danger"})]})})]})})},qse=t=>{var g,v,m,A,w,x,S,T,C;const{field:e}=t,{userSelectedLanguage:n}=sn(),{isBuilderMode:r}=Ht(),[i,a]=k.useState(!1),[s,l]=k.useState(!1),c=()=>{l(!0)},u=()=>{l(!1)},d=E=>{a(E)},f=()=>{a(!1)};k.useEffect(()=>{},[e]);const h=o.jsxs("div",{className:r?"builder-element-wrapper":"",onMouseOver:c,onMouseOut:u,children:[r&&s&&o.jsx(Wr,{handleFieldSettingsSidebar:d,...t}),o.jsxs("div",{className:r?"field-form-builder px-4":" px-4",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(g=e==null?void 0:e.headerText)==null?void 0:g[n==null?void 0:n.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:e.uuid,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[((v=e==null?void 0:e.attributes)==null?void 0:v.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",r?o.jsx(aa,{...t}):o.jsx(o.Fragment,{children:(m=e==null?void 0:e.label)==null?void 0:m[n==null?void 0:n.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(zi,{message:(A=e==null?void 0:e.toolTip)==null?void 0:A[n==null?void 0:n.type],position:"right"})})]}),o.jsx("a",{style:{fontSize:parseInt(e==null?void 0:e.fontSize),color:`#${e==null?void 0:e.color}`,textDecoration:e!=null&&e.underLined?"underline":"none"},className:"atag-style",href:(w=e==null?void 0:e.hrefLink)==null?void 0:w[n==null?void 0:n.type],children:(x=e==null?void 0:e.text)==null?void 0:x[n==null?void 0:n.type]}),((S=e==null?void 0:e.attributes)==null?void 0:S.required)&&o.jsx("small",{className:"error",children:(T=e==null?void 0:e.validationMesssage)==null?void 0:T[n==null?void 0:n.type]}),(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(C=e==null?void 0:e.helperText)==null?void 0:C[n==null?void 0:n.type]})]})]});return o.jsxs(o.Fragment,{children:[i&&o.jsx(Vse,{visibilty:i,closeSettingFieldSidebar:f,...t}),o.jsx(xi,{...t,fieldWrap:h})]})},Use=t=>{var K,W,me,be,Te,ye,fe,ne,q,ee,oe,pe,_e,Ne,ve,Ae,Be,Ee,$,ge,le;const{field:e,fieldIndex:n,sectionIndex:r,pageIndex:i,row:a,rowIndex:s,columnIndex:l,isDisabled:c}=t,{isAdmin:u,isBuilderMode:d}=Ht(),{taskRegisterData:f,updateTaskRegisterData:h,updateTaskProgressValue:g,updateUserFormDataSubmit:v,userTaskSubmitFormData:m,TASK_PUBLISHED:A,task_status:w}=Ar(),{userSelectedLanguage:x,fieldSettingUpdate:S}=sn(),[T,C]=k.useState(null),[E,_]=k.useState(!1),[M,O]=k.useState(null),[F,P]=k.useState(0),[H,N]=k.useState(!1),[z,U]=k.useState(!1),ce=()=>{U(!0)},X=()=>{U(!1)},R=()=>{var se,he;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const Se=[...a.repeatableFields],De=_t.findIndex(Se,function(Me){return Me.uuid===(e==null?void 0:e.uuid)});De>=0&&Se[De].fieldData?O(Number(Se[De].fieldData)||null):O(null)}}else{const Se=m;if(Se!=null&&Se.length){for(const De of Se)if(De.fieldId===t.field.uuid&&((se=De==null?void 0:De.postData)!=null&&se.length)){O(Number((he=De==null?void 0:De.postData[0])==null?void 0:he.postValue)||null);break}}}N(!0)};k.useEffect(()=>{H||R();const se=Gt.addListener("clearRepeatableFields",ze=>{ze===(a==null?void 0:a.uuid)&&(O(null),P(0),e.isValid=0,S(i,r,s,l,n,e))}),he=Gt.addListener("onSubmitUserForm",()=>{var ze;(ze=e==null?void 0:e.attributes)!=null&&ze.required?M?e.isValid=1:e.isValid=0:e.isValid=1}),Se=Gt.addListener("OnInvalidFieldCatch",ze=>{e.uuid===(ze==null?void 0:ze.fieldId)?P(1):P(0)}),De=Gt.addListener("OnGetFieldValue",ze=>{var it;const tt=(it=ze==null?void 0:ze.repeatableColumn)==null?void 0:it.filter(ht=>(ht==null?void 0:ht.fieldUuid)===(e==null?void 0:e.uuid));tt!=null&&tt.length}),Me=Gt.addListener("formFieldAdded",ze=>{T===null&&C(ze.uuid)});return()=>{he.remove(),Se.remove(),De.remove(),se.remove(),Me.remove()}}),k.useEffect(()=>(T!==null&&setTimeout(()=>{C(null)},1e3),()=>{}),[T]);const ue=se=>{_(se)},Y=()=>{_(!1)},ie=se=>{const he=m,Se=_t.cloneDeep(f);if(he!==null){if(se){if(Se[e==null?void 0:e.uuid]=se,(he==null?void 0:he.length)>0)for(const De of he)De.fieldId===t.field.uuid&&(De.postData[0]={postValue:se})}else if(delete Se[e==null?void 0:e.uuid],(he==null?void 0:he.length)>0)for(const De of he)De.fieldId===t.field.uuid&&(De.postData[0]={postValue:""})}if(!(a!=null&&a.rowIsRepeatable)){h(Se);const De=Object.keys(Se).length;g(De)}},re=(se,he)=>{var Se;if(m!=null&&m.length){const De=[...m],Me=_t.findIndex(De,function(tt){return tt.rowId===(a==null?void 0:a.uuid)});let ze=(Se=m[Me])==null?void 0:Se.repeatableFields;ze={...ze,[se==null?void 0:se.uuid]:he},De[Me]={...De[Me],repeatableFields:ze},v(De)}O(he),he!==""?se.isValid=1:se.isValid=0},Z=o.jsxs("div",{onMouseOver:ce,onMouseOut:X,children:[d===!0&&z===!0&&o.jsx(Wr,{handleFieldSettingsSidebar:ue,...t}),o.jsxs("div",{className:`field ${d===!0&&" py-3 px-4 builder-element-wrapper "} ${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:u?"col-6 ":"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(K=e==null?void 0:e.headerText)==null?void 0:K[x==null?void 0:x.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:e.uuid,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((W=e==null?void 0:e.attributes)==null?void 0:W.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",d?o.jsx(aa,{...t}):o.jsx(o.Fragment,{children:(me=e==null?void 0:e.label)==null?void 0:me[x==null?void 0:x.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(zi,{message:(be=e==null?void 0:e.toolTip)==null?void 0:be[x==null?void 0:x.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs("span",{className:"p-input-icon-"+(e==null?void 0:e.iconAlignment),children:[(e==null?void 0:e.showIcon)&&o.jsx("i",{className:"pi pi-"+((ye=(Te=e==null?void 0:e.icon)==null?void 0:Te.properties)==null?void 0:ye.name)}),o.jsx(eo,{readOnly:c,id:e==null?void 0:e.uuid,disabled:u||c,placeholder:(fe=e==null?void 0:e.placeholder)==null?void 0:fe[x==null?void 0:x.type],value:M,min:(ne=e==null?void 0:e.attributes)==null?void 0:ne.min,max:e==null?void 0:e.attributes.max,suffix:e==null?void 0:e.attributes.suffix,prefix:(q=e==null?void 0:e.attributes)==null?void 0:q.prefix,showButtons:(ee=e==null?void 0:e.attributes)==null?void 0:ee.showButtons,pt:{incrementButton:{className:"bg-teal-500 border-teal-500"},decrementButton:{className:"bg-orange-500 border-orange-500"}},minFractionDigits:(oe=e==null?void 0:e.attributes)==null?void 0:oe.minFractionDigits,maxFractionDigits:(pe=e==null?void 0:e.attributes)==null?void 0:pe.maxFractionDigits,locale:(_e=e==null?void 0:e.attributes)==null?void 0:_e.locale,mode:(Ne=e==null?void 0:e.attributes)==null?void 0:Ne.mode,currency:(ve=e==null?void 0:e.attributes)==null?void 0:ve.currency,currencyDisplay:(Ae=e==null?void 0:e.attributes)==null?void 0:Ae.currencyDisplay,useGrouping:(Be=e==null?void 0:e.attributes)==null?void 0:Be.useGrouping,onFocus:()=>P(1),onChange:se=>{a!=null&&a.rowIsRepeatable?re(e,se.value):ie(se.value)},className:F===1&&((Ee=e==null?void 0:e.attributes)!=null&&Ee.required)?M?"valid":"invalid":"valid'"})]}),o.jsx("div",{children:(($=e==null?void 0:e.attributes)==null?void 0:$.required)&&o.jsx("small",{className:"error",children:F===1&&!M?(ge=e==null?void 0:e.validationMesssage)==null?void 0:ge.english:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(le=e==null?void 0:e.helperText)==null?void 0:le[x==null?void 0:x.type]})})]})]})}),u&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[E===!0&&d===!0&&o.jsx(Qi,{visibilty:E,closeSettingFieldSidebar:Y,...t}),o.jsx(xi,{...t,fieldWrap:Z})]})};//! moment.js
2291
2291
  //! version : 2.30.1
2292
2292
  //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
2293
2293
  //! license : MIT
@@ -4263,7 +4263,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
4263
4263
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Q7e(t,e){if(t){if(typeof t=="string")return gU(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gU(t,e)}}function gU(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function J7e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Z7e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ebe(t,e,n){return e&&Z7e(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var Nw="9",tbe=15,nbe=h5(Nw,tbe),rbe=/[- ]/,ibe=function(){return/\[([^\[\]])*\]/g},abe=function(){return/\d(?=[^,}][^,}])/g},sbe=new RegExp("["+p0+"]*\\$1["+p0+"]*(\\$\\d["+p0+"]*)*$"),mU=3,obe=function(){function t(e){e.state;var n=e.metadata;J7e(this,t),this.metadata=n,this.resetFormat()}return ebe(t,[{key:"resetFormat",value:function(){this.chosenFormat=void 0,this.template=void 0,this.nationalNumberTemplate=void 0,this.populatedNationalNumberTemplate=void 0,this.populatedNationalNumberTemplatePosition=-1}},{key:"reset",value:function(n,r){this.resetFormat(),n?(this.isNANP=n.callingCode()==="1",this.matchingFormats=n.formats(),r.nationalSignificantNumber&&this.narrowDownMatchingFormats(r)):(this.isNANP=void 0,this.matchingFormats=[])}},{key:"format",value:function(n,r){var i=this;if(L7e(r.nationalSignificantNumber,this.metadata))for(var a=pU(this.matchingFormats),s;!(s=a()).done;){var l=s.value,c=M7e(r,l,{metadata:this.metadata,shouldTryNationalPrefixFormattingRule:function(d){return i.shouldTryNationalPrefixFormattingRule(d,{international:r.international,nationalPrefix:r.nationalPrefix})},getSeparatorAfterNationalPrefix:function(d){return i.getSeparatorAfterNationalPrefix(d)}});if(c)return this.resetFormat(),this.chosenFormat=l,this.setNationalNumberTemplate(c.replace(/\d/g,Mc),r),this.populatedNationalNumberTemplate=c,this.populatedNationalNumberTemplatePosition=this.template.lastIndexOf(Mc),c}return this.formatNationalNumberWithNextDigits(n,r)}},{key:"formatNationalNumberWithNextDigits",value:function(n,r){var i=this.chosenFormat,a=this.chooseFormat(r);if(a)return a===i?this.formatNextNationalNumberDigits(n):this.formatNextNationalNumberDigits(r.getNationalDigits())}},{key:"narrowDownMatchingFormats",value:function(n){var r=this,i=n.nationalSignificantNumber,a=n.nationalPrefix,s=n.international,l=i,c=l.length-mU;c<0&&(c=0),this.matchingFormats=this.matchingFormats.filter(function(u){return r.formatSuits(u,s,a)&&r.formatMatches(u,l,c)}),this.chosenFormat&&this.matchingFormats.indexOf(this.chosenFormat)===-1&&this.resetFormat()}},{key:"formatSuits",value:function(n,r,i){return!(i&&!n.usesNationalPrefix()&&!n.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!r&&!i&&n.nationalPrefixIsMandatoryWhenFormattingInNationalFormat())}},{key:"formatMatches",value:function(n,r,i){var a=n.leadingDigitsPatterns().length;if(a===0)return!0;i=Math.min(i,a-1);var s=n.leadingDigitsPatterns()[i];if(r.length<mU)try{return new W7e(s).match(r,{allowOverflow:!0})!==void 0}catch(l){return console.error(l),!0}return new RegExp("^(".concat(s,")")).test(r)}},{key:"getFormatFormat",value:function(n,r){return r?n.internationalFormat():n.format()}},{key:"chooseFormat",value:function(n){for(var r=this,i=function(){var u=s.value;return r.chosenFormat===u?"break":sbe.test(r.getFormatFormat(u,n.international))?r.createTemplateForFormat(u,n)?(r.chosenFormat=u,"break"):(r.matchingFormats=r.matchingFormats.filter(function(d){return d!==u}),"continue"):"continue"},a=pU(this.matchingFormats.slice()),s;!(s=a()).done;){var l=i();if(l==="break")break}return this.chosenFormat||this.resetFormat(),this.chosenFormat}},{key:"createTemplateForFormat",value:function(n,r){if(!(n.pattern().indexOf("|")>=0)){var i=this.getTemplateForFormat(n,r);if(i)return this.setNationalNumberTemplate(i,r),!0}}},{key:"getSeparatorAfterNationalPrefix",value:function(n){return this.isNANP||n&&n.nationalPrefixFormattingRule()&&rbe.test(n.nationalPrefixFormattingRule())?" ":""}},{key:"getInternationalPrefixBeforeCountryCallingCode",value:function(n,r){var i=n.IDDPrefix,a=n.missingPlus;return i?r&&r.spacing===!1?i:i+" ":a?"":"+"}},{key:"getTemplate",value:function(n){if(this.template){for(var r=-1,i=0,a=n.international?this.getInternationalPrefixBeforeCountryCallingCode(n,{spacing:!1}):"";i<a.length+n.getDigitsWithoutInternationalPrefix().length;)r=this.template.indexOf(Mc,r+1),i++;return uU(this.template,r+1)}}},{key:"setNationalNumberTemplate",value:function(n,r){this.nationalNumberTemplate=n,this.populatedNationalNumberTemplate=n,this.populatedNationalNumberTemplatePosition=-1,r.international?this.template=this.getInternationalPrefixBeforeCountryCallingCode(r).replace(/[\d\+]/g,Mc)+h5(Mc,r.callingCode.length)+" "+n:this.template=n}},{key:"getTemplateForFormat",value:function(n,r){var i=r.nationalSignificantNumber,a=r.international,s=r.nationalPrefix,l=r.complexPrefixBeforeNationalSignificantNumber,c=n.pattern();c=c.replace(ibe(),"\\d").replace(abe(),"\\d");var u=nbe.match(c)[0];if(!(i.length>u.length)){var d=new RegExp("^"+c+"$"),f=i.replace(/\d/g,Nw);d.test(f)&&(u=f);var h=this.getFormatFormat(n,a),g;if(this.shouldTryNationalPrefixFormattingRule(n,{international:a,nationalPrefix:s})){var v=h.replace(Wq,n.nationalPrefixFormattingRule());if(O1(n.nationalPrefixFormattingRule())===(s||"")+O1("$1")&&(h=v,g=!0,s))for(var m=s.length;m>0;)h=h.replace(/\d/,Mc),m--}var A=u.replace(new RegExp(c),h).replace(new RegExp(Nw,"g"),Mc);return g||(l?A=h5(Mc,l.length)+" "+A:s&&(A=h5(Mc,s.length)+this.getSeparatorAfterNationalPrefix(n)+A)),a&&(A=Gq(A)),A}}},{key:"formatNextNationalNumberDigits",value:function(n){var r=P7e(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition,n);if(!r){this.resetFormat();return}return this.populatedNationalNumberTemplate=r[0],this.populatedNationalNumberTemplatePosition=r[1],uU(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition+1)}},{key:"shouldTryNationalPrefixFormattingRule",value:function(n,r){var i=r.international,a=r.nationalPrefix;if(n.nationalPrefixFormattingRule()){var s=n.usesNationalPrefix();if(s&&a||!s&&!i)return!0}}}]),t}();function vU(t,e){return dbe(t)||ube(t,e)||cbe(t,e)||lbe()}function lbe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4264
4264
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cbe(t,e){if(t){if(typeof t=="string")return bU(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bU(t,e)}}function bU(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ube(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,a=!1,s,l;try{for(n=n.call(t);!(i=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));i=!0);}catch(c){a=!0,l=c}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw l}}return r}}function dbe(t){if(Array.isArray(t))return t}function fbe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function hbe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function pbe(t,e,n){return e&&hbe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var gbe="["+p0+mg+"]+",mbe=new RegExp("^"+gbe+"$","i"),vbe="(?:["+F8e+"]["+p0+mg+"]*|["+p0+mg+"]+)",bbe=new RegExp("[^"+p0+mg+"]+.*$"),ybe=/[^\d\[\]]/,Abe=function(){function t(e){var n=e.defaultCountry,r=e.defaultCallingCode,i=e.metadata,a=e.onNationalSignificantNumberChange;fbe(this,t),this.defaultCountry=n,this.defaultCallingCode=r,this.metadata=i,this.onNationalSignificantNumberChange=a}return pbe(t,[{key:"input",value:function(n,r){var i=Cbe(n),a=vU(i,2),s=a[0],l=a[1],c=O1(s),u;return l&&(r.digits||(r.startInternationalNumber(),c||(u=!0))),c&&this.inputDigits(c,r),{digits:c,justLeadingPlus:u}}},{key:"inputDigits",value:function(n,r){var i=r.digits,a=i.length<3&&i.length+n.length>=3;if(r.appendDigits(n),a&&this.extractIddPrefix(r),this.isWaitingForCountryCallingCode(r)){if(!this.extractCountryCallingCode(r))return}else r.appendNationalSignificantNumberDigits(n);r.international||this.hasExtractedNationalSignificantNumber||this.extractNationalSignificantNumber(r.getNationalDigits(),function(s){return r.update(s)})}},{key:"isWaitingForCountryCallingCode",value:function(n){var r=n.international,i=n.callingCode;return r&&!i}},{key:"extractCountryCallingCode",value:function(n){var r=C7e("+"+n.getDigitsWithoutInternationalPrefix(),this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),i=r.countryCallingCode,a=r.number;if(i)return n.setCallingCode(i),n.update({nationalSignificantNumber:a}),!0}},{key:"reset",value:function(n){if(n){this.hasSelectedNumberingPlan=!0;var r=n._nationalPrefixForParsing();this.couldPossiblyExtractAnotherNationalSignificantNumber=r&&ybe.test(r)}else this.hasSelectedNumberingPlan=void 0,this.couldPossiblyExtractAnotherNationalSignificantNumber=void 0}},{key:"extractNationalSignificantNumber",value:function(n,r){if(this.hasSelectedNumberingPlan){var i=Ew(n,this.metadata),a=i.nationalPrefix,s=i.nationalNumber,l=i.carrierCode;if(s!==n)return this.onExtractedNationalNumber(a,l,s,n,r),!0}}},{key:"extractAnotherNationalSignificantNumber",value:function(n,r,i){if(!this.hasExtractedNationalSignificantNumber)return this.extractNationalSignificantNumber(n,i);if(this.couldPossiblyExtractAnotherNationalSignificantNumber){var a=Ew(n,this.metadata),s=a.nationalPrefix,l=a.nationalNumber,c=a.carrierCode;if(l!==r)return this.onExtractedNationalNumber(s,c,l,n,i),!0}}},{key:"onExtractedNationalNumber",value:function(n,r,i,a,s){var l,c,u=a.lastIndexOf(i);if(u>=0&&u===a.length-i.length){c=!0;var d=a.slice(0,u);d!==n&&(l=d)}s({nationalPrefix:n,carrierCode:r,nationalSignificantNumber:i,nationalSignificantNumberMatchesInput:c,complexPrefixBeforeNationalSignificantNumber:l}),this.hasExtractedNationalSignificantNumber=!0,this.onNationalSignificantNumberChange()}},{key:"reExtractNationalSignificantNumber",value:function(n){if(this.extractAnotherNationalSignificantNumber(n.getNationalDigits(),n.nationalSignificantNumber,function(r){return n.update(r)}))return!0;if(this.extractIddPrefix(n))return this.extractCallingCodeAndNationalSignificantNumber(n),!0;if(this.fixMissingPlus(n))return this.extractCallingCodeAndNationalSignificantNumber(n),!0}},{key:"extractIddPrefix",value:function(n){var r=n.international,i=n.IDDPrefix,a=n.digits;if(n.nationalSignificantNumber,!(r||i)){var s=iU(a,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata);if(s!==void 0&&s!==a)return n.update({IDDPrefix:a.slice(0,a.length-s.length)}),this.startInternationalNumber(n,{country:void 0,callingCode:void 0}),!0}}},{key:"fixMissingPlus",value:function(n){if(!n.international){var r=sU(n.digits,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),i=r.countryCallingCode;if(r.number,i)return n.update({missingPlus:!0}),this.startInternationalNumber(n,{country:n.country,callingCode:i}),!0}}},{key:"startInternationalNumber",value:function(n,r){var i=r.country,a=r.callingCode;n.startInternationalNumber(i,a),n.nationalSignificantNumber&&(n.resetNationalSignificantNumber(),this.onNationalSignificantNumberChange(),this.hasExtractedNationalSignificantNumber=void 0)}},{key:"extractCallingCodeAndNationalSignificantNumber",value:function(n){this.extractCountryCallingCode(n)&&this.extractNationalSignificantNumber(n.getNationalDigits(),function(r){return n.update(r)})}}]),t}();function wbe(t){var e=t.search(vbe);if(!(e<0)){t=t.slice(e);var n;return t[0]==="+"&&(n=!0,t=t.slice(1)),t=t.replace(bbe,""),n&&(t="+"+t),t}}function Sbe(t){var e=wbe(t)||"";return e[0]==="+"?[e.slice(1),!0]:[e]}function Cbe(t){var e=Sbe(t),n=vU(e,2),r=n[0],i=n[1];return mbe.test(r)||(r=""),[r,i]}function xbe(t,e){return _be(t)||Ibe(t,e)||Ebe(t,e)||Tbe()}function Tbe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4265
4265
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ebe(t,e){if(t){if(typeof t=="string")return yU(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yU(t,e)}}function yU(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ibe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,a=!1,s,l;try{for(n=n.call(t);!(i=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));i=!0);}catch(c){a=!0,l=c}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw l}}return r}}function _be(t){if(Array.isArray(t))return t}function Dbe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Nbe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Obe(t,e,n){return e&&Nbe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var p5=function(){function t(e,n){Dbe(this,t),this.metadata=new ho(n);var r=this.getCountryAndCallingCode(e),i=xbe(r,2),a=i[0],s=i[1];this.defaultCountry=a,this.defaultCallingCode=s,this.reset()}return Obe(t,[{key:"getCountryAndCallingCode",value:function(n){var r,i;return n&&(l5(n)?(r=n.defaultCountry,i=n.defaultCallingCode):r=n),r&&!this.metadata.hasCountry(r)&&(r=void 0),[r,i]}},{key:"input",value:function(n){var r=this.parser.input(n,this.state),i=r.digits,a=r.justLeadingPlus;if(a)this.formattedOutput="+";else if(i){this.determineTheCountryIfNeeded(),this.state.nationalSignificantNumber&&this.formatter.narrowDownMatchingFormats(this.state);var s;if(this.metadata.hasSelectedNumberingPlan()&&(s=this.formatter.format(i,this.state)),s===void 0&&this.parser.reExtractNationalSignificantNumber(this.state)){this.determineTheCountryIfNeeded();var l=this.state.getNationalDigits();l&&(s=this.formatter.format(l,this.state))}this.formattedOutput=s?this.getFullNumber(s):this.getNonFormattedNumber()}return this.formattedOutput}},{key:"reset",value:function(){var n=this;return this.state=new N7e({onCountryChange:function(i){n.country=i},onCallingCodeChange:function(i,a){n.metadata.selectNumberingPlan(a,i),n.formatter.reset(n.metadata.numberingPlan,n.state),n.parser.reset(n.metadata.numberingPlan)}}),this.formatter=new obe({state:this.state,metadata:this.metadata}),this.parser=new Abe({defaultCountry:this.defaultCountry,defaultCallingCode:this.defaultCallingCode,metadata:this.metadata,state:this.state,onNationalSignificantNumberChange:function(){n.determineTheCountryIfNeeded(),n.formatter.reset(n.metadata.numberingPlan,n.state)}}),this.state.reset({country:this.defaultCountry,callingCode:this.defaultCallingCode}),this.formattedOutput="",this}},{key:"isInternational",value:function(){return this.state.international}},{key:"getCallingCode",value:function(){if(this.isInternational())return this.state.callingCode}},{key:"getCountryCallingCode",value:function(){return this.getCallingCode()}},{key:"getCountry",value:function(){var n=this.state.digits;if(n)return this._getCountry()}},{key:"_getCountry",value:function(){var n=this.state.country;return n}},{key:"determineTheCountryIfNeeded",value:function(){(!this.state.country||this.isCountryCallingCodeAmbiguous())&&this.determineTheCountry()}},{key:"getFullNumber",value:function(n){var r=this;if(this.isInternational()){var i=function(l){return r.formatter.getInternationalPrefixBeforeCountryCallingCode(r.state,{spacing:!!l})+l},a=this.state.callingCode;return i(a?n?"".concat(a," ").concat(n):a:"".concat(this.state.getDigitsWithoutInternationalPrefix()))}return n}},{key:"getNonFormattedNationalNumberWithPrefix",value:function(){var n=this.state,r=n.nationalSignificantNumber,i=n.complexPrefixBeforeNationalSignificantNumber,a=n.nationalPrefix,s=r,l=i||a;return l&&(s=l+s),s}},{key:"getNonFormattedNumber",value:function(){var n=this.state.nationalSignificantNumberMatchesInput;return this.getFullNumber(n?this.getNonFormattedNationalNumberWithPrefix():this.state.getNationalDigits())}},{key:"getNonFormattedTemplate",value:function(){var n=this.getNonFormattedNumber();if(n)return n.replace(/[\+\d]/g,Mc)}},{key:"isCountryCallingCodeAmbiguous",value:function(){var n=this.state.callingCode,r=this.metadata.getCountryCodesForCallingCode(n);return r&&r.length>1}},{key:"determineTheCountry",value:function(){this.state.setCountry(E7e(this.isInternational()?this.state.callingCode:this.defaultCallingCode,{nationalNumber:this.state.nationalSignificantNumber,defaultCountry:this.defaultCountry,metadata:this.metadata}))}},{key:"getNumberValue",value:function(){var n=this.state,r=n.digits,i=n.callingCode,a=n.country,s=n.nationalSignificantNumber;if(r){if(this.isInternational())return i?"+"+i+s:"+"+r;if(a||i){var l=a?this.metadata.countryCallingCode():i;return"+"+l+s}}}},{key:"getNumber",value:function(){var n=this.state,r=n.nationalSignificantNumber,i=n.carrierCode,a=n.callingCode,s=this._getCountry();if(r&&!(!s&&!a)){if(s&&s===this.defaultCountry){var l=new ho(this.metadata.metadata);l.selectNumberingPlan(s);var c=l.numberingPlan.callingCode(),u=this.metadata.getCountryCodesForCallingCode(c);if(u.length>1){var d=lU(r,{countries:u,defaultCountry:this.defaultCountry,metadata:this.metadata.metadata});d&&(s=d)}}var f=new v7e(s||a,r,this.metadata.metadata);return i&&(f.carrierCode=i),f}}},{key:"isPossible",value:function(){var n=this.getNumber();return n?n.isPossible():!1}},{key:"isValid",value:function(){var n=this.getNumber();return n?n.isValid():!1}},{key:"getNationalNumber",value:function(){return this.state.nationalSignificantNumber}},{key:"getChars",value:function(){return(this.state.international?"+":"")+this.state.digits}},{key:"getTemplate",value:function(){return this.formatter.getTemplate(this.state)||this.getNonFormattedTemplate()||""}}]),t}();function Fbe(t,e,n){return n||(n=e,e=void 0),new p5(e,n).input(t)}function AU(t){var e=t.inputFormat,n=t.country,r=t.metadata;return e==="NATIONAL_PART_OF_INTERNATIONAL"?"+".concat(N1(n,r)):""}function g5(t,e){return e&&(t=t.slice(e.length),t[0]===" "&&(t=t.slice(1))),t}function kbe(t,e,n){if(!(n&&n.ignoreRest)){var r=function(a){if(n)switch(a){case"end":n.ignoreRest=!0;break}};return Xq(t,e,r)}}function wU(t){var e=t.onKeyDown,n=t.inputFormat;return k.useCallback(function(r){if(r.keyCode===Mbe&&n==="INTERNATIONAL"&&r.target instanceof HTMLInputElement&&Pbe(r.target)===Lbe.length){r.preventDefault();return}e&&e(r)},[e,n])}function Pbe(t){return t.selectionStart}var Mbe=8,Lbe="+",Bbe=["onKeyDown","country","inputFormat","metadata","international","withCountryCallingCode"];function Ow(){return Ow=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ow.apply(this,arguments)}function Vbe(t,e){if(t==null)return{};var n=qbe(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function qbe(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Ube(t){function e(n,r){var i=n.onKeyDown,a=n.country,s=n.inputFormat,l=n.metadata,c=l===void 0?t:l;n.international,n.withCountryCallingCode;var u=Vbe(n,Bbe),d=k.useCallback(function(h){var g=new p5(a,c),v=AU({inputFormat:s,country:a,metadata:c}),m=g.input(v+h),A=g.getTemplate();return v&&(m=g5(m,v),A&&(A=g5(A,v))),{text:m,template:A}},[a,c]),f=wU({onKeyDown:i,inputFormat:s});return k.createElement(gg,Ow({},u,{ref:r,parse:kbe,format:d,onKeyDown:f}))}return e=k.forwardRef(e),e.propTypes={value:Tn.string.isRequired,onChange:Tn.func.isRequired,onKeyDown:Tn.func,country:Tn.string,inputFormat:Tn.oneOf(["INTERNATIONAL","NATIONAL_PART_OF_INTERNATIONAL","NATIONAL","INTERNATIONAL_OR_NATIONAL"]).isRequired,metadata:Tn.object},e}const $be=Ube();var jbe=["value","onChange","onKeyDown","country","inputFormat","metadata","inputComponent","international","withCountryCallingCode"];function Fw(){return Fw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Fw.apply(this,arguments)}function zbe(t,e){if(t==null)return{};var n=Hbe(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Hbe(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Ybe(t){function e(n,r){var i=n.value,a=n.onChange,s=n.onKeyDown,l=n.country,c=n.inputFormat,u=n.metadata,d=u===void 0?t:u,f=n.inputComponent,h=f===void 0?"input":f;n.international,n.withCountryCallingCode;var g=zbe(n,jbe),v=AU({inputFormat:c,country:l,metadata:d}),m=k.useCallback(function(w){var x=R8e(w.target.value);if(x===i){var S=SU(v,x,l,d);S.indexOf(w.target.value)===0&&(x=x.slice(0,-1))}a(x)},[v,i,a,l,d]),A=wU({onKeyDown:s,inputFormat:c});return k.createElement(h,Fw({},g,{ref:r,value:SU(v,i,l,d),onChange:m,onKeyDown:A}))}return e=k.forwardRef(e),e.propTypes={value:Tn.string.isRequired,onChange:Tn.func.isRequired,onKeyDown:Tn.func,country:Tn.string,inputFormat:Tn.oneOf(["INTERNATIONAL","NATIONAL_PART_OF_INTERNATIONAL","NATIONAL","INTERNATIONAL_OR_NATIONAL"]).isRequired,metadata:Tn.object,inputComponent:Tn.elementType},e}const Kbe=Ybe();function SU(t,e,n,r){return g5(Fbe(t+e,n,r),t)}function Xbe(t){if(t.length<2||t[0]!=="+")return!1;for(var e=1;e<t.length;){var n=t.charCodeAt(e);if(!(n>=48&&n<=57))return!1;e++}return!0}function Rbe(t){Xbe(t)||console.error("[react-phone-number-input] Expected the initial `value` to be a E.164 phone number. Got",t)}var Gbe=Tn.shape({country_calling_codes:Tn.object.isRequired,countries:Tn.object.isRequired});Tn.objectOf(Tn.string);function kw(t,e){var n="+"+N1(t,e);return n}function vg(t,e){return Zbe(t)||Jbe(t,e)||Qbe(t,e)||Wbe()}function Wbe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4266
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qbe(t,e){if(t){if(typeof t=="string")return CU(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return CU(t,e)}}function CU(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Jbe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,a,s,l=[],c=!0,u=!1;try{if(a=(n=n.call(t)).next,e!==0)for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return l}}function Zbe(t){if(Array.isArray(t))return t}function eye(t){var e=this,n=t.value,r=t.onChange,i=t.country,a=t.defaultCountry,s=t.international,l=t.withCountryCallingCode,c=t.useNationalFormatForDefaultCountryValue,u=t.metadata;typeof l=="boolean"&&!(i&&s)&&console.error("[react-phone-number-input] `withCountryCallingCode` property can only be used together with `country` and `international` properties"),i&&a&&console.error("[react-phone-number-input] When `country` property is passed, `defaultCountry` property has no effect and therefore shouldn't be passed"),typeof s=="boolean"&&!i&&console.error("[react-phone-number-input] `international` property can only be used together with `country` property");var d=nye({international:s,country:i,defaultCountry:a,withCountryCallingCode:l}),f=k.useRef(),h=function(ie,re,Z){console.error("[react-phone-number-input] Expected phone number ".concat(ie," to correspond to country ").concat(re," but ").concat(Z?"in reality it corresponds to country "+Z:"it doesn't",".")),f.current=!0},g=function(ie){return n&&Rbe(n),tye(n,i,a,d,c,u,function(){ie&&ie.onCountryMismatch&&ie.onCountryMismatch();for(var re=arguments.length,Z=new Array(re),K=0;K<re;K++)Z[K]=arguments[K];h.apply(e,Z)})},v=k.useState(i),m=vg(v,2),A=m[0],w=m[1],x=k.useState(a),S=vg(x,2),T=S[0],C=S[1],E=k.useState(g()),_=vg(E,2),M=_[0],O=_[1],F=k.useState(n),P=vg(F,2),H=P[0],N=P[1],z=k.useState(),U=vg(z,2);U[0];var ce=U[1],X=k.useCallback(function(){return ce({})},[ce]);function R(Y){if(Y){d==="NATIONAL_PART_OF_INTERNATIONAL"&&(Y="+".concat(N1(i,u)).concat(Y));var ie=new p5(i||a,u);return ie.input(Y),ie.getNumberValue()}}k.useEffect(function(){n!==H&&(N(n),O(g()))},[n]),k.useEffect(function(){if(i!==A){w(i);var Y,ie=g({onCountryMismatch:function(){Y=!0}});O(ie),Y&&N(R(ie))}},[i]),k.useEffect(function(){a!==T&&(C(a),O(g()))},[a]),k.useEffect(function(){H!==n&&r(H)},[H]);var ue=k.useCallback(function(Y){var ie;if(i)if(d==="INTERNATIONAL"){var re=kw(i,u);if(Y.indexOf(re)!==0){if(Y&&Y[0]!=="+")Y=re+Y;else if(!f.current)return O(re),N(void 0),X()}}else Y&&Y[0]==="+"&&(Y=Y.slice(1));else a||Y&&Y[0]!=="+"&&(Y="+"+Y);Y&&(ie=R(Y)),O(Y),N(ie)},[i,d,a,u,O,N,X,f]);return{phoneDigits:M,setPhoneDigits:ue,inputFormat:d}}function tye(t,e,n,r,i,a,s){if(e&&r==="INTERNATIONAL"){var l=kw(e,a);return t?(t.indexOf(l)!==0&&s(t,e),t):l}if(!t)return"";if(!e&&!n)return t;var c=new p5(void 0,a);c.input(t);var u=c.getNumber();if(u)if(e)switch(u.country&&u.country!==e?s(t,e,u.country):u.countryCallingCode!==N1(e,a)&&s(t,e),r){case"NATIONAL":return O1(u.formatNational());case"NATIONAL_PART_OF_INTERNATIONAL":return O1(g5(u.formatInternational(),kw(e,a)));case"INTERNATIONAL":throw new Error('`inputFormat: "INTERNATIONAL"` case should\'ve already been handled earlier in the code');case"INTERNATIONAL_OR_NATIONAL":throw new Error('`inputFormat: "INTERNATIONAL_OR_NATIONAL"` is not possible when `country` is fixed');default:throw new Error("Unknown `inputFormat`: ".concat(r))}else return u.countryCallingCode&&u.countryCallingCode===N1(n,a)&&i?O1(u.formatNational()):t;else return""}function nye(t){var e=t.international,n=t.country,r=t.defaultCountry,i=t.withCountryCallingCode;return n?e?i?"INTERNATIONAL":"NATIONAL_PART_OF_INTERNATIONAL":"NATIONAL":r?"INTERNATIONAL_OR_NATIONAL":"INTERNATIONAL"}var rye=["Component","country","defaultCountry","useNationalFormatForDefaultCountryValue","value","onChange","metadata","international","withCountryCallingCode"];function Pw(){return Pw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Pw.apply(this,arguments)}function iye(t,e){if(t==null)return{};var n=aye(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function aye(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function m5(t,e){var n=t.Component,r=t.country,i=t.defaultCountry,a=t.useNationalFormatForDefaultCountryValue,s=a===void 0?!0:a,l=t.value,c=t.onChange,u=t.metadata,d=t.international,f=t.withCountryCallingCode,h=iye(t,rye),g=eye({value:l,onChange:c,country:r,defaultCountry:i,international:d,withCountryCallingCode:f,useNationalFormatForDefaultCountryValue:s,metadata:u}),v=g.phoneDigits,m=g.setPhoneDigits,A=g.inputFormat;return k.createElement(n,Pw({},h,{ref:e,metadata:u,inputFormat:A,international:d,withCountryCallingCode:f,country:r||i,value:v,onChange:m}))}m5=k.forwardRef(m5),m5.propTypes={value:Tn.string,onChange:Tn.func.isRequired,country:Tn.string,defaultCountry:Tn.string,international:Tn.bool,withCountryCallingCode:Tn.bool,Component:Tn.elementType.isRequired,useNationalFormatForDefaultCountryValue:Tn.bool,metadata:Gbe};var sye=["type","autoComplete","smartCaret","metadata"];function Mw(){return Mw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Mw.apply(this,arguments)}function oye(t,e){if(t==null)return{};var n=lye(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function lye(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function xU(t){function e(n,r){var i=n.type,a=i===void 0?"tel":i,s=n.autoComplete,l=s===void 0?"tel":s,c=n.smartCaret,u=c===void 0?!0:c,d=n.metadata,f=d===void 0?t:d,h=oye(n,sye);return k.createElement(m5,Mw({},h,{type:a,autoComplete:l,metadata:f,ref:r,Component:u?$be:Kbe}))}return e=k.forwardRef(e),e.propTypes={type:Tn.string,autoComplete:Tn.string,smartCaret:Tn.bool,metadata:Tn.object},e}xU();const cye=xU(n8e),uye=t=>{var Z,K,W,me,be,Te,ye,fe,ne,q,ee;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a,TASK_PUBLISHED:s,task_status:l}=Ar(),{userSelectedLanguage:c,fieldSettingUpdate:u}=sn(),{field:d,fieldIndex:f,sectionIndex:h,pageIndex:g,row:v,rowIndex:m,columnIndex:A,isDisabled:w}=t,{isAdmin:x,isBuilderMode:S}=Ht(),[T,C]=k.useState(!1),[E,_]=k.useState(""),[M,O]=k.useState(0),[F,P]=k.useState(!1),[H,N]=k.useState(!1),z=()=>{N(!0)},U=()=>{N(!1)},ce=()=>{var oe,pe,_e;if(v!=null&&v.rowIsRepeatable){if(v!=null&&v.repeatableFields){const Ne=[...v.repeatableFields],ve=_t.findIndex(Ne,function(Ae){return Ae.uuid===(d==null?void 0:d.uuid)});ve>=0&&Ne[ve].fieldData?_(Ne[ve].fieldData):_("")}}else{const Ne=a;if(Ne!=null&&Ne.length){for(const ve of Ne)if(ve.fieldId===t.field.uuid&&((oe=ve==null?void 0:ve.postData[0])==null?void 0:oe.postValue)!==""&&((pe=ve==null?void 0:ve.postData[0])!=null&&pe.postValue)){_((_e=ve==null?void 0:ve.postData[0])==null?void 0:_e.postValue);break}}}P(!0)};k.useEffect(()=>{F||ce();const oe=Gt.addListener("clearRepeatableFields",ve=>{ve===(v==null?void 0:v.uuid)&&(_(""),O(0),d.isValid=0,u(g,h,m,A,f,d))}),pe=Gt.addListener("onSubmitUserForm",()=>{var ve;(ve=d==null?void 0:d.attributes)!=null&&ve.required?E?d.isValid=1:d.isValid=0:d.isValid=1}),_e=Gt.addListener("OnInvalidFieldCatch",ve=>{d.uuid===(ve==null?void 0:ve.fieldId)?O(1):O(0)}),Ne=Gt.addListener("OnGetFieldValue",ve=>{var Be;const Ae=(Be=ve==null?void 0:ve.repeatableColumn)==null?void 0:Be.filter(Ee=>(Ee==null?void 0:Ee.fieldUuid)===(d==null?void 0:d.uuid));Ae!=null&&Ae.length});return()=>{pe.remove(),_e.remove(),Ne.remove(),oe.remove()}});const X=oe=>{C(oe)},R=()=>{C(!1)},ue=(oe,pe)=>{const _e=a,Ne=_t.cloneDeep(e);if(Ne[d==null?void 0:d.uuid]=oe,(_e==null?void 0:_e.length)>0)for(const ve of _e)ve.fieldId===t.field.uuid&&(ve.postData[0]={postValue:oe});if(!(v!=null&&v.rowIsRepeatable)){n(Ne);const ve=Object.keys(Ne).length;r(ve)}},Y=(oe,pe)=>{var _e;if(a){const Ne=[...a],ve=_t.findIndex(Ne,function(Be){return Be.rowId===(v==null?void 0:v.uuid)});let Ae=(_e=a[ve])==null?void 0:_e.repeatableFields;Ae={...Ae,[oe==null?void 0:oe.uuid]:pe},Ne[ve]={...Ne[ve],repeatableFields:Ae},i(Ne)}_(pe),pe!==""?oe.isValid=1:oe.isValid=0},ie=oe=>{v!=null&&v.rowIsRepeatable?Y(d,oe):ue(oe)},re=o.jsxs("div",{onMouseOver:z,onMouseOut:U,children:[S&&H&&o.jsx(Wr,{handleFieldSettingsSidebar:X,...t}),o.jsxs("div",{className:`field ${S&&" py-3 px-4 builder-element-wrapper "}${(d==null?void 0:d.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:S?"col-12 p-fluid":"col-12 ",children:[(d==null?void 0:d.showHeaderText)&&o.jsx("h6",{children:(Z=d==null?void 0:d.headerText)==null?void 0:Z[c==null?void 0:c.type]}),(d==null?void 0:d.showLabel)&&o.jsxs("label",{htmlFor:f,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((K=d==null?void 0:d.attributes)==null?void 0:K.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",S?o.jsx(aa,{...t}):o.jsx(o.Fragment,{children:(W=d==null?void 0:d.label)==null?void 0:W[c==null?void 0:c.type]}),o.jsx("span",{className:"ml-3",children:(d==null?void 0:d.showToolTip)&&o.jsx(zi,{message:(me=d==null?void 0:d.toolTip)==null?void 0:me[c==null?void 0:c.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs("span",{className:"p-input-icon-"+(d==null?void 0:d.iconAlignment),children:[(d==null?void 0:d.showIcon)&&o.jsx("i",{className:"pi pi-"+((Te=(be=d==null?void 0:d.icon)==null?void 0:be.properties)==null?void 0:Te.name)}),o.jsx(cye,{id:d==null?void 0:d.uuid,placeholder:(ye=d==null?void 0:d.placeholder)==null?void 0:ye[c==null?void 0:c.type],value:E,onFocus:()=>O(1),onChange:ie,international:!0,country:"GB",className:`${M===1&&((fe=d==null?void 0:d.attributes)!=null&&fe.required)?E?"valid":"invalid":"valid'"} p-inputtext`,readOnly:w,disabled:x||w})]}),o.jsx("div",{children:((ne=d==null?void 0:d.attributes)==null?void 0:ne.required)&&o.jsx("small",{className:"error",children:M===1&&!E?(q=d==null?void 0:d.validationMesssage)==null?void 0:q.english:""})}),o.jsx("div",{children:(d==null?void 0:d.showHelperText)&&o.jsx("small",{children:(ee=d==null?void 0:d.helperText)==null?void 0:ee[c==null?void 0:c.type]})})]})]})}),x&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[T===!0&&o.jsx(Qi,{visibilty:T,closeSettingFieldSidebar:R,...t}),o.jsx(xi,{...t,fieldWrap:re})]})},dye=t=>{var ue,Y,ie,re,Z,K,W,me,be,Te,ye;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,row:a,isDisabled:s}=t,{isAdmin:l,isBuilderMode:c}=Ht(),{task_status:u,taskRegisterData:d,updateTaskRegisterData:f,updateTaskProgressValue:h,updateUserFormDataSubmit:g,userTaskSubmitFormData:v,TASK_PUBLISHED:m}=Ar(),{userSelectedLanguage:A}=sn(),[w,x]=k.useState(!1),[S,T]=k.useState(""),[C,E]=k.useState(0),[_,M]=k.useState(!1),O=()=>{M(!0)},F=()=>{M(!1)};k.useEffect(()=>{w||U();const fe=Gt.addListener("clearRepeatableFields",q=>{q===(a==null?void 0:a.uuid)&&(T(""),E(0),e.isValid=0)}),ne=Gt.addListener("onSubmitUserForm",()=>{var q;(q=e==null?void 0:e.attributes)!=null&&q.required?S!==""&&du.test(S)===!0?e.isValid=1:e.isValid=0:e.isValid=1});return()=>{ne.remove(),fe.remove()}});const[P,H]=k.useState(!1),N=fe=>{H(fe)},z=()=>{H(!1)},U=()=>{var fe,ne,q;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const ee=[...a.repeatableFields],oe=_t.findIndex(ee,function(pe){return pe.uuid===(e==null?void 0:e.uuid)});oe>=0&&ee[oe].fieldData?T(ee[oe].fieldData):T("")}}else{const ee=v;if(ee!=null&&ee.length){for(const oe of ee)if(oe.fieldId===t.field.uuid&&((fe=oe==null?void 0:oe.postData[0])==null?void 0:fe.postValue)!==""&&((ne=oe==null?void 0:oe.postData[0])!=null&&ne.postValue)){T((q=oe==null?void 0:oe.postData[0])==null?void 0:q.postValue),x(!0);break}}}x(!0)},ce=fe=>{T(fe);const ne=v,q=_t.cloneDeep(d);if(fe!==""&&du.test(fe)===!0){if(q[e==null?void 0:e.uuid]=fe,(ne==null?void 0:ne.length)>0)for(const ee of ne)ee.fieldId===t.field.uuid&&(ee.postData[0]={postValue:fe})}else if(delete q[e==null?void 0:e.uuid],(ne==null?void 0:ne.length)>0)for(const ee of ne)ee.fieldId===t.field.uuid&&(ee.postData[0]={postValue:""});if(!(a!=null&&a.rowIsRepeatable)){f(q);const ee=Object.keys(q).length;h(ee)}};console.log("inputValue",S);const X=(fe,ne)=>{var Ne;console.log("value",ne);const q=[...v],ee=_t.findIndex(q,function(ve){return ve.rowId===(a==null?void 0:a.uuid)});let oe=(Ne=v[ee])==null?void 0:Ne.repeatableFields;const pe=fe,_e=pe==null?void 0:pe.uuid;oe={...oe,[_e]:ne},q[ee]={...q[ee],repeatableFields:oe},console.log("_data2",q),g(q),T(ne),ne!==""&&du.test(ne)===!0?e.isValid=1:e.isValid=0},R=o.jsxs("div",{onMouseOver:O,onMouseOut:F,children:[c&&_&&o.jsx(Wr,{handleFieldSettingsSidebar:N,...t}),o.jsxs("div",{className:`field ${c&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid"}),(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(ue=e==null?void 0:e.headerText)==null?void 0:ue[A==null?void 0:A.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:n,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((Y=e==null?void 0:e.attributes)==null?void 0:Y.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",c?o.jsx(aa,{...t}):o.jsx(o.Fragment,{children:(ie=e==null?void 0:e.label)==null?void 0:ie[A==null?void 0:A.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(zi,{message:(re=e==null?void 0:e.toolTip)==null?void 0:re[A==null?void 0:A.type],position:"right"})})]}),o.jsxs("span",{className:"p-input-icon-"+(e==null?void 0:e.iconAlignment),children:[(e==null?void 0:e.showIcon)&&o.jsx("i",{className:"pi pi-"+((K=(Z=e==null?void 0:e.icon)==null?void 0:Z.properties)==null?void 0:K.name)}),o.jsx(wn,{id:e==null?void 0:e.uuid,placeholder:(W=e==null?void 0:e.placeholder)==null?void 0:W[A==null?void 0:A.type],value:S,onFocus:()=>E(1),onChange:fe=>{a!=null&&a.rowIsRepeatable?X(e,fe.target.value):ce(fe.target.value)},className:C===1&&((me=e==null?void 0:e.attributes)!=null&&me.required)?S?"valid":"invalid":"valid'",readOnly:s||l})]}),((be=e==null?void 0:e.attributes)==null?void 0:be.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:C===1&&!S?(Te=e==null?void 0:e.validationMesssage)==null?void 0:Te[A==null?void 0:A.type]:""})}),S!==""&&C===1&&du.test(S)===!1&&o.jsx("small",{className:"error",children:"Please enter correct url"}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(ye=e==null?void 0:e.helperText)==null?void 0:ye[A==null?void 0:A.type]})})]}),l&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]});return o.jsxs(o.Fragment,{children:[P===!0&&o.jsx(Qi,{visibilty:P,closeSettingFieldSidebar:z,...t},e==null?void 0:e.uuid),o.jsx(xi,{...t,fieldWrap:R})]})},fye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAwAAAAMACAYAAACTgQCOAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAACAAElEQVR42u3deXxcdb3/8ffnTLaWthSUVVuaTMIWKc2cpLWi/oqIeK+4XisuoKDodUNx38H9Ku67IhdwB6NeF1xBqQrWNjOTUgxbM0kLyKp0b7PMnM/vj1ZFtiazZc7M6/l4+LhXxTZ5nzPnfN9zvt/vMQEAakI6DJv3j6L5gft8NTfPN/f5cp8fuR+gIJhv7vNdag7M5sm91aXZkvaTe4uk/c2sSdL+kuRSQtK8h/hr5khqfsB/Nilpx0P8s9tMKuz9/7e6e17SVplNSNpp0i6ZjUfu20yadLMtiqItgdlmm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,isDisabled:a}=t,{isAdmin:s,isBuilderMode:l}=Ht(),{task_status:c,taskRegisterData:u,updateTaskRegisterData:d,updateTaskProgressValue:f,updateUserFormDataSubmit:h,userTaskSubmitFormData:g,TASK_PUBLISHED:v}=Ar(),{userSelectedLanguage:m}=sn(),[A,w]=k.useState(!1),[x,S]=k.useState(""),[T,C]=k.useState(0),[E,_]=k.useState(!1),M=()=>{_(!0)},O=()=>{_(!1)};k.useEffect(()=>{A||z();const be=Gt.addListener("clearRepeatableFields",ye=>{ye===(i==null?void 0:i.uuid)&&(S(""),C(0),e.isValid=0)}),Te=Gt.addListener("onSubmitUserForm",()=>{var ye;(ye=e==null?void 0:e.attributes)!=null&&ye.required?x!==""&&du.test(x)===!0?e.isValid=1:e.isValid=0:e.isValid=1});return()=>{Te.remove(),be.remove()}});const[F,P]=k.useState(!1),H=be=>{P(be)},N=()=>{P(!1)},z=()=>{var be,Te,ye;if(i!=null&&i.rowIsRepeatable){const fe=[...(i==null?void 0:i.repeatableFields)||[]],ne=_t.findIndex(fe,function(q){return q.uuid===(e==null?void 0:e.uuid)});ne>=0&&fe[ne].fieldData?S(fe[ne].fieldData):S("")}else{const fe=g;if(fe!=null&&fe.length){for(const ne of fe)if(ne.fieldId===t.field.uuid&&((be=ne==null?void 0:ne.postData[0])==null?void 0:be.postValue)!==""&&((Te=ne==null?void 0:ne.postData[0])!=null&&Te.postValue)){S((ye=ne==null?void 0:ne.postData[0])==null?void 0:ye.postValue),w(!0);break}}}w(!0)},U=(be,Te)=>{S(Te);const ye=g,fe=_t.cloneDeep(u);if(ye!==null){if(Te){if(fe[e==null?void 0:e.uuid]=Te,(ye==null?void 0:ye.length)>0)for(const ne of ye)ne.fieldId===t.field.uuid&&(ne.postData[0]={postValue:Te})}else if(delete fe[e==null?void 0:e.uuid],(ye==null?void 0:ye.length)>0)for(const ne of ye)ne.fieldId===t.field.uuid&&(ne.postData[0]={postValue:""})}if(!(i!=null&&i.rowIsRepeatable)){d(fe);const ne=Object.keys(fe).length;f(ne)}},ce=(be,Te,ye,fe)=>{var oe;const ne=[...g],q=_t.findIndex(ne,function(pe){return pe.rowId===(i==null?void 0:i.uuid)});let ee=(oe=g[q])==null?void 0:oe.repeatableFields;ee={...ee,[ye==null?void 0:ye.uuid]:fe},ne[q]={...ne[q],repeatableFields:ee},h(ne),S(fe),fe!==""&&du.test(fe)===!0?e.isValid=1:e.isValid=0},X=o.jsxs("div",{onMouseOver:M,onMouseOut:O,children:[l&&E&&o.jsx(Wr,{handleFieldSettingsSidebar:H,...t}),o.jsxs("div",{className:`field ${l&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:s?"col-6 ":"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(R=e==null?void 0:e.headerText)==null?void 0:R[m==null?void 0:m.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:e.uuid,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((ue=e==null?void 0:e.attributes)==null?void 0:ue.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",l?o.jsx(aa,{...t}):o.jsx(o.Fragment,{children:(Y=e==null?void 0:e.label)==null?void 0:Y[m==null?void 0:m.type]}),(e==null?void 0:e.showToolTip)&&o.jsx("span",{className:"ml-3",children:o.jsx(zi,{message:(ie=e==null?void 0:e.toolTip)==null?void 0:ie[m==null?void 0:m.type],position:"right"})})]}),o.jsx("div",{children:o.jsx(v6,{cancelIcon:o.jsx("img",{src:fye,alt:"custom-cancel-image",width:"25px",height:"25px"}),offIcon:o.jsx("img",{src:hye,alt:"custom-image-active",width:"25px",height:"25px"}),onIcon:o.jsx("img",{src:pye,alt:"custom-image",width:"25px",height:"25px"}),id:e==null?void 0:e.uuid,placeholder:(re=e==null?void 0:e.placeholder)==null?void 0:re[m==null?void 0:m.type],value:x,onFocus:()=>C(1),onChange:be=>{i!=null&&i.rowIsRepeatable?ce(n,r,e,be.value):U(be,be.value)},className:T===1&&((Z=e==null?void 0:e.attributes)!=null&&Z.required)?x?"valid":"invalid":"valid'",readOnly:a})}),((K=e==null?void 0:e.attributes)==null?void 0:K.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:T===1&&!x?(W=e==null?void 0:e.validationMesssage)==null?void 0:W[m==null?void 0:m.type]:""})}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(me=e==null?void 0:e.helperText)==null?void 0:me[m==null?void 0:m.type]})})]})}),s&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[F===!0&&o.jsx(Qi,{visibilty:F,closeSettingFieldSidebar:N,...t},e==null?void 0:e.uuid),o.jsx(xi,{...t,fieldWrap:X})]})},mye=t=>{var R,ue,Y,ie,re,Z,K,W,me;const{field:e,pageIndex:n,sectionIndex:r,row:i,isDisabled:a}=t,{isAdmin:s,isBuilderMode:l}=Ht(),{task_status:c,taskRegisterData:u,updateTaskRegisterData:d,updateTaskProgressValue:f,updateUserFormDataSubmit:h,userTaskSubmitFormData:g,TASK_PUBLISHED:v}=Ar(),{userSelectedLanguage:m}=sn(),[A,w]=k.useState(!1),[x,S]=k.useState(""),[T,C]=k.useState(0),[E,_]=k.useState(!1),M=()=>{_(!0)},O=()=>{_(!1)};k.useEffect(()=>{A||z();const be=Gt.addListener("clearRepeatableFields",ye=>{ye===(i==null?void 0:i.uuid)&&(S(""),C(0),e.isValid=0)}),Te=Gt.addListener("onSubmitUserForm",()=>{var ye;(ye=e==null?void 0:e.attributes)!=null&&ye.required?x!==""&&du.test(x)===!0?e.isValid=1:e.isValid=0:e.isValid=1});return()=>{Te.remove(),be.remove()}});const[F,P]=k.useState(!1),H=be=>{P(be)},N=()=>{P(!1)},z=()=>{var be,Te,ye;if(i!=null&&i.rowIsRepeatable){if(i!=null&&i.repeatableFields){const fe=[...i.repeatableFields],ne=_t.findIndex(fe,function(q){return q.uuid===(e==null?void 0:e.uuid)});ne>=0&&fe[ne].fieldData?S(fe[ne].fieldData):S("")}}else{const fe=g;if(fe!=null&&fe.length){for(const ne of fe)if(ne.fieldId===t.field.uuid&&((be=ne==null?void 0:ne.postData[0])==null?void 0:be.postValue)!==""&&((Te=ne==null?void 0:ne.postData[0])!=null&&Te.postValue)){S((ye=ne==null?void 0:ne.postData[0])==null?void 0:ye.postValue),w(!0);break}}}w(!0)},U=(be,Te)=>{S(Te);const ye=g,fe=_t.cloneDeep(u);if(ye!==null){if(Te){if(fe[e==null?void 0:e.uuid]=Te,(ye==null?void 0:ye.length)>0)for(const ne of ye)ne.fieldId===t.field.uuid&&(ne.postData[0]={postValue:Te})}else if(delete fe[e==null?void 0:e.uuid],(ye==null?void 0:ye.length)>0)for(const ne of ye)ne.fieldId===t.field.uuid&&(ne.postData[0]={postValue:""})}if(!(i!=null&&i.rowIsRepeatable)){d(fe);const ne=Object.keys(fe).length;f(ne)}},ce=(be,Te,ye,fe)=>{var oe;const ne=[...g],q=_t.findIndex(ne,function(pe){return pe.rowId===(i==null?void 0:i.uuid)});let ee=(oe=g[q])==null?void 0:oe.repeatableFields;ee={...ee,[ye==null?void 0:ye.uuid]:fe},ne[q]={...ne[q],repeatableFields:ee},h(ne),S(fe),fe!==""&&du.test(fe)===!0?e.isValid=1:e.isValid=0},X=o.jsxs("div",{onMouseOver:M,onMouseOut:O,children:[l&&E&&o.jsx(Wr,{handleFieldSettingsSidebar:H,...t}),o.jsx("div",{className:`field ${l&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:l?"col-12 p-fluid field-form-builder":"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(R=e==null?void 0:e.headerText)==null?void 0:R[m==null?void 0:m.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:e.uuid,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((ue=e==null?void 0:e.attributes)==null?void 0:ue.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",l?o.jsx(aa,{...t}):o.jsx(o.Fragment,{children:(Y=e==null?void 0:e.label)==null?void 0:Y[m==null?void 0:m.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(zi,{message:(ie=e==null?void 0:e.toolTip)==null?void 0:ie[m==null?void 0:m.type],position:"right"})})]}),o.jsx(A6,{id:e==null?void 0:e.uuid,placeholder:(re=e==null?void 0:e.placeholder)==null?void 0:re[m==null?void 0:m.type],value:x,onFocus:()=>C(1),onChange:be=>{i!=null&&i.rowIsRepeatable?ce(n,r,e,be.value):U(be,be.value)},className:T===1&&((Z=e==null?void 0:e.attributes)!=null&&Z.required)?x?"valid":"invalid":"valid'",readOnly:a,disabled:s||a}),((K=e==null?void 0:e.attributes)==null?void 0:K.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:T===1&&!x?(W=e==null?void 0:e.validationMesssage)==null?void 0:W[m==null?void 0:m.type]:""})}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(me=e==null?void 0:e.helperText)==null?void 0:me[m==null?void 0:m.type]})})]}),s&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[F===!0&&o.jsx(Qi,{visibilty:F,closeSettingFieldSidebar:N,...t},e==null?void 0:e.uuid),o.jsx(xi,{...t,fieldWrap:X})]})},vye=t=>{var X,R,ue,Y,ie,re;const{field:e,pageIndex:n,sectionIndex:r,row:i}=t,{isAdmin:a,isBuilderMode:s}=Ht(),{task_status:l,taskRegisterData:c,updateTaskRegisterData:u,updateTaskProgressValue:d,updateUserFormDataSubmit:f,userTaskSubmitFormData:h,TASK_PUBLISHED:g}=Ar(),{userSelectedLanguage:v}=sn(),[m,A]=k.useState(!1),[w,x]=k.useState(""),[S,T]=k.useState(0),[C,E]=k.useState(!1),_=()=>{E(!0)},M=()=>{E(!1)};k.useEffect(()=>{m||N();const Z=Gt.addListener("clearRepeatableFields",W=>{W===(i==null?void 0:i.uuid)&&(x(""),T(0),e.isValid=0)}),K=Gt.addListener("onSubmitUserForm",()=>{var W;(W=e==null?void 0:e.attributes)!=null&&W.required&&(w!==""&&du.test(w)===!0?e.isValid=1:e.isValid=0)});return()=>{K.remove(),Z.remove()}});const[O,F]=k.useState(!1),P=Z=>{F(Z)},H=()=>{F(!1)},N=()=>{var Z,K,W;if(i!=null&&i.rowIsRepeatable){if(i!=null&&i.repeatableFields){const me=[...i.repeatableFields],be=_t.findIndex(me,function(Te){return Te.uuid===(e==null?void 0:e.uuid)});be>=0&&me[be].fieldData?x(me[be].fieldData):x("")}}else{const me=h;if(me!=null&&me.length){for(const be of me)if(be.fieldId===t.field.uuid&&((Z=be==null?void 0:be.postData[0])==null?void 0:Z.postValue)!==""&&((K=be==null?void 0:be.postData[0])!=null&&K.postValue)){x((W=be==null?void 0:be.postData[0])==null?void 0:W.postValue),A(!0);break}}}A(!0)},z=(Z,K)=>{x(K);const W=h,me=_t.cloneDeep(c);if(K){if(me[e==null?void 0:e.uuid]=K,(W==null?void 0:W.length)>0)for(const be of W)be.fieldId===t.field.uuid&&(be.postData[0]={postValue:K})}else if(delete me[e==null?void 0:e.uuid],(W==null?void 0:W.length)>0)for(const be of W)be.fieldId===t.field.uuid&&(be.postData[0]={postValue:""});if(!(i!=null&&i.rowIsRepeatable)){u(me);const be=Object.keys(me).length;d(be)}},U=(Z,K,W,me)=>{var fe;const be=[...h],Te=_t.findIndex(be,function(ne){return ne.rowId===(i==null?void 0:i.uuid)});let ye=(fe=h[Te])==null?void 0:fe.repeatableFields;ye={...ye,[W==null?void 0:W.uuid]:me},be[Te]={...be[Te],repeatableFields:ye},f(be),x(me),me!==""&&du.test(me)===!0?e.isValid=1:e.isValid=0},ce=o.jsxs("div",{onMouseOver:_,onMouseOut:M,children:[s&&C&&o.jsx(Wr,{handleFieldSettingsSidebar:P,...t}),o.jsxs("div",{className:`field ${s&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[o.jsxs("div",{className:s?"card p-fluid field-form-builder":"p-fluid",children:[s&&o.jsx("label",{className:"block font-medium mb-3 text-700 text-2xl",children:"Hidden field"}),o.jsx(wn,{type:s===!1?"hidden":"text",id:e==null?void 0:e.uuid,placeholder:(X=e==null?void 0:e.placeholder)==null?void 0:X[v==null?void 0:v.type],value:(R=e==null?void 0:e.defaultValue)==null?void 0:R[v==null?void 0:v.type],onFocus:()=>T(1),onLoad:()=>{i!=null&&i.rowIsRepeatable?U(n,r,e,e==null?void 0:e.defaultValue):z("",e==null?void 0:e.defaultValue)},className:S===1&&((ue=e==null?void 0:e.attributes)!=null&&ue.required)?w?"valid":"invalid":"valid'",readOnly:l===g}),((Y=e==null?void 0:e.attributes)==null?void 0:Y.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:S===1&&!w?(ie=e==null?void 0:e.validationMesssage)==null?void 0:ie[v==null?void 0:v.type]:""})}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(re=e==null?void 0:e.helperText)==null?void 0:re[v==null?void 0:v.type]})})]}),a&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[O===!0&&o.jsx(Qi,{visibilty:O,closeSettingFieldSidebar:H,...t}),o.jsx(xi,{...t,fieldWrap:ce})]})},TU=t=>{var T;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,path:l,labelType:c}=t,[u,d]=k.useState(e),{isBuilderMode:f}=Ht();k.useEffect(()=>{var C;return x((C=e[c])==null?void 0:C[h==null?void 0:h.type]),()=>{}},[e]);const{userSelectedLanguage:h,fieldSettingUpdate:g,fieldSettingUpdateInlineConditional:v,gridComponentFieldSettingUpdate:m}=sn(),A=(C,E,_)=>{d(M=>({...M,[C]:{...M[C],[E==null?void 0:E.type]:_}}))},[w,x]=k.useState((T=e[c])==null?void 0:T[h==null?void 0:h.type]);k.useEffect(()=>(S(),()=>{}),[u]);const S=()=>{const C=l.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?v(C[fa],C[ha],C[Ca],C[xa],C[Ta],C[Fa],C[Xo],C[wo],u):(C==null?void 0:C.length)>Fa&&(C==null?void 0:C.length)===Bl+1&&(e!=null&&e.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?m(C[fa],C[ha],C[Ca],C[xa],C[Ta],C[5],C[6],C[7],u):g(r,i,a,s,n,{...e,[c]:u[c]})};return o.jsx(o.Fragment,{children:o.jsx(D3,{style:{display:"inline-block"},className:"builder-input-label-edit",html:w,disabled:!f,onChange:C=>{var E;x(k3.sanitize((E=C==null?void 0:C.target)==null?void 0:E.value))},onBlur:C=>{var _;const E=k3.sanitize((_=C==null?void 0:C.target)==null?void 0:_.innerText);x(E),A(c,h,E)},tagName:"article"})})},bye=t=>{var re,Z,K,W,me,be,Te;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a}=Ar(),{userSelectedLanguage:s,fieldSettingUpdate:l}=sn(),{field:c,fieldIndex:u,sectionIndex:d,pageIndex:f,row:h,rowIndex:g,columnIndex:v,isDisabled:m}=t,{isBuilderMode:A,isAdmin:w}=Ht(),[x,S]=k.useState(!1),[T,C]=k.useState(""),[E,_]=k.useState(0),[M,O]=k.useState(!1),[F,P]=k.useState(!1),H=()=>{P(!0)},N=()=>{P(!1)},z=()=>{var ye,fe,ne;if(h!=null&&h.rowIsRepeatable){if(h!=null&&h.repeatableFields){const q=[...h.repeatableFields],ee=_t.findIndex(q,function(oe){return oe.uuid===(c==null?void 0:c.uuid)});ee>=0&&q[ee].fieldData?C(q[ee].fieldData):C("")}}else{const q=a;if(q!=null&&q.length){for(const ee of q)if(ee.fieldId===t.field.uuid&&((ye=ee==null?void 0:ee.postData[0])==null?void 0:ye.postValue)!==""&&((fe=ee==null?void 0:ee.postData[0])!=null&&fe.postValue)){C((ne=ee==null?void 0:ee.postData[0])==null?void 0:ne.postValue);break}}}O(!0)};k.useEffect(()=>{M||z();const ye=Gt.addListener("clearRepeatableFields",ee=>{ee===(h==null?void 0:h.uuid)&&(C(""),_(0),c.isValid=0,l(f,d,g,v,u,c))}),fe=Gt.addListener("onSubmitUserForm",()=>{var ee;(ee=c==null?void 0:c.attributes)!=null&&ee.required?T?c.isValid=1:c.isValid=0:c.isValid=1}),ne=Gt.addListener("OnInvalidFieldCatch",ee=>{c.uuid===(ee==null?void 0:ee.fieldId)?_(1):_(0)}),q=Gt.addListener("OnGetFieldValue",ee=>{var pe;const oe=(pe=ee==null?void 0:ee.repeatableColumn)==null?void 0:pe.filter(_e=>(_e==null?void 0:_e.fieldUuid)===(c==null?void 0:c.uuid));oe!=null&&oe.length});return()=>{fe.remove(),ne.remove(),q.remove(),ye.remove()}});const U=ye=>{S(ye)},ce=()=>{S(!1)},X=ye=>{var q,ee;C(ye.target.value);const fe=a,ne=_t.cloneDeep(e);if(fe!==null){if((q=ye==null?void 0:ye.target)!=null&&q.value){if(ne[c==null?void 0:c.uuid]=(ee=ye==null?void 0:ye.target)==null?void 0:ee.value,(fe==null?void 0:fe.length)>0)for(const oe of fe)oe.fieldId===t.field.uuid&&(oe.postData[0]={postValue:ye.target.value})}else if(delete ne[c==null?void 0:c.uuid],(fe==null?void 0:fe.length)>0)for(const oe of fe)oe.fieldId===t.field.uuid&&(oe.postData[0]={postValue:""})}if(!(h!=null&&h.rowIsRepeatable)){n(ne);const oe=Object.keys(ne).length;r(oe)}},R=(ye,fe,ne,q)=>{var ee;if(a){const oe=[...a],pe=_t.findIndex(oe,function(Ne){return Ne.rowId===(h==null?void 0:h.uuid)});let _e=(ee=a[pe])==null?void 0:ee.repeatableFields;_e={..._e,[ne==null?void 0:ne.uuid]:q},oe[pe]={...oe[pe],repeatableFields:_e},i(oe)}C(q),q!==""?ne.isValid=1:ne.isValid=0},ue=10,Y=()=>{const ye=[];for(let fe=0;fe<=ue;fe++)ye.push(o.jsxs("label",{children:[o.jsx("input",{onChange:ne=>{h!=null&&h.rowIsRepeatable?R(f,d,c,ne.target.value):X(ne)},checked:parseInt(T)===fe,name:"liker-scale"+(c==null?void 0:c.uuid),type:"radio",value:fe,disabled:m}),o.jsx("span",{children:fe})]},`field-${c==null?void 0:c.uuid}-likertScale-${fe} ${parseInt(T)===fe?"scale-selected":""}`));return ye},ie=o.jsxs("div",{onMouseOver:H,onMouseOut:N,children:[A&&F&&o.jsx(Wr,{handleFieldSettingsSidebar:U,...t}),o.jsxs("div",{className:`field ${A&&" py-3 px-4 builder-element-wrapper "}${(c==null?void 0:c.isFluid)===!0&&" p-fluid"}`,children:[o.jsxs("div",{className:"",children:[(c==null?void 0:c.showHeaderText)&&o.jsx("h6",{children:(re=c==null?void 0:c.headerText)==null?void 0:re[s==null?void 0:s.type]}),(c==null?void 0:c.showLabel)&&o.jsxs("label",{htmlFor:u,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((Z=c==null?void 0:c.attributes)==null?void 0:Z.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",A?o.jsx(aa,{...t}):o.jsx(o.Fragment,{children:(K=c==null?void 0:c.label)==null?void 0:K[s==null?void 0:s.type]}),o.jsx("span",{className:"ml-3",children:(c==null?void 0:c.showToolTip)&&o.jsx(zi,{message:(W=c==null?void 0:c.toolTip)==null?void 0:W[s==null?void 0:s.type],position:"right"})})]}),o.jsx("div",{children:o.jsxs("div",{className:"mt-4",children:[o.jsxs("div",{className:"flex justify-content-between mb-3",children:[o.jsx("div",{className:"font-medium text-900 ",children:o.jsx(TU,{...t,labelType:"startingMessage"})}),o.jsx("div",{className:"font-medium text-900",children:o.jsx(TU,{...t,labelType:"endingMessage"})})]}),o.jsx("div",{className:"likert",children:Y()})]})}),o.jsx("div",{children:((me=c==null?void 0:c.attributes)==null?void 0:me.required)&&o.jsx("small",{className:"error",children:E===1&&!T?(be=c==null?void 0:c.validationMesssage)==null?void 0:be.language:""})}),o.jsx("div",{children:(c==null?void 0:c.showHelperText)&&o.jsx("small",{children:(Te=c==null?void 0:c.helperText)==null?void 0:Te[s==null?void 0:s.type]})})]}),w&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[x===!0&&o.jsx(Qi,{visibilty:x,closeSettingFieldSidebar:ce,...t}),o.jsx(xi,{...t,fieldWrap:ie})]})},yye=t=>{var Z,K,W,me,be,Te,ye,fe,ne,q,ee,oe;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a,task_status:s,TASK_PUBLISHED:l}=Ar(),{userSelectedLanguage:c,fieldSettingUpdate:u}=sn(),{field:d,fieldIndex:f,sectionIndex:h,pageIndex:g,row:v,rowIndex:m,columnIndex:A,isDisabled:w}=t,{isBuilderMode:x,isAdmin:S,isRenderView:T}=Ht(),[C,E]=k.useState(!1),[_,M]=k.useState(""),[O,F]=k.useState(0),[P,H]=k.useState(!1),[N,z]=k.useState(!1),U=()=>{z(!0)},ce=()=>{z(!1)},X=()=>{var pe,_e,Ne;if(v!=null&&v.rowIsRepeatable){if(v!=null&&v.repeatableFields){const ve=[...v.repeatableFields],Ae=_t.findIndex(ve,function(Be){return Be.uuid===(d==null?void 0:d.uuid)});Ae>=0&&ve[Ae].fieldData?M(ve[Ae].fieldData):M("")}}else{const ve=a;if(ve!=null&&ve.length){for(const Ae of ve)if(Ae.fieldId===t.field.uuid&&((pe=Ae==null?void 0:Ae.postData[0])==null?void 0:pe.postValue)!==""&&((_e=Ae==null?void 0:Ae.postData[0])!=null&&_e.postValue)){M((Ne=Ae==null?void 0:Ae.postData[0])==null?void 0:Ne.postValue);break}}}H(!0)};k.useEffect(()=>{P||X();const pe=Gt.addListener("clearRepeatableFields",Ae=>{Ae===(v==null?void 0:v.uuid)&&(M(""),F(0),d.isValid=0,u(g,h,m,A,f,d))}),_e=Gt.addListener("onSubmitUserForm",()=>{var Ae;(Ae=d==null?void 0:d.attributes)!=null&&Ae.required?_?d.isValid=1:d.isValid=0:d.isValid=1}),Ne=Gt.addListener("OnInvalidFieldCatch",Ae=>{d.uuid===(Ae==null?void 0:Ae.fieldId)?F(1):F(0)}),ve=Gt.addListener("OnGetFieldValue",Ae=>{var Ee;const Be=(Ee=Ae==null?void 0:Ae.repeatableColumn)==null?void 0:Ee.filter($=>($==null?void 0:$.fieldUuid)===(d==null?void 0:d.uuid));Be!=null&&Be.length});return()=>{_e.remove(),Ne.remove(),ve.remove(),pe.remove()}});const R=pe=>{E(pe)},ue=()=>{E(!1)},Y=pe=>{var ve,Ae;M(pe.target.value);const _e=a,Ne=_t.cloneDeep(e);if(_e!==null){if((ve=pe==null?void 0:pe.target)!=null&&ve.value){if(Ne[d==null?void 0:d.uuid]=(Ae=pe==null?void 0:pe.target)==null?void 0:Ae.value,(_e==null?void 0:_e.length)>0)for(const Be of _e)Be.fieldId===t.field.uuid&&(Be.postData[0]={postValue:pe.target.value})}else if(delete Ne[d==null?void 0:d.uuid],(_e==null?void 0:_e.length)>0)for(const Be of _e)Be.fieldId===t.field.uuid&&(Be.postData[0]={postValue:""})}if(!(v!=null&&v.rowIsRepeatable)){n(Ne);const Be=Object.keys(Ne).length;r(Be)}},ie=(pe,_e)=>{var Ne;if(a){const ve=[...a],Ae=_t.findIndex(ve,function(Ee){return Ee.rowId===(v==null?void 0:v.uuid)});let Be=(Ne=a[Ae])==null?void 0:Ne.repeatableFields;Be={...Be,[pe==null?void 0:pe.uuid]:_e},ve[Ae]={...ve[Ae],repeatableFields:Be},i(ve)}M(_e),_e!==""?pe.isValid=1:pe.isValid=0},re=o.jsxs("div",{onMouseOver:U,onMouseOut:ce,children:[x&&N&&o.jsx(Wr,{handleFieldSettingsSidebar:R,...t}),o.jsxs("div",{className:`field ${x&&" py-3 px-4 builder-element-wrapper "}${(d==null?void 0:d.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:x?"col-12 p-fluid":"col-12 ",children:[(d==null?void 0:d.showHeaderText)&&o.jsx("h6",{children:(Z=d==null?void 0:d.headerText)==null?void 0:Z[c==null?void 0:c.type]}),(d==null?void 0:d.showLabel)&&o.jsxs("label",{htmlFor:f,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((K=d==null?void 0:d.attributes)==null?void 0:K.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",x?o.jsx(aa,{...t}):o.jsx(o.Fragment,{children:(W=d==null?void 0:d.label)==null?void 0:W[c==null?void 0:c.type]}),o.jsx("span",{className:"ml-3",children:(d==null?void 0:d.showToolTip)&&o.jsx(zi,{message:(me=d==null?void 0:d.toolTip)==null?void 0:me[c==null?void 0:c.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs("span",{className:"p-input-icon-"+(d==null?void 0:d.iconAlignment),children:[(d==null?void 0:d.showIcon)&&o.jsx("i",{className:"pi pi-"+((Te=(be=d==null?void 0:d.icon)==null?void 0:be.properties)==null?void 0:Te.name)}),o.jsx(wn,{id:d==null?void 0:d.uuid,placeholder:(ye=d==null?void 0:d.placeholder)==null?void 0:ye[c==null?void 0:c.type],value:_,onFocus:()=>F(1),onChange:pe=>{v!=null&&v.rowIsRepeatable?ie(d,pe.target.value):Y(pe)},className:O===1&&((fe=d==null?void 0:d.attributes)!=null&&fe.required)?_?"valid mt-2 mr-2":"invalid mt-2":"valid mt-2",readOnly:w,disabled:S||w})]}),o.jsx("div",{children:((ne=d==null?void 0:d.attributes)==null?void 0:ne.required)&&o.jsx("small",{className:"error",children:O===1&&!_?(q=d==null?void 0:d.validationMesssage)==null?void 0:q.english:""})}),o.jsx("div",{children:(d==null?void 0:d.showHelperText)&&o.jsx("small",{children:(ee=d==null?void 0:d.helperText)==null?void 0:ee[c==null?void 0:c.type]})})]})]})}),o.jsx("p",{className:"text-center",children:o.jsx("span",{className:`${(oe=d==null?void 0:d.fontStyle)==null?void 0:oe.font} text-center`,style:{fontSize:d==null?void 0:d.fontSize},children:_})}),S&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[C===!0&&o.jsx(Qi,{visibilty:C,closeSettingFieldSidebar:ue,...t}),o.jsx(xi,{...t,fieldWrap:re})]})},Aye={country:null,city:null,state:null,addressOne:null,addressTwo:null,zipcode:null,isBillingAddressSame:!1,billingCountry:null,billingCity:null,billingState:null,billingAddressOne:null,billingAddressTwo:null,billingZipcode:null},wye=t=>{var ne,q,ee,oe,pe,_e,Ne,ve,Ae,Be,Ee,$,ge,le,se,he,Se;const{updateUserFormDataSubmit:e,taskRegisterData:n,updateTaskRegisterData:r,updateTaskProgressValue:i,userTaskSubmitFormData:a,TASK_PUBLISHED:s,task_status:l}=Ar(),{globalAlignment:c}=Ht(),{userSelectedLanguage:u,fieldSettingUpdate:d}=sn(),{isAdmin:f,isBuilderMode:h}=Ht(),g=De=>{const Me=De.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",ze=`${De.className} justify-content-start`,tt=`${De.titleClassName} pl-1`;return o.jsxs("div",{className:ze,children:[o.jsxs("button",{className:De.togglerClassName,onClick:De.onTogglerClick,children:[o.jsx("span",{className:Me}),o.jsx(Qt,{})]}),o.jsx("span",{className:tt,children:R})]})},{field:v,fieldIndex:m,sectionIndex:A,pageIndex:w,row:x,rowIndex:S,columnIndex:T,isDisabled:C}=t,[E,_]=k.useState(!1),[M,O]=k.useState(null),[F,P]=k.useState(Aye),[H,N]=k.useState(!1),z=()=>{N(!0)},U=()=>{N(!1)},ce=(De,Me)=>{var ze;if(a){const tt=[...a],it=_t.findIndex(tt,function(Ut){return Ut.rowId===(x==null?void 0:x.uuid)});let ht=(ze=a[it])==null?void 0:ze.repeatableFields;ht={...ht,[De==null?void 0:De.uuid]:`${Me==null?void 0:Me.addressOne}, ${Me==null?void 0:Me.addressTwo}, ${Me==null?void 0:Me.zipcode}`},tt[it]={...tt[it],repeatableFields:ht},e(tt)}P(Me)},X=(De,Me)=>{let ze={...F};ze={...ze,[De]:Me},P(ze),(ze==null?void 0:ze.addressOne)!==""&&(ze!=null&&ze.addressTwo)&&(ze!=null&&ze.zipcode)&&ye(ze==null?void 0:ze.zipcode)?(v.isValid=1,x!=null&&x.rowIsRepeatable?ce(v,ze):me(ze,!0)):(v.isValid=0,x!=null&&x.rowIsRepeatable||me(null,!1))},[R]=k.useState((ne=v==null?void 0:v.label)==null?void 0:ne[u==null?void 0:u.type]),[ue,Y]=k.useState(0),[ie,re]=k.useState(!1),Z=()=>{var De,Me;if(!(x!=null&&x.rowIsRepeatable)){const ze=a;if(ze!=null&&ze.length){for(const tt of ze)if(tt.fieldId===t.field.uuid&&((De=tt==null?void 0:tt.postData[0])!=null&&De.postValue)){P((Me=tt==null?void 0:tt.postData[0])==null?void 0:Me.postValue);break}}}re(!0)};k.useEffect(()=>{ie||Z();const De=Gt.addListener("clearRepeatableFields",ht=>{ht===(x==null?void 0:x.uuid)&&(Y(0),v.isValid=0,d(w,A,S,T,m,v))}),Me=Gt.addListener("onSubmitUserForm",()=>{var ht;(ht=v==null?void 0:v.attributes)!=null&&ht.required?(F==null?void 0:F.addressOne)!==""&&(F==null?void 0:F.zipcode)!==""&&ye(F==null?void 0:F.zipcode)?v.isValid=1:v.isValid=0:v.isValid=1}),ze=Gt.addListener("OnInvalidFieldCatch",ht=>{v.uuid===(ht==null?void 0:ht.fieldId)?Y(1):Y(0)}),tt=Gt.addListener("OnGetFieldValue",ht=>{var hn;const Ut=(hn=ht==null?void 0:ht.repeatableColumn)==null?void 0:hn.filter($t=>($t==null?void 0:$t.fieldUuid)===(v==null?void 0:v.uuid));Ut!=null&&Ut.length}),it=Gt.addListener("formFieldAdded",ht=>{M===null&&O(ht.uuid)});return()=>{Me.remove(),ze.remove(),tt.remove(),De.remove(),it.remove()}});const K=De=>{_(De)},W=()=>{_(!1)},me=(De,Me)=>{const ze=a,tt=_t.cloneDeep(n);if(Me){if(tt[v==null?void 0:v.uuid]=De,(ze==null?void 0:ze.length)>0)for(const it of ze)it.fieldId===t.field.uuid&&(it.postData[0]={postValue:De})}else if(delete tt[v==null?void 0:v.uuid],(ze==null?void 0:ze.length)>0)for(const it of ze)it.fieldId===t.field.uuid&&(it.postData[0]={postValue:De});if(!(x!=null&&x.rowIsRepeatable)){r(tt);const it=Object.keys(tt).length;i(it)}},be=()=>{let De="";return h&&(De=De+" field-form-builder"),l===s&&f===!0&&(De=De+" card"),De},Te=()=>{let De=!1;return F.addressOne!==""&&F.zipcode!==""&&ye(F.zipcode)&&(De=!0),De};function ye(De){const Me=/\d/.test(De),ze=/[a-zA-Z]/.test(De);return Me&&ze?!0:!!Me}k.useEffect(()=>(M!==null&&setTimeout(()=>{O(null)},1e3),()=>{}),[M]);const fe=o.jsxs("div",{onMouseOver:z,onMouseOut:U,children:[h&&H&&o.jsx(Wr,{handleFieldSettingsSidebar:K,...t}),o.jsxs("div",{className:`field ${h&&" py-3 px-4 builder-element-wrapper "}${(v==null?void 0:v.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:`col-12 ${h&&"p-fluid"}`,children:[(v==null?void 0:v.showHeaderText)&&o.jsx("h6",{children:(q=v==null?void 0:v.headerText)==null?void 0:q[u==null?void 0:u.type]}),(v==null?void 0:v.showLabel)&&o.jsxs("label",{htmlFor:m,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((ee=v==null?void 0:v.attributes)==null?void 0:ee.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",h?o.jsx(o.Fragment,{children:(oe=v==null?void 0:v.label)==null?void 0:oe[u==null?void 0:u.type]}):o.jsx(aa,{...t}),o.jsx("span",{className:"ml-3",children:(v==null?void 0:v.showToolTip)&&o.jsx(zi,{message:(pe=v==null?void 0:v.toolTip)==null?void 0:pe[u==null?void 0:u.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3 p-fluid",children:[o.jsx("div",{children:o.jsx("label",{className:"w-full",htmlFor:"",children:(_e=v==null?void 0:v.addresslineFirstLabel)==null?void 0:_e[u==null?void 0:u.type]})}),o.jsx(wn,{value:F.addressOne||"",onChange:De=>X("addressOne",De.target.value),className:"my-2 ",readOnly:C,disabled:f||C}),o.jsx("div",{children:o.jsx("label",{htmlFor:"",children:(Ne=v==null?void 0:v.addresslineSecondLabel)==null?void 0:Ne[u==null?void 0:u.type]})}),o.jsx(wn,{value:F.addressTwo||"",onChange:De=>X("addressTwo",De.target.value),className:"my-2",readOnly:C,disabled:f||C}),o.jsx("div",{children:o.jsx("label",{htmlFor:"",children:(ve=v==null?void 0:v.postalcodeLabel)==null?void 0:ve[u==null?void 0:u.type]})}),o.jsx(wn,{value:F.zipcode||"",onChange:De=>X("zipcode",De.target.value),className:"my-2",readOnly:C,disabled:f||C}),o.jsx("p",{children:!ye(F.zipcode)&&o.jsx("small",{children:"Cannot be alphabetical only."})}),((Ae=v==null?void 0:v.attributes)==null?void 0:Ae.required)&&!Te()&&o.jsx("small",{className:"error",children:ue===1?(Be=v==null?void 0:v.validationMesssage)==null?void 0:Be.language:""}),(v==null?void 0:v.showBillingAddress)===!0&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"binary",checked:F.isBillingAddressSame,onChange:De=>{X("isBillingAddressSame",De.checked),De.checked?P(Me=>({...Me,billingCountry:F.country,billingCity:F.city,billingState:F.state,billingAddressOne:F.addressOne,billingAddressTwo:F.addressTwo,billingZipcode:F.zipcode})):P(Me=>({...Me,billingCountry:null,billingCity:null,billingState:null,billingAddressOne:null,billingAddressTwo:null,billingZipcode:null}))},disabled:f||C}),o.jsx("label",{htmlFor:"binary",children:"Is Billing Address Same"})]}),F.isBillingAddressSame===!1&&o.jsxs(o.Fragment,{children:[(v==null?void 0:v.showLabel)&&o.jsxs("label",{htmlFor:m,className:"flex font-medium mb-3 text-700 text-2xl",children:[((Ee=v==null?void 0:v.attributes)==null?void 0:Ee.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",($=v==null?void 0:v.billingLabel)==null?void 0:$[u==null?void 0:u.type],o.jsx("span",{className:"ml-3",children:(v==null?void 0:v.showToolTip)&&o.jsx(zi,{message:(ge=v==null?void 0:v.toolTip)==null?void 0:ge[u==null?void 0:u.type],position:"right"})})]}),o.jsx("label",{htmlFor:"",children:(le=v==null?void 0:v.addresslineFirstLabel)==null?void 0:le[u==null?void 0:u.type]}),o.jsx(wn,{value:F.billingAddressOne||"",onChange:De=>X("billingAddressOne",De.target.value),className:"my-2",readOnly:C,disabled:f||C}),o.jsx("label",{htmlFor:"",children:(se=v==null?void 0:v.addresslineSecondLabel)==null?void 0:se[u==null?void 0:u.type]}),o.jsx(wn,{value:F.billingAddressTwo||"",onChange:De=>X("billingAddressTwo",De.target.value),className:"my-2",readOnly:C,disabled:f||C}),o.jsx("label",{htmlFor:"",children:(he=v==null?void 0:v.postalcodeLabel)==null?void 0:he[u==null?void 0:u.type]}),o.jsx(wn,{value:F.billingZipcode||"",onChange:De=>X("billingZipcode",De.target.value),className:"my-2",readOnly:C,disabled:f||C}),!ye(F.billingZipcode)&&o.jsx("small",{children:"Cannot be alphabetical only."})]})]}),o.jsx("div",{}),o.jsx("div",{children:(v==null?void 0:v.showHelperText)&&o.jsx("small",{children:(Se=v==null?void 0:v.helperText)==null?void 0:Se[u==null?void 0:u.type]})})]})]})}),f&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[E===!0&&o.jsx(Qi,{visibilty:E,closeSettingFieldSidebar:W,...t}),o.jsx("div",{dir:c?"ltr":"rtl",className:be(),children:l===s&&f===!0?o.jsx(ci,{headerTemplate:g,toggleable:!0,children:fe}):fe})]})},Sye=t=>{var S;const{customColumn:e,indexes:n,customColumnIndex:r,path:i,field:a,onSetValuetoPostData:s,sectionIndex:l,page:c,row:u,column:d,section:f,pageIndex:h,rowIndex:g,columnIndex:v}=t,{handleDrop:m}=sn(),{isAdvanceView:A,isBuilderMode:w}=Ht(),x=(T,C)=>{s(T,C)};return o.jsxs("div",{className:"p-2 py-4",children:[n&&((S=a.children)==null?void 0:S.length)>0&&a.children.map((T,C)=>{const E=T[`${n.rowIndex}-${n.columnIndex}`];return E?o.jsx("div",{children:o.jsx(Lc,{type:"grid",showFieldIcons:!1,onChange:x,data:E,field:E,path:`${i}-${n.rowIndex}-${n.columnIndex}-${C}`,sectionIndex:l,page:c,column:d,row:u,section:f,pageIndex:h,rowIndex:g,columnIndex:v,fieldIndex:C,fieldContainer:"grid-container"})},`${n.rowIndex}-${n.columnIndex}-${C}`):null}),n&&w===!0&&o.jsx("div",{className:"py-5",children:o.jsx(Fr,{isAdvanceView:A,fieldDropArea:!0,data:{path:`${i}-${n.rowIndex}-${r}`,childrenCount:1,droppedField:e},onDrop:m})})]})},EU=t=>{var P,H,N,z,U,ce,X;const{field:e,column:n,section:r,row:i,rowIndex:a,columnIndex:s,sectionIndex:l,userSelectedLanguage:c,fieldIndex:u,customColumnHeaderTemplate:d,onSetValuetoPostData:f,setAllFields:h,allFields:g,actionHeaderTemplate:v,actionBodyTemplate:m,isFocus:A,inputValue:w,handleFieldSettingsSidebar:x,isAdmin:S,emitSocketData:T,isRenderView:C}=t,[E,_]=k.useState(!1),{isBuilderMode:M}=Ht(),O=()=>{_(!0)},F=()=>{_(!1)};return o.jsxs("div",{onMouseOver:O,onMouseOut:F,children:[M&&E&&o.jsx(Wr,{handleFieldSettingsSidebar:x,...t}),o.jsxs("div",{className:`field ${M&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(P=e==null?void 0:e.headerText)==null?void 0:P[c==null?void 0:c.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:u,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((H=e==null?void 0:e.attributes)==null?void 0:H.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",M?o.jsx(aa,{...t}):o.jsx(o.Fragment,{children:(N=e==null?void 0:e.label)==null?void 0:N[c==null?void 0:c.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(zi,{message:(z=e==null?void 0:e.toolTip)==null?void 0:z[c==null?void 0:c.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs(ro,{scrollable:!0,showGridlines:!0,columnResizeMode:"expand",resizableColumns:!0,value:e==null?void 0:e.options,tableStyle:{minWidth:"50rem"},children:[e==null?void 0:e.customColumnsForOptions.map((R,ue)=>o.jsx(xr,{style:{minWidth:350},header:d(R,ue),body:(Y,ie)=>o.jsx(Sye,{customColumn:R,section:r,column:n,columnIndex:s,row:i,rowIndex:a,sectionIndex:l,e:Y,indexes:ie,customColumnIndex:ue,onSetValuetoPostData:f,setAllFields:h,allFields:g,emitSocketData:T,field:e,...t})},R==null?void 0:R.uuid)),M&&o.jsx(xr,{frozen:!0,header:R=>v(R),body:(R,ue)=>m(R,ue),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"}})]}),o.jsx("div",{children:((U=e==null?void 0:e.attributes)==null?void 0:U.required)&&o.jsx("small",{className:"error",children:A===1&&!w?(ce=e==null?void 0:e.validationMesssage)==null?void 0:ce.english:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(X=e==null?void 0:e.helperText)==null?void 0:X[c==null?void 0:c.type]})})]})]})}),S&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]})},Cye=({showAddNewColumn:t,setShowAddNewColumn:e,customColumnEditModalData:n,onHandleChangeCustomColumnSetting:r})=>{const[i,a]=k.useState((n==null?void 0:n.customKey)||"");return o.jsx(Os,{maximizable:!0,header:"Update column title",visible:t,style:{width:"20vw"},footer:()=>o.jsx(Ft,{text:!0,label:"Save",onClick:()=>{r(n,i),e(!1)}}),onHide:()=>e(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsx(wn,{value:i,onChange:s=>{a(s.target.value)}})})})},IU=t=>{var fe;const{globalAlignment:e}=Ht(),n=ne=>{const q=ne.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",ee=`${ne.className} justify-content-start`,oe=`${ne.titleClassName} pl-1`;return o.jsxs("div",{className:ee,children:[o.jsxs("button",{className:ne.togglerClassName,onClick:ne.onTogglerClick,children:[o.jsx("span",{className:q}),o.jsx(Qt,{})]}),o.jsx("span",{className:oe,children:C})]})},{userTaskSubmitFormData:r,TASK_PUBLISHED:i,task_status:a}=Ar(),{userSelectedLanguage:s,fieldSettingUpdate:l}=sn(),{isBuilderMode:c}=Ht(),{field:u,fieldIndex:d,sectionIndex:f,pageIndex:h,row:g,rowIndex:v,columnIndex:m,isAdmin:A}=t,[w,x]=k.useState(!1),[S,T]=k.useState(""),[C]=k.useState((fe=u==null?void 0:u.label)==null?void 0:fe[s==null?void 0:s.type]),[E,_]=k.useState(0),[M,O]=k.useState(!1),[F,P]=k.useState(null),[H,N]=k.useState([]),z=()=>{var ne,q,ee;if(g!=null&&g.rowIsRepeatable){if(g!=null&&g.repeatableFields){const oe=[...g.repeatableFields],pe=_t.findIndex(oe,function(_e){return _e.uuid===(u==null?void 0:u.uuid)});pe>=0&&oe[pe].fieldData?T(oe[pe].fieldData):T("")}}else{const oe=r;if(oe!=null&&oe.length){for(const pe of oe)if(pe.fieldId===t.field.uuid&&((ne=pe==null?void 0:pe.postData[0])==null?void 0:ne.postValue)!==""&&((q=pe==null?void 0:pe.postData[0])!=null&&q.postValue)){T((ee=pe==null?void 0:pe.postData[0])==null?void 0:ee.postValue);break}}}O(!0)},U=()=>{const ne=u;ne.customColumnsForOptions=[...ne.customColumnsForOptions,{customKey:"Column",uuid:nt()}],ye(ne)},[ce,X]=k.useState(!1),R=(ne,q)=>{var ee;return o.jsxs(o.Fragment,{children:[((ee=u==null?void 0:u.options)==null?void 0:ee.length)>1&&o.jsx(Ft,{text:!0,type:"button",className:"p-button-danger left-space ",icon:"pi pi-trash",onClick:()=>ie(ne==null?void 0:ne.uuid,q==null?void 0:q.rowIndex),rounded:!0,severity:"secondary","aria-label":"Bookmark",size:"small"}),o.jsx(Ft,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>be(),"aria-label":"Add Row",size:"small"})]})},ue=(ne,q)=>{var ee;return o.jsxs(o.Fragment,{children:[ne==null?void 0:ne.customKey,c===!0&&o.jsxs(o.Fragment,{children:[((ee=u==null?void 0:u.customColumnsForOptions)==null?void 0:ee.length)>1&&o.jsx("i",{className:"pi pi-trash ml-3",onClick:()=>re(ne==null?void 0:ne.uuid,q)}),o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{P(ne),X(!0)}})]})]})},Y=()=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,icon:"pi pi-plus",onClick:()=>U(),rounded:!0,severity:"secondary","aria-label":"Cancel"})}),ie=(ne,q)=>{var Ne,ve;const ee=(Ne=u==null?void 0:u.customColumnsForOptions)==null?void 0:Ne.length,oe=[...(u==null?void 0:u.children)||[]];(ve=u==null?void 0:u.children)==null||ve.map(Ae=>{for(let Be=0;Be<ee;Be++)if(Ae[`${q}-${Be}`]!==void 0){const Ee=_t.findIndex(oe,function($){return $[`${q}-${Be}`]!==void 0});oe.splice(Ee,1)}});for(let Ae=0;Ae<(oe==null?void 0:oe.length);Ae++){const Be=oe[Ae],$=Object.keys(Be)[0].split("-");parseInt($[0])>q&&(oe[Ae]={[`${parseInt($[0])-1}-${$[1]}`]:oe[Ae][`${parseInt($[0])}-${$[1]}`]})}const pe=u==null?void 0:u.options.filter(function(Ae){return(Ae==null?void 0:Ae.uuid)!==ne}),_e={...u,children:[...oe]};_e.options=pe,ye(_e)},re=(ne,q)=>{var ve,Ae;const ee=_t.findIndex(u==null?void 0:u.customColumnsForOptions,Be=>Be.uuid===ne),oe=u==null?void 0:u.customColumnsForOptions.filter(function(Be,Ee){return Ee!==ee}),pe=(ve=u==null?void 0:u.options)==null?void 0:ve.length,_e=[...(u==null?void 0:u.children)||[]];(Ae=u==null?void 0:u.children)==null||Ae.map(Be=>{for(let Ee=0;Ee<pe;Ee++)if(Be[`${Ee}-${q}`]!==void 0){const $=_t.findIndex(_e,function(ge){return ge[`${Ee}-${q}`]!==void 0});_e.splice($,1)}});for(let Be=0;Be<(_e==null?void 0:_e.length);Be++){const Ee=_e[Be],ge=Object.keys(Ee)[0].split("-");parseInt(ge[1])>q&&(_e[Be]={[`${parseInt(ge[0])}-${parseInt(ge[1])-1}`]:_e[Be][`${parseInt(ge[0])}-${ge[1]}`]})}const Ne={...u,children:[..._e]};Ne.customColumnsForOptions=oe,ye(Ne)};k.useEffect(()=>{M||z();const ne=Gt.addListener("clearRepeatableFields",pe=>{pe===(g==null?void 0:g.uuid)&&(T(""),_(0),u.isValid=0,l(h,f,v,m,d,u))}),q=Gt.addListener("onSubmitUserForm",()=>{var pe;(pe=u==null?void 0:u.attributes)!=null&&pe.required&&(u.isValid=1)}),ee=Gt.addListener("OnInvalidFieldCatch",pe=>{u.uuid===(pe==null?void 0:pe.fieldId)?_(1):_(0)}),oe=Gt.addListener("OnGetFieldValue",pe=>{var Ne;const _e=(Ne=pe==null?void 0:pe.repeatableColumn)==null?void 0:Ne.filter(ve=>(ve==null?void 0:ve.fieldUuid)===(u==null?void 0:u.uuid));_e!=null&&_e.length});return()=>{q.remove(),ee.remove(),oe.remove(),ne.remove()}});const Z=ne=>{x(ne)},K=()=>{x(!1)},W=(ne,q)=>{var oe;const ee=r;if((ee==null?void 0:ee.length)>0)for(const pe of ee)pe.fieldId===t.field.uuid&&(pe.postData[0]={postValue:{...(oe=pe.postData[0])==null?void 0:oe.postValue,[ne]:q}})},me=()=>{let ne="";return c&&(ne=ne+" field-form-builder"),a===i&&A===!0&&(ne=ne+" card"),ne},be=()=>{const ne=u;ne.options=[...ne.options,{uuid:nt(),custom_values:{}}],ye(ne)},Te=(ne,q)=>{P(_e=>_e===null?{customKey:q,uuid:""}:{..._e,customKey:q});const ee=u.customColumnsForOptions,oe=ee.findIndex(_e=>_e.uuid===ne.uuid);ee[oe]={...ee[oe],customKey:q};const pe=u;pe.customColumnsForOptions=ee,ye(pe)},ye=ne=>{l(h,f,v,m,d,ne)};return o.jsxs(o.Fragment,{children:[ce&&o.jsx(Cye,{showAddNewColumn:ce,setShowAddNewColumn:X,customColumnEditModalData:F,onHandleChangeCustomColumnSetting:Te}),w&&o.jsx(Qi,{visibilty:w,closeSettingFieldSidebar:K,...t}),o.jsx("div",{dir:e,className:me(),children:a===i&&A===!0?o.jsx(ci,{headerTemplate:n,toggleable:!0,children:o.jsx(EU,{...t,field:u,userSelectedLanguage:s,fieldIndex:d,pageIndex:h,columnIndex:m,customColumnHeaderTemplate:ue,onSetValuetoPostData:W,setAllFields:ne=>N(ne),allFields:H,actionHeaderTemplate:Y,actionBodyTemplate:R,addOption:be,isFocus:E,inputValue:S,handleFieldSettingsSidebar:Z,isAdmin:A})}):o.jsx(EU,{...t,field:u,userSelectedLanguage:s,fieldIndex:d,pageIndex:h,columnIndex:m,customColumnHeaderTemplate:ue,onSetValuetoPostData:W,setAllFields:ne=>N(ne),allFields:H,actionHeaderTemplate:Y,actionBodyTemplate:R,addOption:be,isFocus:E,inputValue:S,handleFieldSettingsSidebar:Z,isAdmin:A})})]})},xye=t=>{const{customColumn:e,indexes:n,customColumnIndex:r,setAllFields:i,allFields:a}=t,s=l=>{const c={...a};c[`${n==null?void 0:n.rowIndex}-${r}`]=l,i(c)};return o.jsx("div",{children:o.jsx(Pa,{value:a[`${n==null?void 0:n.rowIndex}-${r}`],options:e.options,onChange:l=>s(l.value),optionLabel:"label",placeholder:"Select"})})},_U=t=>{var S,T,C,E,_,M,O;const{field:e,userSelectedLanguage:n,fieldIndex:r,customColumnHeaderTemplate:i,customColumnRowBodyTemplate:a,setAllFields:s,allFields:l,actionHeaderTemplate:c,actionBodyTemplate:u,isFocus:d,inputValue:f,handleFieldSettingsSidebar:h,isAdmin:g}=t,{isBuilderMode:v}=Ht(),[m,A]=k.useState(!1),w=()=>{A(!0)},x=()=>{A(!1)};return o.jsxs("div",{onMouseOver:w,onMouseOut:x,children:[v&&m&&o.jsx(Wr,{handleFieldSettingsSidebar:h,...t}),o.jsxs("div",{className:`field ${v&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:`col-12 ${v&&"p-fluid"}`,children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(S=e==null?void 0:e.headerText)==null?void 0:S[n==null?void 0:n.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:r,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((T=e==null?void 0:e.attributes)==null?void 0:T.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",v?o.jsx(aa,{...t}):o.jsx(o.Fragment,{children:(C=e==null?void 0:e.label)==null?void 0:C[n==null?void 0:n.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(zi,{message:(E=e==null?void 0:e.toolTip)==null?void 0:E[n==null?void 0:n.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs(ro,{showGridlines:!0,value:e==null?void 0:e.rows,children:[o.jsx(xr,{frozen:!0,header:"",headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"},body:F=>a(F)}),e==null?void 0:e.customColumns.map((F,P)=>o.jsx(xr,{header:i(F),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"},body:(H,N)=>o.jsx(xye,{customColumn:F,e:H,indexes:N,customColumnIndex:P,setAllFields:s,allFields:l,...t})},F==null?void 0:F.uuid)),v===!0&&o.jsx(xr,{frozen:!0,header:F=>c(F),body:F=>u(F),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"}})]}),o.jsx("div",{children:((_=e==null?void 0:e.attributes)==null?void 0:_.required)&&o.jsx("small",{className:"error",children:d===1&&!f?(M=e==null?void 0:e.validationMesssage)==null?void 0:M.english:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(O=e==null?void 0:e.helperText)==null?void 0:O[n==null?void 0:n.type]})})]})]})}),g&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]})},Tye=(t,e)=>{var Be,Ee;const n=$=>{const ge=$.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",le=`${$.className} justify-content-start`,se=`${$.titleClassName} pl-1`;return o.jsxs("div",{className:le,children:[o.jsxs("button",{className:$.togglerClassName,onClick:$.onTogglerClick,children:[o.jsx("span",{className:ge}),o.jsx(Qt,{})]}),o.jsx("span",{className:se,children:E})]})},{userTaskSubmitFormData:r,TASK_PUBLISHED:i,task_status:a}=Ar(),{globalAlignment:s,isAdmin:l,isBuilderMode:c}=Ht(),{userSelectedLanguage:u,fieldSettingUpdate:d}=sn(),{field:f,fieldIndex:h,sectionIndex:g,pageIndex:v,row:m,rowIndex:A,columnIndex:w}=t,[x,S]=k.useState(!1),[T,C]=k.useState(""),[E]=k.useState((Be=f==null?void 0:f.label)==null?void 0:Be[u==null?void 0:u.type]),[_,M]=k.useState(0),[O,F]=k.useState(!1),[P,H]=k.useState(null),[N,z]=k.useState(null),[U,ce]=k.useState({}),X=()=>{var $,ge,le;if(m!=null&&m.rowIsRepeatable){if(m!=null&&m.repeatableFields){const se=[...m.repeatableFields],he=_t.findIndex(se,function(Se){return Se.uuid===(f==null?void 0:f.uuid)});he>=0&&se[he].fieldData?C(se[he].fieldData):C("")}}else{const se=r;if(se!=null&&se.length){for(const he of se)if(he.fieldId===t.field.uuid&&(($=he==null?void 0:he.postData[0])==null?void 0:$.postValue)!==""&&((ge=he==null?void 0:he.postData[0])!=null&&ge.postValue)){C((le=he==null?void 0:he.postData[0])==null?void 0:le.postValue);break}}}F(!0)},R=()=>{const $=f;$.customColumns=[...$.customColumns,{customKey:"Column",uuid:nt(),options:[]}],pe($)},[ue,Y]=k.useState(!1),[ie,re]=k.useState(!1),Z=$=>{var ge;return o.jsxs(o.Fragment,{children:[((ge=f==null?void 0:f.rows)==null?void 0:ge.length)>1&&o.jsx(Ft,{text:!0,type:"button",icon:"pi pi-trash",rounded:!0,severity:"secondary",onClick:()=>be($==null?void 0:$.uuid),"aria-label":"Add Row"}),o.jsx(Ft,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>q(),"aria-label":"Add Row"})]})},K=$=>{var ge;return o.jsxs(o.Fragment,{children:[$==null?void 0:$.customKey,c===!0&&o.jsxs(o.Fragment,{children:[((ge=f==null?void 0:f.customColumns)==null?void 0:ge.length)>1&&o.jsx("i",{className:"pi pi-trash ml-3",onClick:()=>Te($==null?void 0:$.uuid)}),o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{H($),Y(!0)}})]})]})},W=()=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>R(),"aria-label":"Add Column"})}),me=$=>o.jsxs(o.Fragment,{children:[$==null?void 0:$.rowHeading,c===!0&&o.jsx(o.Fragment,{children:o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{z($),re(!0)}})})]}),be=$=>{const ge=f==null?void 0:f.rows.filter(function(se){return(se==null?void 0:se.uuid)!==$}),le=f;le.rows=ge,pe(le)},Te=$=>{const ge=_t.findIndex(f==null?void 0:f.customColumns,he=>he.uuid===$),le=f==null?void 0:f.customColumns.filter(function(he,Se){return Se!==ge}),se=f;se.customColumns=le,pe(se)};k.useEffect(()=>{O||X();const $=Gt.addListener("clearRepeatableFields",se=>{se===(m==null?void 0:m.uuid)&&(C(""),M(0),f.isValid=0,d(v,g,A,w,h,f))}),ge=Gt.addListener("OnInvalidFieldCatch",se=>{f.uuid===(se==null?void 0:se.fieldId)?M(1):M(0)}),le=Gt.addListener("OnGetFieldValue",se=>{var Se;const he=(Se=se==null?void 0:se.repeatableColumn)==null?void 0:Se.filter(De=>(De==null?void 0:De.fieldUuid)===(f==null?void 0:f.uuid));he!=null&&he.length});return()=>{ge.remove(),le.remove(),$.remove()}});const ye=$=>{S($)},fe=()=>{S(!1)},ne=()=>{let $="";return c&&($=$+" field-form-builder"),a===i&&l===!0&&($=$+" card"),$},q=()=>{const $=f;$.rows=[...$.rows,{rowHeading:"Row",uuid:nt(),custom_values:{}}],pe($)},ee=($,ge)=>{H(Se=>Se===null?{customKey:ge,uuid:""}:{...Se,customKey:ge});const le=f.customColumns,se=le.findIndex(Se=>Se.uuid===$.uuid);le[se]={...le[se],customKey:ge};const he=f;he.customColumns=le,pe(he)},oe=($,ge)=>{z(Se=>Se===null?{uuid:"",rowHeading:ge}:{...Se,rowHeading:ge});const le=f.rows,se=le.findIndex(Se=>Se.uuid===$.uuid);le[se]={...le[se],rowHeading:ge};const he=f;he.rows=le,pe(he)},pe=$=>{d(v,g,A,w,h,$)};function _e($){return $.toLowerCase().replace(/ /g,"-").replace(/[^\w-]+/g,"")}const Ne=($,ge,le)=>{const se=f.customColumns,he=se.findIndex(De=>P&&De.uuid===P.uuid);se[he].options[le][ge]=$,se[he].options[le].value=_e($);const Se=f;Se.customColumns=se,pe(Se)},ve=()=>{const $=f.customColumns,ge=$.findIndex(se=>P&&se.uuid===P.uuid);$[ge].options.push({label:"",value:"",uuid:nt()});const le=f;le.customColumns=$,pe(le)},Ae=$=>{const ge=f.customColumns,le=ge.findIndex(he=>P&&he.uuid===P.uuid);if(le===-1){console.error("Custom column not found");return}ge[le].options=ge[le].options.filter(he=>he.uuid!==$);const se=f;se.customColumns=ge,pe(se)};return o.jsxs(o.Fragment,{children:[o.jsxs(Os,{maximizable:!0,header:"Update column title",visible:ue,style:{width:"20vw"},footer:()=>o.jsxs(o.Fragment,{children:[" ",o.jsx(Ft,{text:!0,label:"Add Option",icon:"pi pi-plus",onClick:()=>ve()}),o.jsx(Ft,{text:!0,label:"Save",onClick:()=>Y(!1)})]}),onHide:()=>Y(!1),children:[o.jsx("div",{className:"p-fluid",children:o.jsx(wn,{value:(P==null?void 0:P.customKey)||"",onChange:$=>ee(P,$.target.value)})}),o.jsx("hr",{}),o.jsx("h5",{children:"Options"}),(P==null?void 0:P.options)&&((Ee=P==null?void 0:P.options)==null?void 0:Ee.length)>0&&(P==null?void 0:P.options.map(($,ge)=>o.jsxs("div",{className:"my-2 flex p-fluid",children:[o.jsx("span",{children:ge+1}),o.jsx(wn,{value:($==null?void 0:$.label)||"",className:"ml-2",onChange:le=>Ne(le.target.value,"label",ge)}),o.jsx(Ft,{text:!0,type:"button",icon:"pi pi-trash",rounded:!0,severity:"secondary",onClick:()=>Ae($.uuid),"aria-label":"Add Column Option"})]},`custom_column_option_${ge}`)))]}),o.jsx(Os,{maximizable:!0,header:"Update Row Title",visible:ie,style:{width:"20vw"},footer:()=>o.jsx(Ft,{text:!0,label:"Save",onClick:()=>re(!1)}),onHide:()=>re(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsx(wn,{value:(N==null?void 0:N.rowHeading)||"",onChange:$=>oe(N,$.target.value)})})}),o.jsx(Qi,{visibilty:x,closeSettingFieldSidebar:fe,...t}),o.jsx("div",{dir:s,className:ne(),children:a===i&&l===!0?o.jsx(ci,{headerTemplate:n,toggleable:!0,children:o.jsx(_U,{ref:e,...t,field:f,userSelectedLanguage:u,fieldIndex:h,customColumnHeaderTemplate:K,customColumnRowBodyTemplate:me,setAllFields:ce,allFields:U,actionHeaderTemplate:W,actionBodyTemplate:Z,isFocus:_,inputValue:T,handleFieldSettingsSidebar:ye,isAdmin:l})}):o.jsx(_U,{ref:e,...t,field:f,userSelectedLanguage:u,fieldIndex:h,customColumnHeaderTemplate:K,customColumnRowBodyTemplate:me,setAllFields:ce,allFields:U,actionHeaderTemplate:W,actionBodyTemplate:Z,isFocus:_,inputValue:T,handleFieldSettingsSidebar:ye,isAdmin:l})})]})},Eye=t=>{const{indexes:e,customColumnIndex:n,setAllFields:r,allFields:i}=t,a=s=>{const l={...i};l[`${e==null?void 0:e.rowIndex}-${n}`]=s,r(l)};return o.jsx("div",{children:o.jsx(wn,{value:i[`${e==null?void 0:e.rowIndex}-${n}`]||"",onChange:s=>a(s.target.value)})})},DU=t=>{var g,v,m,A,w,x,S;const{field:e,userSelectedLanguage:n,fieldIndex:r,customColumnHeaderTemplate:i,setAllFields:a,allFields:s,actionHeaderTemplate:l,actionBodyTemplate:c,isFocus:u,inputValue:d,isAdmin:f}=t,{isBuilderMode:h}=Ht();return o.jsxs("div",{className:`field ${h&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[" ",o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(g=e==null?void 0:e.headerText)==null?void 0:g[n==null?void 0:n.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:r,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((v=e==null?void 0:e.attributes)==null?void 0:v.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",h?o.jsx(aa,{path:"",...t}):o.jsx(o.Fragment,{children:(m=e==null?void 0:e.label)==null?void 0:m[n==null?void 0:n.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(zi,{message:(A=e==null?void 0:e.toolTip)==null?void 0:A[n==null?void 0:n.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",style:{backgroundColor:"#0a061a"},children:[o.jsxs(ro,{scrollable:!0,showGridlines:!0,value:e==null?void 0:e.rows,children:[e==null?void 0:e.customColumns.map((T,C)=>o.jsx(xr,{header:i(T),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"},body:(E,_)=>o.jsx(Eye,{customColumn:T,e:E,indexes:_,customColumnIndex:C,setAllFields:a,allFields:s,...t})},T==null?void 0:T.uuid)),h===!0&&o.jsx(xr,{frozen:!0,header:T=>l(T),body:T=>c(T),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"}})]}),o.jsx("div",{children:((w=e==null?void 0:e.attributes)==null?void 0:w.required)&&o.jsx("small",{className:"error",children:u===1&&!d?(x=e==null?void 0:e.validationMesssage)==null?void 0:x.english:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(S=e==null?void 0:e.helperText)==null?void 0:S[n==null?void 0:n.type]})})]})]})}),f&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})},Iye=({showAddNewRow:t,setShowAddNewRow:e,customRowEditModalData:n,onHandleChangeCustomRowSetting:r})=>{const[i,a]=k.useState((n==null?void 0:n.rowHeading)||"");return o.jsx(Os,{maximizable:!0,header:"Update Row Title",visible:t,style:{width:"20vw"},footer:()=>o.jsx(Ft,{text:!0,label:"Save",onClick:()=>{e(!1),r(n,i)}}),onHide:()=>e(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsx(wn,{value:i||"",onChange:s=>a(s.target.value)})})})},_ye=({showAddNewColumn:t,setShowAddNewColumn:e,customColumnEditModalData:n,onHandleChangeCustomColumnSetting:r})=>{const i=E3({initialValues:{columnValue:(n==null?void 0:n.customKey)||""},validate:a=>{const s={};return a.columnValue||(s.columnValue="Column value is required"),s},onSubmit:a=>{e(!1),r(n,a.columnValue)}});return o.jsx(Os,{maximizable:!0,header:"Update column title",visible:t,style:{width:"20vw"},footer:()=>o.jsx(Ft,{text:!0,label:"Save",onClick:()=>i.handleSubmit()}),onHide:()=>e(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsxs("div",{className:"field",children:[o.jsx("label",{htmlFor:"columnValue",children:"Column Title"}),o.jsx(wn,{id:"columnValue",name:"columnValue",value:i.values.columnValue,onChange:i.handleChange,onBlur:i.handleBlur,className:i.touched.columnValue&&i.errors.columnValue?"p-invalid":""}),i.touched.columnValue&&i.errors.columnValue?o.jsx("small",{className:"p-error",children:i.errors.columnValue}):null]})})})},Dye=t=>{var pe;const e=_e=>{const Ne=_e.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",ve=`${_e.className} justify-content-start`,Ae=`${_e.titleClassName} pl-1`;return o.jsxs("div",{className:ve,children:[o.jsxs("button",{className:_e.togglerClassName,onClick:_e.onTogglerClick,children:[o.jsx("span",{className:Ne}),o.jsx(Qt,{})]}),o.jsx("span",{className:Ae,children:S})]})},{TASK_PUBLISHED:n,task_status:r}=Ar(),{userSelectedLanguage:i,fieldSettingUpdate:a}=sn(),{globalAlignment:s,isAdmin:l,isBuilderMode:c}=Ht(),{field:u,fieldIndex:d,sectionIndex:f,pageIndex:h,rowIndex:g,columnIndex:v}=t,[m,A]=k.useState(!1),[w,x]=k.useState(""),[S]=k.useState((pe=u==null?void 0:u.label)==null?void 0:pe[i==null?void 0:i.type]),[T,C]=k.useState(0),[E,_]=k.useState(null),[M,O]=k.useState(null),[F,P]=k.useState((u==null?void 0:u.allFields)||{}),[H,N]=k.useState(!1),z=()=>{const _e=u;_e.customColumns=[..._e.customColumns,{customKey:"Column",uuid:nt(),options:[]}],q(_e)},[U,ce]=k.useState(!1),[X,R]=k.useState(!1),ue=k.useCallback(_t.debounce(_e=>{const Ne=u;Ne.allFields={..._e},q(Ne)},1e3),[]);k.useEffect(()=>{ue(F)},[F,ue]);const Y=_e=>{var Ne;return o.jsxs(o.Fragment,{children:[((Ne=u==null?void 0:u.options)==null?void 0:Ne.length)>1&&o.jsx(Ft,{text:!0,type:"button",icon:"pi pi-trash",rounded:!0,severity:"secondary",onClick:()=>K(_e==null?void 0:_e.uuid),"aria-label":"Add Row",size:"small"}),o.jsx(Ft,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>ye(),"aria-label":"Add Row",size:"small"})]})},ie=_e=>{var Ne;return o.jsxs(o.Fragment,{children:[_e==null?void 0:_e.customKey,c===!0&&o.jsxs(o.Fragment,{children:[((Ne=u==null?void 0:u.customColumns)==null?void 0:Ne.length)>1&&o.jsx("i",{className:"pi pi-trash ml-3",onClick:()=>W(_e==null?void 0:_e.uuid)}),o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{_(_e),ce(!0)}})]})]})},re=()=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,size:"small",type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>z(),"aria-label":"Add Column"})}),Z=_e=>o.jsxs(o.Fragment,{children:[_e==null?void 0:_e.rowHeading,c===!0&&o.jsx(o.Fragment,{children:o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{O(_e),R(!0)}})})]}),K=_e=>{const Ne=u==null?void 0:u.rows.filter(function(Ae){return(Ae==null?void 0:Ae.uuid)!==_e}),ve=u;ve.rows=Ne,q(ve)},W=_e=>{const Ne=_t.findIndex(u==null?void 0:u.customColumns,Be=>Be.uuid===_e),ve=u==null?void 0:u.customColumns.filter(function(Be,Ee){return Ee!==Ne}),Ae=u;Ae.customColumns=ve,q(Ae)},me=_e=>{A(_e)},be=()=>{A(!1)},Te=()=>{let _e="";return c===!0&&(_e=_e+" field-form-builder"),r===n&&l===!0&&(_e=_e+" card"),_e},ye=()=>{const _e=u;_e.rows=[..._e.rows,{rowHeading:"Row",uuid:nt(),custom_values:{}}],q(_e)},fe=(_e,Ne)=>{_(Ee=>Ee===null?{customKey:Ne,uuid:""}:{...Ee,customKey:Ne});const ve=u.customColumns,Ae=ve.findIndex(Ee=>Ee.uuid===_e.uuid);ve[Ae]={...ve[Ae],customKey:Ne};const Be=u;Be.customColumns=ve,q(Be)},ne=(_e,Ne)=>{O(Ee=>Ee===null?{uuid:"",rowHeading:Ne}:{...Ee,rowHeading:Ne});const ve=u.rows,Ae=ve.findIndex(Ee=>Ee.uuid===_e.uuid);ve[Ae]={...ve[Ae],rowHeading:Ne};const Be=u;Be.rows=ve,q(Be)},q=_e=>{a(h,f,g,v,d,_e)},ee=()=>{N(!0)},oe=()=>{N(!1)};return o.jsxs(o.Fragment,{children:[o.jsx(Os,{maximizable:!0,header:"Update column title",visible:U,style:{width:"20vw"},footer:()=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,label:"Save",onClick:()=>ce(!1)})}),onHide:()=>ce(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsx(wn,{value:(E==null?void 0:E.customKey)||"",onChange:_e=>fe(E,_e.target.value)})})}),X&&o.jsx(Iye,{showAddNewRow:X,setShowAddNewRow:R,customRowEditModalData:M,onHandleChangeCustomRowSetting:ne}),U&&o.jsx(_ye,{showAddNewColumn:U,setShowAddNewColumn:ce,customColumnEditModalData:E,onHandleChangeCustomColumnSetting:fe}),o.jsx(Qi,{visibilty:m,closeSettingFieldSidebar:be,...t}),o.jsx("div",{className:"field-form-builder",children:o.jsxs("div",{onMouseOver:ee,onMouseOut:oe,children:[c&&H&&o.jsx(Wr,{handleFieldSettingsSidebar:me,...t}),o.jsx("div",{dir:s,className:Te(),children:r===n&&l===!0?o.jsx(ci,{headerTemplate:e,toggleable:!0,children:o.jsx(DU,{...t,field:u,userSelectedLanguage:i,fieldIndex:d,customColumnHeaderTemplate:ie,customColumnRowBodyTemplate:Z,setAllFields:P,allFields:F,actionHeaderTemplate:re,actionBodyTemplate:Y,isFocus:T,inputValue:w,handleFieldSettingsSidebar:me,isAdmin:l})}):o.jsx(DU,{isAdmin:!1,...t,field:u,userSelectedLanguage:i,fieldIndex:d,customColumnHeaderTemplate:ie,customColumnRowBodyTemplate:Z,setAllFields:P,allFields:F,actionHeaderTemplate:re,actionBodyTemplate:Y,isFocus:T,inputValue:w,handleFieldSettingsSidebar:me})})]})})]})},Nye=t=>{var fe,ne,q,ee,oe,pe,_e,Ne,ve,Ae,Be;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,userTaskSubmitFormData:i,updateUserFormDataSubmit:a}=Ar(),[s,l]=k.useState([]),{field:c,fieldIndex:u,row:d,pageIndex:f,sectionIndex:h,section:g,page:v,rowIndex:m,columnIndex:A,path:w,update:x,value:S,isDisabled:T}=t,{isAdmin:C,isBuilderMode:E}=Ht(),{userSelectedLanguage:_}=sn(),[M,O]=k.useState(!1),[F,P]=k.useState(""),[H,N]=k.useState(0),[z,U]=k.useState(!1),[ce,X]=k.useState(!1),R=()=>{X(!0)},ue=()=>{X(!1)},Y=Ee=>{O(Ee)},ie=()=>{O(!1)};k.useEffect(()=>((c==null?void 0:c.dataSourceType)==="custom"&&l(c==null?void 0:c.options),c==null||c.dataSourceType,()=>{}));const re=()=>{var $,ge,le,se;let Ee=null;if(d!=null&&d.rowIsRepeatable){if(d!=null&&d.repeatableFields){const he=[...d.repeatableFields],Se=_t.findIndex(he,function(De){return De.uuid===(c==null?void 0:c.uuid)});Se>=0&&he[Se].fieldData?(Ee=he[Se].fieldData,P(he[Se].fieldData)):(c.isValid=0,P(""))}}else{const he=i,Se=_t.cloneDeep(e);if(he!=null&&he.length){for(const De of he)if(De.fieldId===t.field.uuid&&(($=De==null?void 0:De.postData)!=null&&$.length)){Ee=(ge=De==null?void 0:De.postData[0])==null?void 0:ge.postValue,P((le=De==null?void 0:De.postData[0])==null?void 0:le.postValue),Se[c==null?void 0:c.uuid]=(se=De==null?void 0:De.postData[0])==null?void 0:se.postValue;const Me=Object.keys(Se).length;r(Me);break}}}P(Ee),setTimeout(()=>{U(!0)},2e3)};k.useEffect(()=>{!z&&(i==null?void 0:i.length)>0&&re();const Ee=Gt.addListener("clearRepeatableFields",le=>{le===(d==null?void 0:d.uuid)&&(P(""),N(0),c.isValid=1)}),$=Gt.addListener("onSubmitUserForm",()=>{var le;(le=c==null?void 0:c.attributes)!=null&&le.required?F?c.isValid=1:c.isValid=0:c.isValid=1}),ge=Gt.addListener("OnInvalidFieldCatch",le=>{c.uuid===(le==null?void 0:le.fieldId)?N(1):N(0)});return()=>{$.remove(),ge.remove(),Ee.remove()}});const Z=(Ee,$)=>{var ge;if(i){const le=[...i],se=_t.findIndex(le,function(Se){return Se.rowId===(d==null?void 0:d.uuid)});let he=(ge=i[se])==null?void 0:ge.repeatableFields;he={...he,[Ee==null?void 0:Ee.uuid]:$},le[se]={...le[se],repeatableFields:he},a(le)}P($),$?Ee.isValid=1:Ee.isValid=0},K=Ee=>{var $;P(Ee.target.value),d!=null&&d.rowIsRepeatable?Z(c,($=Ee==null?void 0:Ee.target)==null?void 0:$.value):Te(Ee.target.value)},W=()=>(c==null?void 0:c.dataSourceType)==="custom"?`optionText.${_.type}`:(c==null?void 0:c.dataSourceType)==="database"?`${c==null?void 0:c.optionLabel}`:"",me=()=>(c==null?void 0:c.dataSourceType)==="custom"?`optionText.${_.type}`:(c==null?void 0:c.dataSourceType)==="database"?`${c==null?void 0:c.optionLabel}`:"",be=()=>{var Ee,$,ge;if(((Ee=c==null?void 0:c.fieldType)==null?void 0:Ee.type)==="radio"){const le=[];return s.map((se,he)=>{var De,Me,ze,tt;const Se=F;le.push(o.jsxs("div",{className:"field-radiobutton field-radiobutton-builder",onClick:()=>{K({value:se,target:{value:se}})},style:(Se==null?void 0:Se.uuid)===(se==null?void 0:se.uuid)?{backgroundColor:"#0F8BFD",padding:15,borderRadius:8}:{padding:15},children:[o.jsx(ia,{onFocus:()=>N(1),inputId:`radio-option-${he}-${se==null?void 0:se.uuid}-${E?"builder-radio":"preview"}`,onChange:it=>{K(it)},value:se,name:`radio-option-${he}-${se==null?void 0:se.uuid}-${E?"builder":"preview"}`,checked:(Se==null?void 0:Se.uuid)===(se==null?void 0:se.uuid),disabled:T}),((De=se==null?void 0:se.hyperlinkText)==null?void 0:De[_==null?void 0:_.type])===""?o.jsx("label",{htmlFor:`radio-option-${he}-${se==null?void 0:se.uuid}-${E?"builder":"preview"}`,children:(Me=se==null?void 0:se.optionText)==null?void 0:Me[_==null?void 0:_.type]}):o.jsx("label",{children:o.jsx("a",{href:(ze=se==null?void 0:se.hyperlinkText)==null?void 0:ze[_==null?void 0:_.type],target:"_blank",rel:"noreferrer",children:(tt=se==null?void 0:se.optionText)==null?void 0:tt[_==null?void 0:_.type]})})]},he))}),le}if((($=c==null?void 0:c.fieldType)==null?void 0:$.type)==="dropdown")return o.jsx(Pa,{onFocus:()=>N(1),onChange:le=>{d!=null&&d.rowIsRepeatable?Z(c,le.target.value):Te(le.target.value)},options:s,optionLabel:me(),optionValue:W(),value:F,placeholder:(ge=c==null?void 0:c.placeholder)==null?void 0:ge[_==null?void 0:_.type],disabled:T})},Te=Ee=>{var le,se;P(Ee.target.value);const $=i,ge=_t.cloneDeep(e);if($!==null){if((le=Ee==null?void 0:Ee.target)!=null&&le.value){if(ge[c==null?void 0:c.uuid]=(se=Ee==null?void 0:Ee.target)==null?void 0:se.value,($==null?void 0:$.length)>0)for(const he of $)he.fieldId===t.field.uuid&&(he.postData[0]={postValue:Ee.target.value})}else if(delete ge[c==null?void 0:c.uuid],($==null?void 0:$.length)>0)for(const he of $)he.fieldId===t.field.uuid&&(he.postData[0]={postValue:""})}if(!(d!=null&&d.rowIsRepeatable)){n(ge);const he=Object.keys(ge).length;r(he)}},ye=o.jsxs("div",{onMouseOver:R,onMouseOut:ue,children:[E&&ce&&o.jsx(Wr,{handleFieldSettingsSidebar:Y,...t}),o.jsx("div",{className:`field ${!E&&" py-3 px-4 builder-element-wrapper "}${(c==null?void 0:c.isFluid)===!0&&" p-fluid"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-12",children:[(c==null?void 0:c.showHeaderText)&&o.jsx("h6",{children:(fe=c==null?void 0:c.headerText)==null?void 0:fe[_==null?void 0:_.type]}),(c==null?void 0:c.showLabel)&&o.jsxs("label",{htmlFor:u,className:"flex font-medium mb-5 text-700 text-2xl",children:[o.jsx(ca,{sectionIndex:h,fieldIndex:u,field:c,update:x,value:S}),((ne=c==null?void 0:c.attributes)==null?void 0:ne.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",E?o.jsx(aa,{...t}):o.jsx(o.Fragment,{children:(q=c==null?void 0:c.label)==null?void 0:q[_==null?void 0:_.type]}),o.jsx("span",{className:"ml-3",children:c!=null&&c.showToolTip?o.jsx(o.Fragment,{children:o.jsx(zi,{message:(ee=c==null?void 0:c.toolTip)==null?void 0:ee[_==null?void 0:_.type],position:"right"})}):""})]}),be(),o.jsx("div",{children:((oe=c==null?void 0:c.attributes)==null?void 0:oe.required)&&o.jsx("small",{className:"error",children:H===1&&!F?(pe=c==null?void 0:c.validationMesssage)==null?void 0:pe.language:""})}),o.jsx("div",{children:(c==null?void 0:c.showHelperText)&&o.jsx("small",{children:(_e=c==null?void 0:c.helperText)==null?void 0:_e[_==null?void 0:_.type]})}),((Ne=c==null?void 0:c.inlineConditionalRules)==null?void 0:Ne.rules.length)>0&&E===!0&&o.jsx("p",{children:"Inline conditional rules"}),z===!0&&((Ae=(ve=c==null?void 0:c.inlineConditionalRules)==null?void 0:ve.rules)==null?void 0:Ae.length)>0&&((Be=c==null?void 0:c.inlineConditionalRules)==null?void 0:Be.rules.map((Ee,$)=>{const ge=F;return E===!1?o.jsx("div",{children:Ee==null?void 0:Ee.conditions.map((le,se)=>o.jsx(k.Fragment,{children:o.jsx(e0,{isConditionTrue:!!((ge==null?void 0:ge.value)==le.value||E),inputValue:F,condition:le,ruleIndex:$,conditionIndex:se,field:c,section:g,page:v,row:d,pageIndex:f,sectionIndex:h,rowIndex:m,columnIndex:A,path:w,...t})},`select-rule-${$}-`+se))},`rule-${$}`):o.jsx(ci,{className:"mt-4",header:`Rule ${$+1}`,children:o.jsx("div",{children:Ee==null?void 0:Ee.conditions.map((le,se)=>o.jsx(k.Fragment,{children:o.jsx(e0,{isConditionTrue:!!((ge==null?void 0:ge.value)===le.value||E),inputValue:F,condition:le,ruleIndex:$,conditionIndex:se,field:c,section:g,page:v,row:d,pageIndex:f,sectionIndex:h,rowIndex:m,columnIndex:A,path:w,...t})},`select-rule-${$}-`+se))},`rule-${$}`)},$)}))]}),C&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[M===!0&&o.jsx(Qi,{visibilty:M,closeSettingFieldSidebar:ie,...t},c==null?void 0:c.uuid),o.jsx(xi,{...t,fieldWrap:ye})]})},Oye=t=>{var z,U,ce,X;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,userTaskSubmitFormData:i}=Ar(),{field:a,row:s,isDisabled:l=!1}=t,{isBuilderMode:c,isAdmin:u}=Ht(),{userSelectedLanguage:d}=sn(),[f,h]=k.useState(!1),[g,v]=k.useState(""),[m,A]=k.useState(0),[w,x]=k.useState(!1),[S,T]=k.useState(!1),C=()=>{T(!0)},E=()=>{T(!1)},_=R=>{h(R)},M=()=>{h(!1)},O=()=>{var ue,Y,ie,re;let R=null;if(s!=null&&s.rowIsRepeatable){if(s!=null&&s.repeatableFields){const Z=[...s.repeatableFields],K=_t.findIndex(Z,function(W){return W.uuid===(a==null?void 0:a.uuid)});K>=0&&Z[K].fieldData?(R=Z[K].fieldData,v(Z[K].fieldData)):(a.isValid=0,v(""))}}else{const Z=i,K=_t.cloneDeep(e);if(Z!=null&&Z.length){for(const W of Z)if(W.fieldId===t.field.uuid&&((ue=W==null?void 0:W.postData)!=null&&ue.length)){R=(Y=W==null?void 0:W.postData[0])==null?void 0:Y.postValue,v((ie=W==null?void 0:W.postData[0])==null?void 0:ie.postValue),K[a==null?void 0:a.uuid]=(re=W==null?void 0:W.postData[0])==null?void 0:re.postValue;const me=Object.keys(K).length;r(me);break}}}v(R),setTimeout(()=>{x(!0)},2e3)};k.useEffect(()=>{w||O();const R=Gt.addListener("clearRepeatableFields",ie=>{ie===(s==null?void 0:s.uuid)&&(v(""),A(0),a.isValid=1)}),ue=Gt.addListener("onSubmitUserForm",()=>{var ie;if((ie=a==null?void 0:a.attributes)!=null&&ie.required){const re=g;re!=null&&re[a.uuid]?a.isValid=1:a.isValid=0}else a.isValid=1}),Y=Gt.addListener("OnInvalidFieldCatch",ie=>{a.uuid===(ie==null?void 0:ie.fieldId)?A(1):A(0)});return()=>{ue.remove(),Y.remove(),R.remove()}});const F=(R,ue,Y,ie,re)=>ie==null?void 0:ie.map(Z=>{var K,W;return{...Z,children:Z!=null&&Z.children&&((K=Z==null?void 0:Z.children)==null?void 0:K.length)>0?[...((W=Z==null?void 0:Z.children)==null?void 0:W.map(me=>ue===(Z==null?void 0:Z.uuid)||re===!0?(Y!=null&&Y[me==null?void 0:me.uuid]&&delete Y[me==null?void 0:me.uuid],{...me,options:F(R,ue,Y,(me==null?void 0:me.options)||[],!0)}):{...me,options:F(R,ue,Y,(me==null?void 0:me.options)||[],!1)}))||[]]:[]}}),P=(R,ue)=>{const Y={...g};F(R,ue,Y,a==null?void 0:a.options,!1),Y[R]=ue,v(Y),s!=null&&s.rowIsRepeatable||H(Y)},H=R=>{const ue=i,Y=_t.cloneDeep(e);if(ue!==null){if(R){if(Y[a==null?void 0:a.uuid]=R,(ue==null?void 0:ue.length)>0)for(const ie of ue)ie.fieldId===t.field.uuid&&(ie.postData[0]={postValue:R})}else if(delete Y[a==null?void 0:a.uuid],(ue==null?void 0:ue.length)>0)for(const ie of ue)ie.fieldId===t.field.uuid&&(ie.postData[0]={postValue:""})}if(!(s!=null&&s.rowIsRepeatable)){n(Y);const ie=Object.keys(Y).length;r(ie)}},N=o.jsxs("div",{onMouseOver:C,onMouseOut:E,children:[c&&S&&o.jsx(Wr,{handleFieldSettingsSidebar:_,...t}),o.jsx("div",{className:`field ${c&&" py-3 px-4 builder-element-wrapper "}${(a==null?void 0:a.isFluid)===!0&&" p-fluid"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-12",children:[(a==null?void 0:a.showHeaderText)&&o.jsx("h6",{children:(z=a==null?void 0:a.headerText)==null?void 0:z[d==null?void 0:d.type]}),o.jsx(m7,{...t,isDisabled:l,isFirst:!0,schema:a,field:a,value:g,update:(R,ue)=>{P(R,ue)}}),o.jsx("div",{children:((U=a==null?void 0:a.attributes)==null?void 0:U.required)&&o.jsx("small",{className:"error",children:m===1&&!g?(ce=a==null?void 0:a.validationMesssage)==null?void 0:ce.english:""})}),o.jsx("div",{children:(a==null?void 0:a.showHelperText)&&o.jsx("small",{children:(X=a==null?void 0:a.helperText)==null?void 0:X[d==null?void 0:d.type]})})]}),u&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[o.jsx(Qi,{visibilty:f,closeSettingFieldSidebar:M,...t},a==null?void 0:a.uuid),o.jsx(xi,{...t,fieldWrap:N})]})},Fye=t=>{var W,me,be,Te,ye,fe,ne,q,ee,oe;const{field:e,fieldIndex:n,sectionIndex:r,pageIndex:i,row:a,rowIndex:s,columnIndex:l,isDisabled:c}=t,{isRenderView:u,isAdmin:d,isBuilderMode:f}=Ht(),{taskRegisterData:h,updateTaskRegisterData:g,updateTaskProgressValue:v,updateUserFormDataSubmit:m,userTaskSubmitFormData:A,task_status:w,TASK_PUBLISHED:x}=Ar(),[S,T]=k.useState(!1),{userSelectedLanguage:C,fieldSettingUpdate:E}=sn(),[_,M]=k.useState(!1),[O,F]=k.useState(0),[P,H]=k.useState(),[N,z]=k.useState(!1),U=()=>{z(!0)},ce=()=>{z(!1)},X=[{icon:"pi pi-thumbs-up",thumbValue:"up"},{icon:"pi pi-thumbs-down",thumbValue:"down"}],R=pe=>o.jsx("span",{className:"m-2",children:o.jsx("i",{style:{fontSize:30},className:pe.icon})}),ue=()=>{var pe,_e,Ne;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const ve=[...a.repeatableFields],Ae=_t.findIndex(ve,function(Be){return Be.uuid===(e==null?void 0:e.uuid)});Ae>=0&&ve[Ae].fieldData?H(ve[Ae].fieldData):H("")}}else{const ve=A;if(ve!=null&&ve.length){for(const Ae of ve)if(Ae.fieldId===t.field.uuid&&((pe=Ae==null?void 0:Ae.postData[0])==null?void 0:pe.postValue)!==""&&((_e=Ae==null?void 0:Ae.postData[0])!=null&&_e.postValue)){H((Ne=Ae==null?void 0:Ae.postData[0])==null?void 0:Ne.postValue);break}}}M(!0)};k.useEffect(()=>{_||ue();const pe=Gt.addListener("clearRepeatableFields",Ae=>{Ae===(a==null?void 0:a.uuid)&&(H(""),F(0),e.isValid=0,E(i,r,s,l,n,e))}),_e=Gt.addListener("onSubmitUserForm",()=>{var Ae;(Ae=e==null?void 0:e.attributes)!=null&&Ae.required?P?e.isValid=1:e.isValid=0:e.isValid=1}),Ne=Gt.addListener("OnInvalidFieldCatch",Ae=>{e.uuid===(Ae==null?void 0:Ae.fieldId)?F(1):F(0)}),ve=Gt.addListener("OnGetFieldValue",Ae=>{var Ee;const Be=(Ee=Ae==null?void 0:Ae.repeatableColumn)==null?void 0:Ee.filter(($,ge)=>($==null?void 0:$.fieldUuid)===(e==null?void 0:e.uuid));Be!=null&&Be.length});return()=>{_e.remove(),Ne.remove(),ve.remove(),pe.remove()}});const Y=pe=>{H(pe.value);const _e=A,Ne=_t.cloneDeep(h);if(_e!==null){if(pe!=null&&pe.value){if(Ne[e==null?void 0:e.uuid]=pe==null?void 0:pe.value,(_e==null?void 0:_e.length)>0)for(const ve of _e)ve.fieldId===t.field.uuid&&(ve.postData[0]={postValue:pe.value})}else if(delete Ne[e==null?void 0:e.uuid],(_e==null?void 0:_e.length)>0)for(const ve of _e)ve.fieldId===t.field.uuid&&(ve.postData[0]={postValue:""})}if(!(a!=null&&a.rowIsRepeatable)){g(Ne);const ve=Object.keys(Ne).length;v(ve)}},ie=(pe,_e)=>{var Ne;if(A){const ve=[...A],Ae=_t.findIndex(ve,function(Ee){return Ee.rowId===(a==null?void 0:a.uuid)});let Be=(Ne=A[Ae])==null?void 0:Ne.repeatableFields;Be={...Be,[pe==null?void 0:pe.uuid]:_e},ve[Ae]={...ve[Ae],repeatableFields:Be},m(ve)}H(_e),_e!==""?pe.isValid=1:pe.isValid=0},re=pe=>{T(pe)},Z=()=>{T(!1)},K=o.jsxs("div",{onMouseOver:U,onMouseOut:ce,children:[f&&N&&o.jsx(Wr,{handleFieldSettingsSidebar:re,...t}),o.jsx("div",{className:`field ${f&&" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:d?"col-6 ":"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(W=e==null?void 0:e.headerText)==null?void 0:W[C==null?void 0:C.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:n,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((me=e==null?void 0:e.attributes)==null?void 0:me.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",f?o.jsx(aa,{...t}):o.jsx(o.Fragment,{children:(be=e==null?void 0:e.label)==null?void 0:be[C==null?void 0:C.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(zi,{message:(Te=e==null?void 0:e.toolTip)==null?void 0:Te[C==null?void 0:C.type],position:"right"})})]}),o.jsxs("span",{className:"p-input-icon-"+(e==null?void 0:e.iconAlignment),children:[(e==null?void 0:e.showIcon)&&o.jsx("i",{className:"pi pi-"+((fe=(ye=e==null?void 0:e.icon)==null?void 0:ye.properties)==null?void 0:fe.name)}),o.jsx("div",{className:"card flex justify-content-start",children:o.jsx(tf,{value:P,onChange:pe=>{H(pe.value),a!=null&&a.rowIsRepeatable?ie(e,pe.value):Y(pe)},itemTemplate:R,disabled:d||c,optionLabel:"value",onFocus:()=>F(1),options:X,readOnly:c,className:O===1&&((ne=e==null?void 0:e.attributes)!=null&&ne.required)?P?"valid":"invalid":"valid'"})})]}),o.jsx("div",{children:((q=e==null?void 0:e.attributes)==null?void 0:q.required)&&o.jsx(o.Fragment,{children:o.jsx("small",{className:"error",children:O===1&&!P?(ee=e==null?void 0:e.validationMesssage)==null?void 0:ee.english:""})})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(oe=e==null?void 0:e.helperText)==null?void 0:oe[C==null?void 0:C.type]})})]}),d&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[o.jsx(Qi,{visibilty:S,closeSettingFieldSidebar:Z,...t}),o.jsx(xi,{...t,fieldWrap:K})]})},kye=t=>{var ie,re,Z,K,W,me,be;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a}=Ar(),{userSelectedLanguage:s,fieldSettingUpdate:l}=sn(),{field:c,fieldIndex:u,sectionIndex:d,pageIndex:f,row:h,rowIndex:g,columnIndex:v}=t,{isAdmin:m,isBuilderMode:A}=Ht(),[w,x]=k.useState(!1),[S,T]=k.useState(""),[C,E]=k.useState(0),[_,M]=k.useState(!1),[O,F]=k.useState(!1),P=()=>{F(!0)},H=()=>{F(!1)},N=()=>{var Te,ye,fe;if(h!=null&&h.rowIsRepeatable){if(h!=null&&h.repeatableFields){const ne=[...h.repeatableFields],q=_t.findIndex(ne,function(ee){return ee.uuid===(c==null?void 0:c.uuid)});q>=0&&ne[q].fieldData?T(ne[q].fieldData):T("")}}else{const ne=a;if(ne!=null&&ne.length){for(const q of ne)if(q.fieldId===t.field.uuid&&((Te=q==null?void 0:q.postData[0])==null?void 0:Te.postValue)!==""&&((ye=q==null?void 0:q.postData[0])!=null&&ye.postValue)){T((fe=q==null?void 0:q.postData[0])==null?void 0:fe.postValue);break}}}M(!0)};k.useEffect(()=>{_||N();const Te=Gt.addListener("clearRepeatableFields",q=>{q===(h==null?void 0:h.uuid)&&(T(""),E(0),c.isValid=0,l(f,d,g,v,u,c))}),ye=Gt.addListener("onSubmitUserForm",()=>{var q;(q=c==null?void 0:c.attributes)!=null&&q.required?S?c.isValid=1:c.isValid=0:c.isValid=1}),fe=Gt.addListener("OnInvalidFieldCatch",q=>{c.uuid===(q==null?void 0:q.fieldId)?E(1):E(0)}),ne=Gt.addListener("OnGetFieldValue",q=>{var oe;const ee=(oe=q==null?void 0:q.repeatableColumn)==null?void 0:oe.filter(pe=>(pe==null?void 0:pe.fieldUuid)===(c==null?void 0:c.uuid));ee!=null&&ee.length});return()=>{ye.remove(),fe.remove(),ne.remove(),Te.remove()}});const z=Te=>{x(Te)},U=()=>{x(!1)},ce=Te=>{var ne,q;T(Te.target.value);const ye=a,fe=_t.cloneDeep(e);if(ye!==null){if((ne=Te==null?void 0:Te.target)!=null&&ne.value){if(fe[c==null?void 0:c.uuid]=(q=Te==null?void 0:Te.target)==null?void 0:q.value,(ye==null?void 0:ye.length)>0)for(const ee of ye)ee.fieldId===t.field.uuid&&(ee.postData[0]={postValue:Te.target.value})}else if(delete fe[c==null?void 0:c.uuid],(ye==null?void 0:ye.length)>0)for(const ee of ye)ee.fieldId===t.field.uuid&&(ee.postData[0]={postValue:""})}if(!(h!=null&&h.rowIsRepeatable)){n(fe);const ee=Object.keys(fe).length;r(ee)}},X=(Te,ye,fe,ne)=>{var q;if(a){const ee=[...a],oe=_t.findIndex(ee,function(_e){return _e.rowId===(h==null?void 0:h.uuid)});let pe=(q=a[oe])==null?void 0:q.repeatableFields;pe={...pe,[fe==null?void 0:fe.uuid]:ne},ee[oe]={...ee[oe],repeatableFields:pe},i(ee)}T(ne),ne!==""?fe.isValid=1:fe.isValid=0},R=5,ue=()=>{const Te=[],ye=[HT,zT,YT,$T,jT],fe=["Awful","Not Very Good","Okay","Really Good","Fantastic"];for(let ne=0;ne<R;ne++)Te.push(o.jsxs("label",{children:[o.jsx("input",{onChange:q=>{h!=null&&h.rowIsRepeatable?X(f,d,c,q.target.value):ce(q)},checked:parseInt(S)===ne,name:"liker-Emoji-scale"+(c==null?void 0:c.uuid),type:"radio",value:ne}),o.jsxs("span",{className:"grid m-0",children:[o.jsx("div",{className:"col-12 flex justify-content-center",children:o.jsx("img",{src:ye[ne]})}),o.jsx("div",{children:fe[ne]})]})]},`field-${c==null?void 0:c.uuid}-likertEmojiScale-${ne} ${parseInt(S)===ne?"scale-selected":""}`));return Te},Y=o.jsxs("div",{onMouseOver:P,onMouseOut:H,children:[A&&O&&o.jsx(Wr,{handleFieldSettingsSidebar:z,...t}),o.jsxs("div",{className:`field ${A&&" py-3 px-4 builder-element-wrapper "}${(c==null?void 0:c.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12 ",children:[(c==null?void 0:c.showHeaderText)&&o.jsx("h6",{children:(ie=c==null?void 0:c.headerText)==null?void 0:ie[s==null?void 0:s.type]}),(c==null?void 0:c.showLabel)&&o.jsxs("label",{htmlFor:`label${u}`,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((re=c==null?void 0:c.attributes)==null?void 0:re.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",A?o.jsx(aa,{...t}):o.jsx(o.Fragment,{children:(Z=c==null?void 0:c.label)==null?void 0:Z[s==null?void 0:s.type]}),o.jsx("span",{className:"ml-3",children:(c==null?void 0:c.showToolTip)&&o.jsx(zi,{message:(K=c==null?void 0:c.toolTip)==null?void 0:K[s==null?void 0:s.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsx("div",{children:o.jsx("div",{className:"emoji",children:ue()})}),o.jsx("div",{children:((W=c==null?void 0:c.attributes)==null?void 0:W.required)&&o.jsx("small",{className:"error",children:C===1&&!S?(me=c==null?void 0:c.validationMesssage)==null?void 0:me.english:""})}),o.jsx("div",{children:(c==null?void 0:c.showHelperText)&&o.jsx("small",{children:(be=c==null?void 0:c.helperText)==null?void 0:be[s==null?void 0:s.type]})})]})]})}),m&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[o.jsx(Qi,{visibilty:w,closeSettingFieldSidebar:U,...t}),o.jsx(xi,{...t,fieldWrap:Y})]})},Pye=t=>{var N,z,U,ce,X,R,ue,Y,ie,re,Z;const{userTaskSubmitFormData:e}=Ar(),{userSelectedLanguage:n,fieldSettingUpdate:r}=sn(),{isAdmin:i,isBuilderMode:a}=Ht(),{field:s,fieldIndex:l,sectionIndex:c,pageIndex:u,row:d,rowIndex:f,columnIndex:h}=t,[g,v]=k.useState(!1),[m,A]=k.useState(""),[w,x]=k.useState(0),[S,T]=k.useState(!1),[C,E]=k.useState(!1),_=()=>{E(!0)},M=()=>{E(!1)},O=()=>{var K,W,me;if(d!=null&&d.rowIsRepeatable){if(d!=null&&d.repeatableFields){const be=[...d.repeatableFields],Te=_t.findIndex(be,function(ye){return ye.uuid===(s==null?void 0:s.uuid)});Te>=0&&be[Te].fieldData?A(be[Te].fieldData):A("")}}else{const be=e;if(be!=null&&be.length){for(const Te of be)if(Te.fieldId===t.field.uuid&&((K=Te==null?void 0:Te.postData[0])==null?void 0:K.postValue)!==""&&((W=Te==null?void 0:Te.postData[0])!=null&&W.postValue)){A((me=Te==null?void 0:Te.postData[0])==null?void 0:me.postValue);break}}}T(!0)};k.useEffect(()=>{S||O();const K=Gt.addListener("clearRepeatableFields",Te=>{Te===(d==null?void 0:d.uuid)&&(A(""),x(0),s.isValid=0,r(u,c,f,h,l,s))}),W=Gt.addListener("onSubmitUserForm",()=>{var Te,ye;(Te=s==null?void 0:s.attributes)!=null&&Te.required?m&&(m==null?void 0:m.length)<((ye=s==null?void 0:s.attributes)==null?void 0:ye.minLength)?s.isValid=1:s.isValid=0:s.isValid=1}),me=Gt.addListener("OnInvalidFieldCatch",Te=>{s.uuid===(Te==null?void 0:Te.fieldId)?x(1):x(0)}),be=Gt.addListener("OnGetFieldValue",Te=>{var fe;const ye=(fe=Te==null?void 0:Te.repeatableColumn)==null?void 0:fe.filter(ne=>(ne==null?void 0:ne.fieldUuid)===(s==null?void 0:s.uuid));ye!=null&&ye.length});return()=>{W.remove(),me.remove(),be.remove(),K.remove()}});const F=K=>{v(K)},P=()=>{v(!1)},H=o.jsxs("div",{onMouseOver:_,onMouseOut:M,children:[a&&C&&o.jsx(Wr,{handleFieldSettingsSidebar:F,...t}),o.jsxs("div",{className:`field ${a&&" py-3 px-4 builder-element-wrapper "}${(s==null?void 0:s.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:i?"col-6 ":"col-12 p-fluid",children:[(s==null?void 0:s.showHeaderText)&&o.jsx("h6",{children:(N=s==null?void 0:s.headerText)==null?void 0:N[n==null?void 0:n.type]}),(s==null?void 0:s.showLabel)&&o.jsxs("label",{htmlFor:l,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((z=s==null?void 0:s.attributes)==null?void 0:z.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",a?o.jsx(aa,{...t}):o.jsx(o.Fragment,{children:(U=s==null?void 0:s.label)==null?void 0:U[n==null?void 0:n.type]}),(s==null?void 0:s.showToolTip)&&o.jsx("span",{className:"ml-3",children:o.jsx(zi,{message:(ce=s==null?void 0:s.toolTip)==null?void 0:ce[n==null?void 0:n.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsx("span",{className:"p-input-icon-"+(s==null?void 0:s.iconAlignment),children:(s==null?void 0:s.showIcon)&&o.jsx("i",{className:"pi pi-"+((R=(X=s==null?void 0:s.icon)==null?void 0:X.properties)==null?void 0:R.name)})}),o.jsx("div",{children:((ue=s==null?void 0:s.attributes)==null?void 0:ue.required)&&o.jsxs(o.Fragment,{children:[o.jsx("small",{className:"error",children:w===1&&!m?(Y=s==null?void 0:s.validationMesssage)==null?void 0:Y.english:""}),o.jsx("small",{className:"error",children:w===1&&(m==null?void 0:m.length)<((ie=s==null?void 0:s.attributes)==null?void 0:ie.minLength)?`Mini length ${(re=s==null?void 0:s.attributes)==null?void 0:re.minLength}`:""})]})}),o.jsx("div",{children:(s==null?void 0:s.showHelperText)&&o.jsx("small",{children:(Z=s==null?void 0:s.helperText)==null?void 0:Z[n==null?void 0:n.type]})})]})]})}),i&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[o.jsx(Qi,{visibilty:g,closeSettingFieldSidebar:P,...t}),o.jsx(xi,{...t,fieldWrap:H})]})},Mye=t=>{var H,N,z,U,ce,X,R;const{field:e,fieldIndex:n,columnIndex:r,sectionIndex:i,rowIndex:a,pageIndex:s,ref:l}=t,{isBuilderMode:c}=Ht(),{userSelectedLanguage:u,fieldSettingUpdate:d}=sn(),{userTaskSubmitFormData:f}=Ar(),[h,g]=k.useState(!1),[v,m]=k.useState(""),[A,w]=k.useState(0),[x,S]=k.useState(!1),[T,C]=k.useState(!1),E=()=>{C(!0)},_=()=>{C(!1)},M=()=>{var Y;const ue=f;if(ue.length){for(const ie of ue)if(ie.fieldId===t.field.uuid){m((Y=ie==null?void 0:ie.postData[0])==null?void 0:Y.postValue),S(!0);break}}};k.useEffect(()=>{x||M();const ue=Gt.addListener("onSubmitUserForm",()=>{var ie;(ie=e==null?void 0:e.attributes)!=null&&ie.required&&(v?e.isValid=1:e.isValid=0,d(s,i,a,r,n,e))}),Y=Gt.addListener("OnInvalidFieldCatch",ie=>{e.uuid===(ie==null?void 0:ie.fieldId)?w(1):w(0)});return()=>{ue.remove(),Y.remove()}});const O=ue=>{g(ue)},F=()=>{g(!1)},P=o.jsxs("div",{onMouseOver:E,onMouseOut:_,children:[c&&T&&o.jsx(Wr,{handleFieldSettingsSidebar:O,...t}),o.jsx("div",{className:c?"field-form-builder":"",ref:l,children:o.jsx("div",{className:"field",children:o.jsx("div",{className:"grid",children:o.jsxs("div",{className:c?"col-11":"col-12",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(H=e==null?void 0:e.headerText)==null?void 0:H[u==null?void 0:u.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:`${n}`,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[((N=e==null?void 0:e.attributes)==null?void 0:N.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",i+1,".",r+1,".",n+1," ",(z=e==null?void 0:e.label)==null?void 0:z[u==null?void 0:u.type],o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(zi,{message:(U=e==null?void 0:e.toolTip)==null?void 0:U[u==null?void 0:u.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsx("p",{children:"Anchor Tag"}),o.jsx("div",{children:((ce=e==null?void 0:e.attributes)==null?void 0:ce.required)&&o.jsx("small",{className:"error",children:A===1&&!v?(X=e==null?void 0:e.validationMesssage)==null?void 0:X.language:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(R=e==null?void 0:e.helperText)==null?void 0:R[u==null?void 0:u.type]})})]})]})})})})]});return o.jsxs(o.Fragment,{children:[h&&o.jsx(Qi,{visibilty:h,closeSettingFieldSidebar:F,...t}),o.jsx(xi,{...t,fieldWrap:P})]})},Lc=t=>{const{data:e,path:n,field:r}=t,{renderType:i,isAdmin:a,isBuilderMode:s}=Ht(),{task_status:l,TASK_PUBLISHED:c}=Ar(),u=k.useRef(null),[d,f]=k.useState(!1),[{isDragging:h},g]=ra({item:{...e,type:z1,uuid:e==null?void 0:e.uuid,path:n},type:z1,collect:T=>({isDragging:T.isDragging()})}),v=h&&s?.25:1;g(u);const m=l===c||a,A=T=>{switch(r==null?void 0:r.componentType){case"text":return o.jsx(Mse,{typeName:"Text",field:r,...T});case"number":return o.jsx(Use,{typeName:"Number",field:r,...T});case"email":return o.jsx(zue,{typeName:"Email",field:r,...T});case"textarea":return o.jsx(Hue,{typeName:"Text Area",field:r,...T});case"editor":return o.jsx(cde,{typeName:"Editor",field:r,...T});case"question":return o.jsx(jde,{typeName:"Exam",field:r,...T});case"select":return o.jsx(Que,{typeName:"Select",field:r,...T});case"multi-select":return o.jsx(Ede,{typeName:"Multi Select",field:r,...T});case"checkbox":return o.jsx(_de,{typeName:"Checkbox",field:r,...T});case"radio":return o.jsx(Ode,{typeName:"Radio",field:r,...T});case"radio-hierarchal":return o.jsx(Oye,{typeName:"Radio Progressive",field:r,...T});case"href":return o.jsx(qse,{typeName:"Hyperlink",field:r,...T});case"heading":return o.jsx(Mde,{typeName:"Heading",field:r,...T});case"paragraph":return o.jsx(r4e,{typeName:"Paragraph",field:r,...T});case"image":return o.jsx(RO,{typeName:"Image",field:r,...T});case"video":return o.jsx(ime,{typeName:"Video",field:r,...T});case"hr":return o.jsx(ame,{typeName:"Hr",field:r,...T});case"date-picker":return o.jsx(sme,{typeName:"Date Picker",field:r,...T});case"signature":return o.jsx(ome,{typeName:"Signature",field:r,...T});case"file-upload":return o.jsx(V6e,{typeName:"File Upload",field:r,...T});case"facebook-login":return o.jsx(Pye,{typeName:"Facebook Login",field:r,...T});case"anchor":return o.jsx(Mye,{ref:u,typeName:"Anchor Tag",field:r,...T});case"image-gallery":return o.jsx(e4e,{typeName:"Image gallery",field:r,...T});case"quiz":return o.jsx(J6e,{typeName:"Quiz",field:r,...T});case"document":return o.jsx(q6e,{typeName:"Document",field:r,...T});case"list":return o.jsx(t8e,{typeName:"List",field:r,...T});case"country":return o.jsx(Pse,{typeName:"Country",field:r,...T});case"phone":return o.jsx(uye,{typeName:"Phone",field:r,...T});case"web-url":return o.jsx(dye,{typeName:"Website Url",field:r,...T});case"rating":return o.jsx(gye,{typeName:"Rating",field:r,...T});case"slider":return o.jsx(mye,{typeName:"Rating",field:r,...T});case"hidden-field":return o.jsx(vye,{typeName:"Hidden Field",field:r,...T});case"likert-scale":return o.jsx(bye,{typeName:"Likert Scale Field",field:r,...T});case"type-signature":return o.jsx(yye,{typeName:"Likert Scale Field",field:r,...T});case"address":return o.jsx(wye,{typeName:"Address",field:r,...T});case"grid-component":return o.jsx(IU,{typeName:"Grid",field:r,...T});case"matrix-scale":return o.jsx(IU,{typeName:"Grid",field:r,...T});case"matrix-dropdown":return o.jsx(Tye,{typeName:"Grid",field:r,...T});case"thumbs":return o.jsx(Fye,{typeName:"Thumbs Up and Down",field:r,...T});case"likert-emoji-scale":return o.jsx(kye,{typeName:"Thumbs Up and Down",field:r,...T});case"table":return o.jsx(Dye,{typeName:"Grid",field:r,...T});case"dynamic-listing":return o.jsx(Nye,{typeName:"Grid",field:r,...T});default:return o.jsx(o.Fragment,{children:"Empty"})}},w=()=>{f(!0)},x=()=>{f(!1)},S=()=>{let T="";return s===!0?(T=T+" component draggable field-form-builder-not-preview",i===H1?T=T+" pdf-component":T=T+" px-2 pdf-component"):(T=T+" component ",i===H1?T=T+" ":T=T+" px-2 "),T};return o.jsx(o.Fragment,{children:o.jsxs("div",{style:{opacity:v},className:S(),onMouseOver:w,onMouseOut:x,children:[s&&d&&o.jsx("i",{ref:s===!0?u:null,className:"elementDrag-icon pi pi-arrows-alt cursor-move",style:{fontSize:"1em"}}),A({...t,isDisabled:m})]})})},Lye={position:"relative"},Bye=t=>{var M,O,F,P,H;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,section:l,row:c,page:u}=t,d=k.useRef(null),{removeColumn:f,addColumn:h,cloneColumn:g,formBuilderFormLayout:v,handleDrop:m}=sn(),{isAdvanceView:A,isBuilderMode:w,emitSocketData:x}=Ht(),[{isDragging:S},T]=ra({type:As,item:{type:As,uuid:e==null?void 0:e.uuid,children:e.children,path:n},collect:N=>({isDragging:N.isDragging()})}),C=S&&w?.25:1;T(d);const E=(N,z,U,ce,X,R,ue)=>o.jsx(Lc,{page:u,type:"field",row:c,column:e,section:l,field:N,data:N,path:z,pageIndex:U,sectionIndex:ce,rowIndex:X,columnIndex:R,fieldIndex:ue},`component-${n}-${N==null?void 0:N.uuid}`),_=(N,z,U,ce,X)=>{var ie,re,Z,K;const R=N.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",ue=`${N.className} justify-content-space-between`,Y=`${N.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".add-column-tool"}),o.jsxs("div",{className:ue,children:[o.jsxs("span",{ref:w===!0?d:null,children:[o.jsx("button",{className:N.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:N.togglerClassName,onClick:N.onTogglerClick,children:[o.jsx("span",{className:R}),o.jsx(Qt,{})]}),o.jsx("span",{className:Y,children:"Column"})]}),w===!0&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-column-tool","data-pr-tooltip":"Add Column",children:o.jsxs("button",{className:N.togglerClassName,onClick:()=>{h(z,U,ce),x()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((K=(Z=(re=(ie=v[z])==null?void 0:ie.children[U])==null?void 0:re.children[ce])==null?void 0:Z.children)==null?void 0:K.length)>1&&o.jsxs("button",{className:N.togglerClassName,onClick:()=>{f(z,U,ce,X),x()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:N.togglerClassName,onClick:()=>{g(e,z,U,ce,X),x()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsx("div",{style:A&&w?{...Lye,opacity:C}:{},className:w?"draggable form-builder-column container-column":"form-builder-column container-column",children:w===!0?o.jsx(o.Fragment,{children:A===!0?o.jsxs(ci,{className:"builder-row-column",header:"Column",toggleable:!0,headerTemplate:N=>_(N,r,i,a,s),children:[((M=e==null?void 0:e.children)==null?void 0:M.length)>0?(O=e==null?void 0:e.children)==null?void 0:O.map((N,z)=>{const U=`${n}-${z}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:A,fieldDropArea:!0,data:{path:U,childrenCount:e.children.length,droppedField:e},onDrop:m}),E(N,U,r,i,a,s,z)]},U)}):o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]}),o.jsx(Fr,{isAdvanceView:A,fieldDropArea:!0,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:m,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((F=e==null?void 0:e.children)==null?void 0:F.length)>0?(P=e==null?void 0:e.children)==null?void 0:P.map((N,z)=>{const U=`${n}-${z}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:A,fieldDropArea:!0,data:{path:U,childrenCount:e.children.length,droppedField:e},onDrop:m}),E(N,U,r,i,a,s,z)]},U)}):o.jsx(o.Fragment,{children:o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]})}),o.jsx(Fr,{isAdvanceView:A,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:m,isLast:!0})]})})}):o.jsx(o.Fragment,{children:(H=e==null?void 0:e.children)==null?void 0:H.map((N,z)=>{const U=`${n}-${z}`;return o.jsx(k.Fragment,{children:E(N,U,r,i,a,s,z)},U)})})})},Vye=t=>{var i,a,s;const{language:e,onHandleChange:n,stateRow:r}=t;return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Row heading"}),o.jsx(wn,{value:(i=r==null?void 0:r.heading)==null?void 0:i[e==null?void 0:e.type],placeholder:"Enter row heading",onChange:l=>n("heading",e,l.target.value)})]}),o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Row description"}),o.jsx(so,{value:(a=r==null?void 0:r.subHeadingText)==null?void 0:a[e==null?void 0:e.type],placeholder:"Enter row description",onChange:l=>n("subHeadingText",e,l.target.value)})]}),(r==null?void 0:r.rowIsRepeatable)===!0&&o.jsxs("div",{className:"field",children:[o.jsx("span",{className:"must-required",children:"*"})," ",o.jsx("label",{children:"Add To List Button Label"}),o.jsx(wn,{value:(s=r.addToListButtonLabel)==null?void 0:s[e==null?void 0:e.type],onChange:l=>n("addToListButtonLabel",e,l.target.value)})]})]})},qye=t=>{const{stateRow:e,onHandleChangeAdvanceSettings:n}=t,{renderType:r}=Ht();return o.jsxs("div",{className:"p-fluid",children:[r===F0&&o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"rowIsRepeatable",checked:e==null?void 0:e.rowIsRepeatable,onChange:i=>n("rowIsRepeatable",i==null?void 0:i.checked)}),o.jsx("label",{htmlFor:"isRepeatable",children:"Row is repeatable ?"})]}),(e==null?void 0:e.rowIsRepeatable)&&o.jsxs("div",{className:"field",children:[o.jsx("span",{className:"must-required",children:"*"})," ",o.jsx("label",{children:"Row Minimum Entries"}),o.jsx(eo,{value:e==null?void 0:e.minimumEntries,onChange:i=>n("minimumEntries",i.value)})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"isManualEnumerationEnabled",checked:(e==null?void 0:e.isManualEnumerationEnabled)||!1,onChange:i=>n("isManualEnumerationEnabled",i==null?void 0:i.checked)}),o.jsx("label",{htmlFor:"isManualEnumerationEnabled",children:"Enable manual enumeration for row components?"}),o.jsxs("small",{children:[" ","You need to set mannual enumeration for every component from its settings."," "]})]})]})},bg=t=>{var x;const{visibilty:e,setVisibility:n,row:r,pageIndex:i,sectionIndex:a,rowIndex:s}=t,{formBuilderSchemaLanguages:l,rowSettingUpdate:c,userSelectedLanguage:u,formBuilderPublishedStatus:d}=sn(),[f,h]=k.useState(r),{updateGlobalToast:g,emitSocketData:v}=Ht(),m=(S,T,C)=>{h(E=>{const _=E[S];return Object.assign({},E,{[S]:Object.assign({},_,{[T==null?void 0:T.type]:C})})})},A=(S,T)=>{h(C=>({...C,[S]:T}))},w=()=>{const S={...f,children:r==null?void 0:r.children};c(i,a,s,S),v(),g({showToast:!0,toastMessage:"Updated",toastDetail:"Row updated",toastType:"success"})};return o.jsx(o.Fragment,{children:o.jsxs(To,{visible:e,position:"left",className:"p-sidebar-lg",onHide:()=>n(!1),children:[o.jsxs("div",{className:"flex justify-content-between flex-wrap card-container ",children:[o.jsxs("div",{className:"flex align-items-center justify-content-center ",children:[" ",o.jsxs("h5",{children:["Row settings - ",(x=r==null?void 0:r.heading)==null?void 0:x[u==null?void 0:u.type]]})," "]}),!d&&o.jsx("div",{className:"flex align-items-center justify-content-center",children:o.jsx(Ft,{className:"mt-3",label:"Update",type:"button",onClick:()=>w(),"aria-label":"Update"})})]}),o.jsxs(ts,{children:[o.jsx(wr,{header:"Text",children:o.jsx(ao,{activeIndex:0,children:l!=null&&l.length?l.map((S,T)=>o.jsx(io,{tabIndex:T,header:S==null?void 0:S.language,children:o.jsx(Vye,{language:S,stateRow:f,onHandleChange:m,...t})},T)):""})}),o.jsx(wr,{header:"Advance",children:o.jsx(qye,{stateRow:f,onHandleChangeAdvanceSettings:A})}),o.jsx(wr,{header:"Layout",children:o.jsxs("div",{className:"p-fluid",children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"showRowTitle",checked:f==null?void 0:f.showRowTitle,onChange:S=>A("showRowTitle",S==null?void 0:S.checked)}),o.jsx("label",{htmlFor:"showRowTitle",children:"Show Row Title?"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"showRowSubTitle",checked:f==null?void 0:f.showRowSubTitle,onChange:S=>A("showRowSubTitle",S==null?void 0:S.checked)}),o.jsx("label",{htmlFor:"showRowSubTitle",children:"Show Row Sub Title?"})]})]})})]})]})})},Uye={},$ye=t=>{var ne,q,ee,oe,pe,_e,Ne,ve,Ae,Be,Ee,$,ge;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,c=k.useRef(null),{removeRow:u,addRow:d,cloneRow:f,formBuilderFormLayout:h,userSelectedLanguage:g,handleDrop:v}=sn(),{userTaskSubmitFormData:m,taskRegisterData:A,updateTaskRegisterData:w,updateTaskProgressValue:x,addUserDataFormSectionRepeatableData:S,removeUserDataFormSectionRepeatableData:T,task_status:C,TASK_PUBLISHED:E}=Ar(),{isRenderView:_,isAdvanceView:M,isBuilderMode:O,renderType:F,isAdmin:P,emitSocketData:H,updateGlobalToast:N}=Ht(),[z,U]=k.useState(!1),[ce,X]=k.useState(!1),[{isDragging:R},ue]=ra({type:Ao,item:{type:Ao,uuid:e.uuid,children:e.children,path:n,data:e},collect:le=>({isDragging:le.isDragging()})}),Y=R?.25:1;ue(c);const ie=(le,se,he,Se,De,Me)=>o.jsx(Bye,{page:l,row:e,section:s,data:le,path:se,pageIndex:he,sectionIndex:Se,rowIndex:De,columnIndex:Me,isAdmin:P,emitSocketData:H},`column-${n}-${le.uuid}`),re=(le,se,he,Se)=>{var tt,it,ht,Ut;const De=le.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Me=`${le.className} justify-content-space-between`,ze=`${le.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-row-tool"}),o.jsxs("div",{className:Me,children:[o.jsxs("span",{ref:O===!0?c:null,children:[o.jsx("button",{className:le.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:le.togglerClassName,onClick:le.onTogglerClick,children:[o.jsx("span",{className:De}),o.jsx(Qt,{})]}),o.jsxs("span",{className:ze,children:["Row:"," ",((tt=e==null?void 0:e.heading)==null?void 0:tt[g==null?void 0:g.type])!==""?(it=e==null?void 0:e.heading)==null?void 0:it[g==null?void 0:g.type]:"Untitled"]})]}),O===!0&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-row-tool","data-pr-tooltip":"Add Row",children:o.jsxs("button",{className:le.togglerClassName,onClick:()=>{d(se,he),H()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((Ut=(ht=h[se])==null?void 0:ht.children[he])==null?void 0:Ut.children.length)>1&&o.jsxs("button",{className:le.togglerClassName,onClick:()=>{u(se,he,Se),H()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:le.togglerClassName,onClick:()=>{f(e,se,he,Se),H()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"setting-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{onClick:()=>U(!0),className:le.togglerClassName,children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})},[Z,K]=k.useState(-1);k.useEffect(()=>{if(m.length>0&&(e!=null&&e.uuid)&&Z===-1){const le=m.findIndex(se=>se.rowId===e.uuid);K(le)}},[m,e==null?void 0:e.uuid]);const W=()=>{var he,Se,De;const le=_t.cloneDeep(A);((Se=(he=m[Z])==null?void 0:he.repeatableFieldsData)==null?void 0:Se.length)>=(e==null?void 0:e.minimumEntries)?le[e==null?void 0:e.uuid]=(De=m[Z])==null?void 0:De.repeatableFields:delete le[e==null?void 0:e.uuid];const se=Object.keys(le).length;w(le),x(se)},me=(ne=e==null?void 0:e.repeatableFields)==null?void 0:ne.map(le=>{var se;return{fieldUuid:le==null?void 0:le.uuid,field:le==null?void 0:le.uuid,header:(se=le==null?void 0:le.label)==null?void 0:se.english}}),be=(le,se)=>o.jsx(o.Fragment,{children:o.jsx("div",{className:"post__content_repetable",dangerouslySetInnerHTML:{__html:le[se==null?void 0:se.field]}})}),Te=me==null?void 0:me.map(le=>o.jsx(xr,{field:le.field,header:le.header,body:se=>be(se,le)},le.field)),ye=()=>{var Se,De,Me;const le=[...m],se=[];let he=!0;e:for(const[,ze]of e.children.entries()){for(const[,tt]of ze.children.entries())if(console.log("field",tt),tt!=null&&tt.isPostField&&((Se=tt==null?void 0:tt.attributes)!=null&&Se.required)&&tt.isValid!==__){const it={fieldId:tt.uuid,rowIndex:a};console.log("inValidData",it),se.push(it),Gt.emit("OnInvalidFieldCatch",it),he=!1;break e}he=!0}console.log("repeatableRowIndex",Z),console.log("userFormSubmitData[repeatableRowIndex]?.repeatableFields",(De=le[Z])==null?void 0:De.repeatableFields),he&&(se==null?void 0:se.length)===0&&(alert("addToSectionRepeatableList"+(e==null?void 0:e.uuid)),S(e==null?void 0:e.uuid,(Me=le[Z])==null?void 0:Me.repeatableFields),Gt.emit("clearRepeatableFields",e==null?void 0:e.uuid),W(),N({showToast:!0,toastMessage:"Record Added",toastDetail:"",toastType:"success"}))},fe=le=>o.jsx(o.Fragment,{children:!P&&o.jsx(Ft,{text:!0,size:"small",type:"button",className:"p-button-danger ",onClick:()=>{T(e==null?void 0:e.uuid,le==null?void 0:le.rowIndex),setTimeout(()=>{W()},1e3)},icon:"pi pi-trash"})});return o.jsxs("div",{style:{...Uye,opacity:Y,marginTop:`${(q=e==null?void 0:e.margin)==null?void 0:q.top}px`,marginBottom:`${(ee=e==null?void 0:e.margin)==null?void 0:ee.bottom}px`,marginLeft:`${(oe=e==null?void 0:e.margin)==null?void 0:oe.left}px`,marginRight:`${(pe=e==null?void 0:e.margin)==null?void 0:pe.right}px`},className:_?"row container-row":"draggable row container-row",children:[z&&o.jsx(bg,{renderType:F,visibilty:z,setVisibility:U,row:e,pageIndex:r,sectionIndex:i,rowIndex:a,emitSocketData:H},"row_settings_"+r+i+a),O===!0?o.jsx(o.Fragment,{children:M===!0?o.jsx(ci,{header:"Row",toggleable:!0,headerTemplate:le=>re(le,r,i,a),children:o.jsxs("div",{className:"form-builder-columns",style:{overflowX:"auto"},children:[(_e=e==null?void 0:e.children)==null?void 0:_e.map((le,se)=>{const he=`${n}-${se}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:M,data:{path:he,childrenCount:e.children.length},onDrop:v,className:"horizontalDrag"}),ie(le,he,r,i,a,se)]},he)}),o.jsx(Fr,{isAdvanceView:M,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:v,className:"horizontalDrag",isLast:!0})]})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:M?"form-builder-columns":"",style:M?{overflowX:"auto"}:{},children:(Ne=e==null?void 0:e.children)==null?void 0:Ne.map((le,se)=>{const he=`${n}-${se}`;return o.jsx(k.Fragment,{children:ie(le,he,r,i,a,se)},he)})})})}):o.jsx(o.Fragment,{children:e!=null&&e.rowIsRepeatable?o.jsx(o.Fragment,{children:o.jsx(Os,{header:((Be=e==null?void 0:e.heading)==null?void 0:Be[g==null?void 0:g.type])||"Untitled",footer:()=>{var le;return o.jsx(o.Fragment,{children:(e==null?void 0:e.rowIsRepeatable)&&C!==E&&o.jsx(Ft,{size:"small",type:"button",outlined:!0,className:" mb-3",onClick:()=>{ye()},label:(le=e.addToListButtonLabel)==null?void 0:le[g==null?void 0:g.type]})})},visible:ce,style:{width:"50vw"},onHide:()=>{ce&&X(!1)},children:o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(Ee=e==null?void 0:e.heading)==null?void 0:Ee[g==null?void 0:g.type]}),o.jsx("span",{children:($=e==null?void 0:e.subHeadingText)==null?void 0:$[g==null?void 0:g.type]}),o.jsx("div",{className:"form-builder-columns p-3",style:{maxHeight:"500px",overflowY:"scroll"},children:e.children.map((le,se)=>{const he=`${n}-${se}`;return o.jsx(k.Fragment,{children:ie(le,he,r,i,a,se)},he)})})]})})}):o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(ve=e==null?void 0:e.heading)==null?void 0:ve[g==null?void 0:g.type]}),o.jsx("span",{children:(Ae=e==null?void 0:e.subHeadingText)==null?void 0:Ae[g==null?void 0:g.type]}),o.jsx("div",{className:"form-builder-columns",children:e.children.map((le,se)=>{const he=`${n}-${se}`;return o.jsx(k.Fragment,{children:ie(le,he,r,i,a,se)},he)})})]})}),!P&&(e==null?void 0:e.rowIsRepeatable)&&C!==E&&o.jsx("div",{className:"text-right mb-2",children:o.jsx(Ft,{outlined:!0,size:"small",type:"button",className:"",onClick:()=>X(!0),label:"Add Record"})}),(e==null?void 0:e.rowIsRepeatable)&&o.jsxs("div",{children:[o.jsxs(ro,{scrollable:!0,reorderableRows:!P,value:(m==null?void 0:m.length)>0?(ge=m[Z])==null?void 0:ge.repeatableFieldsData:[],children:[Te,C!==E&&o.jsx(xr,{frozen:!0,style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"left",overflow:"visible"},body:(le,se)=>fe(se)})]}),P&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{field:e})]})]})]})},jye=t=>{var i,a;const{language:e,onHandleChange:n,stateSection:r}=t;return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Section heading"}),o.jsx(wn,{value:(i=r.heading)==null?void 0:i[e==null?void 0:e.type],placeholder:"Enter section heading",onChange:s=>n("heading",e,s.target.value)})]}),o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Section description"}),o.jsx(so,{value:(a=r.subHeadingText)==null?void 0:a[e==null?void 0:e.type],placeholder:"Enter section description",onChange:s=>n("subHeadingText",e,s.target.value)})]})]})},Ih=t=>{const{visibilty:e,setVisibility:n,section:r,pageIndex:i,sectionIndex:a}=t,[s,l]=k.useState(r),{formBuilderSchemaLanguages:c,sectionSettingUpdate:u,userSelectedLanguage:d,formBuilderPublishedStatus:f}=sn(),{emitSocketData:h}=Ht(),{updateGlobalToast:g}=Ht(),v=(w,x,S)=>{l(T=>Object.assign({},T,{[w]:Object.assign({},T[w],{[x==null?void 0:x.type]:S})}))},m=(w,x)=>{l(S=>({...S,[w]:x}))},A=()=>{const w={...s,children:r==null?void 0:r.children};u(i,a,w),h(),g({showToast:!0,toastMessage:"Updated",toastDetail:"Section updated",toastType:"success"})};return o.jsx(o.Fragment,{children:o.jsxs(To,{visible:e,position:"left",className:"p-sidebar-lg",onHide:()=>n(!1),children:[o.jsxs("div",{className:"flex justify-content-between flex-wrap card-container ",children:[o.jsxs("div",{className:"flex align-items-center justify-content-center ",children:[" ",o.jsxs("h5",{children:["Section settings - ",r==null?void 0:r.heading[d==null?void 0:d.type]," "]})," "]}),!f&&o.jsx("div",{className:"flex align-items-center justify-content-center",children:o.jsx(Ft,{className:"mt-3",label:"Update",type:"button",onClick:()=>A(),"aria-label":"Update"})})]}),o.jsxs(ts,{children:[o.jsx(wr,{header:"Text",children:o.jsx(ao,{activeIndex:0,children:c!=null&&c.length?c.map((w,x)=>o.jsx(io,{tabIndex:x,header:w==null?void 0:w.language,children:o.jsx(jye,{language:w,stateSection:s,onHandleChange:v,...t})},x)):""})}),o.jsx(wr,{header:"Layout",children:o.jsxs("div",{className:"p-fluid",children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"showSectionTitle",checked:s==null?void 0:s.showSectionHeader,onChange:w=>m("showSectionHeader",w==null?void 0:w.checked)}),o.jsx("label",{htmlFor:"showSectionTitle",children:"Show section header?"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"showSectionTitle",checked:s==null?void 0:s.showSectionTitle,onChange:w=>m("showSectionTitle",w==null?void 0:w.checked)}),o.jsx("label",{htmlFor:"showSectionTitle",children:"Show section title?"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"showSectionSubTitle",checked:s==null?void 0:s.showSectionSubTitle,onChange:w=>m("showSectionSubTitle",w==null?void 0:w.checked)}),o.jsx("label",{htmlFor:"showSectionSubTitle",children:"Show section sub title?"})]})]})})]})]})})},_h=t=>{const{saveBuilderElementModalData:e,saveElementModal:n,setSaveElementModal:r}=t,{saveComponent:i}=Ht(),a=E3({initialValues:{builder_element_title:"",builder_element_description:""},validate:c=>{const u={};return c.builder_element_title||(u.builder_element_title="Title is required."),c.builder_element_description||(u.builder_element_description="Description is required."),u},onSubmit:c=>{const u={...c,reusable_template_schema:e==null?void 0:e.reusable_template_schema};i(u,()=>{a.resetForm(),r(!1)})}}),s=c=>!!(a.touched[c]&&a.errors[c]),l=()=>o.jsx("div",{children:o.jsx(Ft,{text:!0,className:"p-button-success",label:"Save",icon:"pi pi-file",onClick:()=>{a.handleSubmit()},autoFocus:!0})});return o.jsxs(Os,{header:"Save Custom Element",visible:n,style:{width:"20vw"},footer:l(),onHide:()=>r(!1),children:[o.jsxs("div",{className:"p-field field",children:[o.jsxs("label",{htmlFor:"username",children:[o.jsx("span",{className:"must-required",children:"*"})," Builder element title"]}),o.jsx(wn,{id:"builder_element_title",name:"builder_element_title",value:a.values.builder_element_title,onChange:a.handleChange,className:`${u3({invalid:s("builder_element_title")})} w-full`})]}),o.jsxs("div",{className:"p-field field",children:[o.jsxs("label",{htmlFor:"username",children:[o.jsx("span",{className:"must-required",children:"*"})," Builder element description"]}),o.jsx(so,{id:"builder_element_description",name:"builder_element_description",value:a.values.builder_element_description,onChange:a.handleChange,className:`${u3({invalid:s("builder_element_title")})} w-full`})]})]})},zye=t=>{var ce,X,R,ue,Y,ie,re,Z;const{data:e,path:n,pageIndex:r,sectionIndex:i,section:a,page:s}=t,{removeSection:l,addSection:c,cloneSection:u,formBuilderFormLayout:d,userSelectedLanguage:f,handleDrop:h}=sn(),{isAdvanceView:g,renderType:v,isBuilderMode:m,emitSocketData:A}=Ht(),[w,x]=k.useState(!1),[S,T]=k.useState(!1),[C,E]=k.useState(null),[_,M]=k.useState(!1),O=k.useRef(null),F=(K,W)=>{E(me=>({...me,[K]:W}))},[{isDragging:P},H]=ra({type:na,item:{type:na,uuid:e.uuid,children:e.children,path:n},collect:K=>({isDragging:K.isDragging()})}),N=P&&m||e!=null&&e.isHidden?.25:1;H(O);const z=(K,W,me,be,Te)=>o.jsx($ye,{page:s,section:a,data:K,path:W,pageIndex:me,sectionIndex:be,rowIndex:Te},`row-${n}-${K.uuid}`),U=(K,W,me)=>{var fe,ne;const be=K.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Te=`${K.className} justify-content-space-between panel-tab-section`,ye=`${K.titleClassName} pl-1 text-primary`;return o.jsxs("div",{className:Te,children:[o.jsxs("span",{ref:m===!0?O:null,children:[o.jsx("button",{className:K.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:K.togglerClassName,onClick:K.onTogglerClick,children:[o.jsx("span",{className:be}),o.jsx(Qt,{})]}),o.jsxs("span",{className:ye,children:[me+1," ",(fe=e==null?void 0:e.heading)==null?void 0:fe[f==null?void 0:f.type]]})]}),m===!0&&o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".del-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-section-tool"}),o.jsx(cn,{target:".save-tool"}),o.jsx(cn,{target:".settings-tool"}),o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-section-tool","data-pr-tooltip":"Add Section",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{c(W),A()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((ne=d[W])==null?void 0:ne.children.length)>1&&o.jsx("span",{className:"del-tool","data-pr-tooltip":"Delete",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{l(W,me),A()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"save-tool","data-pr-tooltip":"Save",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{F("reusable_template_schema",e),T(!0)},children:[o.jsx("span",{className:"pi pi-save"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{u(e,W,me),A()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"settings-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>x(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsxs("div",{style:{opacity:N,marginBottom:20},className:m&&g?"draggable row":"",children:[m===!0&&o.jsx(_h,{saveBuilderElementModalData:C,setSaveBuilderElementModalData:E,saveElementModal:S,setSaveElementModal:T}),w===!0&&m===!0&&o.jsx(Ih,{renderType:v,visibilty:w,setVisibility:x,section:e,pageIndex:r,sectionIndex:i,emitSocketData:A},"section_settings_"+r+i),m===!0?o.jsx(o.Fragment,{children:g===!0?o.jsxs(ci,{header:(ce=e==null?void 0:e.heading)==null?void 0:ce.english,toggleable:!0,headerTemplate:K=>U(K,r,i),onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),children:[((X=e==null?void 0:e.subHeadingText)==null?void 0:X[f==null?void 0:f.type])&&o.jsx("p",{children:(R=e==null?void 0:e.subHeadingText)==null?void 0:R[f==null?void 0:f.type]}),o.jsxs("div",{children:[e.children.map((K,W)=>{const me=`${n}-${W}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:g,data:{path:me,childrenCount:e.children.length},onDrop:h}),z(K,me,r,i,W)]},me)}),o.jsx(Fr,{isAdvanceView:g,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:h,isLast:!0})]}),_&&o.jsxs("div",{className:"m-3 flex justify-content-end",children:[o.jsx("span",{className:"add-section-tool ","data-pr-tooltip":"Add Section",children:o.jsx("i",{className:"pi pi-plus",onClick:()=>{c(r),A()},children:o.jsx(Qt,{})})}),((ue=d[r])==null?void 0:ue.children.length)>1&&o.jsx("span",{className:"del-tool ml-2",children:o.jsx("i",{className:"pi pi-trash","data-pr-tooltip":"Delete",onClick:()=>{l(r,i),A()},children:o.jsx(Qt,{})})})]})]}):o.jsxs(o.Fragment,{children:[((Y=e==null?void 0:e.subHeadingText)==null?void 0:Y[f==null?void 0:f.type])&&o.jsx("p",{children:(ie=e==null?void 0:e.subHeadingText)==null?void 0:ie[f==null?void 0:f.type]}),o.jsx("div",{children:e.children.map((K,W)=>{const me=`${n}-${W}`;return o.jsx(k.Fragment,{children:z(K,me,r,i,W)},me)})})]})}):o.jsx(o.Fragment,{children:o.jsxs("div",{className:"",children:[(e==null?void 0:e.showSectionHeader)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:(re=e==null?void 0:e.heading)==null?void 0:re[f==null?void 0:f.type]}),o.jsx("p",{children:(Z=e==null?void 0:e.subHeadingText)==null?void 0:Z[f==null?void 0:f.type]}),o.jsx("hr",{})]}),e.children.map((K,W)=>{const me=`${n}-${W}`;return o.jsx(k.Fragment,{children:o.jsx("div",{className:"",children:z(K,me,r,i,W)},me)},me)})]})})]})},Hye={position:"relative"},Yye=t=>{var S,T,C;const{data:e,data:n,path:r,pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,section:c,row:u,page:d}=t,f=k.useRef(null),{handleDrop:h}=sn(),{isAdvanceView:g,isBuilderMode:v}=Ht(),[{isDragging:m},A]=ra({type:As,item:{type:As,uuid:e==null?void 0:e.uuid,children:e.children,path:r},collect:E=>({isDragging:E.isDragging()})}),w=m&&v?.25:1;A(f);const x=(E,_,M,O,F,P,H)=>o.jsx(Lc,{page:d,section:c,row:u,column:n,field:E,pageIndex:M,sectionIndex:O,rowIndex:F,columnIndex:P,fieldIndex:H,type:"field",data:E,path:_},`component-${r}-${E==null?void 0:E.uuid}`);return o.jsx("div",{style:g?{...Hye,opacity:w}:{},className:v&&"draggable column container-column",children:v===!0?o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((S=e==null?void 0:e.children)==null?void 0:S.length)>0?(T=e==null?void 0:e.children)==null?void 0:T.map((E,_)=>{const M=`${r}-${_}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:g,fieldDropArea:!0,data:{path:M,childrenCount:e.children.length,droppedField:e},onDrop:h}),x(E,M,i,a,s,l,_)]},M)}):o.jsx(o.Fragment,{children:o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]})}),v&&o.jsx(Fr,{isAdvanceView:g,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${r}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:h,isLast:!0})]})}):o.jsx(o.Fragment,{children:(C=e==null?void 0:e.children)==null?void 0:C.map((E,_)=>{const M=`${r}-${_}`;return o.jsx(k.Fragment,{children:x(E,M,i,a,s,l,_)},M)})})})},Kye=t=>{var l;const{isAdvanceView:e}=Ht(),{data:n,page:r,path:i,pageIndex:a}=t,s=(c,u,d,f,h,g,v,m)=>o.jsx(Yye,{page:r,row:m,section:v,data:c,path:`${d}-${f}-${h}-${g}`,pageIndex:d,sectionIndex:f,rowIndex:h,columnIndex:g},`column-${i}-${c.uuid}`);return o.jsx(o.Fragment,{children:(l=n==null?void 0:n.children)==null?void 0:l.map((c,u)=>{var d;return(d=c==null?void 0:c.children)==null?void 0:d.map((f,h)=>{var g;return o.jsx("div",{className:e?"columns":"",style:e?{overflowX:"auto"}:{},children:(g=f==null?void 0:f.children)==null?void 0:g.map((v,m)=>{const A=`${i}-${u}-${h}-${m}`;return o.jsx(k.Fragment,{children:s(v,A,a,u,h,m,c,f)},A)})},`basic_view_section_${i}-${u}-${h}`)})})})},Xye=t=>{const{data:e,path:n,pageIndex:r}=t,{isAdvanceView:i,isBuilderMode:a}=Ht(),{formBuilderFormSchema:s,handleDrop:l}=sn(),c=k.useRef(null),[u,d]=ra({type:na,item:{type:na,uuid:e.uuid,children:e.children,path:n},collect:h=>({isDragging:h.isDragging()})});d(c);const f=(h,g,v,m)=>o.jsx(zye,{data:h,page:e,section:h,path:g,pageIndex:v,sectionIndex:m},`section_${v}_${m}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${a&&"draggable p-3 pb-4"}`,"data-image-src":e==null?void 0:e.bgImage,"data-bg-color":`#${e==null?void 0:e.bgColor}`,children:a===!0?o.jsx(o.Fragment,{children:i?o.jsxs(o.Fragment,{children:[e.children.map((h,g)=>{const v=`${n}-${g}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:i,data:{path:v,childrenCount:e.children.length},onDrop:l}),f(h,v,r,g)]},`section-${g}-${h.uuid}`)}),o.jsx(Fr,{isAdvanceView:i,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:l,isLast:!0})]}):o.jsx(Kye,{page:e,path:n,data:e,pageIndex:r},`basic_view-${r}-${e.uuid}`)}):o.jsx(o.Fragment,{children:o.jsx("div",{className:"p-1",children:e.children.map((h,g)=>{const v=`${n}-${g}`;return o.jsx(k.Fragment,{children:s!=null&&s.showConditionalFields?o.jsx("div",{children:f(h,v,r,g)}):((h==null?void 0:h.isHidden)===!1||a)&&f(h,v,r,g)},`section-${g}-${h.uuid}`)})})})})},Rye=()=>{const{isAdvanceView:t,isBuilderMode:e,isPreview:n}=Ht(),[r,i]=k.useState(!1),[a,s]=k.useState(!1),[l,c]=k.useState(0),{formBuilderFormLayout:u}=sn(),{emitSocketData:d}=Ht(),f=["Mobile","Desktop"],[h,g]=k.useState(f[1]),v=(m,A,w)=>o.jsx(Xye,{data:m,path:A,pageIndex:w},`page-${m.uuid}`);return o.jsxs("div",{children:[n===!0&&o.jsx("div",{className:"flex justify-content-center align-items-center",children:o.jsx(tf,{value:h,onChange:m=>g(m.value),options:f})}),(u==null?void 0:u.length)===S9&&e===!1?o.jsx(o.Fragment,{children:o.jsx("div",{className:"mt-3 flex card justify-content-center",children:(u==null?void 0:u.length)&&u.map((m,A)=>{const w=`${A}`;return o.jsx("div",{className:"flex flex-column justify-content-start",style:{width:h==="Mobile"?375:800},children:o.jsx("div",{className:"w-full",children:v(m,w,A)})},`preview-${m.uuid}-${A}`)})})}):o.jsx(o.Fragment,{children:t===!0&&e===!0?o.jsx(ts,{scrollable:!0,activeIndex:l,onTabChange:m=>c(m.index),children:(u==null?void 0:u.length)&&u.map((m,A)=>{const w=`${A}`;return o.jsxs(wr,{disabled:!((m==null?void 0:m.isHidden)===!1||e),header:"Page",headerTemplate:x=>o.jsx(F8,{options:x,pageIndex:A,setTabSidebarSetting:i,setPageActiveIndex:c,page:m,pages:u}),children:[e===!0&&o.jsx(mf,{reusableBuilderElementModalVisibility:a,setReusableBuilderElementModalVisibility:s,pageIndex:A}),e===!0&&o.jsx(j0,{setVisibility:i,visibilty:r,pageIndex:A,page:m,emitSocketData:d}),v(m,w,A)]},`advanced_${m.uuid}-${A}`)})}):o.jsx(o.Fragment,{children:(u==null?void 0:u.length)>0&&(u==null?void 0:u.map((m,A)=>{const w=`${A}`;return o.jsxs(k.Fragment,{children:[e===!0&&o.jsx(mf,{reusableBuilderElementModalVisibility:a,setReusableBuilderElementModalVisibility:s,pageIndex:A}),e===!0&&o.jsx(j0,{setVisibility:i,visibilty:r,pageIndex:A,page:m,emitSocketData:d}),v(m,w,A)]},`basic_${m.uuid}-${A}`)}))})})]})},Gye={position:"relative"},Wye=t=>{var O,F,P,H,N;const{isAdvanceView:e,isBuilderMode:n,emitSocketData:r,isRenderView:i}=Ht(),{data:a,path:s,pageIndex:l,sectionIndex:c,rowIndex:u,columnIndex:d,section:f,row:h,page:g}=t,v=k.useRef(null),{removeColumn:m,addColumn:A,cloneColumn:w,formBuilderFormLayout:x,handleDrop:S}=sn(),[{isDragging:T},C]=ra({type:As,item:{type:As,uuid:a==null?void 0:a.uuid,children:a.children,path:s},collect:z=>({isDragging:z.isDragging()})}),E=T&&!i?.25:1;C(v);const _=(z,U,ce,X,R,ue,Y)=>o.jsx(Lc,{page:g,column:a,type:"field",row:h,section:f,field:z,data:z,path:U,pageIndex:ce,sectionIndex:X,rowIndex:R,columnIndex:ue,fieldIndex:Y},`component-${s}-${z==null?void 0:z.uuid}`),M=(z,U,ce,X,R)=>{var re,Z,K,W;const ue=z.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Y=`${z.className} justify-content-space-between`,ie=`${z.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".add-column-tool"}),o.jsxs("div",{className:Y,children:[o.jsxs("span",{ref:n===!0?v:null,children:[o.jsx("button",{className:z.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:z.togglerClassName,onClick:z.onTogglerClick,children:[o.jsx("span",{className:ue}),o.jsx(Qt,{})]}),o.jsx("span",{className:ie,children:"Column"})]}),n===!0&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-column-tool","data-pr-tooltip":"Add Column",children:o.jsxs("button",{className:z.togglerClassName,onClick:()=>{A(U,ce,X),r()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((W=(K=(Z=(re=x[U])==null?void 0:re.children[ce])==null?void 0:Z.children[X])==null?void 0:K.children)==null?void 0:W.length)>1&&o.jsxs("button",{className:z.togglerClassName,onClick:()=>{m(U,ce,X,R),r()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:z.togglerClassName,onClick:()=>{w(a,U,ce,X,R),r()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsx("div",{style:e?{...Gye,opacity:E}:{},className:i?"form-builder-column container-column":"draggable form-builder-column container-column",children:n===!0?o.jsx(o.Fragment,{children:e===!0?o.jsxs(ci,{className:"builder-row-column",header:"Column",toggleable:!0,headerTemplate:z=>M(z,l,c,u,d),children:[((O=a==null?void 0:a.children)==null?void 0:O.length)>0?(F=a==null?void 0:a.children)==null?void 0:F.map((z,U)=>{const ce=`${s}-${U}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:ce,childrenCount:a.children.length,droppedField:a},onDrop:S}),_(z,ce,l,c,u,d,U)]},ce)}):o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]}),o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:S,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((P=a==null?void 0:a.children)==null?void 0:P.length)>0?(H=a==null?void 0:a.children)==null?void 0:H.map((z,U)=>{const ce=`${s}-${U}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:ce,childrenCount:a.children.length,droppedField:a},onDrop:S}),_(z,ce,l,c,u,d,U)]},ce)}):o.jsx(o.Fragment,{children:o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]})}),o.jsx(Fr,{isAdvanceView:e,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:S,isLast:!0})]})})}):o.jsx(o.Fragment,{children:(N=a==null?void 0:a.children)==null?void 0:N.map((z,U)=>{const ce=`${s}-${U}`;return o.jsx(k.Fragment,{children:_(z,ce,l,c,u,d,U)},ce)})})})},Qye={},Jye=t=>{var me,be,Te,ye,fe,ne,q,ee,oe,pe,_e,Ne,ve,Ae,Be,Ee;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,{isRenderView:c,isAdvanceView:u,isAdmin:d,isBuilderMode:f,emitSocketData:h,renderType:g}=Ht(),v=k.useRef(null),{removeRow:m,addRow:A,cloneRow:w,formBuilderFormLayout:x,userSelectedLanguage:S,handleDrop:T}=sn(),{userTaskSubmitFormData:C,taskRegisterData:E,updateTaskRegisterData:_,updateTaskProgressValue:M,addUserDataFormSectionRepeatableData:O,removeUserDataFormSectionRepeatableData:F,task_status:P,TASK_PUBLISHED:H}=Ar(),[N,z]=k.useState(!1),[{isDragging:U},ce]=ra({type:Ao,item:{type:Ao,uuid:e.uuid,children:e.children,path:n,data:e},collect:$=>({isDragging:$.isDragging()})}),X=U?.25:1;ce(v);const R=($,ge,le,se,he,Se)=>o.jsx(Wye,{page:l,row:e,section:s,data:$,path:ge,pageIndex:le,sectionIndex:se,rowIndex:he,columnIndex:Se,isAdmin:d,emitSocketData:h},`column-${n}-${$.uuid}`),ue=($,ge,le,se)=>{var Me,ze,tt,it;const he=$.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Se=`${$.className} justify-content-space-between`,De=`${$.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-row-tool"}),o.jsxs("div",{className:Se,children:[o.jsxs("span",{ref:f===!0?v:null,children:[o.jsx("button",{className:$.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:$.togglerClassName,onClick:$.onTogglerClick,children:[o.jsx("span",{className:he}),o.jsx(Qt,{})]}),o.jsxs("span",{className:De,children:["Row:"," ",((Me=e==null?void 0:e.heading)==null?void 0:Me[S==null?void 0:S.type])!==""?(ze=e==null?void 0:e.heading)==null?void 0:ze[S==null?void 0:S.type]:"Untitled"]})]}),f===!0&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-row-tool","data-pr-tooltip":"Add Row",children:o.jsxs("button",{className:$.togglerClassName,onClick:()=>{A(ge,le),h()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((it=(tt=x[ge])==null?void 0:tt.children[le])==null?void 0:it.children.length)>1&&o.jsxs("button",{className:$.togglerClassName,onClick:()=>{m(ge,le,se),h()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:$.togglerClassName,onClick:()=>{w(e,ge,le,se),h()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"setting-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{onClick:()=>z(!0),className:$.togglerClassName,children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})},Y=_t.findIndex(C,function($){return($==null?void 0:$.rowId)===(e==null?void 0:e.uuid)}),ie=()=>{var le,se,he;const $=_t.cloneDeep(E);((se=(le=C[Y])==null?void 0:le.repeatableFieldsData)==null?void 0:se.length)>=(e==null?void 0:e.minimumEntries)?$[e==null?void 0:e.uuid]=(he=C[Y])==null?void 0:he.repeatableFields:delete $[e==null?void 0:e.uuid];const ge=Object.keys($).length;_($),M(ge)},re=(me=e==null?void 0:e.repeatableFields)==null?void 0:me.map($=>{var ge;return{fieldUuid:$==null?void 0:$.uuid,field:$==null?void 0:$.uuid,header:(ge=$==null?void 0:$.label)==null?void 0:ge.english}}),Z=re==null?void 0:re.map($=>o.jsx(xr,{field:$.field,header:$.header,body:ge=>o.jsx(o.Fragment,{children:o.jsx("div",{className:"post__content_repetable",dangerouslySetInnerHTML:{__html:ge[$==null?void 0:$.field]}})})},$.field)),K=()=>{var se;const $=[...C],ge=[];let le=!0;e:for(const[,he]of e.children.entries()){for(const[,Se]of he.children.entries())if(Se!=null&&Se.isPostField&&Se.isValid!==1){const De={fieldId:Se.uuid,rowIndex:a};ge.push(De),Gt.emit("OnInvalidFieldCatch",De),le=!1;break e}le=!0}le&&(ge==null?void 0:ge.length)===0&&(O(e==null?void 0:e.uuid,(se=$[Y])==null?void 0:se.repeatableFields),Gt.emit("clearRepeatableFields",e==null?void 0:e.uuid),ie())},W=$=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,size:"small",type:"button",className:"p-button-danger ",onClick:()=>{F(e==null?void 0:e.uuid,$==null?void 0:$.rowIndex),setTimeout(()=>{ie()},1e3)},icon:"pi pi-trash"})});return o.jsxs("div",{style:{...Qye,opacity:X,marginTop:`${(be=e==null?void 0:e.margin)==null?void 0:be.top}px`,marginBottom:`${(Te=e==null?void 0:e.margin)==null?void 0:Te.bottom}px`,marginLeft:`${(ye=e==null?void 0:e.margin)==null?void 0:ye.left}px`,marginRight:`${(fe=e==null?void 0:e.margin)==null?void 0:fe.right}px`},className:c?"row container-row":"draggable row container-row",children:[N&&o.jsx(bg,{renderType:g,visibilty:N,setVisibility:z,row:e,pageIndex:r,sectionIndex:i,rowIndex:a,emitSocketData:h},"row_settings_"+r+i+a),g===im&&o.jsxs("div",{className:"form-builder-columns",children:[e.children.map(($,ge)=>{const le=`${n}-${ge}`;return o.jsxs(k.Fragment,{children:[g===zd&&o.jsx(Fr,{isAdvanceView:u,data:{path:le,childrenCount:e.children.length},onDrop:T,className:"horizontalDrag"}),R($,le,r,i,a,ge)]},le)}),o.jsx(Fr,{isAdvanceView:u,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:T,className:"horizontalDrag",isLast:!0})]}),(g===k0||g===F0||g===rm||g===w9||g===Gh)&&(f===!0?o.jsx(o.Fragment,{children:u===!0?o.jsx(ci,{header:"Row",toggleable:!0,headerTemplate:$=>ue($,r,i,a),children:o.jsxs("div",{className:"form-builder-columns",style:{overflowX:"auto"},children:[(ne=e==null?void 0:e.children)==null?void 0:ne.map(($,ge)=>{const le=`${n}-${ge}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:u,data:{path:le,childrenCount:e.children.length},onDrop:T,className:"horizontalDrag"}),R($,le,r,i,a,ge)]},le)}),o.jsx(Fr,{isAdvanceView:u,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:T,className:"horizontalDrag",isLast:!0})]})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:u?"form-builder-columns":"",style:u?{overflowX:"auto"}:{},children:(q=e==null?void 0:e.children)==null?void 0:q.map(($,ge)=>{const le=`${n}-${ge}`;return o.jsx(k.Fragment,{children:R($,le,r,i,a,ge)},le)})})})}):o.jsx(o.Fragment,{children:!(e!=null&&e.rowIsRepeatable&&P===H)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(ee=e==null?void 0:e.heading)==null?void 0:ee[S==null?void 0:S.type]}),o.jsx("span",{children:(oe=e==null?void 0:e.subHeadingText)==null?void 0:oe[S==null?void 0:S.type]}),o.jsx("div",{className:"form-builder-columns",children:e.children.map(($,ge)=>{const le=`${n}-${ge}`;return o.jsx(k.Fragment,{children:R($,le,r,i,a,ge)},le)})})]})})),g===H1&&(f===!0?o.jsxs("div",{children:[o.jsx("span",{className:"row-setting-block-pdf-editor",children:o.jsxs("div",{className:"pdf-setting-container",children:[o.jsxs("button",{onClick:()=>{A(r,i),h()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]}),((_e=(pe=x[r])==null?void 0:pe.children[i])==null?void 0:_e.children.length)>1&&o.jsxs("button",{onClick:()=>{m(r,i,a),h()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsxs("button",{onClick:()=>{w(e,r,i,a),h()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]}),o.jsxs("button",{onClick:()=>z(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})]})}),o.jsx("div",{className:"form-builder-columns",children:(Ne=e==null?void 0:e.children)==null?void 0:Ne.map(($,ge)=>{const le=`${n}-${ge}`;return o.jsx(k.Fragment,{children:R($,le,r,i,a,ge)},le)})})]}):o.jsx(o.Fragment,{children:!(e!=null&&e.rowIsRepeatable&&P===H)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(ve=e==null?void 0:e.heading)==null?void 0:ve[S==null?void 0:S.type]}),o.jsx("span",{children:(Ae=e==null?void 0:e.subHeadingText)==null?void 0:Ae[S==null?void 0:S.type]}),o.jsx("div",{className:"form-builder-columns",children:e.children.map(($,ge)=>{const le=`${n}-${ge}`;return o.jsx(k.Fragment,{children:R($,le,r,i,a,ge)},le)})})]})})),g===zd&&o.jsx("div",{className:"form-builder-columns",children:e.children.map(($,ge)=>{const le=`${n}-${ge}`;return o.jsx(k.Fragment,{children:R($,le,r,i,a,ge)},le)})}),(e==null?void 0:e.rowIsRepeatable)&&P!==H&&o.jsx(Ft,{text:!0,size:"small",type:"button",className:"p-button-success mb-3",onClick:()=>K(),label:(Be=e.addToListButtonLabel)==null?void 0:Be[S==null?void 0:S.type]}),(e==null?void 0:e.rowIsRepeatable)&&o.jsxs("div",{className:"card",children:[o.jsxs(ro,{value:(C==null?void 0:C.length)>0?(Ee=C[Y])==null?void 0:Ee.repeatableFieldsData:[],children:[Z,P!==H&&o.jsx(xr,{style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"left",overflow:"visible"},body:$=>W($)})]}),d&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{field:e})]})]})]})},Zye=t=>{var ce,X,R,ue,Y,ie,re,Z;const{isAdvanceView:e,isBuilderMode:n,renderType:r,emitSocketData:i}=Ht(),{handleDrop:a}=sn(),{data:s,path:l,pageIndex:c,sectionIndex:u,section:d,page:f}=t,{removeSection:h,addSection:g,cloneSection:v,formBuilderFormLayout:m,userSelectedLanguage:A}=sn(),[w,x]=k.useState(!1),[S,T]=k.useState(!1),[C,E]=k.useState({reusable_template_schema:""}),[_,M]=k.useState(!1),O=k.useRef(null),F=(K,W)=>{E(me=>({...me,[K]:W}))},[{isDragging:P},H]=ra({type:na,item:{type:na,uuid:s.uuid,children:s.children,path:l},collect:K=>({isDragging:K.isDragging()})}),N=P?.25:1;H(O);const z=(K,W,me,be,Te)=>o.jsx(Jye,{page:f,section:d,data:K,path:W,pageIndex:me,sectionIndex:be,rowIndex:Te},`row-${l}-${K.uuid}`),U=(K,W,me)=>{var fe,ne;const be=K.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Te=`${K.className} justify-content-space-between panel-tab-section`,ye=`${K.titleClassName} pl-1 text-primary`;return o.jsxs("div",{className:Te,children:[o.jsxs("span",{ref:n===!0?O:null,children:[o.jsx("button",{className:K.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:K.togglerClassName,onClick:K.onTogglerClick,children:[o.jsx("span",{className:be}),o.jsx(Qt,{})]}),o.jsxs("span",{className:ye,children:[me+1," ",(fe=s==null?void 0:s.heading)==null?void 0:fe[A==null?void 0:A.type]]})]}),n===!0&&o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".del-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-section-tool"}),o.jsx(cn,{target:".save-tool"}),o.jsx(cn,{target:".settings-tool"}),o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-section-tool","data-pr-tooltip":"Add Section",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{g(W),i()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((ne=m[W])==null?void 0:ne.children.length)>1&&o.jsx("span",{className:"del-tool","data-pr-tooltip":"Delete",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{h(W,me),i()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"save-tool","data-pr-tooltip":"Save",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{F("reusable_template_schema",s),T(!0)},children:[o.jsx("span",{className:"pi pi-save"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{v(s,W,me),i()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"settings-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>x(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsxs("div",{style:{opacity:N,marginBottom:20},className:e?"draggable row":"",children:[n===!0&&o.jsx(_h,{saveBuilderElementModalData:C,setSaveBuilderElementModalData:E,saveElementModal:S,setSaveElementModal:T}),w===!0&&n===!0&&o.jsx(Ih,{renderType:r,visibilty:w,setVisibility:x,section:s,pageIndex:c,sectionIndex:u,emitSocketData:i},"section_settings_"+c+u),n===!0?o.jsx(o.Fragment,{children:e===!0?o.jsxs(ci,{header:(ce=s==null?void 0:s.heading)==null?void 0:ce.english,toggleable:!0,headerTemplate:K=>U(K,c,u),onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),children:[((X=s==null?void 0:s.subHeadingText)==null?void 0:X[A==null?void 0:A.type])&&o.jsx("p",{children:(R=s==null?void 0:s.subHeadingText)==null?void 0:R[A==null?void 0:A.type]}),o.jsxs("div",{children:[s.children.map((K,W)=>{const me=`${l}-${W}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,data:{path:me,childrenCount:s.children.length},onDrop:a}),z(K,me,c,u,W)]},me)}),o.jsx(Fr,{isAdvanceView:e,data:{path:`${l}-${s.children.length}`,childrenCount:s.children.length,droppedField:s},onDrop:a,isLast:!0})]}),_&&o.jsxs("div",{className:"m-3 flex justify-content-end",children:[o.jsx("span",{className:"add-section-tool ","data-pr-tooltip":"Add Section",children:o.jsx("i",{className:"pi pi-plus",onClick:()=>{g(c),i()},children:o.jsx(Qt,{})})}),((ue=m[c])==null?void 0:ue.children.length)>1&&o.jsx("span",{className:"del-tool ml-2",children:o.jsx("i",{className:"pi pi-trash","data-pr-tooltip":"Delete",onClick:()=>{h(c,u),i()},children:o.jsx(Qt,{})})})]})]}):o.jsxs(o.Fragment,{children:[((Y=s==null?void 0:s.subHeadingText)==null?void 0:Y[A==null?void 0:A.type])&&o.jsx("p",{children:(ie=s==null?void 0:s.subHeadingText)==null?void 0:ie[A==null?void 0:A.type]}),o.jsx("div",{children:s.children.map((K,W)=>{const me=`${l}-${W}`;return o.jsx(k.Fragment,{children:z(K,me,c,u,W)},me)})})]})}):o.jsx(o.Fragment,{children:o.jsxs("div",{className:"",children:[(s==null?void 0:s.showSectionHeader)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:(re=s==null?void 0:s.heading)==null?void 0:re[A==null?void 0:A.type]}),o.jsx("p",{children:(Z=s==null?void 0:s.subHeadingText)==null?void 0:Z[A==null?void 0:A.type]}),o.jsx("hr",{})]}),s.children.map((K,W)=>{const me=`${l}-${W}`;return o.jsx(k.Fragment,{children:o.jsx("div",{className:"",children:z(K,me,c,u,W)},me)},me)})]})})]})},eAe=t=>{var s;const{data:e,currentPath:n,pageIndex:r,page:i}=t,a=k.useRef(null);return o.jsx(o.Fragment,{children:o.jsxs(DA,{ref:a,modules:[xB,Q3e],spaceBetween:50,slidesPerView:1,navigation:{prevEl:".prev",nextEl:".next"},pagination:{clickable:!1},scrollbar:{el:".swiper-scrollbar",draggable:!1},onSwiper:l=>console.log(l),onSlideChange:()=>console.log("slide change"),children:[(s=e==null?void 0:e.children)==null?void 0:s.map((l,c)=>{var u;return(u=l==null?void 0:l.children)==null?void 0:u.map((d,f)=>{var h;return(h=d==null?void 0:d.children)==null?void 0:h.map((g,v)=>{var m;return(m=g==null?void 0:g.children)==null?void 0:m.map((A,w)=>{const x=`${n}-${c}-${f}-${v}-${w}`;return o.jsx(NA,{children:o.jsx("div",{className:"",children:o.jsx(Lc,{page:i,column:g,type:"field",row:d,section:l,field:A,data:A,path:x,pageIndex:r,sectionIndex:c,rowIndex:f,columnIndex:v,fieldIndex:w},`component-${x}-${A==null?void 0:A.uuid}`)})},`swiper_slide_${x}`)})})})}),o.jsxs("div",{className:"flex justify-content-center",children:[o.jsx(Ft,{className:"mr-2 p-button-info prev",size:"large",label:"Previous",icon:"pi pi-arrow-left",onClick:()=>{}}),o.jsx(Ft,{size:"large",className:"p-button-info next",icon:"pi pi-arrow-right",label:"Next"})]})]})})},tAe=t=>{const{isAdvanceView:e,isBuilderMode:n}=Ht(),{handleDrop:r}=sn(),{data:i,path:a,pageIndex:s}=t,{formBuilderFormSchema:l}=sn(),c=k.useRef(null),[{},u]=ra({type:na,item:{type:na,uuid:i.uuid,children:i.children,path:a},collect:f=>({isDragging:f.isDragging()})});u(c);const d=(f,h,g,v)=>o.jsx(Zye,{data:f,section:f,path:h,page:i,pageIndex:g,sectionIndex:v},`section_${g}_${v}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${n&&"draggable page-css p-3 pb-4"}`,"data-image-src":i==null?void 0:i.bgImage,"data-bg-color":`#${i==null?void 0:i.bgColor}`,children:n===!0?o.jsxs(o.Fragment,{children:[i.children.map((f,h)=>{const g=`${a}-${h}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,data:{path:g,childrenCount:i.children.length},onDrop:r}),d(f,g,s,h)]},`section-${h}-${f.uuid}`)}),o.jsx(Fr,{isAdvanceView:e,data:{path:`${a}-${i.children.length}`,childrenCount:i.children.length,droppedField:i},onDrop:r,isLast:!0})]}):o.jsx(o.Fragment,{children:(l==null?void 0:l.surveyQuestionSlide)===!0?o.jsx(o.Fragment,{children:o.jsx(eAe,{page:i,data:i,currentPath:a,pageIndex:s})}):o.jsx("div",{className:"p-1",children:i.children.map((f,h)=>{const g=`${a}-${h}`;return o.jsx(k.Fragment,{children:((f==null?void 0:f.isHidden)===!1||!n)&&d(f,g,s,h)},`section-${h}-${f.uuid}`)})})})})},nAe=()=>{const[t,e]=k.useState(!1),{isAdvanceView:n,isBuilderMode:r,emitSocketData:i}=Ht(),[a,s]=k.useState(!1),[l,c]=k.useState(0),{removePage:u,userSelectedLanguage:d,formBuilderFormLayout:f,formBuilderFormLayout:h,clonePage:g}=sn(),v=(m,A,w)=>o.jsx(tAe,{data:m,path:A,pageIndex:w},`page-${m.uuid}`);return o.jsx(o.Fragment,{children:o.jsx("div",{className:"page",children:(h==null?void 0:h.length)===S9&&r===!1?o.jsx(o.Fragment,{children:(h==null?void 0:h.length)&&h.map((m,A)=>{const w=`${A}`;return o.jsx("div",{children:v(m,w,A)},`${m.uuid}-${A}`)})}):o.jsx(o.Fragment,{children:n===!0||r===!1?o.jsx(ts,{scrollable:!0,activeIndex:l,onTabChange:m=>c(m.index),children:(h==null?void 0:h.length)&&h.map((m,A)=>{const w=`${A}`;return o.jsxs(wr,{disabled:!((m==null?void 0:m.isHidden)===!1||r),header:"Page",headerTemplate:x=>o.jsx(F8,{options:x,pageIndex:A,page:m,setTabSidebarSetting:s,clonePage:g,emitSocketData:i,formBuilderFormLayout:f,userSelectedLanguage:d,removePage:u,setPageActiveIndex:c,pages:h}),children:[r===!0&&o.jsx(mf,{reusableBuilderElementModalVisibility:t,setReusableBuilderElementModalVisibility:e,pageIndex:A}),o.jsx(j0,{setVisibility:s,visibilty:a,pageIndex:A,page:m,emitSocketData:i}),v(m,w,A)]},`${m.uuid}-${A}`)})}):o.jsx(o.Fragment,{children:(h==null?void 0:h.length)>0&&(h==null?void 0:h.map((m,A)=>{const w=`${A}`;return o.jsxs(k.Fragment,{children:[r===!0&&o.jsx(mf,{reusableBuilderElementModalVisibility:t,setReusableBuilderElementModalVisibility:e,pageIndex:A}),o.jsx(j0,{setVisibility:s,visibilty:a,pageIndex:A,page:m,emitSocketData:i}),v(m,w,A)]},`${m.uuid}-${A}`)}))})})})})},rAe={position:"relative"},iAe=t=>{var S,T,C;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,section:l,row:c,page:u}=t,d=k.useRef(null),{handleDrop:f}=sn(),{isRenderView:h,isAdvanceView:g,isBuilderMode:v}=Ht(),[{isDragging:m},A]=ra({type:As,item:{type:As,uuid:e==null?void 0:e.uuid,children:e.children,path:n},collect:E=>({isDragging:E.isDragging()})}),w=m&&v?.25:1;A(d);const x=(E,_,M,O,F,P,H)=>o.jsx(Lc,{page:u,type:"field",row:c,section:l,field:E,data:E,path:_,pageIndex:M,sectionIndex:O,rowIndex:F,columnIndex:P,fieldIndex:H},`component-${n}-${E==null?void 0:E.uuid}`);return o.jsx("div",{style:g?{...rAe,opacity:w}:{},className:h?"form-builder-column container-column":"draggable form-builder-column container-column",children:v===!0?o.jsxs("div",{className:"builder-row-column",children:[((S=e==null?void 0:e.children)==null?void 0:S.length)>0?(T=e==null?void 0:e.children)==null?void 0:T.map((E,_)=>{const M=`${n}-${_}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:g,data:{path:M,childrenCount:e.children.length,droppedField:e},onDrop:f}),x(E,M,r,i,a,s,_)]},M)}):o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]}),o.jsx(Fr,{isAdvanceView:!0,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},isLast:!0,onDrop:f})]}):o.jsx(o.Fragment,{children:(C=e==null?void 0:e.children)==null?void 0:C.map((E,_)=>{const M=`${n}-${_}`;return o.jsx(k.Fragment,{children:x(E,M,r,i,a,s,_)},M)})})})},aAe={},sAe=t=>{var M,O,F,P,H,N,z,U,ce;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,c=k.useRef(null),{removeRow:u,addRow:d,cloneRow:f,formBuilderFormLayout:h,userSelectedLanguage:g}=sn(),{isRenderView:v,isBuilderMode:m}=Ht(),{task_status:A,TASK_PUBLISHED:w}=Ar(),[x,S]=k.useState(!1),[{isDragging:T},C]=ra({type:Ao,item:{type:Ao,uuid:e.uuid,children:e.children,path:n,data:e},collect:X=>({isDragging:X.isDragging()})}),E=T?.25:1;C(c);const _=(X,R,ue,Y,ie,re)=>o.jsx(iAe,{page:l,row:e,section:s,data:X,path:R,pageIndex:ue,sectionIndex:Y,rowIndex:ie,columnIndex:re},`column-${n}-${X.uuid}`);return o.jsxs("div",{style:{...aAe,opacity:E,marginTop:`${(M=e==null?void 0:e.margin)==null?void 0:M.top}px`,marginBottom:`${(O=e==null?void 0:e.margin)==null?void 0:O.bottom}px`,marginLeft:`${(F=e==null?void 0:e.margin)==null?void 0:F.left}px`,marginRight:`${(P=e==null?void 0:e.margin)==null?void 0:P.right}px`},className:v?"row container-row":"draggable row container-row",children:[x&&o.jsx(bg,{visibilty:x,setVisibility:S,row:e,pageIndex:r,sectionIndex:i,rowIndex:a},"row_settings_"+r+i+a),m===!0?o.jsxs("div",{children:[o.jsx("span",{className:"row-setting-block-pdf-editor",children:o.jsxs("div",{className:"pdf-setting-container",children:[o.jsxs("button",{onClick:()=>{d(r,i)},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]}),((N=(H=h[r])==null?void 0:H.children[i])==null?void 0:N.children.length)>1&&o.jsxs("button",{onClick:()=>{u(r,i,a)},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsxs("button",{onClick:()=>{f(e,r,i,a)},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]}),o.jsxs("button",{onClick:()=>S(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})]})}),o.jsx("div",{className:"form-builder-columns",children:(z=e==null?void 0:e.children)==null?void 0:z.map((X,R)=>{const ue=`${n}-${R}`;return o.jsx(k.Fragment,{children:_(X,ue,r,i,a,R)},ue)})})]}):o.jsx(o.Fragment,{children:!(e!=null&&e.rowIsRepeatable&&A===w)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(U=e==null?void 0:e.heading)==null?void 0:U[g==null?void 0:g.type]}),o.jsx("span",{children:(ce=e==null?void 0:e.subHeadingText)==null?void 0:ce[g==null?void 0:g.type]}),o.jsx("div",{className:"form-builder-columns",children:e.children.map((X,R)=>{const ue=`${n}-${R}`;return o.jsx(k.Fragment,{children:_(X,ue,r,i,a,R)},ue)})})]})})]})},oAe=t=>{var C,E,_;const{data:e,path:n,pageIndex:r,sectionIndex:i,section:a,page:s}=t,{userSelectedLanguage:l}=sn(),{isAdvanceView:c,isBuilderMode:u}=Ht(),[d,f]=k.useState(!1),[h,g]=k.useState(!1),[v,m]=k.useState(null),A=k.useRef(null),[{isDragging:w},x]=ra({type:na,item:{type:na,uuid:e.uuid,children:e.children,path:n},collect:M=>({isDragging:M.isDragging()})}),S=w?.25:1;x(A);const T=(M,O,F,P,H)=>o.jsx(sAe,{page:s,section:a,data:M,path:O,pageIndex:F,sectionIndex:P,rowIndex:H},`row-${n}-${M.uuid}`);return o.jsxs("div",{style:{opacity:S,marginBottom:20},className:c?"draggable row":"",children:[u===!0&&o.jsx(_h,{saveBuilderElementModalData:v,setSaveBuilderElementModalData:m,saveElementModal:h,setSaveElementModal:g}),d===!0&&o.jsx(Ih,{visibilty:d,setVisibility:f,section:e,pageIndex:r,sectionIndex:i},"section_settings_"+r+i),u===!0?o.jsx("div",{children:o.jsx("div",{children:e.children.map((M,O)=>{const F=`${n}-${O}`;return o.jsx(k.Fragment,{children:T(M,F,r,i,O)},F)})})}):o.jsx(o.Fragment,{children:o.jsxs("div",{children:[(e==null?void 0:e.showSectionHeader)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:(C=e==null?void 0:e.heading)==null?void 0:C[l==null?void 0:l.type]}),((E=e==null?void 0:e.subHeadingText)==null?void 0:E[l==null?void 0:l.type])&&o.jsx("p",{children:(_=e==null?void 0:e.subHeadingText)==null?void 0:_[l==null?void 0:l.type]}),o.jsx("hr",{})]}),e.children.map((M,O)=>{const F=`${n}-${O}`;return o.jsx(k.Fragment,{children:o.jsx("div",{className:"",children:T(M,F,r,i,O)},F)},F)})]})})]})},v5={},b5={height:"1280px",width:"100%"},lAe=t=>{var d,f,h,g;const{data:e,path:n,pageIndex:r}=t,{isBuilderMode:i}=Ht(),a=k.useRef(null),[{isDragging:s},l]=ra({type:na,item:{type:na,uuid:e.uuid,children:e.children,path:n},collect:v=>({isDragging:v.isDragging()})}),c=s?0:1;l(a);const u=(v,m,A,w)=>o.jsx(oAe,{data:v,section:v,path:m,page:e,pageIndex:A,sectionIndex:w},`section_${A}_${w}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${i&&"draggable page-css p-3 pb-4"}`,"data-image-src":e==null?void 0:e.bgImage,"data-bg-color":`#${e==null?void 0:e.bgColor}`,children:o.jsx("div",{className:"pdf flex justify-content-center",children:i===!0?o.jsx("div",{id:e==null?void 0:e.uuid,className:"page-block ",style:(e==null?void 0:e.bgType)==="image"?{...v5,...b5,opacity:c,backgroundImage:`url("${e==null?void 0:e.bgImage}")`}:{...v5,...b5,opacity:c,backgroundColor:`#${e==null?void 0:e.bgColor}`},children:((e==null?void 0:e.isCoverPage)===!1||(e==null?void 0:e.isCoverPage)===void 0)&&o.jsx(o.Fragment,{children:e.children.map((v,m)=>{const A=`${n}-${m}`;return o.jsx(k.Fragment,{children:u(v,A,r,m)},`section-${m}-${v.uuid}`)})})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:"page-block",style:(e==null?void 0:e.bgType)==="image"?{...v5,...b5,opacity:c,backgroundImage:`url("${e==null?void 0:e.bgImage}")`,backgroundSize:"cover"}:{...v5,...b5,opacity:c,backgroundColor:`#${e==null?void 0:e.bgColor}`},children:o.jsx("div",{style:{marginTop:`${(d=e==null?void 0:e.margin)==null?void 0:d.top}px`,marginBottom:`${(f=e==null?void 0:e.margin)==null?void 0:f.bottom}px`,marginLeft:`${(h=e==null?void 0:e.margin)==null?void 0:h.left}px`,marginRight:`${(g=e==null?void 0:e.margin)==null?void 0:g.right}px`},children:e.children.map((v,m)=>{const A=`${n}-${m}`;return o.jsx(k.Fragment,{children:((v==null?void 0:v.isHidden)===!1||i)&&u(v,A,r,m)},`section-${m}-${v.uuid}`)})})})})})})},cAe=()=>{const{isBuilderMode:t}=Ht(),[e,n]=k.useState(!1),[r,i]=k.useState(0),[a,s]=k.useState(!1),{formBuilderFormLayout:l}=sn(),c=(u,d,f)=>o.jsx(lAe,{data:u,path:d,pageIndex:f},`page-${u.uuid}`);return o.jsx("div",{className:"page",children:(l==null?void 0:l.length)===S9&&t===!1?o.jsx(o.Fragment,{children:(l==null?void 0:l.length)&&l.map((u,d)=>{const f=`${d}`;return o.jsx("div",{className:"scroll-height-400",children:c(u,f,d)},`${u.uuid}-${d}`)})}):o.jsx(o.Fragment,{children:t===!0?o.jsx(ts,{scrollable:!0,activeIndex:r,onTabChange:u=>i(u.index),children:(l==null?void 0:l.length)&&l.map((u,d)=>{const f=`${d}`;if((u==null?void 0:u.isHidden)===!1||t)return o.jsxs(wr,{header:"Page",headerTemplate:h=>o.jsx(F8,{options:h,pageIndex:d,page:u,setTabSidebarSetting:n,setPageActiveIndex:i,pages:l}),children:[t===!0&&o.jsx(mf,{reusableBuilderElementModalVisibility:a,setReusableBuilderElementModalVisibility:s,pageIndex:d}),o.jsxs("div",{className:"p-3",children:[o.jsx(j0,{setVisibility:n,visibilty:e,pageIndex:d,page:u}),o.jsx("div",{children:c(u,f,d)})]})]},`${u.uuid}-${d}`)})}):o.jsx("div",{className:"",children:(l==null?void 0:l.length)&&l.map((u,d)=>{var h;const f=`${d}`;if((u==null?void 0:u.isHidden)===!1||t)return o.jsxs("section",{id:u==null?void 0:u.uuid,"data-nav-title":(h=u==null?void 0:u.title)==null?void 0:h.english,"data-scrollspy":!0,children:[t===!0&&o.jsx(mf,{reusableBuilderElementModalVisibility:a,setReusableBuilderElementModalVisibility:s,pageIndex:d}),o.jsxs("div",{className:"p-3",children:[o.jsx(j0,{setVisibility:n,visibilty:e,pageIndex:d,page:u}),o.jsx("div",{children:c(u,f,d)})]})]},`${u.uuid}-${d}`)})})})})},uAe=t=>{var w,x,S,T;const e=k.useRef(null),{removeColumn:n,addColumn:r,cloneColumn:i,formBuilderFormLayout:a}=sn(),{emitSocketData:s,isBuilderMode:l}=Ht(),{options:c,pageIndex:u,sectionIndex:d,rowIndex:f,columnIndex:h,data:g}=t,v=c.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",m=`${c.className} justify-content-space-between`,A=`${c.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".add-column-tool"}),o.jsxs("div",{className:m,children:[o.jsxs("span",{ref:l===!0?e:null,children:[o.jsx("button",{className:c.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:c.togglerClassName,onClick:c.onTogglerClick,children:[o.jsx("span",{className:v}),o.jsx(Qt,{})]}),o.jsx("span",{className:A,children:"Column"})]}),l===!0&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-column-tool","data-pr-tooltip":"Add Column",children:o.jsxs("button",{className:c.togglerClassName,onClick:()=>{r(u,d,f),s()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((T=(S=(x=(w=a[u])==null?void 0:w.children[d])==null?void 0:x.children[f])==null?void 0:S.children)==null?void 0:T.length)>1&&o.jsxs("button",{className:c.togglerClassName,onClick:()=>{n(u,d,f,h),s()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:c.togglerClassName,onClick:()=>{i(g,u,d,f,h),s()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})})]})]})]})},dAe={position:"relative"},fAe=t=>{var S,T,C,E,_;const{isAdvanceView:e,isRenderView:n,isBuilderMode:r}=Ht(),{handleDrop:i}=sn(),{data:a,path:s,pageIndex:l,sectionIndex:c,rowIndex:u,columnIndex:d,section:f,row:h,page:g}=t,v=k.useRef(null),[{isDragging:m},A]=ra({type:As,item:{type:As,uuid:a==null?void 0:a.uuid,children:a.children,path:s},collect:M=>({isDragging:M.isDragging()})}),w=m&&!n?.25:1;A(v);const x=(M,O,F,P,H,N,z)=>o.jsx(Lc,{page:g,column:a,type:"field",row:h,section:f,field:M,data:M,path:O,pageIndex:F,sectionIndex:P,rowIndex:H,columnIndex:N,fieldIndex:z},`component-${s}-${M==null?void 0:M.uuid}`);return o.jsx("div",{style:e?{...dAe,opacity:w}:{},className:n?"form-builder-column container-column":"draggable form-builder-column container-column",children:r===!0?o.jsx(o.Fragment,{children:e===!0?o.jsxs(ci,{className:"builder-row-column",header:"Column",toggleable:!0,headerTemplate:M=>o.jsx(uAe,{options:M,pageIndex:l,sectionIndex:c,rowIndex:u,data:a,columnIndex:d}),children:[((S=a==null?void 0:a.children)==null?void 0:S.length)>0?(T=a==null?void 0:a.children)==null?void 0:T.map((M,O)=>{const F=`${s}-${O}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:F,childrenCount:a.children.length,droppedField:a},onDrop:i}),x(M,F,l,c,u,d,O)]},F)}):o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]}),o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:i,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((C=a==null?void 0:a.children)==null?void 0:C.length)>0?(E=a==null?void 0:a.children)==null?void 0:E.map((M,O)=>{const F=`${s}-${O}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:F,childrenCount:a.children.length,droppedField:a},onDrop:i}),x(M,F,l,c,u,d,O)]},F)}):o.jsx(o.Fragment,{children:o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]})}),o.jsx(Fr,{isAdvanceView:e,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:i,isLast:!0})]})})}):o.jsx(o.Fragment,{children:(_=a==null?void 0:a.children)==null?void 0:_.map((M,O)=>{const F=`${s}-${O}`;return o.jsx(k.Fragment,{children:x(M,F,l,c,u,d,O)},F)})})})},hAe=t=>{var x,S,T,C;const{options:e,pageIndex:n,sectionIndex:r,rowIndex:i,data:a}=t,[,s]=k.useState(!1),l=k.useRef(null),{isBuilderMode:c,emitSocketData:u}=Ht(),{removeRow:d,addRow:f,cloneRow:h,formBuilderFormLayout:g,userSelectedLanguage:v}=sn(),m=e!=null&&e.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",A=`${e==null?void 0:e.className} justify-content-space-between`,w=`${e==null?void 0:e.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-row-tool"}),o.jsxs("div",{className:A,children:[o.jsxs("span",{ref:c===!0?l:null,children:[o.jsx("button",{className:e==null?void 0:e.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:e==null?void 0:e.togglerClassName,onClick:e==null?void 0:e.onTogglerClick,children:[o.jsx("span",{className:m}),o.jsx(Qt,{})]}),o.jsxs("span",{className:w,children:["Row:"," ",((x=a==null?void 0:a.heading)==null?void 0:x[v==null?void 0:v.type])!==""?(S=a==null?void 0:a.heading)==null?void 0:S[v==null?void 0:v.type]:"Untitled"]})]}),c===!0&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-row-tool","data-pr-tooltip":"Add Row",children:o.jsxs("button",{className:e==null?void 0:e.togglerClassName,onClick:()=>{f(n,r),u()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((C=(T=g[n])==null?void 0:T.children[r])==null?void 0:C.children.length)>1&&o.jsxs("button",{className:e==null?void 0:e.togglerClassName,onClick:()=>{d(n,r,i),u()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:e==null?void 0:e.togglerClassName,onClick:()=>{h(a,n,r,i),u()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"setting-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{onClick:()=>s(!0),className:e==null?void 0:e.togglerClassName,children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})},pAe={},gAe=t=>{var ie,re,Z,K,W,me,be,Te,ye,fe,ne;const{isAdvanceView:e,isRenderView:n,isBuilderMode:r,isAdmin:i,renderType:a,emitSocketData:s}=Ht(),{handleDrop:l}=sn(),{data:c,path:u,pageIndex:d,sectionIndex:f,rowIndex:h,section:g,page:v}=t,m=k.useRef(null),{userSelectedLanguage:A}=sn(),{userTaskSubmitFormData:w,taskRegisterData:x,updateTaskRegisterData:S,updateTaskProgressValue:T,addUserDataFormSectionRepeatableData:C,removeUserDataFormSectionRepeatableData:E,task_status:_,TASK_PUBLISHED:M}=Ar(),[O,F]=k.useState(!1),[{isDragging:P},H]=ra({type:Ao,item:{type:Ao,uuid:c.uuid,children:c.children,path:u,data:c},collect:q=>({isDragging:q.isDragging()})}),N=P?.25:1;H(m);const z=(q,ee,oe,pe,_e,Ne)=>o.jsx(fAe,{page:v,row:c,section:g,data:q,path:ee,pageIndex:oe,sectionIndex:pe,rowIndex:_e,columnIndex:Ne,emitSocketData:s},`column-${u}-${q.uuid}`),U=_t.findIndex(w,function(q){return(q==null?void 0:q.rowId)===(c==null?void 0:c.uuid)}),ce=()=>{var oe,pe,_e;const q=_t.cloneDeep(x);((pe=(oe=w[U])==null?void 0:oe.repeatableFieldsData)==null?void 0:pe.length)>=(c==null?void 0:c.minimumEntries)?q[c==null?void 0:c.uuid]=(_e=w[U])==null?void 0:_e.repeatableFields:delete q[c==null?void 0:c.uuid];const ee=Object.keys(q).length;S(q),T(ee)},X=(ie=c==null?void 0:c.repeatableFields)==null?void 0:ie.map(q=>{var ee;return{fieldUuid:q==null?void 0:q.uuid,field:q==null?void 0:q.uuid,header:(ee=q==null?void 0:q.label)==null?void 0:ee.english}}),R=X==null?void 0:X.map(q=>o.jsx(xr,{field:q.field,header:q.header,body:ee=>o.jsx(o.Fragment,{children:o.jsx("div",{className:"post__content_repetable",dangerouslySetInnerHTML:{__html:ee[q==null?void 0:q.field]}})})},q.field)),ue=()=>{var pe;const q=[...w],ee=[];let oe=!0;e:for(const[,_e]of c.children.entries()){for(const[,Ne]of _e.children.entries())if(Ne!=null&&Ne.isPostField&&Ne.isValid!==1){const ve={fieldId:Ne.uuid,rowIndex:h};console.log("inValidData",ve),ee.push(ve),Gt.emit("OnInvalidFieldCatch",ve),oe=!1;break e}oe=!0}oe&&(ee==null?void 0:ee.length)===0&&(C(c==null?void 0:c.uuid,(pe=q[U])==null?void 0:pe.repeatableFields),Gt.emit("clearRepeatableFields",c==null?void 0:c.uuid),ce())},Y=q=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,size:"small",type:"button",className:"p-button-danger ",onClick:()=>{E(c==null?void 0:c.uuid,q==null?void 0:q.rowIndex),setTimeout(()=>{ce()},1e3)},icon:"pi pi-trash"})});return o.jsxs("div",{style:{...pAe,opacity:N,marginTop:`${(re=c==null?void 0:c.margin)==null?void 0:re.top}px`,marginBottom:`${(Z=c==null?void 0:c.margin)==null?void 0:Z.bottom}px`,marginLeft:`${(K=c==null?void 0:c.margin)==null?void 0:K.left}px`,marginRight:`${(W=c==null?void 0:c.margin)==null?void 0:W.right}px`},className:n?"row container-row":"draggable row container-row",children:[O&&o.jsx(bg,{renderType:a,visibilty:O,setVisibility:F,row:c,pageIndex:d,sectionIndex:f,rowIndex:h,emitSocketData:s},"row_settings_"+d+f+h),r===!0?o.jsx(o.Fragment,{children:e===!0?o.jsx(ci,{header:"Row",toggleable:!0,headerTemplate:q=>o.jsx(hAe,{options:q,pageIndex:d,sectionIndex:f,rowIndex:h,data:c}),children:o.jsxs("div",{className:"form-builder-columns",style:{overflowX:"auto"},children:[(me=c==null?void 0:c.children)==null?void 0:me.map((q,ee)=>{const oe=`${u}-${ee}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,data:{path:oe,childrenCount:c.children.length},onDrop:l,className:"horizontalDrag"}),z(q,oe,d,f,h,ee)]},oe)}),o.jsx(Fr,{isAdvanceView:e,data:{path:`${u}-${c.children.length}`,childrenCount:c.children.length},onDrop:l,className:"horizontalDrag",isLast:!0})]})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:e?"form-builder-columns":"",style:e?{overflowX:"auto"}:{},children:(be=c==null?void 0:c.children)==null?void 0:be.map((q,ee)=>{const oe=`${u}-${ee}`;return o.jsx(k.Fragment,{children:z(q,oe,d,f,h,ee)},oe)})})})}):o.jsx(o.Fragment,{children:!(c!=null&&c.rowIsRepeatable&&_===M)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(Te=c==null?void 0:c.heading)==null?void 0:Te[A==null?void 0:A.type]}),o.jsx("span",{children:(ye=c==null?void 0:c.subHeadingText)==null?void 0:ye[A==null?void 0:A.type]}),o.jsx("div",{className:"form-builder-columns",children:c.children.map((q,ee)=>{const oe=`${u}-${ee}`;return o.jsx(k.Fragment,{children:z(q,oe,d,f,h,ee)},oe)})})]})}),(c==null?void 0:c.rowIsRepeatable)&&_!==M&&o.jsx(Ft,{text:!0,size:"small",type:"button",className:"p-button-success mb-3",onClick:()=>ue(),label:((fe=c.addToListButtonLabel)==null?void 0:fe[A==null?void 0:A.type])+"9999999999"}),(c==null?void 0:c.rowIsRepeatable)&&o.jsxs("div",{className:"card",children:[o.jsxs(ro,{value:(w==null?void 0:w.length)>0?(ne=w[U])==null?void 0:ne.repeatableFieldsData:[],children:[R,_!==M&&o.jsx(xr,{style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"left",overflow:"visible"},body:q=>Y(q)})]}),i&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{field:c})]})]})]})},mAe=t=>{var ce,X,R,ue,Y,ie,re,Z;const{isAdvanceView:e,isBuilderMode:n,renderType:r,emitSocketData:i}=Ht(),{handleDrop:a}=sn(),{data:s,path:l,pageIndex:c,sectionIndex:u,section:d,page:f}=t,{removeSection:h,addSection:g,cloneSection:v,formBuilderFormLayout:m,userSelectedLanguage:A}=sn(),[w,x]=k.useState(!1),[S,T]=k.useState(!1),[C,E]=k.useState({reusable_template_schema:""}),[_,M]=k.useState(!1),O=k.useRef(null),F=(K,W)=>{E(me=>({...me,[K]:W}))},[{isDragging:P},H]=ra({type:na,item:{type:na,uuid:s.uuid,children:s.children,path:l},collect:K=>({isDragging:K.isDragging()})}),N=P?.25:1;H(O);const z=(K,W,me,be,Te)=>o.jsx(gAe,{page:f,section:d,data:K,path:W,pageIndex:me,sectionIndex:be,rowIndex:Te,emitSocketData:i},`row-${l}-${K.uuid}`),U=(K,W,me)=>{var fe,ne;const be=K.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Te=`${K.className} justify-content-space-between panel-tab-section`,ye=`${K.titleClassName} pl-1 text-primary`;return o.jsxs("div",{className:Te,children:[o.jsxs("span",{ref:n===!0?O:null,children:[o.jsx("button",{className:K.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:K.togglerClassName,onClick:K.onTogglerClick,children:[o.jsx("span",{className:be}),o.jsx(Qt,{})]}),o.jsxs("span",{className:ye,children:[me+1," ",(fe=s==null?void 0:s.heading)==null?void 0:fe[A==null?void 0:A.type]]})]}),n===!0&&o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".del-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-section-tool"}),o.jsx(cn,{target:".save-tool"}),o.jsx(cn,{target:".settings-tool"}),o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-section-tool","data-pr-tooltip":"Add Section",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{g(W),i()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((ne=m[W])==null?void 0:ne.children.length)>1&&o.jsx("span",{className:"del-tool","data-pr-tooltip":"Delete",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{h(W,me),i()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"save-tool","data-pr-tooltip":"Save",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{F("reusable_template_schema",s),T(!0)},children:[o.jsx("span",{className:"pi pi-save"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{v(s,W,me),i()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"settings-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>x(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsxs("div",{style:{opacity:N,marginBottom:20},className:e?"draggable row":"",children:[n===!0&&o.jsx(_h,{saveBuilderElementModalData:C,setSaveBuilderElementModalData:E,saveElementModal:S,setSaveElementModal:T}),w===!0&&n===!0&&o.jsx(Ih,{renderType:r,visibilty:w,setVisibility:x,section:s,pageIndex:c,sectionIndex:u,emitSocketData:i},"section_settings_"+c+u),n===!0?o.jsx(o.Fragment,{children:e===!0?o.jsxs(ci,{header:(ce=s==null?void 0:s.heading)==null?void 0:ce.english,toggleable:!0,headerTemplate:K=>U(K,c,u),onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),children:[((X=s==null?void 0:s.subHeadingText)==null?void 0:X[A==null?void 0:A.type])&&o.jsx("p",{children:(R=s==null?void 0:s.subHeadingText)==null?void 0:R[A==null?void 0:A.type]}),o.jsxs("div",{children:[s.children.map((K,W)=>{const me=`${l}-${W}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,data:{path:me,childrenCount:s.children.length},onDrop:a}),z(K,me,c,u,W)]},me)}),o.jsx(Fr,{isAdvanceView:e,data:{path:`${l}-${s.children.length}`,childrenCount:s.children.length,droppedField:s},onDrop:a,isLast:!0})]}),_&&o.jsxs("div",{className:"m-3 flex justify-content-end",children:[o.jsx("span",{className:"add-section-tool ","data-pr-tooltip":"Add Section",children:o.jsx("i",{className:"pi pi-plus",onClick:()=>{g(c),i()},children:o.jsx(Qt,{})})}),((ue=m[c])==null?void 0:ue.children.length)>1&&o.jsx("span",{className:"del-tool ml-2",children:o.jsx("i",{className:"pi pi-trash","data-pr-tooltip":"Delete",onClick:()=>{h(c,u),i()},children:o.jsx(Qt,{})})})]})]}):o.jsxs(o.Fragment,{children:[((Y=s==null?void 0:s.subHeadingText)==null?void 0:Y[A==null?void 0:A.type])&&o.jsx("p",{children:(ie=s==null?void 0:s.subHeadingText)==null?void 0:ie[A==null?void 0:A.type]}),o.jsx("div",{children:s.children.map((K,W)=>{const me=`${l}-${W}`;return o.jsx(k.Fragment,{children:z(K,me,c,u,W)},me)})})]})}):o.jsx(o.Fragment,{children:o.jsxs("div",{className:"",children:[(s==null?void 0:s.showSectionHeader)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:(re=s==null?void 0:s.heading)==null?void 0:re[A==null?void 0:A.type]}),o.jsx("p",{children:(Z=s==null?void 0:s.subHeadingText)==null?void 0:Z[A==null?void 0:A.type]}),o.jsx("hr",{})]}),s.children.map((K,W)=>{const me=`${l}-${W}`;return o.jsx(k.Fragment,{children:o.jsx("div",{className:"",children:z(K,me,c,u,W)},me)},me)})]})})]})},vAe={position:"relative"},bAe=t=>{var S,T,C;const{isAdvanceView:e,isRenderView:n,isBuilderMode:r}=Ht(),{handleDrop:i}=sn(),{data:a,path:s,pageIndex:l,sectionIndex:c,rowIndex:u,columnIndex:d,section:f,row:h,page:g}=t,v=k.useRef(null),[{isDragging:m},A]=ra({type:As,item:{type:As,uuid:a==null?void 0:a.uuid,children:a.children,path:s},collect:E=>({isDragging:E.isDragging()})}),w=m&&!n?.25:1;A(v);const x=(E,_,M,O,F,P,H)=>o.jsx(Lc,{page:g,type:"field",row:h,column:a,section:f,field:E,data:E,path:_,pageIndex:M,sectionIndex:O,rowIndex:F,columnIndex:P,fieldIndex:H},`component-${s}-${E==null?void 0:E.uuid}`);return o.jsx("div",{style:e?{...vAe,opacity:w}:{},className:n?"":"draggable column container-column",children:r===!0?o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((S=a==null?void 0:a.children)==null?void 0:S.length)>0?(T=a==null?void 0:a.children)==null?void 0:T.map((E,_)=>{const M=`${s}-${_}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:M,childrenCount:a.children.length,droppedField:a},onDrop:i}),x(E,M,l,c,u,d,_)]},M)}):o.jsx(o.Fragment,{}),o.jsx(Fr,{isAdvanceView:e,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:i,isLast:!0})]})}):o.jsx(o.Fragment,{children:(C=a==null?void 0:a.children)==null?void 0:C.map((E,_)=>{const M=`${s}-${_}`;return o.jsx(k.Fragment,{children:x(E,M,l,c,u,d,_)},M)})})})},yAe=t=>{var l;const{isAdvanceView:e}=Ht(),{data:n,page:r,currentPath:i,pageIndex:a}=t,s=(c,u,d,f,h,g,v,m)=>o.jsx(bAe,{page:r,row:m,section:v,data:c,path:`${d}-${f}-${h}-${g}`,pageIndex:d,sectionIndex:f,rowIndex:h,columnIndex:g},`column-${i}-${c.uuid}`);return o.jsx(o.Fragment,{children:(l=n==null?void 0:n.children)==null?void 0:l.map((c,u)=>{var d;return(d=c==null?void 0:c.children)==null?void 0:d.map((f,h)=>{var g;return o.jsx(o.Fragment,{children:o.jsx("div",{className:e?"columns":"",style:e?{overflowX:"auto"}:{},children:(g=f==null?void 0:f.children)==null?void 0:g.map((v,m)=>{const A=`${i}-${u}-${h}-${m}`;return o.jsx(k.Fragment,{children:s(v,A,a,u,h,m,c,f)},A)})})})})})})},AAe=t=>{const{data:e,path:n,pageIndex:r}=t,{isAdvanceView:i,isBuilderMode:a}=Ht(),{formBuilderFormSchema:s,handleDrop:l}=sn(),c=k.useRef(null),[{},u]=ra({type:na,item:{type:na,uuid:e.uuid,children:e.children,path:n},collect:f=>({isDragging:f.isDragging()})});u(c);const d=(f,h,g,v)=>o.jsx(mAe,{data:f,section:f,path:h,page:e,pageIndex:g,sectionIndex:v},`section_${g}_${v}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${a&&"draggable page-css p-3 pb-4"}`,"data-image-src":e==null?void 0:e.bgImage,"data-bg-color":`#${e==null?void 0:e.bgColor}`,children:a===!0?o.jsx(o.Fragment,{children:i?o.jsxs(o.Fragment,{children:[e.children.map((f,h)=>{const g=`${n}-${h}`;return o.jsxs(k.Fragment,{children:[i===!0&&o.jsx(Fr,{isAdvanceView:i,data:{path:g,childrenCount:e.children.length},onDrop:l}),d(f,g,r,h)]},`section-${h}-${f.uuid}`)}),i===!0&&o.jsx(Fr,{isAdvanceView:i,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:l,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsx(yAe,{page:e,data:e,path:n,pageIndex:r})})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:"p-1",children:e.children.map((f,h)=>{const g=`${n}-${h}`;return o.jsx(k.Fragment,{children:s!=null&&s.showConditionalFields?o.jsx(o.Fragment,{children:o.jsx("div",{children:d(f,g,r,h)})}):((f==null?void 0:f.isHidden)===!1||!a)&&d(f,g,r,h)},`section-${h}-${f.uuid}`)})})})})},wAe=()=>{const[t,e]=k.useState(!1),{formBuilderFormLayout:n}=sn(),{isBuilderMode:r}=Ht(),i=()=>{},a=(s,l,c)=>o.jsx(AAe,{data:s,path:l,pageIndex:c},`page-${s.uuid}`);return o.jsx(o.Fragment,{children:o.jsx("div",{className:"page",children:o.jsx("div",{children:(n==null?void 0:n.length)&&n.map((s,l)=>{const c=`${l}`;if((s==null?void 0:s.isHidden)===!1||r)return o.jsxs("div",{children:[o.jsx(j0,{setVisibility:e,visibilty:t,pageIndex:l,page:s,emitSocketData:i}),a(s,c,l)]},`policie-page-${l}`)})})})})},SAe={position:"relative"},CAe=t=>{var S;const{isRenderView:e,isAdvanceView:n,isBuilderMode:r}=Ht(),{data:i,path:a,pageIndex:s,sectionIndex:l,rowIndex:c,columnIndex:u,section:d,row:f,page:h}=t,g=k.useRef(null),{handleDrop:v}=sn(),[{isDragging:m},A]=ra({type:As,item:{type:As,uuid:i==null?void 0:i.uuid,children:i.children,path:a},collect:T=>({isDragging:T.isDragging()})}),w=m&&!e?.25:1;A(g);const x=(T,C,E,_,M,O,F)=>o.jsx(Lc,{page:h,type:"field",row:f,section:d,field:T,data:T,path:C,pageIndex:E,sectionIndex:_,rowIndex:M,columnIndex:O,fieldIndex:F},`component-${a}-${T==null?void 0:T.uuid}`);return o.jsx("div",{style:n?{...SAe,opacity:w}:{},className:e?"form-builder-column container-column":"draggable form-builder-column container-column",children:r&&o.jsxs("div",{children:[(S=i==null?void 0:i.children)==null?void 0:S.map((T,C)=>{const E=`${a}-${C}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{fieldDropArea:!0,isAdvanceView:n,data:{path:E,childrenCount:i.children.length,droppedField:i},onDrop:v}),x(T,E,s,l,c,u,C)]},E)}),i.children.length===0&&o.jsx("p",{className:"text-center",children:"Add element by dragging and dropping element from the sidebar into the dropzone area"}),o.jsx(Fr,{fieldDropArea:!0,isAdvanceView:n,data:{path:`${a}-${i.children.length}`,childrenCount:i.children.length,droppedField:i},onDrop:v,isLast:!0})]})})},xAe={},TAe=t=>{var Y,ie,re,Z,K,W,me;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,c=k.useRef(null),{userSelectedLanguage:u,handleDrop:d}=sn(),{userTaskSubmitFormData:f,taskRegisterData:h,updateTaskRegisterData:g,updateTaskProgressValue:v,addUserDataFormSectionRepeatableData:m,removeUserDataFormSectionRepeatableData:A,task_status:w,TASK_PUBLISHED:x}=Ar(),{isRenderView:S,isAdmin:T,isAdvanceView:C,emitSocketData:E,renderType:_}=Ht(),[M,O]=k.useState(!1),[{isDragging:F},P]=ra({type:Ao,item:{type:Ao,uuid:e.uuid,children:e.children,path:n,data:e},collect:be=>({isDragging:be.isDragging()})}),H=F?.25:1;P(c);const N=(be,Te,ye,fe,ne,q)=>o.jsx(CAe,{page:l,row:e,section:s,data:be,path:Te,pageIndex:ye,sectionIndex:fe,rowIndex:ne,columnIndex:q},`column-${n}-${be.uuid}`),z=_t.findIndex(f,function(be){return(be==null?void 0:be.rowId)===(e==null?void 0:e.uuid)}),U=()=>{var ye,fe,ne;const be=_t.cloneDeep(h);((fe=(ye=f[z])==null?void 0:ye.repeatableFieldsData)==null?void 0:fe.length)>=(e==null?void 0:e.minimumEntries)?be[e==null?void 0:e.uuid]=(ne=f[z])==null?void 0:ne.repeatableFields:delete be[e==null?void 0:e.uuid];const Te=Object.keys(be).length;g(be),v(Te)},ce=(Y=e==null?void 0:e.repeatableFields)==null?void 0:Y.map(be=>{var Te;return{fieldUuid:be==null?void 0:be.uuid,field:be==null?void 0:be.uuid,header:(Te=be==null?void 0:be.label)==null?void 0:Te.english}}),X=ce==null?void 0:ce.map(be=>o.jsx(xr,{field:be.field,header:be.header,body:Te=>o.jsx(o.Fragment,{children:o.jsx("div",{className:"post__content_repetable",dangerouslySetInnerHTML:{__html:Te[be==null?void 0:be.field]}})})},be.field)),R=()=>{var fe;const be=[...f],Te=[];let ye=!0;e:for(const[,ne]of e.children.entries()){for(const[,q]of ne.children.entries())if(q!=null&&q.isPostField&&q.isValid!==1){const ee={fieldId:q.uuid,rowIndex:a};Te.push(ee),Gt.emit("OnInvalidFieldCatch",ee),ye=!1;break e}ye=!0}ye&&(Te==null?void 0:Te.length)===0&&(m(e==null?void 0:e.uuid,(fe=be[z])==null?void 0:fe.repeatableFields),Gt.emit("clearRepeatableFields",e==null?void 0:e.uuid),U())},ue=be=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,type:"button",size:"small",className:"p-button-danger ",onClick:()=>{A(e==null?void 0:e.uuid,be==null?void 0:be.rowIndex),setTimeout(()=>{U()},1e3)},icon:"pi pi-trash"})});return o.jsxs("div",{style:{...xAe,opacity:H,marginTop:`${(ie=e==null?void 0:e.margin)==null?void 0:ie.top}px`,marginBottom:`${(re=e==null?void 0:e.margin)==null?void 0:re.bottom}px`,marginLeft:`${(Z=e==null?void 0:e.margin)==null?void 0:Z.left}px`,marginRight:`${(K=e==null?void 0:e.margin)==null?void 0:K.right}px`},className:S?"row container-row":"draggable row container-row",children:[M&&o.jsx(bg,{renderType:_,visibilty:M,setVisibility:O,row:e,pageIndex:r,sectionIndex:i,rowIndex:a,emitSocketData:E},"row_settings_"+r+i+a),o.jsxs("div",{className:"form-builder-columns",children:[e.children.map((be,Te)=>{const ye=`${n}-${Te}`;return o.jsxs(k.Fragment,{children:[_===zd&&o.jsx(Fr,{isAdvanceView:C,data:{path:ye,childrenCount:e.children.length},onDrop:d,className:"horizontalDrag"}),N(be,ye,r,i,a,Te)]},ye)}),o.jsx(Fr,{isAdvanceView:C,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:d,className:"horizontalDrag",isLast:!0})]}),(e==null?void 0:e.rowIsRepeatable)&&w!==x&&o.jsx(Ft,{text:!0,size:"small",type:"button",className:"p-button-success mb-3",onClick:()=>R(),label:(W=e.addToListButtonLabel)==null?void 0:W[u==null?void 0:u.type]}),(e==null?void 0:e.rowIsRepeatable)&&o.jsxs("div",{className:"card",children:[o.jsxs(ro,{value:(f==null?void 0:f.length)>0?(me=f[z])==null?void 0:me.repeatableFieldsData:[],children:[X,w!==x&&o.jsx(xr,{style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"left",overflow:"visible"},body:be=>ue(be)})]}),T&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{field:e})]})]})]})},EAe=t=>{var N,z;const{data:e,path:n,pageIndex:r,sectionIndex:i,section:a,page:s}=t,{removeSection:l,addSection:c,cloneSection:u,formBuilderFormLayout:d,userSelectedLanguage:f,handleDrop:h}=sn(),{isBuilderMode:g,isAdvanceView:v,renderType:m,emitSocketData:A}=Ht(),[w,x]=k.useState(!1),[S,T]=k.useState(!1),[C,E]=k.useState({reusable_template_schema:""}),_=k.useRef(null),[{isDragging:M},O]=ra({type:na,item:{type:na,uuid:e.uuid,children:e.children,path:n},collect:U=>({isDragging:U.isDragging()})}),F=M?.25:1;O(_);const P=(U,ce,X,R,ue)=>o.jsx(TAe,{page:s,section:a,data:U,path:ce,pageIndex:X,sectionIndex:R,rowIndex:ue},`row-${n}-${U.uuid}`),H=(U,ce,X)=>{var ie,re;const R=U.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",ue=`${U.className} justify-content-space-between panel-tab-section`,Y=`${U.titleClassName} pl-1 text-primary`;return o.jsxs("div",{className:ue,children:[o.jsxs("span",{ref:g===!0?_:null,children:[o.jsx("button",{className:U.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:U.togglerClassName,onClick:U.onTogglerClick,children:[o.jsx("span",{className:R}),o.jsx(Qt,{})]}),o.jsxs("span",{className:Y,children:[X+1," ",(ie=e==null?void 0:e.heading)==null?void 0:ie[f==null?void 0:f.type]]})]}),g===!0&&o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".del-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-section-tool"}),o.jsx(cn,{target:".save-tool"}),o.jsx(cn,{target:".settings-tool"}),o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-section-tool","data-pr-tooltip":"Add Section",children:o.jsxs("button",{className:U.togglerClassName,onClick:()=>{c(ce),A()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((re=d[ce])==null?void 0:re.children.length)>1&&o.jsx("span",{className:"del-tool","data-pr-tooltip":"Delete",children:o.jsxs("button",{className:U.togglerClassName,onClick:()=>{l(ce,X),A()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:U.togglerClassName,onClick:()=>{u(e,ce,X),A()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"settings-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{className:U.togglerClassName,onClick:()=>x(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsxs("div",{style:{opacity:F,marginBottom:20},className:v?"draggable row":"",children:[g===!0&&o.jsx(_h,{saveBuilderElementModalData:C,setSaveBuilderElementModalData:E,saveElementModal:S,setSaveElementModal:T}),w===!0&&g===!0&&o.jsx(Ih,{renderType:m,visibilty:w,setVisibility:x,section:e,pageIndex:r,sectionIndex:i,emitSocketData:A},"section_settings_"+r+i),g===!0&&o.jsxs(ci,{className:"mb-5",header:(N=e==null?void 0:e.heading)==null?void 0:N.english,toggleable:!0,headerTemplate:U=>H(U,r,i),children:[o.jsx("p",{children:(z=e==null?void 0:e.subHeadingText)==null?void 0:z[f==null?void 0:f.type]}),o.jsxs("div",{className:"",children:[e.children.map((U,ce)=>{const X=`${n}-${ce}`;return o.jsx(k.Fragment,{children:P(U,X,r,i,ce)},X)}),o.jsx(Fr,{isAdvanceView:v,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:h,className:"horizontalDrag",isLast:!0})]})]})]})},IAe=t=>{const{isRenderView:e,isBuilderMode:n}=Ht(),{data:r,path:i,pageIndex:a}=t,s=k.useRef(null),[,l]=ra({type:na,item:{type:na,uuid:r.uuid,children:r.children,path:i},collect:u=>({isDragging:u.isDragging()})});l(s);const c=(u,d,f,h)=>o.jsx(EAe,{data:u,section:u,path:d,pageIndex:f,sectionIndex:h,page:r},`section_${f}_${h}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${n&&"draggable page-css p-3 pb-4"}`,"data-image-src":r==null?void 0:r.bgImage,"data-bg-color":`#${r==null?void 0:r.bgColor}`,children:n?o.jsx("div",{className:"p-1",children:r.children.map((u,d)=>{const f=`${i}-${d}`;return o.jsx(k.Fragment,{children:c(u,f,a,d)},`section-${d}-${u.uuid}`)})}):o.jsx(o.Fragment,{})})},y5=t=>{const{handleSelectCourseItem:e,icon:n,currentItem:r,field:i,fieldIndex:a,title:s}=t,[l,c]=k.useState(!1),{userTrainingSaveData:u}=Ar(),d=h=>{var g,v;if(u!==null&&h){const m=u==null?void 0:u.findIndex(A=>(A==null?void 0:A.fieldId)===(h==null?void 0:h.uuid));return(g=u[m])!=null&&g.isSeen?(v=u[m])==null?void 0:v.isSeen:!1}else return!1},f=()=>{let h=[];if(u!==null){const v=u.findIndex(m=>(m==null?void 0:m.fieldId)===(i==null?void 0:i.uuid));h=u[v].logs}else h=[];return h==null?void 0:h.map((v,m)=>o.jsxs("li",{className:"flex flex-column md:flex-row md:align-items-center md:justify-content-between mb-4",children:[o.jsxs("div",{className:"mr-8 md:mr-8",children:[o.jsxs("span",{className:"inline-block text-900 font-medium mr-2 mb-1 md:mb-0",children:[v==null?void 0:v.action," on ",((v==null?void 0:v.videoTime)/60).toFixed(3)," seconds"]}),o.jsx("span",{className:"text-600",children:Ln(v==null?void 0:v.timeState).format("Do, MMMM, YYYY HH:ss")})]}),o.jsxs("div",{className:"mt-2 md:mt-0 ml-0 md:ml-8 flex align-items-center",children:[o.jsx("div",{className:"surface-300 border-round overflow-hidden",style:{height:"8px",width:"200px"},children:o.jsx("div",{className:(v==null?void 0:v.action)==="Play"?"bg-green-500 h-full":"bg-orange-500 h-full",style:{width:`${Math.floor((v==null?void 0:v.videoTime)/(v==null?void 0:v.totalTime)*100)}%`}})}),o.jsxs("span",{className:"text-orange-500 ml-3 font-medium",children:[Math.floor((v==null?void 0:v.videoTime)/(v==null?void 0:v.totalTime)*100),"%"]})]})]},`logs_${m}`))};return o.jsxs("ul",{className:"list-none p-0 m-0 cursor-pointer",onClick:()=>{e(i)},children:[o.jsxs("li",{className:"flex flex-column md:flex-row md:align-items-center md:justify-content-between mb-3",style:{borderRadius:"10px"},children:[o.jsx("div",{children:o.jsxs("div",{children:[d(i)?o.jsx(Ft,{text:!0,size:"small",type:"button",icon:"pi pi-check",className:"p-button-rounded p-button-primary mr-2 p-button-outlined","aria-label":"Search"}):o.jsx(Ft,{text:!0,size:"small",type:"button",icon:"pi pi-dot",className:"p-button-rounded p-button-secondary mr-2 p-button-outlined","aria-label":"Search"}),(i==null?void 0:i.uuid)===(r==null?void 0:r.uuid)?o.jsxs("span",{children:[o.jsx(Ft,{text:!0,size:"small",type:"button",icon:n,className:"p-button-rounded p-button-primary mr-2 inline-flex justify-content-center align-items-center w-2rem h-2rem","aria-label":"Search"}),o.jsxs("span",{className:"inline-flex justify-content-center align-items-center h-2rem",style:{color:"#0f8bfd"},children:[a+1," - ",s]})]}):o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"inline-flex justify-content-center align-items-center w-2rem h-2rem border-circle border-1",children:o.jsx("i",{className:n})}),o.jsxs("span",{className:"font-medium text-500 ml-2 hoverSelect",children:[a+1," - ",s]})]})]})}),o.jsxs("div",{className:"flex align-items-center justify-content-between md:justify-content-end mt-3 md:mt-0",children:[o.jsx("div",{className:"text-right mr-3",children:o.jsxs("span",{className:" font-bold",children:[" ",i==null?void 0:i.videoDuration]})}),o.jsx(Ft,{text:!0,size:"small",type:"button",onClick:()=>c(!l),icon:"pi pi-eye",className:"p-button-rounded p-button-secondary mr-2 ","aria-label":"Search"})]})]}),l&&o.jsxs("div",{className:"surface-card shadow-2 border-round p-4",children:[o.jsx("div",{className:"flex justify-content-between align-items-center mb-5",children:o.jsx("span",{className:"text-xl text-900 font-medium",children:"Logs"})}),o.jsx("ul",{className:"list-none p-0 m-0",children:f()})]})]},`ul-list-${a}`)},_Ae=t=>{var S,T,C,E,_,M;const{field:e,fieldIndex:n,currentItem:r,setCurrentItem:i,setCurrentSection:a,setvideoJsOptions:s,section:l,setImage:c,setDocuments:u}=t,{taskOptions:d,userTrainingSaveData:f,updateUserTraining:h}=Ar(),g=(S=d==null?void 0:d.training)!=null&&S.getAssessmentSelectedQuiz?(T=d==null?void 0:d.training)==null?void 0:T.getAssessmentSelectedQuiz:()=>{},v=O=>{if(f!==null){const F=[...f],P=F.findIndex(H=>(H==null?void 0:H.fieldId)===(O==null?void 0:O.uuid));P>=0&&(F[P]={...F[P],isSeen:!0}),h([...F])}},m=O=>{var F;i(O),a(l),s({autoplay:!1,controls:!0,responsive:!0,fluid:!0,sources:[{src:(F=O==null?void 0:O.media_url)==null?void 0:F.english}]})},A=O=>{var F;v(O),i(O),c((F=O==null?void 0:O.media_url)==null?void 0:F.english),a(l)},w=O=>{v(O),i(O),u(O==null?void 0:O.documents),a(l)},x=O=>{var F,P;(F=O==null?void 0:O.quizSchema)!=null&&F.assessment_id&&(g((P=O==null?void 0:O.quizSchema)==null?void 0:P.assessment_id),a(l),i(O))};switch(e==null?void 0:e.componentType){case"video":return o.jsx(y5,{title:(C=e==null?void 0:e.title)==null?void 0:C.english,type:"video",icon:"pi pi-video",handleSelectCourseItem:m,field:e,fieldIndex:n,currentItem:r,userTrainingSaveData:f},`${e==null?void 0:e.uuid}-list`);case"image":return o.jsx(y5,{title:(E=e==null?void 0:e.title)==null?void 0:E.english,type:"image",icon:"pi pi-image",handleSelectCourseItem:A,field:e,fieldIndex:n,currentItem:r,userTrainingSaveData:f},`${e==null?void 0:e.uuid}-list`);case"document":return o.jsx(y5,{title:(_=e==null?void 0:e.title)==null?void 0:_.english,type:"document",icon:"pi pi-image",handleSelectCourseItem:w,field:e,fieldIndex:n,currentItem:r,userTrainingSaveData:f},`${e==null?void 0:e.uuid}-list`);case"quiz":return o.jsx(y5,{title:(M=e==null?void 0:e.quizSchema)==null?void 0:M.assessment_title,type:"quiz",icon:"pi pi-image",handleSelectCourseItem:x,field:e,fieldIndex:n,currentItem:r,userTrainingSaveData:f},`${e==null?void 0:e.uuid}-list`);default:return o.jsx(o.Fragment,{})}},DAe=t=>{const{fields:e,setImage:n,setvideoJsOptions:r,setDocuments:i,setQuizSchema:a,setCurrentItem:s,currentItem:l,setCurrentSection:c,section:u,updateTrainingProgress:d}=t;return o.jsx(o.Fragment,{children:o.jsx("div",{className:"surface-card border-round p-4 ",children:e==null?void 0:e.map((f,h)=>o.jsxs("div",{children:[o.jsx(_Ae,{field:f,fieldIndex:h,currentItem:l,setCurrentItem:s,setCurrentSection:c,setvideoJsOptions:r,section:u,setImage:n,setDocuments:i,setQuizSchema:a,updateTrainingProgress:d},`${h}-list-sidebar`)," ",o.jsx("hr",{})," "]},`sidebar-item-card-${h}`))})})},NAe=t=>{var v,m,A,w,x,S,T,C,E,_;const{setSelectedOption:e,quiz:n,userSelectedLanguage:r,onSetAnswer:i,setIsOptionSelected:a,index:s,eleIndex:l,ele:c,setCorrectAnswerCheck:u,correctAnswerCheck:d,selectedOption:f}=t,{media:h}=Ht(),g=(v=h==null?void 0:h.image)!=null&&v.MediaImage?(m=h==null?void 0:h.image)==null?void 0:m.MediaImage:o.jsx(o.Fragment,{});return o.jsxs("div",{onClick:M=>{e(O=>{var F;return(F=n==null?void 0:n.answersText)==null?void 0:F[r==null?void 0:r.type]}),i(M,s,l,n,c),a(!0),u({isCorrect:null,text:null})},className:"field-radiobutton card",style:(d==null?void 0:d.text)===((A=n.answersText)==null?void 0:A[r==null?void 0:r.type])?(d==null?void 0:d.isCorrect)===!0?{borderColor:"green",borderWidth:1,borderStyle:"solid",position:"relative"}:{borderColor:"red",borderWidth:1,borderStyle:"solid",position:"relative"}:((w=n.answersText)==null?void 0:w[r==null?void 0:r.type])===f?{backgroundColor:"#0F8BFD",color:"#fff"}:{},children:[o.jsx(ia,{inputId:s,value:n.answersText,checked:((x=n.answersText)==null?void 0:x[r==null?void 0:r.type])===f,onChange:M=>{u({isCorrect:null,text:null}),e(O=>{var F;return(F=M.target.value)==null?void 0:F[r==null?void 0:r.type]}),i(M,s,l,n,c),a(!0)}}),((S=n.answersTextImage)==null?void 0:S[r==null?void 0:r.type])&&((T=n.answersTextImage)==null?void 0:T[r==null?void 0:r.type])!==""&&o.jsx(g,{mediaId:(C=n.answersTextImage)==null?void 0:C[r==null?void 0:r.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:s,children:(E=n.answersText)==null?void 0:E[r==null?void 0:r.type]}),o.jsx("span",{style:{position:"absolute",right:10},children:(d==null?void 0:d.text)===((_=n.answersText)==null?void 0:_[r==null?void 0:r.type])?(d==null?void 0:d.isCorrect)===!0?o.jsxs("span",{style:{color:"green"},children:[" ","Correct answer"]}):o.jsxs("span",{style:{color:"red"},children:[" ","Wrong answer"]}):""})]},s)},OAe=t=>{var g,v,m,A,w,x,S;const{media:e}=Ht(),n=(g=e==null?void 0:e.image)!=null&&g.MediaImage?(v=e==null?void 0:e.image)==null?void 0:v.MediaImage:o.jsx(o.Fragment,{}),{setSelectedOption:r,quiz:i,userSelectedLanguage:a,setIsOptionSelected:s,index:l,ele:c,setCorrectAnswerCheck:u,correctAnswerCheck:d,selectedOption:f,onChangeCheckbox:h}=t;return k.useEffect(()=>(Array.isArray(f)||r([]),()=>{}),[]),o.jsx(o.Fragment,{children:Array.isArray(f)&&o.jsxs("div",{onClick:()=>{var T;h(!(f!=null&&f.some(C=>{var E;return C===((E=i.answersText)==null?void 0:E[a==null?void 0:a.type])})),(T=i==null?void 0:i.answersText)==null?void 0:T[a==null?void 0:a.type]),s(!0),u({isCorrect:null,text:null})},className:"field-radiobutton card",style:d!=null&&d.length&&(d!=null&&d.some(T=>{var C;return(T==null?void 0:T.text)===((C=i.answersText)==null?void 0:C[a==null?void 0:a.type])}))?d!=null&&d.some(T=>{var C;return(T==null?void 0:T.text)===((C=i.answersText)==null?void 0:C[a==null?void 0:a.type])&&(T==null?void 0:T.isCorrect)===!0})?{borderColor:"green",borderWidth:1,borderStyle:"solid",position:"relative"}:{borderColor:"red",borderWidth:1,borderStyle:"solid",position:"relative"}:((m=i.answersText)==null?void 0:m[a==null?void 0:a.type])===f?{backgroundColor:"#0F8BFD"}:{},children:[o.jsx(Yr,{inputId:l,value:i.answersText,checked:f==null?void 0:f.some(T=>{var C;return T===((C=i.answersText)==null?void 0:C[a==null?void 0:a.type])}),onChange:T=>{var C;h(T.checked,(C=T.target.value)==null?void 0:C[a==null?void 0:a.type],i,c),s(!0)}}),((A=i.answersTextImage)==null?void 0:A[a==null?void 0:a.type])&&((w=i.answersTextImage)==null?void 0:w[a==null?void 0:a.type])!==""&&o.jsx(n,{mediaId:(x=i.answersTextImage)==null?void 0:x[a==null?void 0:a.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:l,children:(S=i.answersText)==null?void 0:S[a==null?void 0:a.type]}),o.jsx("span",{style:{position:"absolute",right:10},children:d!=null&&d.length&&(d!=null&&d.some(T=>{var C;return(T==null?void 0:T.text)===((C=i.answersText)==null?void 0:C[a==null?void 0:a.type])}))?d!=null&&d.some(T=>{var C;return(T==null?void 0:T.text)===((C=i.answersText)==null?void 0:C[a==null?void 0:a.type])&&(T==null?void 0:T.isCorrect)===!0})?o.jsx("span",{style:{color:"green"},children:" Correct Answer"}):o.jsx("span",{style:{color:"red"},children:" Wrong Answer"}):""})]},l)})};function NU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function FAe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function OU(t,e,n){return e&&FAe(t.prototype,e),t}function FU(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Lw(t,e)}function A5(t){return A5=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},A5(t)}function Lw(t,e){return Lw=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},Lw(t,e)}function kAe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function PAe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function MAe(t,e){return e&&(typeof e=="object"||typeof e=="function")?e:PAe(t)}function kU(t){var e=kAe();return function(){var r=A5(t),i;if(e){var a=A5(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return MAe(this,i)}}function LAe(t){return BAe(t)||VAe(t)||qAe(t)||UAe()}function BAe(t){if(Array.isArray(t))return Bw(t)}function VAe(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function qAe(t,e){if(t){if(typeof t=="string")return Bw(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bw(t,e)}}function Bw(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function UAe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
4266
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qbe(t,e){if(t){if(typeof t=="string")return CU(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return CU(t,e)}}function CU(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Jbe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,a,s,l=[],c=!0,u=!1;try{if(a=(n=n.call(t)).next,e!==0)for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return l}}function Zbe(t){if(Array.isArray(t))return t}function eye(t){var e=this,n=t.value,r=t.onChange,i=t.country,a=t.defaultCountry,s=t.international,l=t.withCountryCallingCode,c=t.useNationalFormatForDefaultCountryValue,u=t.metadata;typeof l=="boolean"&&!(i&&s)&&console.error("[react-phone-number-input] `withCountryCallingCode` property can only be used together with `country` and `international` properties"),i&&a&&console.error("[react-phone-number-input] When `country` property is passed, `defaultCountry` property has no effect and therefore shouldn't be passed"),typeof s=="boolean"&&!i&&console.error("[react-phone-number-input] `international` property can only be used together with `country` property");var d=nye({international:s,country:i,defaultCountry:a,withCountryCallingCode:l}),f=k.useRef(),h=function(ie,re,Z){console.error("[react-phone-number-input] Expected phone number ".concat(ie," to correspond to country ").concat(re," but ").concat(Z?"in reality it corresponds to country "+Z:"it doesn't",".")),f.current=!0},g=function(ie){return n&&Rbe(n),tye(n,i,a,d,c,u,function(){ie&&ie.onCountryMismatch&&ie.onCountryMismatch();for(var re=arguments.length,Z=new Array(re),K=0;K<re;K++)Z[K]=arguments[K];h.apply(e,Z)})},v=k.useState(i),m=vg(v,2),A=m[0],w=m[1],x=k.useState(a),S=vg(x,2),T=S[0],C=S[1],E=k.useState(g()),_=vg(E,2),M=_[0],O=_[1],F=k.useState(n),P=vg(F,2),H=P[0],N=P[1],z=k.useState(),U=vg(z,2);U[0];var ce=U[1],X=k.useCallback(function(){return ce({})},[ce]);function R(Y){if(Y){d==="NATIONAL_PART_OF_INTERNATIONAL"&&(Y="+".concat(N1(i,u)).concat(Y));var ie=new p5(i||a,u);return ie.input(Y),ie.getNumberValue()}}k.useEffect(function(){n!==H&&(N(n),O(g()))},[n]),k.useEffect(function(){if(i!==A){w(i);var Y,ie=g({onCountryMismatch:function(){Y=!0}});O(ie),Y&&N(R(ie))}},[i]),k.useEffect(function(){a!==T&&(C(a),O(g()))},[a]),k.useEffect(function(){H!==n&&r(H)},[H]);var ue=k.useCallback(function(Y){var ie;if(i)if(d==="INTERNATIONAL"){var re=kw(i,u);if(Y.indexOf(re)!==0){if(Y&&Y[0]!=="+")Y=re+Y;else if(!f.current)return O(re),N(void 0),X()}}else Y&&Y[0]==="+"&&(Y=Y.slice(1));else a||Y&&Y[0]!=="+"&&(Y="+"+Y);Y&&(ie=R(Y)),O(Y),N(ie)},[i,d,a,u,O,N,X,f]);return{phoneDigits:M,setPhoneDigits:ue,inputFormat:d}}function tye(t,e,n,r,i,a,s){if(e&&r==="INTERNATIONAL"){var l=kw(e,a);return t?(t.indexOf(l)!==0&&s(t,e),t):l}if(!t)return"";if(!e&&!n)return t;var c=new p5(void 0,a);c.input(t);var u=c.getNumber();if(u)if(e)switch(u.country&&u.country!==e?s(t,e,u.country):u.countryCallingCode!==N1(e,a)&&s(t,e),r){case"NATIONAL":return O1(u.formatNational());case"NATIONAL_PART_OF_INTERNATIONAL":return O1(g5(u.formatInternational(),kw(e,a)));case"INTERNATIONAL":throw new Error('`inputFormat: "INTERNATIONAL"` case should\'ve already been handled earlier in the code');case"INTERNATIONAL_OR_NATIONAL":throw new Error('`inputFormat: "INTERNATIONAL_OR_NATIONAL"` is not possible when `country` is fixed');default:throw new Error("Unknown `inputFormat`: ".concat(r))}else return u.countryCallingCode&&u.countryCallingCode===N1(n,a)&&i?O1(u.formatNational()):t;else return""}function nye(t){var e=t.international,n=t.country,r=t.defaultCountry,i=t.withCountryCallingCode;return n?e?i?"INTERNATIONAL":"NATIONAL_PART_OF_INTERNATIONAL":"NATIONAL":r?"INTERNATIONAL_OR_NATIONAL":"INTERNATIONAL"}var rye=["Component","country","defaultCountry","useNationalFormatForDefaultCountryValue","value","onChange","metadata","international","withCountryCallingCode"];function Pw(){return Pw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Pw.apply(this,arguments)}function iye(t,e){if(t==null)return{};var n=aye(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function aye(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function m5(t,e){var n=t.Component,r=t.country,i=t.defaultCountry,a=t.useNationalFormatForDefaultCountryValue,s=a===void 0?!0:a,l=t.value,c=t.onChange,u=t.metadata,d=t.international,f=t.withCountryCallingCode,h=iye(t,rye),g=eye({value:l,onChange:c,country:r,defaultCountry:i,international:d,withCountryCallingCode:f,useNationalFormatForDefaultCountryValue:s,metadata:u}),v=g.phoneDigits,m=g.setPhoneDigits,A=g.inputFormat;return k.createElement(n,Pw({},h,{ref:e,metadata:u,inputFormat:A,international:d,withCountryCallingCode:f,country:r||i,value:v,onChange:m}))}m5=k.forwardRef(m5),m5.propTypes={value:Tn.string,onChange:Tn.func.isRequired,country:Tn.string,defaultCountry:Tn.string,international:Tn.bool,withCountryCallingCode:Tn.bool,Component:Tn.elementType.isRequired,useNationalFormatForDefaultCountryValue:Tn.bool,metadata:Gbe};var sye=["type","autoComplete","smartCaret","metadata"];function Mw(){return Mw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Mw.apply(this,arguments)}function oye(t,e){if(t==null)return{};var n=lye(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function lye(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function xU(t){function e(n,r){var i=n.type,a=i===void 0?"tel":i,s=n.autoComplete,l=s===void 0?"tel":s,c=n.smartCaret,u=c===void 0?!0:c,d=n.metadata,f=d===void 0?t:d,h=oye(n,sye);return k.createElement(m5,Mw({},h,{type:a,autoComplete:l,metadata:f,ref:r,Component:u?$be:Kbe}))}return e=k.forwardRef(e),e.propTypes={type:Tn.string,autoComplete:Tn.string,smartCaret:Tn.bool,metadata:Tn.object},e}xU();const cye=xU(n8e),uye=t=>{var Z,K,W,me,be,Te,ye,fe,ne,q,ee;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a,TASK_PUBLISHED:s,task_status:l}=Ar(),{userSelectedLanguage:c,fieldSettingUpdate:u}=sn(),{field:d,fieldIndex:f,sectionIndex:h,pageIndex:g,row:v,rowIndex:m,columnIndex:A,isDisabled:w}=t,{isAdmin:x,isBuilderMode:S}=Ht(),[T,C]=k.useState(!1),[E,_]=k.useState(""),[M,O]=k.useState(0),[F,P]=k.useState(!1),[H,N]=k.useState(!1),z=()=>{N(!0)},U=()=>{N(!1)},ce=()=>{var oe,pe,_e;if(v!=null&&v.rowIsRepeatable){if(v!=null&&v.repeatableFields){const Ne=[...v.repeatableFields],ve=_t.findIndex(Ne,function(Ae){return Ae.uuid===(d==null?void 0:d.uuid)});ve>=0&&Ne[ve].fieldData?_(Ne[ve].fieldData):_("")}}else{const Ne=a;if(Ne!=null&&Ne.length){for(const ve of Ne)if(ve.fieldId===t.field.uuid&&((oe=ve==null?void 0:ve.postData[0])==null?void 0:oe.postValue)!==""&&((pe=ve==null?void 0:ve.postData[0])!=null&&pe.postValue)){_((_e=ve==null?void 0:ve.postData[0])==null?void 0:_e.postValue);break}}}P(!0)};k.useEffect(()=>{F||ce();const oe=Gt.addListener("clearRepeatableFields",ve=>{ve===(v==null?void 0:v.uuid)&&(_(""),O(0),d.isValid=0,u(g,h,m,A,f,d))}),pe=Gt.addListener("onSubmitUserForm",()=>{var ve;(ve=d==null?void 0:d.attributes)!=null&&ve.required?E?d.isValid=1:d.isValid=0:d.isValid=1}),_e=Gt.addListener("OnInvalidFieldCatch",ve=>{d.uuid===(ve==null?void 0:ve.fieldId)?O(1):O(0)}),Ne=Gt.addListener("OnGetFieldValue",ve=>{var Be;const Ae=(Be=ve==null?void 0:ve.repeatableColumn)==null?void 0:Be.filter(Ee=>(Ee==null?void 0:Ee.fieldUuid)===(d==null?void 0:d.uuid));Ae!=null&&Ae.length});return()=>{pe.remove(),_e.remove(),Ne.remove(),oe.remove()}});const X=oe=>{C(oe)},R=()=>{C(!1)},ue=(oe,pe)=>{const _e=a,Ne=_t.cloneDeep(e);if(Ne[d==null?void 0:d.uuid]=oe,(_e==null?void 0:_e.length)>0)for(const ve of _e)ve.fieldId===t.field.uuid&&(ve.postData[0]={postValue:oe});if(!(v!=null&&v.rowIsRepeatable)){n(Ne);const ve=Object.keys(Ne).length;r(ve)}},Y=(oe,pe)=>{var _e;if(a){const Ne=[...a],ve=_t.findIndex(Ne,function(Be){return Be.rowId===(v==null?void 0:v.uuid)});let Ae=(_e=a[ve])==null?void 0:_e.repeatableFields;Ae={...Ae,[oe==null?void 0:oe.uuid]:pe},Ne[ve]={...Ne[ve],repeatableFields:Ae},i(Ne)}_(pe),pe!==""?oe.isValid=1:oe.isValid=0},ie=oe=>{v!=null&&v.rowIsRepeatable?Y(d,oe):ue(oe)},re=o.jsxs("div",{onMouseOver:z,onMouseOut:U,children:[S&&H&&o.jsx(Wr,{handleFieldSettingsSidebar:X,...t}),o.jsxs("div",{className:`field ${S&&" py-3 px-4 builder-element-wrapper "}${(d==null?void 0:d.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:S?"col-12 p-fluid":"col-12 ",children:[(d==null?void 0:d.showHeaderText)&&o.jsx("h6",{children:(Z=d==null?void 0:d.headerText)==null?void 0:Z[c==null?void 0:c.type]}),(d==null?void 0:d.showLabel)&&o.jsxs("label",{htmlFor:f,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((K=d==null?void 0:d.attributes)==null?void 0:K.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",S?o.jsx(aa,{...t}):o.jsx(o.Fragment,{children:(W=d==null?void 0:d.label)==null?void 0:W[c==null?void 0:c.type]}),o.jsx("span",{className:"ml-3",children:(d==null?void 0:d.showToolTip)&&o.jsx(zi,{message:(me=d==null?void 0:d.toolTip)==null?void 0:me[c==null?void 0:c.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs("span",{className:"p-input-icon-"+(d==null?void 0:d.iconAlignment),children:[(d==null?void 0:d.showIcon)&&o.jsx("i",{className:"pi pi-"+((Te=(be=d==null?void 0:d.icon)==null?void 0:be.properties)==null?void 0:Te.name)}),o.jsx(cye,{id:d==null?void 0:d.uuid,placeholder:(ye=d==null?void 0:d.placeholder)==null?void 0:ye[c==null?void 0:c.type],value:E,onFocus:()=>O(1),onChange:ie,international:!0,country:"GB",className:`${M===1&&((fe=d==null?void 0:d.attributes)!=null&&fe.required)?E?"valid":"invalid":"valid'"} p-inputtext`,readOnly:w,disabled:x||w})]}),o.jsx("div",{children:((ne=d==null?void 0:d.attributes)==null?void 0:ne.required)&&o.jsx("small",{className:"error",children:M===1&&!E?(q=d==null?void 0:d.validationMesssage)==null?void 0:q.english:""})}),o.jsx("div",{children:(d==null?void 0:d.showHelperText)&&o.jsx("small",{children:(ee=d==null?void 0:d.helperText)==null?void 0:ee[c==null?void 0:c.type]})})]})]})}),x&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[T===!0&&o.jsx(Qi,{visibilty:T,closeSettingFieldSidebar:R,...t}),o.jsx(xi,{...t,fieldWrap:re})]})},dye=t=>{var ue,Y,ie,re,Z,K,W,me,be,Te,ye;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,row:a,isDisabled:s}=t,{isAdmin:l,isBuilderMode:c}=Ht(),{task_status:u,taskRegisterData:d,updateTaskRegisterData:f,updateTaskProgressValue:h,updateUserFormDataSubmit:g,userTaskSubmitFormData:v,TASK_PUBLISHED:m}=Ar(),{userSelectedLanguage:A}=sn(),[w,x]=k.useState(!1),[S,T]=k.useState(""),[C,E]=k.useState(0),[_,M]=k.useState(!1),O=()=>{M(!0)},F=()=>{M(!1)};k.useEffect(()=>{w||U();const fe=Gt.addListener("clearRepeatableFields",q=>{q===(a==null?void 0:a.uuid)&&(T(""),E(0),e.isValid=0)}),ne=Gt.addListener("onSubmitUserForm",()=>{var q;(q=e==null?void 0:e.attributes)!=null&&q.required?S!==""&&du.test(S)===!0?e.isValid=1:e.isValid=0:e.isValid=1});return()=>{ne.remove(),fe.remove()}});const[P,H]=k.useState(!1),N=fe=>{H(fe)},z=()=>{H(!1)},U=()=>{var fe,ne,q;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const ee=[...a.repeatableFields],oe=_t.findIndex(ee,function(pe){return pe.uuid===(e==null?void 0:e.uuid)});oe>=0&&ee[oe].fieldData?T(ee[oe].fieldData):T("")}}else{const ee=v;if(ee!=null&&ee.length){for(const oe of ee)if(oe.fieldId===t.field.uuid&&((fe=oe==null?void 0:oe.postData[0])==null?void 0:fe.postValue)!==""&&((ne=oe==null?void 0:oe.postData[0])!=null&&ne.postValue)){T((q=oe==null?void 0:oe.postData[0])==null?void 0:q.postValue),x(!0);break}}}x(!0)},ce=fe=>{T(fe);const ne=v,q=_t.cloneDeep(d);if(fe!==""&&du.test(fe)===!0){if(q[e==null?void 0:e.uuid]=fe,(ne==null?void 0:ne.length)>0)for(const ee of ne)ee.fieldId===t.field.uuid&&(ee.postData[0]={postValue:fe})}else if(delete q[e==null?void 0:e.uuid],(ne==null?void 0:ne.length)>0)for(const ee of ne)ee.fieldId===t.field.uuid&&(ee.postData[0]={postValue:""});if(!(a!=null&&a.rowIsRepeatable)){f(q);const ee=Object.keys(q).length;h(ee)}};console.log("inputValue",S);const X=(fe,ne)=>{var Ne;console.log("value",ne);const q=[...v],ee=_t.findIndex(q,function(ve){return ve.rowId===(a==null?void 0:a.uuid)});let oe=(Ne=v[ee])==null?void 0:Ne.repeatableFields;const pe=fe,_e=pe==null?void 0:pe.uuid;oe={...oe,[_e]:ne},q[ee]={...q[ee],repeatableFields:oe},console.log("_data2",q),g(q),T(ne),ne!==""&&du.test(ne)===!0?e.isValid=1:e.isValid=0},R=o.jsxs("div",{onMouseOver:O,onMouseOut:F,children:[c&&_&&o.jsx(Wr,{handleFieldSettingsSidebar:N,...t}),o.jsxs("div",{className:`field ${c&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid"}),(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(ue=e==null?void 0:e.headerText)==null?void 0:ue[A==null?void 0:A.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:n,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((Y=e==null?void 0:e.attributes)==null?void 0:Y.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",c?o.jsx(aa,{...t}):o.jsx(o.Fragment,{children:(ie=e==null?void 0:e.label)==null?void 0:ie[A==null?void 0:A.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(zi,{message:(re=e==null?void 0:e.toolTip)==null?void 0:re[A==null?void 0:A.type],position:"right"})})]}),o.jsxs("span",{className:"p-input-icon-"+(e==null?void 0:e.iconAlignment),children:[(e==null?void 0:e.showIcon)&&o.jsx("i",{className:"pi pi-"+((K=(Z=e==null?void 0:e.icon)==null?void 0:Z.properties)==null?void 0:K.name)}),o.jsx(wn,{id:e==null?void 0:e.uuid,placeholder:(W=e==null?void 0:e.placeholder)==null?void 0:W[A==null?void 0:A.type],value:S,onFocus:()=>E(1),onChange:fe=>{a!=null&&a.rowIsRepeatable?X(e,fe.target.value):ce(fe.target.value)},className:C===1&&((me=e==null?void 0:e.attributes)!=null&&me.required)?S?"valid":"invalid":"valid'",readOnly:s||l})]}),((be=e==null?void 0:e.attributes)==null?void 0:be.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:C===1&&!S?(Te=e==null?void 0:e.validationMesssage)==null?void 0:Te[A==null?void 0:A.type]:""})}),S!==""&&C===1&&du.test(S)===!1&&o.jsx("small",{className:"error",children:"Please enter correct url"}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(ye=e==null?void 0:e.helperText)==null?void 0:ye[A==null?void 0:A.type]})})]}),l&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]});return o.jsxs(o.Fragment,{children:[P===!0&&o.jsx(Qi,{visibilty:P,closeSettingFieldSidebar:z,...t},e==null?void 0:e.uuid),o.jsx(xi,{...t,fieldWrap:R})]})},fye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAwAAAAMACAYAAACTgQCOAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAACAAElEQVR42u3deXxcdb3/8ffnTLaWthSUVVuaTMIWKc2cpLWi/oqIeK+4XisuoKDodUNx38H9Ku67IhdwB6NeF1xBqQrWNjOTUgxbM0kLyKp0b7PMnM/vj1ZFtiazZc7M6/l4+LhXxTZ5nzPnfN9zvt/vMQEAakI6DJv3j6L5gft8NTfPN/f5cp8fuR+gIJhv7vNdag7M5sm91aXZkvaTe4uk/c2sSdL+kuRSQtK8h/hr5khqfsB/Nilpx0P8s9tMKuz9/7e6e17SVplNSNpp0i6ZjUfu20yadLMtiqItgdlmmW1xsy2anNwSmW3ZGgRbejOZSY4yAMw8IwIAqAxfuTKxcePGg6IoOsjMDlUUHeJBcJBJh8n9YHc/2MwOdelgSfMl7VfnkeyUtMWke1y606R73f1uBcFdFkX3Kgjudve7giC4d9GiRfdaf3+BswgAKAAAUDM2HXfcARNtbYcH0mFeKHRYEBxu0mEeRR1m1uHSQklNJFW0zZJGJI2YdKdLd5g04tKdhSC4o2tgYKNJETEBAAUAAMoiHYbN892PkNQZSEkPgk65d7qUNKldUhspzagxl0bNbFhRNGxSzqThgpTbYraJKUcAQAEAgIc0vHjxwWpu7jbpGEndkjolJSUdIb7Bj6u8pE0uDZvZsNyHXLrJo+gvXYOD9xIPAAoAADSATccdd0C+paXb3Y8NzLrd/ViZdUs6jHQaymZJI+5+g5kNmfsN+URiqGtgYNQkJx4AFAAAiKFbe3oOz5uFHgSh3ENJvZIOJRk8gi2ShkzKRGYZN8t0DgzcyDoDABQAAKghvnJlYmRk5Fh3DwOzHpd6JB2vh94CE5iubTJbJ/dBlwZNynZ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RWXhnk98AfAO3p0iVsZZfXU2Sj1mQUgozTC4cAPSRzQxY99kOB3osk1XfxMSTWWhjmHySJweBc/9iGCVb4GOB+3ADKKJr8isRa6chveGME6tnCck7+kbooW15M4AbgSunKA+CESb3Pyz8sVgAJIP+YQxvkz4PRZfsRNwGejxb90MZYkvUIa5njgi8DaWX7EdxjgQz5/JD8LQEFMvbnrIyR+l+kvs/0UuDxa/GUPo0nSK6Rh3kPiKoKl0/wt9xD8O1bwxxF0ehpO02IBKJipw4HvBN4NrAZez4tvDxwD/pnE90n8T9p8128kSbmkRINh3gScT3AqcAIwb+qXJ4C7gO8Df8kG/tqH/RSLBaDg0nUMcByLATiJzU74kooqJRr8hL0B+BmjTviSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJKnG/n/K52f+BC6LdAAAAABJRU5ErkJggg==",gye=t=>{var R,ue,Y,ie,re,Z,K,W,me;const{field:e,pageIndex:n,sectionIndex:r,row:i,isDisabled:a}=t,{isAdmin:s,isBuilderMode:l}=Ht(),{task_status:c,taskRegisterData:u,updateTaskRegisterData:d,updateTaskProgressValue:f,updateUserFormDataSubmit:h,userTaskSubmitFormData:g,TASK_PUBLISHED:v}=Ar(),{userSelectedLanguage:m}=sn(),[A,w]=k.useState(!1),[x,S]=k.useState(""),[T,C]=k.useState(0),[E,_]=k.useState(!1),M=()=>{_(!0)},O=()=>{_(!1)};k.useEffect(()=>{A||z();const be=Gt.addListener("clearRepeatableFields",ye=>{ye===(i==null?void 0:i.uuid)&&(S(""),C(0),e.isValid=0)}),Te=Gt.addListener("onSubmitUserForm",()=>{var ye;(ye=e==null?void 0:e.attributes)!=null&&ye.required?x!==""&&du.test(x)===!0?e.isValid=1:e.isValid=0:e.isValid=1});return()=>{Te.remove(),be.remove()}});const[F,P]=k.useState(!1),H=be=>{P(be)},N=()=>{P(!1)},z=()=>{var be,Te,ye;if(i!=null&&i.rowIsRepeatable){const fe=[...(i==null?void 0:i.repeatableFields)||[]],ne=_t.findIndex(fe,function(q){return q.uuid===(e==null?void 0:e.uuid)});ne>=0&&fe[ne].fieldData?S(fe[ne].fieldData):S("")}else{const fe=g;if(fe!=null&&fe.length){for(const ne of fe)if(ne.fieldId===t.field.uuid&&((be=ne==null?void 0:ne.postData[0])==null?void 0:be.postValue)!==""&&((Te=ne==null?void 0:ne.postData[0])!=null&&Te.postValue)){S((ye=ne==null?void 0:ne.postData[0])==null?void 0:ye.postValue),w(!0);break}}}w(!0)},U=(be,Te)=>{S(Te);const ye=g,fe=_t.cloneDeep(u);if(ye!==null){if(Te){if(fe[e==null?void 0:e.uuid]=Te,(ye==null?void 0:ye.length)>0)for(const ne of ye)ne.fieldId===t.field.uuid&&(ne.postData[0]={postValue:Te})}else if(delete fe[e==null?void 0:e.uuid],(ye==null?void 0:ye.length)>0)for(const ne of ye)ne.fieldId===t.field.uuid&&(ne.postData[0]={postValue:""})}if(!(i!=null&&i.rowIsRepeatable)){d(fe);const ne=Object.keys(fe).length;f(ne)}},ce=(be,Te,ye,fe)=>{var oe;const ne=[...g],q=_t.findIndex(ne,function(pe){return pe.rowId===(i==null?void 0:i.uuid)});let ee=(oe=g[q])==null?void 0:oe.repeatableFields;ee={...ee,[ye==null?void 0:ye.uuid]:fe},ne[q]={...ne[q],repeatableFields:ee},h(ne),S(fe),fe!==""&&du.test(fe)===!0?e.isValid=1:e.isValid=0},X=o.jsxs("div",{onMouseOver:M,onMouseOut:O,children:[l&&E&&o.jsx(Wr,{handleFieldSettingsSidebar:H,...t}),o.jsxs("div",{className:`field ${l&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:s?"col-6 ":"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(R=e==null?void 0:e.headerText)==null?void 0:R[m==null?void 0:m.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:e.uuid,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((ue=e==null?void 0:e.attributes)==null?void 0:ue.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",l?o.jsx(aa,{...t}):o.jsx(o.Fragment,{children:(Y=e==null?void 0:e.label)==null?void 0:Y[m==null?void 0:m.type]}),(e==null?void 0:e.showToolTip)&&o.jsx("span",{className:"ml-3",children:o.jsx(zi,{message:(ie=e==null?void 0:e.toolTip)==null?void 0:ie[m==null?void 0:m.type],position:"right"})})]}),o.jsx("div",{children:o.jsx(v6,{cancelIcon:o.jsx("img",{src:fye,alt:"custom-cancel-image",width:"25px",height:"25px"}),offIcon:o.jsx("img",{src:hye,alt:"custom-image-active",width:"25px",height:"25px"}),onIcon:o.jsx("img",{src:pye,alt:"custom-image",width:"25px",height:"25px"}),id:e==null?void 0:e.uuid,placeholder:(re=e==null?void 0:e.placeholder)==null?void 0:re[m==null?void 0:m.type],value:x,onFocus:()=>C(1),onChange:be=>{i!=null&&i.rowIsRepeatable?ce(n,r,e,be.value):U(be,be.value)},className:T===1&&((Z=e==null?void 0:e.attributes)!=null&&Z.required)?x?"valid":"invalid":"valid'",readOnly:a})}),((K=e==null?void 0:e.attributes)==null?void 0:K.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:T===1&&!x?(W=e==null?void 0:e.validationMesssage)==null?void 0:W[m==null?void 0:m.type]:""})}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(me=e==null?void 0:e.helperText)==null?void 0:me[m==null?void 0:m.type]})})]})}),s&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[F===!0&&o.jsx(Qi,{visibilty:F,closeSettingFieldSidebar:N,...t},e==null?void 0:e.uuid),o.jsx(xi,{...t,fieldWrap:X})]})},mye=t=>{var R,ue,Y,ie,re,Z,K,W,me;const{field:e,pageIndex:n,sectionIndex:r,row:i,isDisabled:a}=t,{isAdmin:s,isBuilderMode:l}=Ht(),{task_status:c,taskRegisterData:u,updateTaskRegisterData:d,updateTaskProgressValue:f,updateUserFormDataSubmit:h,userTaskSubmitFormData:g,TASK_PUBLISHED:v}=Ar(),{userSelectedLanguage:m}=sn(),[A,w]=k.useState(!1),[x,S]=k.useState(""),[T,C]=k.useState(0),[E,_]=k.useState(!1),M=()=>{_(!0)},O=()=>{_(!1)};k.useEffect(()=>{A||z();const be=Gt.addListener("clearRepeatableFields",ye=>{ye===(i==null?void 0:i.uuid)&&(S(""),C(0),e.isValid=0)}),Te=Gt.addListener("onSubmitUserForm",()=>{var ye;(ye=e==null?void 0:e.attributes)!=null&&ye.required?x!==""&&du.test(x)===!0?e.isValid=1:e.isValid=0:e.isValid=1});return()=>{Te.remove(),be.remove()}});const[F,P]=k.useState(!1),H=be=>{P(be)},N=()=>{P(!1)},z=()=>{var be,Te,ye;if(i!=null&&i.rowIsRepeatable){if(i!=null&&i.repeatableFields){const fe=[...i.repeatableFields],ne=_t.findIndex(fe,function(q){return q.uuid===(e==null?void 0:e.uuid)});ne>=0&&fe[ne].fieldData?S(fe[ne].fieldData):S("")}}else{const fe=g;if(fe!=null&&fe.length){for(const ne of fe)if(ne.fieldId===t.field.uuid&&((be=ne==null?void 0:ne.postData[0])==null?void 0:be.postValue)!==""&&((Te=ne==null?void 0:ne.postData[0])!=null&&Te.postValue)){S((ye=ne==null?void 0:ne.postData[0])==null?void 0:ye.postValue),w(!0);break}}}w(!0)},U=(be,Te)=>{S(Te);const ye=g,fe=_t.cloneDeep(u);if(ye!==null){if(Te){if(fe[e==null?void 0:e.uuid]=Te,(ye==null?void 0:ye.length)>0)for(const ne of ye)ne.fieldId===t.field.uuid&&(ne.postData[0]={postValue:Te})}else if(delete fe[e==null?void 0:e.uuid],(ye==null?void 0:ye.length)>0)for(const ne of ye)ne.fieldId===t.field.uuid&&(ne.postData[0]={postValue:""})}if(!(i!=null&&i.rowIsRepeatable)){d(fe);const ne=Object.keys(fe).length;f(ne)}},ce=(be,Te,ye,fe)=>{var oe;const ne=[...g],q=_t.findIndex(ne,function(pe){return pe.rowId===(i==null?void 0:i.uuid)});let ee=(oe=g[q])==null?void 0:oe.repeatableFields;ee={...ee,[ye==null?void 0:ye.uuid]:fe},ne[q]={...ne[q],repeatableFields:ee},h(ne),S(fe),fe!==""&&du.test(fe)===!0?e.isValid=1:e.isValid=0},X=o.jsxs("div",{onMouseOver:M,onMouseOut:O,children:[l&&E&&o.jsx(Wr,{handleFieldSettingsSidebar:H,...t}),o.jsx("div",{className:`field ${l&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:l?"col-12 p-fluid field-form-builder":"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(R=e==null?void 0:e.headerText)==null?void 0:R[m==null?void 0:m.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:e.uuid,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((ue=e==null?void 0:e.attributes)==null?void 0:ue.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",l?o.jsx(aa,{...t}):o.jsx(o.Fragment,{children:(Y=e==null?void 0:e.label)==null?void 0:Y[m==null?void 0:m.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(zi,{message:(ie=e==null?void 0:e.toolTip)==null?void 0:ie[m==null?void 0:m.type],position:"right"})})]}),o.jsx(A6,{id:e==null?void 0:e.uuid,placeholder:(re=e==null?void 0:e.placeholder)==null?void 0:re[m==null?void 0:m.type],value:x,onFocus:()=>C(1),onChange:be=>{i!=null&&i.rowIsRepeatable?ce(n,r,e,be.value):U(be,be.value)},className:T===1&&((Z=e==null?void 0:e.attributes)!=null&&Z.required)?x?"valid":"invalid":"valid'",readOnly:a,disabled:s||a}),((K=e==null?void 0:e.attributes)==null?void 0:K.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:T===1&&!x?(W=e==null?void 0:e.validationMesssage)==null?void 0:W[m==null?void 0:m.type]:""})}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(me=e==null?void 0:e.helperText)==null?void 0:me[m==null?void 0:m.type]})})]}),s&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[F===!0&&o.jsx(Qi,{visibilty:F,closeSettingFieldSidebar:N,...t},e==null?void 0:e.uuid),o.jsx(xi,{...t,fieldWrap:X})]})},vye=t=>{var X,R,ue,Y,ie,re;const{field:e,pageIndex:n,sectionIndex:r,row:i}=t,{isAdmin:a,isBuilderMode:s}=Ht(),{task_status:l,taskRegisterData:c,updateTaskRegisterData:u,updateTaskProgressValue:d,updateUserFormDataSubmit:f,userTaskSubmitFormData:h,TASK_PUBLISHED:g}=Ar(),{userSelectedLanguage:v}=sn(),[m,A]=k.useState(!1),[w,x]=k.useState(""),[S,T]=k.useState(0),[C,E]=k.useState(!1),_=()=>{E(!0)},M=()=>{E(!1)};k.useEffect(()=>{m||N();const Z=Gt.addListener("clearRepeatableFields",W=>{W===(i==null?void 0:i.uuid)&&(x(""),T(0),e.isValid=0)}),K=Gt.addListener("onSubmitUserForm",()=>{var W;(W=e==null?void 0:e.attributes)!=null&&W.required&&(w!==""&&du.test(w)===!0?e.isValid=1:e.isValid=0)});return()=>{K.remove(),Z.remove()}});const[O,F]=k.useState(!1),P=Z=>{F(Z)},H=()=>{F(!1)},N=()=>{var Z,K,W;if(i!=null&&i.rowIsRepeatable){if(i!=null&&i.repeatableFields){const me=[...i.repeatableFields],be=_t.findIndex(me,function(Te){return Te.uuid===(e==null?void 0:e.uuid)});be>=0&&me[be].fieldData?x(me[be].fieldData):x("")}}else{const me=h;if(me!=null&&me.length){for(const be of me)if(be.fieldId===t.field.uuid&&((Z=be==null?void 0:be.postData[0])==null?void 0:Z.postValue)!==""&&((K=be==null?void 0:be.postData[0])!=null&&K.postValue)){x((W=be==null?void 0:be.postData[0])==null?void 0:W.postValue),A(!0);break}}}A(!0)},z=(Z,K)=>{x(K);const W=h,me=_t.cloneDeep(c);if(K){if(me[e==null?void 0:e.uuid]=K,(W==null?void 0:W.length)>0)for(const be of W)be.fieldId===t.field.uuid&&(be.postData[0]={postValue:K})}else if(delete me[e==null?void 0:e.uuid],(W==null?void 0:W.length)>0)for(const be of W)be.fieldId===t.field.uuid&&(be.postData[0]={postValue:""});if(!(i!=null&&i.rowIsRepeatable)){u(me);const be=Object.keys(me).length;d(be)}},U=(Z,K,W,me)=>{var fe;const be=[...h],Te=_t.findIndex(be,function(ne){return ne.rowId===(i==null?void 0:i.uuid)});let ye=(fe=h[Te])==null?void 0:fe.repeatableFields;ye={...ye,[W==null?void 0:W.uuid]:me},be[Te]={...be[Te],repeatableFields:ye},f(be),x(me),me!==""&&du.test(me)===!0?e.isValid=1:e.isValid=0},ce=o.jsxs("div",{onMouseOver:_,onMouseOut:M,children:[s&&C&&o.jsx(Wr,{handleFieldSettingsSidebar:P,...t}),o.jsxs("div",{className:`field ${s&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[o.jsxs("div",{className:s?"card p-fluid field-form-builder":"p-fluid",children:[s&&o.jsx("label",{className:"block font-medium mb-3 text-700 text-2xl",children:"Hidden field"}),o.jsx(wn,{type:s===!1?"hidden":"text",id:e==null?void 0:e.uuid,placeholder:(X=e==null?void 0:e.placeholder)==null?void 0:X[v==null?void 0:v.type],value:(R=e==null?void 0:e.defaultValue)==null?void 0:R[v==null?void 0:v.type],onFocus:()=>T(1),onLoad:()=>{i!=null&&i.rowIsRepeatable?U(n,r,e,e==null?void 0:e.defaultValue):z("",e==null?void 0:e.defaultValue)},className:S===1&&((ue=e==null?void 0:e.attributes)!=null&&ue.required)?w?"valid":"invalid":"valid'",readOnly:l===g}),((Y=e==null?void 0:e.attributes)==null?void 0:Y.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:S===1&&!w?(ie=e==null?void 0:e.validationMesssage)==null?void 0:ie[v==null?void 0:v.type]:""})}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(re=e==null?void 0:e.helperText)==null?void 0:re[v==null?void 0:v.type]})})]}),a&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[O===!0&&o.jsx(Qi,{visibilty:O,closeSettingFieldSidebar:H,...t}),o.jsx(xi,{...t,fieldWrap:ce})]})},TU=t=>{var T;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,path:l,labelType:c}=t,[u,d]=k.useState(e),{isBuilderMode:f}=Ht();k.useEffect(()=>{var C;return x((C=e[c])==null?void 0:C[h==null?void 0:h.type]),()=>{}},[e]);const{userSelectedLanguage:h,fieldSettingUpdate:g,fieldSettingUpdateInlineConditional:v,gridComponentFieldSettingUpdate:m}=sn(),A=(C,E,_)=>{d(M=>({...M,[C]:{...M[C],[E==null?void 0:E.type]:_}}))},[w,x]=k.useState((T=e[c])==null?void 0:T[h==null?void 0:h.type]);k.useEffect(()=>(S(),()=>{}),[u]);const S=()=>{const C=l.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?v(C[fa],C[ha],C[Ca],C[xa],C[Ta],C[Fa],C[Xo],C[wo],u):(C==null?void 0:C.length)>Fa&&(C==null?void 0:C.length)===Bl+1&&(e!=null&&e.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?m(C[fa],C[ha],C[Ca],C[xa],C[Ta],C[5],C[6],C[7],u):g(r,i,a,s,n,{...e,[c]:u[c]})};return o.jsx(o.Fragment,{children:o.jsx(D3,{style:{display:"inline-block"},className:"builder-input-label-edit",html:w,disabled:!f,onChange:C=>{var E;x(k3.sanitize((E=C==null?void 0:C.target)==null?void 0:E.value))},onBlur:C=>{var _;const E=k3.sanitize((_=C==null?void 0:C.target)==null?void 0:_.innerText);x(E),A(c,h,E)},tagName:"article"})})},bye=t=>{var re,Z,K,W,me,be,Te;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a}=Ar(),{userSelectedLanguage:s,fieldSettingUpdate:l}=sn(),{field:c,fieldIndex:u,sectionIndex:d,pageIndex:f,row:h,rowIndex:g,columnIndex:v,isDisabled:m}=t,{isBuilderMode:A,isAdmin:w}=Ht(),[x,S]=k.useState(!1),[T,C]=k.useState(""),[E,_]=k.useState(0),[M,O]=k.useState(!1),[F,P]=k.useState(!1),H=()=>{P(!0)},N=()=>{P(!1)},z=()=>{var ye,fe,ne;if(h!=null&&h.rowIsRepeatable){if(h!=null&&h.repeatableFields){const q=[...h.repeatableFields],ee=_t.findIndex(q,function(oe){return oe.uuid===(c==null?void 0:c.uuid)});ee>=0&&q[ee].fieldData?C(q[ee].fieldData):C("")}}else{const q=a;if(q!=null&&q.length){for(const ee of q)if(ee.fieldId===t.field.uuid&&((ye=ee==null?void 0:ee.postData[0])==null?void 0:ye.postValue)!==""&&((fe=ee==null?void 0:ee.postData[0])!=null&&fe.postValue)){C((ne=ee==null?void 0:ee.postData[0])==null?void 0:ne.postValue);break}}}O(!0)};k.useEffect(()=>{M||z();const ye=Gt.addListener("clearRepeatableFields",ee=>{ee===(h==null?void 0:h.uuid)&&(C(""),_(0),c.isValid=0,l(f,d,g,v,u,c))}),fe=Gt.addListener("onSubmitUserForm",()=>{var ee;(ee=c==null?void 0:c.attributes)!=null&&ee.required?T?c.isValid=1:c.isValid=0:c.isValid=1}),ne=Gt.addListener("OnInvalidFieldCatch",ee=>{c.uuid===(ee==null?void 0:ee.fieldId)?_(1):_(0)}),q=Gt.addListener("OnGetFieldValue",ee=>{var pe;const oe=(pe=ee==null?void 0:ee.repeatableColumn)==null?void 0:pe.filter(_e=>(_e==null?void 0:_e.fieldUuid)===(c==null?void 0:c.uuid));oe!=null&&oe.length});return()=>{fe.remove(),ne.remove(),q.remove(),ye.remove()}});const U=ye=>{S(ye)},ce=()=>{S(!1)},X=ye=>{var q,ee;C(ye.target.value);const fe=a,ne=_t.cloneDeep(e);if(fe!==null){if((q=ye==null?void 0:ye.target)!=null&&q.value){if(ne[c==null?void 0:c.uuid]=(ee=ye==null?void 0:ye.target)==null?void 0:ee.value,(fe==null?void 0:fe.length)>0)for(const oe of fe)oe.fieldId===t.field.uuid&&(oe.postData[0]={postValue:ye.target.value})}else if(delete ne[c==null?void 0:c.uuid],(fe==null?void 0:fe.length)>0)for(const oe of fe)oe.fieldId===t.field.uuid&&(oe.postData[0]={postValue:""})}if(!(h!=null&&h.rowIsRepeatable)){n(ne);const oe=Object.keys(ne).length;r(oe)}},R=(ye,fe,ne,q)=>{var ee;if(a){const oe=[...a],pe=_t.findIndex(oe,function(Ne){return Ne.rowId===(h==null?void 0:h.uuid)});let _e=(ee=a[pe])==null?void 0:ee.repeatableFields;_e={..._e,[ne==null?void 0:ne.uuid]:q},oe[pe]={...oe[pe],repeatableFields:_e},i(oe)}C(q),q!==""?ne.isValid=1:ne.isValid=0},ue=10,Y=()=>{const ye=[];for(let fe=0;fe<=ue;fe++)ye.push(o.jsxs("label",{children:[o.jsx("input",{onChange:ne=>{h!=null&&h.rowIsRepeatable?R(f,d,c,ne.target.value):X(ne)},checked:parseInt(T)===fe,name:"liker-scale"+(c==null?void 0:c.uuid),type:"radio",value:fe,disabled:m}),o.jsx("span",{children:fe})]},`field-${c==null?void 0:c.uuid}-likertScale-${fe} ${parseInt(T)===fe?"scale-selected":""}`));return ye},ie=o.jsxs("div",{onMouseOver:H,onMouseOut:N,children:[A&&F&&o.jsx(Wr,{handleFieldSettingsSidebar:U,...t}),o.jsxs("div",{className:`field ${A&&" py-3 px-4 builder-element-wrapper "}${(c==null?void 0:c.isFluid)===!0&&" p-fluid"}`,children:[o.jsxs("div",{className:"",children:[(c==null?void 0:c.showHeaderText)&&o.jsx("h6",{children:(re=c==null?void 0:c.headerText)==null?void 0:re[s==null?void 0:s.type]}),(c==null?void 0:c.showLabel)&&o.jsxs("label",{htmlFor:u,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((Z=c==null?void 0:c.attributes)==null?void 0:Z.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",A?o.jsx(aa,{...t}):o.jsx(o.Fragment,{children:(K=c==null?void 0:c.label)==null?void 0:K[s==null?void 0:s.type]}),o.jsx("span",{className:"ml-3",children:(c==null?void 0:c.showToolTip)&&o.jsx(zi,{message:(W=c==null?void 0:c.toolTip)==null?void 0:W[s==null?void 0:s.type],position:"right"})})]}),o.jsx("div",{children:o.jsxs("div",{className:"mt-4",children:[o.jsxs("div",{className:"flex justify-content-between mb-3",children:[o.jsx("div",{className:"font-medium text-900 ",children:o.jsx(TU,{...t,labelType:"startingMessage"})}),o.jsx("div",{className:"font-medium text-900",children:o.jsx(TU,{...t,labelType:"endingMessage"})})]}),o.jsx("div",{className:"likert",children:Y()})]})}),o.jsx("div",{children:((me=c==null?void 0:c.attributes)==null?void 0:me.required)&&o.jsx("small",{className:"error",children:E===1&&!T?(be=c==null?void 0:c.validationMesssage)==null?void 0:be.language:""})}),o.jsx("div",{children:(c==null?void 0:c.showHelperText)&&o.jsx("small",{children:(Te=c==null?void 0:c.helperText)==null?void 0:Te[s==null?void 0:s.type]})})]}),w&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[x===!0&&o.jsx(Qi,{visibilty:x,closeSettingFieldSidebar:ce,...t}),o.jsx(xi,{...t,fieldWrap:ie})]})},yye=t=>{var Z,K,W,me,be,Te,ye,fe,ne,q,ee,oe;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a,task_status:s,TASK_PUBLISHED:l}=Ar(),{userSelectedLanguage:c,fieldSettingUpdate:u}=sn(),{field:d,fieldIndex:f,sectionIndex:h,pageIndex:g,row:v,rowIndex:m,columnIndex:A,isDisabled:w}=t,{isBuilderMode:x,isAdmin:S,isRenderView:T}=Ht(),[C,E]=k.useState(!1),[_,M]=k.useState(""),[O,F]=k.useState(0),[P,H]=k.useState(!1),[N,z]=k.useState(!1),U=()=>{z(!0)},ce=()=>{z(!1)},X=()=>{var pe,_e,Ne;if(v!=null&&v.rowIsRepeatable){if(v!=null&&v.repeatableFields){const ve=[...v.repeatableFields],Ae=_t.findIndex(ve,function(Be){return Be.uuid===(d==null?void 0:d.uuid)});Ae>=0&&ve[Ae].fieldData?M(ve[Ae].fieldData):M("")}}else{const ve=a;if(ve!=null&&ve.length){for(const Ae of ve)if(Ae.fieldId===t.field.uuid&&((pe=Ae==null?void 0:Ae.postData[0])==null?void 0:pe.postValue)!==""&&((_e=Ae==null?void 0:Ae.postData[0])!=null&&_e.postValue)){M((Ne=Ae==null?void 0:Ae.postData[0])==null?void 0:Ne.postValue);break}}}H(!0)};k.useEffect(()=>{P||X();const pe=Gt.addListener("clearRepeatableFields",Ae=>{Ae===(v==null?void 0:v.uuid)&&(M(""),F(0),d.isValid=0,u(g,h,m,A,f,d))}),_e=Gt.addListener("onSubmitUserForm",()=>{var Ae;(Ae=d==null?void 0:d.attributes)!=null&&Ae.required?_?d.isValid=1:d.isValid=0:d.isValid=1}),Ne=Gt.addListener("OnInvalidFieldCatch",Ae=>{d.uuid===(Ae==null?void 0:Ae.fieldId)?F(1):F(0)}),ve=Gt.addListener("OnGetFieldValue",Ae=>{var Ee;const Be=(Ee=Ae==null?void 0:Ae.repeatableColumn)==null?void 0:Ee.filter($=>($==null?void 0:$.fieldUuid)===(d==null?void 0:d.uuid));Be!=null&&Be.length});return()=>{_e.remove(),Ne.remove(),ve.remove(),pe.remove()}});const R=pe=>{E(pe)},ue=()=>{E(!1)},Y=pe=>{var ve,Ae;M(pe.target.value);const _e=a,Ne=_t.cloneDeep(e);if(_e!==null){if((ve=pe==null?void 0:pe.target)!=null&&ve.value){if(Ne[d==null?void 0:d.uuid]=(Ae=pe==null?void 0:pe.target)==null?void 0:Ae.value,(_e==null?void 0:_e.length)>0)for(const Be of _e)Be.fieldId===t.field.uuid&&(Be.postData[0]={postValue:pe.target.value})}else if(delete Ne[d==null?void 0:d.uuid],(_e==null?void 0:_e.length)>0)for(const Be of _e)Be.fieldId===t.field.uuid&&(Be.postData[0]={postValue:""})}if(!(v!=null&&v.rowIsRepeatable)){n(Ne);const Be=Object.keys(Ne).length;r(Be)}},ie=(pe,_e)=>{var Ne;if(a){const ve=[...a],Ae=_t.findIndex(ve,function(Ee){return Ee.rowId===(v==null?void 0:v.uuid)});let Be=(Ne=a[Ae])==null?void 0:Ne.repeatableFields;Be={...Be,[pe==null?void 0:pe.uuid]:_e},ve[Ae]={...ve[Ae],repeatableFields:Be},i(ve)}M(_e),_e!==""?pe.isValid=1:pe.isValid=0},re=o.jsxs("div",{onMouseOver:U,onMouseOut:ce,children:[x&&N&&o.jsx(Wr,{handleFieldSettingsSidebar:R,...t}),o.jsxs("div",{className:`field ${x&&" py-3 px-4 builder-element-wrapper "}${(d==null?void 0:d.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:x?"col-12 p-fluid":"col-12 ",children:[(d==null?void 0:d.showHeaderText)&&o.jsx("h6",{children:(Z=d==null?void 0:d.headerText)==null?void 0:Z[c==null?void 0:c.type]}),(d==null?void 0:d.showLabel)&&o.jsxs("label",{htmlFor:f,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((K=d==null?void 0:d.attributes)==null?void 0:K.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",x?o.jsx(aa,{...t}):o.jsx(o.Fragment,{children:(W=d==null?void 0:d.label)==null?void 0:W[c==null?void 0:c.type]}),o.jsx("span",{className:"ml-3",children:(d==null?void 0:d.showToolTip)&&o.jsx(zi,{message:(me=d==null?void 0:d.toolTip)==null?void 0:me[c==null?void 0:c.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs("span",{className:"p-input-icon-"+(d==null?void 0:d.iconAlignment),children:[(d==null?void 0:d.showIcon)&&o.jsx("i",{className:"pi pi-"+((Te=(be=d==null?void 0:d.icon)==null?void 0:be.properties)==null?void 0:Te.name)}),o.jsx(wn,{id:d==null?void 0:d.uuid,placeholder:(ye=d==null?void 0:d.placeholder)==null?void 0:ye[c==null?void 0:c.type],value:_,onFocus:()=>F(1),onChange:pe=>{v!=null&&v.rowIsRepeatable?ie(d,pe.target.value):Y(pe)},className:O===1&&((fe=d==null?void 0:d.attributes)!=null&&fe.required)?_?"valid mt-2 mr-2":"invalid mt-2":"valid mt-2",readOnly:w,disabled:S||w})]}),o.jsx("div",{children:((ne=d==null?void 0:d.attributes)==null?void 0:ne.required)&&o.jsx("small",{className:"error",children:O===1&&!_?(q=d==null?void 0:d.validationMesssage)==null?void 0:q.english:""})}),o.jsx("div",{children:(d==null?void 0:d.showHelperText)&&o.jsx("small",{children:(ee=d==null?void 0:d.helperText)==null?void 0:ee[c==null?void 0:c.type]})})]})]})}),o.jsx("p",{className:"text-center",children:o.jsx("span",{className:`${(oe=d==null?void 0:d.fontStyle)==null?void 0:oe.font} text-center`,style:{fontSize:d==null?void 0:d.fontSize},children:_})}),S&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[C===!0&&o.jsx(Qi,{visibilty:C,closeSettingFieldSidebar:ue,...t}),o.jsx(xi,{...t,fieldWrap:re})]})},Aye={country:null,city:null,state:null,addressOne:null,addressTwo:null,zipcode:null,isBillingAddressSame:!1,billingCountry:null,billingCity:null,billingState:null,billingAddressOne:null,billingAddressTwo:null,billingZipcode:null},wye=t=>{var ne,q,ee,oe,pe,_e,Ne,ve,Ae,Be,Ee,$,ge,le,se,he,Se;const{updateUserFormDataSubmit:e,taskRegisterData:n,updateTaskRegisterData:r,updateTaskProgressValue:i,userTaskSubmitFormData:a,TASK_PUBLISHED:s,task_status:l}=Ar(),{globalAlignment:c}=Ht(),{userSelectedLanguage:u,fieldSettingUpdate:d}=sn(),{isAdmin:f,isBuilderMode:h}=Ht(),g=De=>{const Me=De.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",ze=`${De.className} justify-content-start`,tt=`${De.titleClassName} pl-1`;return o.jsxs("div",{className:ze,children:[o.jsxs("button",{className:De.togglerClassName,onClick:De.onTogglerClick,children:[o.jsx("span",{className:Me}),o.jsx(Qt,{})]}),o.jsx("span",{className:tt,children:R})]})},{field:v,fieldIndex:m,sectionIndex:A,pageIndex:w,row:x,rowIndex:S,columnIndex:T,isDisabled:C}=t,[E,_]=k.useState(!1),[M,O]=k.useState(null),[F,P]=k.useState(Aye),[H,N]=k.useState(!1),z=()=>{N(!0)},U=()=>{N(!1)},ce=(De,Me)=>{var ze;if(a){const tt=[...a],it=_t.findIndex(tt,function(Ut){return Ut.rowId===(x==null?void 0:x.uuid)});let ht=(ze=a[it])==null?void 0:ze.repeatableFields;ht={...ht,[De==null?void 0:De.uuid]:`${Me==null?void 0:Me.addressOne}, ${Me==null?void 0:Me.addressTwo}, ${Me==null?void 0:Me.zipcode}`},tt[it]={...tt[it],repeatableFields:ht},e(tt)}P(Me)},X=(De,Me)=>{let ze={...F};ze={...ze,[De]:Me},P(ze),(ze==null?void 0:ze.addressOne)!==""&&(ze!=null&&ze.addressTwo)&&(ze!=null&&ze.zipcode)&&ye(ze==null?void 0:ze.zipcode)?(v.isValid=1,x!=null&&x.rowIsRepeatable?ce(v,ze):me(ze,!0)):(v.isValid=0,x!=null&&x.rowIsRepeatable||me(null,!1))},[R]=k.useState((ne=v==null?void 0:v.label)==null?void 0:ne[u==null?void 0:u.type]),[ue,Y]=k.useState(0),[ie,re]=k.useState(!1),Z=()=>{var De,Me;if(!(x!=null&&x.rowIsRepeatable)){const ze=a;if(ze!=null&&ze.length){for(const tt of ze)if(tt.fieldId===t.field.uuid&&((De=tt==null?void 0:tt.postData[0])!=null&&De.postValue)){P((Me=tt==null?void 0:tt.postData[0])==null?void 0:Me.postValue);break}}}re(!0)};k.useEffect(()=>{ie||Z();const De=Gt.addListener("clearRepeatableFields",ht=>{ht===(x==null?void 0:x.uuid)&&(Y(0),v.isValid=0,d(w,A,S,T,m,v))}),Me=Gt.addListener("onSubmitUserForm",()=>{var ht;(ht=v==null?void 0:v.attributes)!=null&&ht.required?(F==null?void 0:F.addressOne)!==""&&(F==null?void 0:F.zipcode)!==""&&ye(F==null?void 0:F.zipcode)?v.isValid=1:v.isValid=0:v.isValid=1}),ze=Gt.addListener("OnInvalidFieldCatch",ht=>{v.uuid===(ht==null?void 0:ht.fieldId)?Y(1):Y(0)}),tt=Gt.addListener("OnGetFieldValue",ht=>{var hn;const Ut=(hn=ht==null?void 0:ht.repeatableColumn)==null?void 0:hn.filter($t=>($t==null?void 0:$t.fieldUuid)===(v==null?void 0:v.uuid));Ut!=null&&Ut.length}),it=Gt.addListener("formFieldAdded",ht=>{M===null&&O(ht.uuid)});return()=>{Me.remove(),ze.remove(),tt.remove(),De.remove(),it.remove()}});const K=De=>{_(De)},W=()=>{_(!1)},me=(De,Me)=>{const ze=a,tt=_t.cloneDeep(n);if(Me){if(tt[v==null?void 0:v.uuid]=De,(ze==null?void 0:ze.length)>0)for(const it of ze)it.fieldId===t.field.uuid&&(it.postData[0]={postValue:De})}else if(delete tt[v==null?void 0:v.uuid],(ze==null?void 0:ze.length)>0)for(const it of ze)it.fieldId===t.field.uuid&&(it.postData[0]={postValue:De});if(!(x!=null&&x.rowIsRepeatable)){r(tt);const it=Object.keys(tt).length;i(it)}},be=()=>{let De="";return h&&(De=De+" field-form-builder"),l===s&&f===!0&&(De=De+" card"),De},Te=()=>{let De=!1;return F.addressOne!==""&&F.zipcode!==""&&ye(F.zipcode)&&(De=!0),De};function ye(De){const Me=/\d/.test(De),ze=/[a-zA-Z]/.test(De);return Me&&ze?!0:!!Me}k.useEffect(()=>(M!==null&&setTimeout(()=>{O(null)},1e3),()=>{}),[M]);const fe=o.jsxs("div",{onMouseOver:z,onMouseOut:U,children:[h&&H&&o.jsx(Wr,{handleFieldSettingsSidebar:K,...t}),o.jsxs("div",{className:`field ${h&&" py-3 px-4 builder-element-wrapper "}${(v==null?void 0:v.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:`col-12 ${h&&"p-fluid"}`,children:[(v==null?void 0:v.showHeaderText)&&o.jsx("h6",{children:(q=v==null?void 0:v.headerText)==null?void 0:q[u==null?void 0:u.type]}),(v==null?void 0:v.showLabel)&&o.jsxs("label",{htmlFor:m,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((ee=v==null?void 0:v.attributes)==null?void 0:ee.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",h?o.jsx(o.Fragment,{children:(oe=v==null?void 0:v.label)==null?void 0:oe[u==null?void 0:u.type]}):o.jsx(aa,{...t}),o.jsx("span",{className:"ml-3",children:(v==null?void 0:v.showToolTip)&&o.jsx(zi,{message:(pe=v==null?void 0:v.toolTip)==null?void 0:pe[u==null?void 0:u.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3 p-fluid",children:[o.jsx("div",{children:o.jsx("label",{className:"w-full",htmlFor:"",children:(_e=v==null?void 0:v.addresslineFirstLabel)==null?void 0:_e[u==null?void 0:u.type]})}),o.jsx(wn,{value:F.addressOne||"",onChange:De=>X("addressOne",De.target.value),className:"my-2 ",readOnly:C,disabled:f||C}),o.jsx("div",{children:o.jsx("label",{htmlFor:"",children:(Ne=v==null?void 0:v.addresslineSecondLabel)==null?void 0:Ne[u==null?void 0:u.type]})}),o.jsx(wn,{value:F.addressTwo||"",onChange:De=>X("addressTwo",De.target.value),className:"my-2",readOnly:C,disabled:f||C}),o.jsx("div",{children:o.jsx("label",{htmlFor:"",children:(ve=v==null?void 0:v.postalcodeLabel)==null?void 0:ve[u==null?void 0:u.type]})}),o.jsx(wn,{value:F.zipcode||"",onChange:De=>X("zipcode",De.target.value),className:"my-2",readOnly:C,disabled:f||C}),o.jsx("p",{children:!ye(F.zipcode)&&o.jsx("small",{children:"Cannot be alphabetical only."})}),((Ae=v==null?void 0:v.attributes)==null?void 0:Ae.required)&&!Te()&&o.jsx("small",{className:"error",children:ue===1?(Be=v==null?void 0:v.validationMesssage)==null?void 0:Be.language:""}),(v==null?void 0:v.showBillingAddress)===!0&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"binary",checked:F.isBillingAddressSame,onChange:De=>{X("isBillingAddressSame",De.checked),De.checked?P(Me=>({...Me,billingCountry:F.country,billingCity:F.city,billingState:F.state,billingAddressOne:F.addressOne,billingAddressTwo:F.addressTwo,billingZipcode:F.zipcode})):P(Me=>({...Me,billingCountry:null,billingCity:null,billingState:null,billingAddressOne:null,billingAddressTwo:null,billingZipcode:null}))},disabled:f||C}),o.jsx("label",{htmlFor:"binary",children:"Is Billing Address Same"})]}),F.isBillingAddressSame===!1&&o.jsxs(o.Fragment,{children:[(v==null?void 0:v.showLabel)&&o.jsxs("label",{htmlFor:m,className:"flex font-medium mb-3 text-700 text-2xl",children:[((Ee=v==null?void 0:v.attributes)==null?void 0:Ee.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",($=v==null?void 0:v.billingLabel)==null?void 0:$[u==null?void 0:u.type],o.jsx("span",{className:"ml-3",children:(v==null?void 0:v.showToolTip)&&o.jsx(zi,{message:(ge=v==null?void 0:v.toolTip)==null?void 0:ge[u==null?void 0:u.type],position:"right"})})]}),o.jsx("label",{htmlFor:"",children:(le=v==null?void 0:v.addresslineFirstLabel)==null?void 0:le[u==null?void 0:u.type]}),o.jsx(wn,{value:F.billingAddressOne||"",onChange:De=>X("billingAddressOne",De.target.value),className:"my-2",readOnly:C,disabled:f||C}),o.jsx("label",{htmlFor:"",children:(se=v==null?void 0:v.addresslineSecondLabel)==null?void 0:se[u==null?void 0:u.type]}),o.jsx(wn,{value:F.billingAddressTwo||"",onChange:De=>X("billingAddressTwo",De.target.value),className:"my-2",readOnly:C,disabled:f||C}),o.jsx("label",{htmlFor:"",children:(he=v==null?void 0:v.postalcodeLabel)==null?void 0:he[u==null?void 0:u.type]}),o.jsx(wn,{value:F.billingZipcode||"",onChange:De=>X("billingZipcode",De.target.value),className:"my-2",readOnly:C,disabled:f||C}),!ye(F.billingZipcode)&&o.jsx("small",{children:"Cannot be alphabetical only."})]})]}),o.jsx("div",{}),o.jsx("div",{children:(v==null?void 0:v.showHelperText)&&o.jsx("small",{children:(Se=v==null?void 0:v.helperText)==null?void 0:Se[u==null?void 0:u.type]})})]})]})}),f&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[E===!0&&o.jsx(Qi,{visibilty:E,closeSettingFieldSidebar:W,...t}),o.jsx("div",{dir:c?"ltr":"rtl",className:be(),children:l===s&&f===!0?o.jsx(ci,{headerTemplate:g,toggleable:!0,children:fe}):fe})]})},Sye=t=>{var S;const{customColumn:e,indexes:n,customColumnIndex:r,path:i,field:a,onSetValuetoPostData:s,sectionIndex:l,page:c,row:u,column:d,section:f,pageIndex:h,rowIndex:g,columnIndex:v}=t,{handleDrop:m}=sn(),{isAdvanceView:A,isBuilderMode:w}=Ht(),x=(T,C)=>{s(T,C)};return o.jsxs("div",{className:"p-2 py-4",children:[n&&((S=a.children)==null?void 0:S.length)>0&&a.children.map((T,C)=>{const E=T[`${n.rowIndex}-${n.columnIndex}`];return E?o.jsx("div",{children:o.jsx(Lc,{type:"grid",showFieldIcons:!1,onChange:x,data:E,field:E,path:`${i}-${n.rowIndex}-${n.columnIndex}-${C}`,sectionIndex:l,page:c,column:d,row:u,section:f,pageIndex:h,rowIndex:g,columnIndex:v,fieldIndex:C,fieldContainer:"grid-container"})},`${n.rowIndex}-${n.columnIndex}-${C}`):null}),n&&w===!0&&o.jsx("div",{className:"py-5",children:o.jsx(Fr,{isAdvanceView:A,fieldDropArea:!0,data:{path:`${i}-${n.rowIndex}-${r}`,childrenCount:1,droppedField:e},onDrop:m})})]})},EU=t=>{var P,H,N,z,U,ce,X;const{field:e,column:n,section:r,row:i,rowIndex:a,columnIndex:s,sectionIndex:l,userSelectedLanguage:c,fieldIndex:u,customColumnHeaderTemplate:d,onSetValuetoPostData:f,setAllFields:h,allFields:g,actionHeaderTemplate:v,actionBodyTemplate:m,isFocus:A,inputValue:w,handleFieldSettingsSidebar:x,isAdmin:S,emitSocketData:T,isRenderView:C}=t,[E,_]=k.useState(!1),{isBuilderMode:M}=Ht(),O=()=>{_(!0)},F=()=>{_(!1)};return o.jsxs("div",{onMouseOver:O,onMouseOut:F,children:[M&&E&&o.jsx(Wr,{handleFieldSettingsSidebar:x,...t}),o.jsxs("div",{className:`field ${M&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(P=e==null?void 0:e.headerText)==null?void 0:P[c==null?void 0:c.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:u,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((H=e==null?void 0:e.attributes)==null?void 0:H.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",M?o.jsx(aa,{...t}):o.jsx(o.Fragment,{children:(N=e==null?void 0:e.label)==null?void 0:N[c==null?void 0:c.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(zi,{message:(z=e==null?void 0:e.toolTip)==null?void 0:z[c==null?void 0:c.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs(ro,{scrollable:!0,showGridlines:!0,columnResizeMode:"expand",resizableColumns:!0,value:e==null?void 0:e.options,tableStyle:{minWidth:"50rem"},children:[e==null?void 0:e.customColumnsForOptions.map((R,ue)=>o.jsx(xr,{style:{minWidth:350},header:d(R,ue),body:(Y,ie)=>o.jsx(Sye,{customColumn:R,section:r,column:n,columnIndex:s,row:i,rowIndex:a,sectionIndex:l,e:Y,indexes:ie,customColumnIndex:ue,onSetValuetoPostData:f,setAllFields:h,allFields:g,emitSocketData:T,field:e,...t})},R==null?void 0:R.uuid)),M&&o.jsx(xr,{frozen:!0,header:R=>v(R),body:(R,ue)=>m(R,ue),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"}})]}),o.jsx("div",{children:((U=e==null?void 0:e.attributes)==null?void 0:U.required)&&o.jsx("small",{className:"error",children:A===1&&!w?(ce=e==null?void 0:e.validationMesssage)==null?void 0:ce.english:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(X=e==null?void 0:e.helperText)==null?void 0:X[c==null?void 0:c.type]})})]})]})}),S&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]})},Cye=({showAddNewColumn:t,setShowAddNewColumn:e,customColumnEditModalData:n,onHandleChangeCustomColumnSetting:r})=>{const[i,a]=k.useState((n==null?void 0:n.customKey)||"");return o.jsx(Os,{maximizable:!0,header:"Update column title",visible:t,style:{width:"20vw"},footer:()=>o.jsx(Ft,{text:!0,label:"Save",onClick:()=>{r(n,i),e(!1)}}),onHide:()=>e(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsx(wn,{value:i,onChange:s=>{a(s.target.value)}})})})},IU=t=>{var fe;const{globalAlignment:e}=Ht(),n=ne=>{const q=ne.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",ee=`${ne.className} justify-content-start`,oe=`${ne.titleClassName} pl-1`;return o.jsxs("div",{className:ee,children:[o.jsxs("button",{className:ne.togglerClassName,onClick:ne.onTogglerClick,children:[o.jsx("span",{className:q}),o.jsx(Qt,{})]}),o.jsx("span",{className:oe,children:C})]})},{userTaskSubmitFormData:r,TASK_PUBLISHED:i,task_status:a}=Ar(),{userSelectedLanguage:s,fieldSettingUpdate:l}=sn(),{isBuilderMode:c}=Ht(),{field:u,fieldIndex:d,sectionIndex:f,pageIndex:h,row:g,rowIndex:v,columnIndex:m,isAdmin:A}=t,[w,x]=k.useState(!1),[S,T]=k.useState(""),[C]=k.useState((fe=u==null?void 0:u.label)==null?void 0:fe[s==null?void 0:s.type]),[E,_]=k.useState(0),[M,O]=k.useState(!1),[F,P]=k.useState(null),[H,N]=k.useState([]),z=()=>{var ne,q,ee;if(g!=null&&g.rowIsRepeatable){if(g!=null&&g.repeatableFields){const oe=[...g.repeatableFields],pe=_t.findIndex(oe,function(_e){return _e.uuid===(u==null?void 0:u.uuid)});pe>=0&&oe[pe].fieldData?T(oe[pe].fieldData):T("")}}else{const oe=r;if(oe!=null&&oe.length){for(const pe of oe)if(pe.fieldId===t.field.uuid&&((ne=pe==null?void 0:pe.postData[0])==null?void 0:ne.postValue)!==""&&((q=pe==null?void 0:pe.postData[0])!=null&&q.postValue)){T((ee=pe==null?void 0:pe.postData[0])==null?void 0:ee.postValue);break}}}O(!0)},U=()=>{const ne=u;ne.customColumnsForOptions=[...ne.customColumnsForOptions,{customKey:"Column",uuid:nt()}],ye(ne)},[ce,X]=k.useState(!1),R=(ne,q)=>{var ee;return o.jsxs(o.Fragment,{children:[((ee=u==null?void 0:u.options)==null?void 0:ee.length)>1&&o.jsx(Ft,{text:!0,type:"button",className:"p-button-danger left-space ",icon:"pi pi-trash",onClick:()=>ie(ne==null?void 0:ne.uuid,q==null?void 0:q.rowIndex),rounded:!0,severity:"secondary","aria-label":"Bookmark",size:"small"}),o.jsx(Ft,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>be(),"aria-label":"Add Row",size:"small"})]})},ue=(ne,q)=>{var ee;return o.jsxs(o.Fragment,{children:[ne==null?void 0:ne.customKey,c===!0&&o.jsxs(o.Fragment,{children:[((ee=u==null?void 0:u.customColumnsForOptions)==null?void 0:ee.length)>1&&o.jsx("i",{className:"pi pi-trash ml-3",onClick:()=>re(ne==null?void 0:ne.uuid,q)}),o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{P(ne),X(!0)}})]})]})},Y=()=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,icon:"pi pi-plus",onClick:()=>U(),rounded:!0,severity:"secondary","aria-label":"Cancel"})}),ie=(ne,q)=>{var Ne,ve;const ee=(Ne=u==null?void 0:u.customColumnsForOptions)==null?void 0:Ne.length,oe=[...(u==null?void 0:u.children)||[]];(ve=u==null?void 0:u.children)==null||ve.map(Ae=>{for(let Be=0;Be<ee;Be++)if(Ae[`${q}-${Be}`]!==void 0){const Ee=_t.findIndex(oe,function($){return $[`${q}-${Be}`]!==void 0});oe.splice(Ee,1)}});for(let Ae=0;Ae<(oe==null?void 0:oe.length);Ae++){const Be=oe[Ae],$=Object.keys(Be)[0].split("-");parseInt($[0])>q&&(oe[Ae]={[`${parseInt($[0])-1}-${$[1]}`]:oe[Ae][`${parseInt($[0])}-${$[1]}`]})}const pe=u==null?void 0:u.options.filter(function(Ae){return(Ae==null?void 0:Ae.uuid)!==ne}),_e={...u,children:[...oe]};_e.options=pe,ye(_e)},re=(ne,q)=>{var ve,Ae;const ee=_t.findIndex(u==null?void 0:u.customColumnsForOptions,Be=>Be.uuid===ne),oe=u==null?void 0:u.customColumnsForOptions.filter(function(Be,Ee){return Ee!==ee}),pe=(ve=u==null?void 0:u.options)==null?void 0:ve.length,_e=[...(u==null?void 0:u.children)||[]];(Ae=u==null?void 0:u.children)==null||Ae.map(Be=>{for(let Ee=0;Ee<pe;Ee++)if(Be[`${Ee}-${q}`]!==void 0){const $=_t.findIndex(_e,function(ge){return ge[`${Ee}-${q}`]!==void 0});_e.splice($,1)}});for(let Be=0;Be<(_e==null?void 0:_e.length);Be++){const Ee=_e[Be],ge=Object.keys(Ee)[0].split("-");parseInt(ge[1])>q&&(_e[Be]={[`${parseInt(ge[0])}-${parseInt(ge[1])-1}`]:_e[Be][`${parseInt(ge[0])}-${ge[1]}`]})}const Ne={...u,children:[..._e]};Ne.customColumnsForOptions=oe,ye(Ne)};k.useEffect(()=>{M||z();const ne=Gt.addListener("clearRepeatableFields",pe=>{pe===(g==null?void 0:g.uuid)&&(T(""),_(0),u.isValid=0,l(h,f,v,m,d,u))}),q=Gt.addListener("onSubmitUserForm",()=>{var pe;(pe=u==null?void 0:u.attributes)!=null&&pe.required&&(u.isValid=1)}),ee=Gt.addListener("OnInvalidFieldCatch",pe=>{u.uuid===(pe==null?void 0:pe.fieldId)?_(1):_(0)}),oe=Gt.addListener("OnGetFieldValue",pe=>{var Ne;const _e=(Ne=pe==null?void 0:pe.repeatableColumn)==null?void 0:Ne.filter(ve=>(ve==null?void 0:ve.fieldUuid)===(u==null?void 0:u.uuid));_e!=null&&_e.length});return()=>{q.remove(),ee.remove(),oe.remove(),ne.remove()}});const Z=ne=>{x(ne)},K=()=>{x(!1)},W=(ne,q)=>{var oe;const ee=r;if((ee==null?void 0:ee.length)>0)for(const pe of ee)pe.fieldId===t.field.uuid&&(pe.postData[0]={postValue:{...(oe=pe.postData[0])==null?void 0:oe.postValue,[ne]:q}})},me=()=>{let ne="";return c&&(ne=ne+" field-form-builder"),a===i&&A===!0&&(ne=ne+" card"),ne},be=()=>{const ne=u;ne.options=[...ne.options,{uuid:nt(),custom_values:{}}],ye(ne)},Te=(ne,q)=>{P(_e=>_e===null?{customKey:q,uuid:""}:{..._e,customKey:q});const ee=u.customColumnsForOptions,oe=ee.findIndex(_e=>_e.uuid===ne.uuid);ee[oe]={...ee[oe],customKey:q};const pe=u;pe.customColumnsForOptions=ee,ye(pe)},ye=ne=>{l(h,f,v,m,d,ne)};return o.jsxs(o.Fragment,{children:[ce&&o.jsx(Cye,{showAddNewColumn:ce,setShowAddNewColumn:X,customColumnEditModalData:F,onHandleChangeCustomColumnSetting:Te}),w&&o.jsx(Qi,{visibilty:w,closeSettingFieldSidebar:K,...t}),o.jsx("div",{dir:e,className:me(),children:a===i&&A===!0?o.jsx(ci,{headerTemplate:n,toggleable:!0,children:o.jsx(EU,{...t,field:u,userSelectedLanguage:s,fieldIndex:d,pageIndex:h,columnIndex:m,customColumnHeaderTemplate:ue,onSetValuetoPostData:W,setAllFields:ne=>N(ne),allFields:H,actionHeaderTemplate:Y,actionBodyTemplate:R,addOption:be,isFocus:E,inputValue:S,handleFieldSettingsSidebar:Z,isAdmin:A})}):o.jsx(EU,{...t,field:u,userSelectedLanguage:s,fieldIndex:d,pageIndex:h,columnIndex:m,customColumnHeaderTemplate:ue,onSetValuetoPostData:W,setAllFields:ne=>N(ne),allFields:H,actionHeaderTemplate:Y,actionBodyTemplate:R,addOption:be,isFocus:E,inputValue:S,handleFieldSettingsSidebar:Z,isAdmin:A})})]})},xye=t=>{const{customColumn:e,indexes:n,customColumnIndex:r,setAllFields:i,allFields:a}=t,s=l=>{const c={...a};c[`${n==null?void 0:n.rowIndex}-${r}`]=l,i(c)};return o.jsx("div",{children:o.jsx(Pa,{value:a[`${n==null?void 0:n.rowIndex}-${r}`],options:e.options,onChange:l=>s(l.value),optionLabel:"label",placeholder:"Select"})})},_U=t=>{var S,T,C,E,_,M,O;const{field:e,userSelectedLanguage:n,fieldIndex:r,customColumnHeaderTemplate:i,customColumnRowBodyTemplate:a,setAllFields:s,allFields:l,actionHeaderTemplate:c,actionBodyTemplate:u,isFocus:d,inputValue:f,handleFieldSettingsSidebar:h,isAdmin:g}=t,{isBuilderMode:v}=Ht(),[m,A]=k.useState(!1),w=()=>{A(!0)},x=()=>{A(!1)};return o.jsxs("div",{onMouseOver:w,onMouseOut:x,children:[v&&m&&o.jsx(Wr,{handleFieldSettingsSidebar:h,...t}),o.jsxs("div",{className:`field ${v&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:`col-12 ${v&&"p-fluid"}`,children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(S=e==null?void 0:e.headerText)==null?void 0:S[n==null?void 0:n.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:r,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((T=e==null?void 0:e.attributes)==null?void 0:T.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",v?o.jsx(aa,{...t}):o.jsx(o.Fragment,{children:(C=e==null?void 0:e.label)==null?void 0:C[n==null?void 0:n.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(zi,{message:(E=e==null?void 0:e.toolTip)==null?void 0:E[n==null?void 0:n.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs(ro,{showGridlines:!0,value:e==null?void 0:e.rows,children:[o.jsx(xr,{frozen:!0,header:"",headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"},body:F=>a(F)}),e==null?void 0:e.customColumns.map((F,P)=>o.jsx(xr,{header:i(F),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"},body:(H,N)=>o.jsx(xye,{customColumn:F,e:H,indexes:N,customColumnIndex:P,setAllFields:s,allFields:l,...t})},F==null?void 0:F.uuid)),v===!0&&o.jsx(xr,{frozen:!0,header:F=>c(F),body:F=>u(F),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"}})]}),o.jsx("div",{children:((_=e==null?void 0:e.attributes)==null?void 0:_.required)&&o.jsx("small",{className:"error",children:d===1&&!f?(M=e==null?void 0:e.validationMesssage)==null?void 0:M.english:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(O=e==null?void 0:e.helperText)==null?void 0:O[n==null?void 0:n.type]})})]})]})}),g&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]})},Tye=(t,e)=>{var Be,Ee;const n=$=>{const ge=$.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",le=`${$.className} justify-content-start`,se=`${$.titleClassName} pl-1`;return o.jsxs("div",{className:le,children:[o.jsxs("button",{className:$.togglerClassName,onClick:$.onTogglerClick,children:[o.jsx("span",{className:ge}),o.jsx(Qt,{})]}),o.jsx("span",{className:se,children:E})]})},{userTaskSubmitFormData:r,TASK_PUBLISHED:i,task_status:a}=Ar(),{globalAlignment:s,isAdmin:l,isBuilderMode:c}=Ht(),{userSelectedLanguage:u,fieldSettingUpdate:d}=sn(),{field:f,fieldIndex:h,sectionIndex:g,pageIndex:v,row:m,rowIndex:A,columnIndex:w}=t,[x,S]=k.useState(!1),[T,C]=k.useState(""),[E]=k.useState((Be=f==null?void 0:f.label)==null?void 0:Be[u==null?void 0:u.type]),[_,M]=k.useState(0),[O,F]=k.useState(!1),[P,H]=k.useState(null),[N,z]=k.useState(null),[U,ce]=k.useState({}),X=()=>{var $,ge,le;if(m!=null&&m.rowIsRepeatable){if(m!=null&&m.repeatableFields){const se=[...m.repeatableFields],he=_t.findIndex(se,function(Se){return Se.uuid===(f==null?void 0:f.uuid)});he>=0&&se[he].fieldData?C(se[he].fieldData):C("")}}else{const se=r;if(se!=null&&se.length){for(const he of se)if(he.fieldId===t.field.uuid&&(($=he==null?void 0:he.postData[0])==null?void 0:$.postValue)!==""&&((ge=he==null?void 0:he.postData[0])!=null&&ge.postValue)){C((le=he==null?void 0:he.postData[0])==null?void 0:le.postValue);break}}}F(!0)},R=()=>{const $=f;$.customColumns=[...$.customColumns,{customKey:"Column",uuid:nt(),options:[]}],pe($)},[ue,Y]=k.useState(!1),[ie,re]=k.useState(!1),Z=$=>{var ge;return o.jsxs(o.Fragment,{children:[((ge=f==null?void 0:f.rows)==null?void 0:ge.length)>1&&o.jsx(Ft,{text:!0,type:"button",icon:"pi pi-trash",rounded:!0,severity:"secondary",onClick:()=>be($==null?void 0:$.uuid),"aria-label":"Add Row"}),o.jsx(Ft,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>q(),"aria-label":"Add Row"})]})},K=$=>{var ge;return o.jsxs(o.Fragment,{children:[$==null?void 0:$.customKey,c===!0&&o.jsxs(o.Fragment,{children:[((ge=f==null?void 0:f.customColumns)==null?void 0:ge.length)>1&&o.jsx("i",{className:"pi pi-trash ml-3",onClick:()=>Te($==null?void 0:$.uuid)}),o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{H($),Y(!0)}})]})]})},W=()=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>R(),"aria-label":"Add Column"})}),me=$=>o.jsxs(o.Fragment,{children:[$==null?void 0:$.rowHeading,c===!0&&o.jsx(o.Fragment,{children:o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{z($),re(!0)}})})]}),be=$=>{const ge=f==null?void 0:f.rows.filter(function(se){return(se==null?void 0:se.uuid)!==$}),le=f;le.rows=ge,pe(le)},Te=$=>{const ge=_t.findIndex(f==null?void 0:f.customColumns,he=>he.uuid===$),le=f==null?void 0:f.customColumns.filter(function(he,Se){return Se!==ge}),se=f;se.customColumns=le,pe(se)};k.useEffect(()=>{O||X();const $=Gt.addListener("clearRepeatableFields",se=>{se===(m==null?void 0:m.uuid)&&(C(""),M(0),f.isValid=0,d(v,g,A,w,h,f))}),ge=Gt.addListener("OnInvalidFieldCatch",se=>{f.uuid===(se==null?void 0:se.fieldId)?M(1):M(0)}),le=Gt.addListener("OnGetFieldValue",se=>{var Se;const he=(Se=se==null?void 0:se.repeatableColumn)==null?void 0:Se.filter(De=>(De==null?void 0:De.fieldUuid)===(f==null?void 0:f.uuid));he!=null&&he.length});return()=>{ge.remove(),le.remove(),$.remove()}});const ye=$=>{S($)},fe=()=>{S(!1)},ne=()=>{let $="";return c&&($=$+" field-form-builder"),a===i&&l===!0&&($=$+" card"),$},q=()=>{const $=f;$.rows=[...$.rows,{rowHeading:"Row",uuid:nt(),custom_values:{}}],pe($)},ee=($,ge)=>{H(Se=>Se===null?{customKey:ge,uuid:""}:{...Se,customKey:ge});const le=f.customColumns,se=le.findIndex(Se=>Se.uuid===$.uuid);le[se]={...le[se],customKey:ge};const he=f;he.customColumns=le,pe(he)},oe=($,ge)=>{z(Se=>Se===null?{uuid:"",rowHeading:ge}:{...Se,rowHeading:ge});const le=f.rows,se=le.findIndex(Se=>Se.uuid===$.uuid);le[se]={...le[se],rowHeading:ge};const he=f;he.rows=le,pe(he)},pe=$=>{d(v,g,A,w,h,$)};function _e($){return $.toLowerCase().replace(/ /g,"-").replace(/[^\w-]+/g,"")}const Ne=($,ge,le)=>{const se=f.customColumns,he=se.findIndex(De=>P&&De.uuid===P.uuid);se[he].options[le][ge]=$,se[he].options[le].value=_e($);const Se=f;Se.customColumns=se,pe(Se)},ve=()=>{const $=f.customColumns,ge=$.findIndex(se=>P&&se.uuid===P.uuid);$[ge].options.push({label:"",value:"",uuid:nt()});const le=f;le.customColumns=$,pe(le)},Ae=$=>{const ge=f.customColumns,le=ge.findIndex(he=>P&&he.uuid===P.uuid);if(le===-1){console.error("Custom column not found");return}ge[le].options=ge[le].options.filter(he=>he.uuid!==$);const se=f;se.customColumns=ge,pe(se)};return o.jsxs(o.Fragment,{children:[o.jsxs(Os,{maximizable:!0,header:"Update column title",visible:ue,style:{width:"20vw"},footer:()=>o.jsxs(o.Fragment,{children:[" ",o.jsx(Ft,{text:!0,label:"Add Option",icon:"pi pi-plus",onClick:()=>ve()}),o.jsx(Ft,{text:!0,label:"Save",onClick:()=>Y(!1)})]}),onHide:()=>Y(!1),children:[o.jsx("div",{className:"p-fluid",children:o.jsx(wn,{value:(P==null?void 0:P.customKey)||"",onChange:$=>ee(P,$.target.value)})}),o.jsx("hr",{}),o.jsx("h5",{children:"Options"}),(P==null?void 0:P.options)&&((Ee=P==null?void 0:P.options)==null?void 0:Ee.length)>0&&(P==null?void 0:P.options.map(($,ge)=>o.jsxs("div",{className:"my-2 flex p-fluid",children:[o.jsx("span",{children:ge+1}),o.jsx(wn,{value:($==null?void 0:$.label)||"",className:"ml-2",onChange:le=>Ne(le.target.value,"label",ge)}),o.jsx(Ft,{text:!0,type:"button",icon:"pi pi-trash",rounded:!0,severity:"secondary",onClick:()=>Ae($.uuid),"aria-label":"Add Column Option"})]},`custom_column_option_${ge}`)))]}),o.jsx(Os,{maximizable:!0,header:"Update Row Title",visible:ie,style:{width:"20vw"},footer:()=>o.jsx(Ft,{text:!0,label:"Save",onClick:()=>re(!1)}),onHide:()=>re(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsx(wn,{value:(N==null?void 0:N.rowHeading)||"",onChange:$=>oe(N,$.target.value)})})}),o.jsx(Qi,{visibilty:x,closeSettingFieldSidebar:fe,...t}),o.jsx("div",{dir:s,className:ne(),children:a===i&&l===!0?o.jsx(ci,{headerTemplate:n,toggleable:!0,children:o.jsx(_U,{ref:e,...t,field:f,userSelectedLanguage:u,fieldIndex:h,customColumnHeaderTemplate:K,customColumnRowBodyTemplate:me,setAllFields:ce,allFields:U,actionHeaderTemplate:W,actionBodyTemplate:Z,isFocus:_,inputValue:T,handleFieldSettingsSidebar:ye,isAdmin:l})}):o.jsx(_U,{ref:e,...t,field:f,userSelectedLanguage:u,fieldIndex:h,customColumnHeaderTemplate:K,customColumnRowBodyTemplate:me,setAllFields:ce,allFields:U,actionHeaderTemplate:W,actionBodyTemplate:Z,isFocus:_,inputValue:T,handleFieldSettingsSidebar:ye,isAdmin:l})})]})},Eye=t=>{const{indexes:e,customColumnIndex:n,setAllFields:r,allFields:i}=t,a=s=>{const l={...i};l[`${e==null?void 0:e.rowIndex}-${n}`]=s,r(l)};return o.jsx("div",{children:o.jsx(wn,{value:i[`${e==null?void 0:e.rowIndex}-${n}`]||"",onChange:s=>a(s.target.value)})})},DU=t=>{var g,v,m,A,w,x,S;const{field:e,userSelectedLanguage:n,fieldIndex:r,customColumnHeaderTemplate:i,setAllFields:a,allFields:s,actionHeaderTemplate:l,actionBodyTemplate:c,isFocus:u,inputValue:d,isAdmin:f}=t,{isBuilderMode:h}=Ht();return o.jsxs("div",{className:`field ${h&&" py-3 px-4 builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0&&" p-fluid"}`,children:[" ",o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(g=e==null?void 0:e.headerText)==null?void 0:g[n==null?void 0:n.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:r,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((v=e==null?void 0:e.attributes)==null?void 0:v.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",h?o.jsx(aa,{path:"",...t}):o.jsx(o.Fragment,{children:(m=e==null?void 0:e.label)==null?void 0:m[n==null?void 0:n.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(zi,{message:(A=e==null?void 0:e.toolTip)==null?void 0:A[n==null?void 0:n.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",style:{backgroundColor:"#0a061a"},children:[o.jsxs(ro,{scrollable:!0,showGridlines:!0,value:e==null?void 0:e.rows,children:[e==null?void 0:e.customColumns.map((T,C)=>o.jsx(xr,{header:i(T),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"},body:(E,_)=>o.jsx(Eye,{customColumn:T,e:E,indexes:_,customColumnIndex:C,setAllFields:a,allFields:s,...t})},T==null?void 0:T.uuid)),h===!0&&o.jsx(xr,{frozen:!0,header:T=>l(T),body:T=>c(T),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"}})]}),o.jsx("div",{children:((w=e==null?void 0:e.attributes)==null?void 0:w.required)&&o.jsx("small",{className:"error",children:u===1&&!d?(x=e==null?void 0:e.validationMesssage)==null?void 0:x.english:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(S=e==null?void 0:e.helperText)==null?void 0:S[n==null?void 0:n.type]})})]})]})}),f&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})},Iye=({showAddNewRow:t,setShowAddNewRow:e,customRowEditModalData:n,onHandleChangeCustomRowSetting:r})=>{const[i,a]=k.useState((n==null?void 0:n.rowHeading)||"");return o.jsx(Os,{maximizable:!0,header:"Update Row Title",visible:t,style:{width:"20vw"},footer:()=>o.jsx(Ft,{text:!0,label:"Save",onClick:()=>{e(!1),r(n,i)}}),onHide:()=>e(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsx(wn,{value:i||"",onChange:s=>a(s.target.value)})})})},_ye=({showAddNewColumn:t,setShowAddNewColumn:e,customColumnEditModalData:n,onHandleChangeCustomColumnSetting:r})=>{const i=E3({initialValues:{columnValue:(n==null?void 0:n.customKey)||""},validate:a=>{const s={};return a.columnValue||(s.columnValue="Column value is required"),s},onSubmit:a=>{e(!1),r(n,a.columnValue)}});return o.jsx(Os,{maximizable:!0,header:"Update column title",visible:t,style:{width:"20vw"},footer:()=>o.jsx(Ft,{text:!0,label:"Save",onClick:()=>i.handleSubmit()}),onHide:()=>e(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsxs("div",{className:"field",children:[o.jsx("label",{htmlFor:"columnValue",children:"Column Title"}),o.jsx(wn,{id:"columnValue",name:"columnValue",value:i.values.columnValue,onChange:i.handleChange,onBlur:i.handleBlur,className:i.touched.columnValue&&i.errors.columnValue?"p-invalid":""}),i.touched.columnValue&&i.errors.columnValue?o.jsx("small",{className:"p-error",children:i.errors.columnValue}):null]})})})},Dye=t=>{var pe;const e=_e=>{const Ne=_e.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",ve=`${_e.className} justify-content-start`,Ae=`${_e.titleClassName} pl-1`;return o.jsxs("div",{className:ve,children:[o.jsxs("button",{className:_e.togglerClassName,onClick:_e.onTogglerClick,children:[o.jsx("span",{className:Ne}),o.jsx(Qt,{})]}),o.jsx("span",{className:Ae,children:S})]})},{TASK_PUBLISHED:n,task_status:r}=Ar(),{userSelectedLanguage:i,fieldSettingUpdate:a}=sn(),{globalAlignment:s,isAdmin:l,isBuilderMode:c}=Ht(),{field:u,fieldIndex:d,sectionIndex:f,pageIndex:h,rowIndex:g,columnIndex:v}=t,[m,A]=k.useState(!1),[w,x]=k.useState(""),[S]=k.useState((pe=u==null?void 0:u.label)==null?void 0:pe[i==null?void 0:i.type]),[T,C]=k.useState(0),[E,_]=k.useState(null),[M,O]=k.useState(null),[F,P]=k.useState((u==null?void 0:u.allFields)||{}),[H,N]=k.useState(!1),z=()=>{const _e=u;_e.customColumns=[..._e.customColumns,{customKey:"Column",uuid:nt(),options:[]}],q(_e)},[U,ce]=k.useState(!1),[X,R]=k.useState(!1),ue=k.useCallback(_t.debounce(_e=>{const Ne=u;Ne.allFields={..._e},q(Ne)},1e3),[]);k.useEffect(()=>{ue(F)},[F,ue]);const Y=_e=>{var Ne;return o.jsxs(o.Fragment,{children:[((Ne=u==null?void 0:u.options)==null?void 0:Ne.length)>1&&o.jsx(Ft,{text:!0,type:"button",icon:"pi pi-trash",rounded:!0,severity:"secondary",onClick:()=>K(_e==null?void 0:_e.uuid),"aria-label":"Add Row",size:"small"}),o.jsx(Ft,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>ye(),"aria-label":"Add Row",size:"small"})]})},ie=_e=>{var Ne;return o.jsxs(o.Fragment,{children:[_e==null?void 0:_e.customKey,c===!0&&o.jsxs(o.Fragment,{children:[((Ne=u==null?void 0:u.customColumns)==null?void 0:Ne.length)>1&&o.jsx("i",{className:"pi pi-trash ml-3",onClick:()=>W(_e==null?void 0:_e.uuid)}),o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{_(_e),ce(!0)}})]})]})},re=()=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,size:"small",type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>z(),"aria-label":"Add Column"})}),Z=_e=>o.jsxs(o.Fragment,{children:[_e==null?void 0:_e.rowHeading,c===!0&&o.jsx(o.Fragment,{children:o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{O(_e),R(!0)}})})]}),K=_e=>{const Ne=u==null?void 0:u.rows.filter(function(Ae){return(Ae==null?void 0:Ae.uuid)!==_e}),ve=u;ve.rows=Ne,q(ve)},W=_e=>{const Ne=_t.findIndex(u==null?void 0:u.customColumns,Be=>Be.uuid===_e),ve=u==null?void 0:u.customColumns.filter(function(Be,Ee){return Ee!==Ne}),Ae=u;Ae.customColumns=ve,q(Ae)},me=_e=>{A(_e)},be=()=>{A(!1)},Te=()=>{let _e="";return c===!0&&(_e=_e+" field-form-builder"),r===n&&l===!0&&(_e=_e+" card"),_e},ye=()=>{const _e=u;_e.rows=[..._e.rows,{rowHeading:"Row",uuid:nt(),custom_values:{}}],q(_e)},fe=(_e,Ne)=>{_(Ee=>Ee===null?{customKey:Ne,uuid:""}:{...Ee,customKey:Ne});const ve=u.customColumns,Ae=ve.findIndex(Ee=>Ee.uuid===_e.uuid);ve[Ae]={...ve[Ae],customKey:Ne};const Be=u;Be.customColumns=ve,q(Be)},ne=(_e,Ne)=>{O(Ee=>Ee===null?{uuid:"",rowHeading:Ne}:{...Ee,rowHeading:Ne});const ve=u.rows,Ae=ve.findIndex(Ee=>Ee.uuid===_e.uuid);ve[Ae]={...ve[Ae],rowHeading:Ne};const Be=u;Be.rows=ve,q(Be)},q=_e=>{a(h,f,g,v,d,_e)},ee=()=>{N(!0)},oe=()=>{N(!1)};return o.jsxs(o.Fragment,{children:[o.jsx(Os,{maximizable:!0,header:"Update column title",visible:U,style:{width:"20vw"},footer:()=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,label:"Save",onClick:()=>ce(!1)})}),onHide:()=>ce(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsx(wn,{value:(E==null?void 0:E.customKey)||"",onChange:_e=>fe(E,_e.target.value)})})}),X&&o.jsx(Iye,{showAddNewRow:X,setShowAddNewRow:R,customRowEditModalData:M,onHandleChangeCustomRowSetting:ne}),U&&o.jsx(_ye,{showAddNewColumn:U,setShowAddNewColumn:ce,customColumnEditModalData:E,onHandleChangeCustomColumnSetting:fe}),o.jsx(Qi,{visibilty:m,closeSettingFieldSidebar:be,...t}),o.jsx("div",{className:"field-form-builder",children:o.jsxs("div",{onMouseOver:ee,onMouseOut:oe,children:[c&&H&&o.jsx(Wr,{handleFieldSettingsSidebar:me,...t}),o.jsx("div",{dir:s,className:Te(),children:r===n&&l===!0?o.jsx(ci,{headerTemplate:e,toggleable:!0,children:o.jsx(DU,{...t,field:u,userSelectedLanguage:i,fieldIndex:d,customColumnHeaderTemplate:ie,customColumnRowBodyTemplate:Z,setAllFields:P,allFields:F,actionHeaderTemplate:re,actionBodyTemplate:Y,isFocus:T,inputValue:w,handleFieldSettingsSidebar:me,isAdmin:l})}):o.jsx(DU,{isAdmin:!1,...t,field:u,userSelectedLanguage:i,fieldIndex:d,customColumnHeaderTemplate:ie,customColumnRowBodyTemplate:Z,setAllFields:P,allFields:F,actionHeaderTemplate:re,actionBodyTemplate:Y,isFocus:T,inputValue:w,handleFieldSettingsSidebar:me})})]})})]})},Nye=t=>{var fe,ne,q,ee,oe,pe,_e,Ne,ve,Ae,Be;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,userTaskSubmitFormData:i,updateUserFormDataSubmit:a}=Ar(),[s,l]=k.useState([]),{field:c,fieldIndex:u,row:d,pageIndex:f,sectionIndex:h,section:g,page:v,rowIndex:m,columnIndex:A,path:w,update:x,value:S,isDisabled:T}=t,{isAdmin:C,isBuilderMode:E}=Ht(),{userSelectedLanguage:_}=sn(),[M,O]=k.useState(!1),[F,P]=k.useState(""),[H,N]=k.useState(0),[z,U]=k.useState(!1),[ce,X]=k.useState(!1),R=()=>{X(!0)},ue=()=>{X(!1)},Y=Ee=>{O(Ee)},ie=()=>{O(!1)};k.useEffect(()=>((c==null?void 0:c.dataSourceType)==="custom"&&l(c==null?void 0:c.options),c==null||c.dataSourceType,()=>{}));const re=()=>{var $,ge,le,se;let Ee=null;if(d!=null&&d.rowIsRepeatable){if(d!=null&&d.repeatableFields){const he=[...d.repeatableFields],Se=_t.findIndex(he,function(De){return De.uuid===(c==null?void 0:c.uuid)});Se>=0&&he[Se].fieldData?(Ee=he[Se].fieldData,P(he[Se].fieldData)):(c.isValid=0,P(""))}}else{const he=i,Se=_t.cloneDeep(e);if(he!=null&&he.length){for(const De of he)if(De.fieldId===t.field.uuid&&(($=De==null?void 0:De.postData)!=null&&$.length)){Ee=(ge=De==null?void 0:De.postData[0])==null?void 0:ge.postValue,P((le=De==null?void 0:De.postData[0])==null?void 0:le.postValue),Se[c==null?void 0:c.uuid]=(se=De==null?void 0:De.postData[0])==null?void 0:se.postValue;const Me=Object.keys(Se).length;r(Me);break}}}P(Ee),setTimeout(()=>{U(!0)},2e3)};k.useEffect(()=>{!z&&(i==null?void 0:i.length)>0&&re();const Ee=Gt.addListener("clearRepeatableFields",le=>{le===(d==null?void 0:d.uuid)&&(P(""),N(0),c.isValid=1)}),$=Gt.addListener("onSubmitUserForm",()=>{var le;(le=c==null?void 0:c.attributes)!=null&&le.required?F?c.isValid=1:c.isValid=0:c.isValid=1}),ge=Gt.addListener("OnInvalidFieldCatch",le=>{c.uuid===(le==null?void 0:le.fieldId)?N(1):N(0)});return()=>{$.remove(),ge.remove(),Ee.remove()}});const Z=(Ee,$)=>{var ge;if(i){const le=[...i],se=_t.findIndex(le,function(Se){return Se.rowId===(d==null?void 0:d.uuid)});let he=(ge=i[se])==null?void 0:ge.repeatableFields;he={...he,[Ee==null?void 0:Ee.uuid]:$},le[se]={...le[se],repeatableFields:he},a(le)}P($),$?Ee.isValid=1:Ee.isValid=0},K=Ee=>{var $;P(Ee.target.value),d!=null&&d.rowIsRepeatable?Z(c,($=Ee==null?void 0:Ee.target)==null?void 0:$.value):Te(Ee.target.value)},W=()=>(c==null?void 0:c.dataSourceType)==="custom"?`optionText.${_.type}`:(c==null?void 0:c.dataSourceType)==="database"?`${c==null?void 0:c.optionLabel}`:"",me=()=>(c==null?void 0:c.dataSourceType)==="custom"?`optionText.${_.type}`:(c==null?void 0:c.dataSourceType)==="database"?`${c==null?void 0:c.optionLabel}`:"",be=()=>{var Ee,$,ge;if(((Ee=c==null?void 0:c.fieldType)==null?void 0:Ee.type)==="radio"){const le=[];return s.map((se,he)=>{var De,Me,ze,tt;const Se=F;le.push(o.jsxs("div",{className:"field-radiobutton field-radiobutton-builder",onClick:()=>{K({value:se,target:{value:se}})},style:(Se==null?void 0:Se.uuid)===(se==null?void 0:se.uuid)?{backgroundColor:"#0F8BFD",padding:15,borderRadius:8}:{padding:15},children:[o.jsx(ia,{onFocus:()=>N(1),inputId:`radio-option-${he}-${se==null?void 0:se.uuid}-${E?"builder-radio":"preview"}`,onChange:it=>{K(it)},value:se,name:`radio-option-${he}-${se==null?void 0:se.uuid}-${E?"builder":"preview"}`,checked:(Se==null?void 0:Se.uuid)===(se==null?void 0:se.uuid),disabled:T}),((De=se==null?void 0:se.hyperlinkText)==null?void 0:De[_==null?void 0:_.type])===""?o.jsx("label",{htmlFor:`radio-option-${he}-${se==null?void 0:se.uuid}-${E?"builder":"preview"}`,children:(Me=se==null?void 0:se.optionText)==null?void 0:Me[_==null?void 0:_.type]}):o.jsx("label",{children:o.jsx("a",{href:(ze=se==null?void 0:se.hyperlinkText)==null?void 0:ze[_==null?void 0:_.type],target:"_blank",rel:"noreferrer",children:(tt=se==null?void 0:se.optionText)==null?void 0:tt[_==null?void 0:_.type]})})]},he))}),le}if((($=c==null?void 0:c.fieldType)==null?void 0:$.type)==="dropdown")return o.jsx(Pa,{onFocus:()=>N(1),onChange:le=>{d!=null&&d.rowIsRepeatable?Z(c,le.target.value):Te(le.target.value)},options:s,optionLabel:me(),optionValue:W(),value:F,placeholder:(ge=c==null?void 0:c.placeholder)==null?void 0:ge[_==null?void 0:_.type],disabled:T})},Te=Ee=>{var le,se;P(Ee.target.value);const $=i,ge=_t.cloneDeep(e);if($!==null){if((le=Ee==null?void 0:Ee.target)!=null&&le.value){if(ge[c==null?void 0:c.uuid]=(se=Ee==null?void 0:Ee.target)==null?void 0:se.value,($==null?void 0:$.length)>0)for(const he of $)he.fieldId===t.field.uuid&&(he.postData[0]={postValue:Ee.target.value})}else if(delete ge[c==null?void 0:c.uuid],($==null?void 0:$.length)>0)for(const he of $)he.fieldId===t.field.uuid&&(he.postData[0]={postValue:""})}if(!(d!=null&&d.rowIsRepeatable)){n(ge);const he=Object.keys(ge).length;r(he)}},ye=o.jsxs("div",{onMouseOver:R,onMouseOut:ue,children:[E&&ce&&o.jsx(Wr,{handleFieldSettingsSidebar:Y,...t}),o.jsx("div",{className:`field ${!E&&" py-3 px-4 builder-element-wrapper "}${(c==null?void 0:c.isFluid)===!0&&" p-fluid"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-12",children:[(c==null?void 0:c.showHeaderText)&&o.jsx("h6",{children:(fe=c==null?void 0:c.headerText)==null?void 0:fe[_==null?void 0:_.type]}),(c==null?void 0:c.showLabel)&&o.jsxs("label",{htmlFor:u,className:"flex font-medium mb-5 text-700 text-2xl",children:[o.jsx(ca,{sectionIndex:h,fieldIndex:u,field:c,update:x,value:S}),((ne=c==null?void 0:c.attributes)==null?void 0:ne.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",E?o.jsx(aa,{...t}):o.jsx(o.Fragment,{children:(q=c==null?void 0:c.label)==null?void 0:q[_==null?void 0:_.type]}),o.jsx("span",{className:"ml-3",children:c!=null&&c.showToolTip?o.jsx(o.Fragment,{children:o.jsx(zi,{message:(ee=c==null?void 0:c.toolTip)==null?void 0:ee[_==null?void 0:_.type],position:"right"})}):""})]}),be(),o.jsx("div",{children:((oe=c==null?void 0:c.attributes)==null?void 0:oe.required)&&o.jsx("small",{className:"error",children:H===1&&!F?(pe=c==null?void 0:c.validationMesssage)==null?void 0:pe.language:""})}),o.jsx("div",{children:(c==null?void 0:c.showHelperText)&&o.jsx("small",{children:(_e=c==null?void 0:c.helperText)==null?void 0:_e[_==null?void 0:_.type]})}),((Ne=c==null?void 0:c.inlineConditionalRules)==null?void 0:Ne.rules.length)>0&&E===!0&&o.jsx("p",{children:"Inline conditional rules"}),z===!0&&((Ae=(ve=c==null?void 0:c.inlineConditionalRules)==null?void 0:ve.rules)==null?void 0:Ae.length)>0&&((Be=c==null?void 0:c.inlineConditionalRules)==null?void 0:Be.rules.map((Ee,$)=>{const ge=F;return E===!1?o.jsx("div",{children:Ee==null?void 0:Ee.conditions.map((le,se)=>o.jsx(k.Fragment,{children:o.jsx(e0,{isConditionTrue:!!((ge==null?void 0:ge.value)==le.value||E),inputValue:F,condition:le,ruleIndex:$,conditionIndex:se,field:c,section:g,page:v,row:d,pageIndex:f,sectionIndex:h,rowIndex:m,columnIndex:A,path:w,...t})},`select-rule-${$}-`+se))},`rule-${$}`):o.jsx(ci,{className:"mt-4",header:`Rule ${$+1}`,children:o.jsx("div",{children:Ee==null?void 0:Ee.conditions.map((le,se)=>o.jsx(k.Fragment,{children:o.jsx(e0,{isConditionTrue:!!((ge==null?void 0:ge.value)===le.value||E),inputValue:F,condition:le,ruleIndex:$,conditionIndex:se,field:c,section:g,page:v,row:d,pageIndex:f,sectionIndex:h,rowIndex:m,columnIndex:A,path:w,...t})},`select-rule-${$}-`+se))},`rule-${$}`)},$)}))]}),C&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[M===!0&&o.jsx(Qi,{visibilty:M,closeSettingFieldSidebar:ie,...t},c==null?void 0:c.uuid),o.jsx(xi,{...t,fieldWrap:ye})]})},Oye=t=>{var z,U,ce,X;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,userTaskSubmitFormData:i}=Ar(),{field:a,row:s,isDisabled:l=!1}=t,{isBuilderMode:c,isAdmin:u}=Ht(),{userSelectedLanguage:d}=sn(),[f,h]=k.useState(!1),[g,v]=k.useState(""),[m,A]=k.useState(0),[w,x]=k.useState(!1),[S,T]=k.useState(!1),C=()=>{T(!0)},E=()=>{T(!1)},_=R=>{h(R)},M=()=>{h(!1)},O=()=>{var ue,Y,ie,re;let R=null;if(s!=null&&s.rowIsRepeatable){if(s!=null&&s.repeatableFields){const Z=[...s.repeatableFields],K=_t.findIndex(Z,function(W){return W.uuid===(a==null?void 0:a.uuid)});K>=0&&Z[K].fieldData?(R=Z[K].fieldData,v(Z[K].fieldData)):(a.isValid=0,v(""))}}else{const Z=i,K=_t.cloneDeep(e);if(Z!=null&&Z.length){for(const W of Z)if(W.fieldId===t.field.uuid&&((ue=W==null?void 0:W.postData)!=null&&ue.length)){R=(Y=W==null?void 0:W.postData[0])==null?void 0:Y.postValue,v((ie=W==null?void 0:W.postData[0])==null?void 0:ie.postValue),K[a==null?void 0:a.uuid]=(re=W==null?void 0:W.postData[0])==null?void 0:re.postValue;const me=Object.keys(K).length;r(me);break}}}v(R),setTimeout(()=>{x(!0)},2e3)};k.useEffect(()=>{w||O();const R=Gt.addListener("clearRepeatableFields",ie=>{ie===(s==null?void 0:s.uuid)&&(v(""),A(0),a.isValid=1)}),ue=Gt.addListener("onSubmitUserForm",()=>{var ie;if((ie=a==null?void 0:a.attributes)!=null&&ie.required){const re=g;re!=null&&re[a.uuid]?a.isValid=1:a.isValid=0}else a.isValid=1}),Y=Gt.addListener("OnInvalidFieldCatch",ie=>{a.uuid===(ie==null?void 0:ie.fieldId)?A(1):A(0)});return()=>{ue.remove(),Y.remove(),R.remove()}});const F=(R,ue,Y,ie,re)=>ie==null?void 0:ie.map(Z=>{var K,W;return{...Z,children:Z!=null&&Z.children&&((K=Z==null?void 0:Z.children)==null?void 0:K.length)>0?[...((W=Z==null?void 0:Z.children)==null?void 0:W.map(me=>ue===(Z==null?void 0:Z.uuid)||re===!0?(Y!=null&&Y[me==null?void 0:me.uuid]&&delete Y[me==null?void 0:me.uuid],{...me,options:F(R,ue,Y,(me==null?void 0:me.options)||[],!0)}):{...me,options:F(R,ue,Y,(me==null?void 0:me.options)||[],!1)}))||[]]:[]}}),P=(R,ue)=>{const Y={...g};F(R,ue,Y,a==null?void 0:a.options,!1),Y[R]=ue,v(Y),s!=null&&s.rowIsRepeatable||H(Y)},H=R=>{const ue=i,Y=_t.cloneDeep(e);if(ue!==null){if(R){if(Y[a==null?void 0:a.uuid]=R,(ue==null?void 0:ue.length)>0)for(const ie of ue)ie.fieldId===t.field.uuid&&(ie.postData[0]={postValue:R})}else if(delete Y[a==null?void 0:a.uuid],(ue==null?void 0:ue.length)>0)for(const ie of ue)ie.fieldId===t.field.uuid&&(ie.postData[0]={postValue:""})}if(!(s!=null&&s.rowIsRepeatable)){n(Y);const ie=Object.keys(Y).length;r(ie)}},N=o.jsxs("div",{onMouseOver:C,onMouseOut:E,children:[c&&S&&o.jsx(Wr,{handleFieldSettingsSidebar:_,...t}),o.jsx("div",{className:`field ${c&&" py-3 px-4 builder-element-wrapper "}${(a==null?void 0:a.isFluid)===!0&&" p-fluid"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-12",children:[(a==null?void 0:a.showHeaderText)&&o.jsx("h6",{children:(z=a==null?void 0:a.headerText)==null?void 0:z[d==null?void 0:d.type]}),o.jsx(m7,{...t,isDisabled:l,isFirst:!0,schema:a,field:a,value:g,update:(R,ue)=>{P(R,ue)}}),o.jsx("div",{children:((U=a==null?void 0:a.attributes)==null?void 0:U.required)&&o.jsx("small",{className:"error",children:m===1&&!g?(ce=a==null?void 0:a.validationMesssage)==null?void 0:ce.english:""})}),o.jsx("div",{children:(a==null?void 0:a.showHelperText)&&o.jsx("small",{children:(X=a==null?void 0:a.helperText)==null?void 0:X[d==null?void 0:d.type]})})]}),u&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[o.jsx(Qi,{visibilty:f,closeSettingFieldSidebar:M,...t},a==null?void 0:a.uuid),o.jsx(xi,{...t,fieldWrap:N})]})},Fye=t=>{var W,me,be,Te,ye,fe,ne,q,ee,oe;const{field:e,fieldIndex:n,sectionIndex:r,pageIndex:i,row:a,rowIndex:s,columnIndex:l,isDisabled:c}=t,{isRenderView:u,isAdmin:d,isBuilderMode:f}=Ht(),{taskRegisterData:h,updateTaskRegisterData:g,updateTaskProgressValue:v,updateUserFormDataSubmit:m,userTaskSubmitFormData:A,task_status:w,TASK_PUBLISHED:x}=Ar(),[S,T]=k.useState(!1),{userSelectedLanguage:C,fieldSettingUpdate:E}=sn(),[_,M]=k.useState(!1),[O,F]=k.useState(0),[P,H]=k.useState(),[N,z]=k.useState(!1),U=()=>{z(!0)},ce=()=>{z(!1)},X=[{icon:"pi pi-thumbs-up",thumbValue:"up"},{icon:"pi pi-thumbs-down",thumbValue:"down"}],R=pe=>o.jsx("span",{className:"m-2",children:o.jsx("i",{style:{fontSize:30},className:pe.icon})}),ue=()=>{var pe,_e,Ne;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const ve=[...a.repeatableFields],Ae=_t.findIndex(ve,function(Be){return Be.uuid===(e==null?void 0:e.uuid)});Ae>=0&&ve[Ae].fieldData?H(ve[Ae].fieldData):H("")}}else{const ve=A;if(ve!=null&&ve.length){for(const Ae of ve)if(Ae.fieldId===t.field.uuid&&((pe=Ae==null?void 0:Ae.postData[0])==null?void 0:pe.postValue)!==""&&((_e=Ae==null?void 0:Ae.postData[0])!=null&&_e.postValue)){H((Ne=Ae==null?void 0:Ae.postData[0])==null?void 0:Ne.postValue);break}}}M(!0)};k.useEffect(()=>{_||ue();const pe=Gt.addListener("clearRepeatableFields",Ae=>{Ae===(a==null?void 0:a.uuid)&&(H(""),F(0),e.isValid=0,E(i,r,s,l,n,e))}),_e=Gt.addListener("onSubmitUserForm",()=>{var Ae;(Ae=e==null?void 0:e.attributes)!=null&&Ae.required?P?e.isValid=1:e.isValid=0:e.isValid=1}),Ne=Gt.addListener("OnInvalidFieldCatch",Ae=>{e.uuid===(Ae==null?void 0:Ae.fieldId)?F(1):F(0)}),ve=Gt.addListener("OnGetFieldValue",Ae=>{var Ee;const Be=(Ee=Ae==null?void 0:Ae.repeatableColumn)==null?void 0:Ee.filter(($,ge)=>($==null?void 0:$.fieldUuid)===(e==null?void 0:e.uuid));Be!=null&&Be.length});return()=>{_e.remove(),Ne.remove(),ve.remove(),pe.remove()}});const Y=pe=>{H(pe.value);const _e=A,Ne=_t.cloneDeep(h);if(_e!==null){if(pe!=null&&pe.value){if(Ne[e==null?void 0:e.uuid]=pe==null?void 0:pe.value,(_e==null?void 0:_e.length)>0)for(const ve of _e)ve.fieldId===t.field.uuid&&(ve.postData[0]={postValue:pe.value})}else if(delete Ne[e==null?void 0:e.uuid],(_e==null?void 0:_e.length)>0)for(const ve of _e)ve.fieldId===t.field.uuid&&(ve.postData[0]={postValue:""})}if(!(a!=null&&a.rowIsRepeatable)){g(Ne);const ve=Object.keys(Ne).length;v(ve)}},ie=(pe,_e)=>{var Ne;if(A){const ve=[...A],Ae=_t.findIndex(ve,function(Ee){return Ee.rowId===(a==null?void 0:a.uuid)});let Be=(Ne=A[Ae])==null?void 0:Ne.repeatableFields;Be={...Be,[pe==null?void 0:pe.uuid]:_e},ve[Ae]={...ve[Ae],repeatableFields:Be},m(ve)}H(_e),_e!==""?pe.isValid=1:pe.isValid=0},re=pe=>{T(pe)},Z=()=>{T(!1)},K=o.jsxs("div",{onMouseOver:U,onMouseOut:ce,children:[f&&N&&o.jsx(Wr,{handleFieldSettingsSidebar:re,...t}),o.jsx("div",{className:`field ${f&&" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:d?"col-6 ":"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(W=e==null?void 0:e.headerText)==null?void 0:W[C==null?void 0:C.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:n,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((me=e==null?void 0:e.attributes)==null?void 0:me.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",f?o.jsx(aa,{...t}):o.jsx(o.Fragment,{children:(be=e==null?void 0:e.label)==null?void 0:be[C==null?void 0:C.type]}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(zi,{message:(Te=e==null?void 0:e.toolTip)==null?void 0:Te[C==null?void 0:C.type],position:"right"})})]}),o.jsxs("span",{className:"p-input-icon-"+(e==null?void 0:e.iconAlignment),children:[(e==null?void 0:e.showIcon)&&o.jsx("i",{className:"pi pi-"+((fe=(ye=e==null?void 0:e.icon)==null?void 0:ye.properties)==null?void 0:fe.name)}),o.jsx("div",{className:"card flex justify-content-start",children:o.jsx(tf,{value:P,onChange:pe=>{H(pe.value),a!=null&&a.rowIsRepeatable?ie(e,pe.value):Y(pe)},itemTemplate:R,disabled:d||c,optionLabel:"value",onFocus:()=>F(1),options:X,readOnly:c,className:O===1&&((ne=e==null?void 0:e.attributes)!=null&&ne.required)?P?"valid":"invalid":"valid'"})})]}),o.jsx("div",{children:((q=e==null?void 0:e.attributes)==null?void 0:q.required)&&o.jsx(o.Fragment,{children:o.jsx("small",{className:"error",children:O===1&&!P?(ee=e==null?void 0:e.validationMesssage)==null?void 0:ee.english:""})})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(oe=e==null?void 0:e.helperText)==null?void 0:oe[C==null?void 0:C.type]})})]}),d&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[o.jsx(Qi,{visibilty:S,closeSettingFieldSidebar:Z,...t}),o.jsx(xi,{...t,fieldWrap:K})]})},kye=t=>{var ie,re,Z,K,W,me,be;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a}=Ar(),{userSelectedLanguage:s,fieldSettingUpdate:l}=sn(),{field:c,fieldIndex:u,sectionIndex:d,pageIndex:f,row:h,rowIndex:g,columnIndex:v}=t,{isAdmin:m,isBuilderMode:A}=Ht(),[w,x]=k.useState(!1),[S,T]=k.useState(""),[C,E]=k.useState(0),[_,M]=k.useState(!1),[O,F]=k.useState(!1),P=()=>{F(!0)},H=()=>{F(!1)},N=()=>{var Te,ye,fe;if(h!=null&&h.rowIsRepeatable){if(h!=null&&h.repeatableFields){const ne=[...h.repeatableFields],q=_t.findIndex(ne,function(ee){return ee.uuid===(c==null?void 0:c.uuid)});q>=0&&ne[q].fieldData?T(ne[q].fieldData):T("")}}else{const ne=a;if(ne!=null&&ne.length){for(const q of ne)if(q.fieldId===t.field.uuid&&((Te=q==null?void 0:q.postData[0])==null?void 0:Te.postValue)!==""&&((ye=q==null?void 0:q.postData[0])!=null&&ye.postValue)){T((fe=q==null?void 0:q.postData[0])==null?void 0:fe.postValue);break}}}M(!0)};k.useEffect(()=>{_||N();const Te=Gt.addListener("clearRepeatableFields",q=>{q===(h==null?void 0:h.uuid)&&(T(""),E(0),c.isValid=0,l(f,d,g,v,u,c))}),ye=Gt.addListener("onSubmitUserForm",()=>{var q;(q=c==null?void 0:c.attributes)!=null&&q.required?S?c.isValid=1:c.isValid=0:c.isValid=1}),fe=Gt.addListener("OnInvalidFieldCatch",q=>{c.uuid===(q==null?void 0:q.fieldId)?E(1):E(0)}),ne=Gt.addListener("OnGetFieldValue",q=>{var oe;const ee=(oe=q==null?void 0:q.repeatableColumn)==null?void 0:oe.filter(pe=>(pe==null?void 0:pe.fieldUuid)===(c==null?void 0:c.uuid));ee!=null&&ee.length});return()=>{ye.remove(),fe.remove(),ne.remove(),Te.remove()}});const z=Te=>{x(Te)},U=()=>{x(!1)},ce=Te=>{var ne,q;T(Te.target.value);const ye=a,fe=_t.cloneDeep(e);if(ye!==null){if((ne=Te==null?void 0:Te.target)!=null&&ne.value){if(fe[c==null?void 0:c.uuid]=(q=Te==null?void 0:Te.target)==null?void 0:q.value,(ye==null?void 0:ye.length)>0)for(const ee of ye)ee.fieldId===t.field.uuid&&(ee.postData[0]={postValue:Te.target.value})}else if(delete fe[c==null?void 0:c.uuid],(ye==null?void 0:ye.length)>0)for(const ee of ye)ee.fieldId===t.field.uuid&&(ee.postData[0]={postValue:""})}if(!(h!=null&&h.rowIsRepeatable)){n(fe);const ee=Object.keys(fe).length;r(ee)}},X=(Te,ye,fe,ne)=>{var q;if(a){const ee=[...a],oe=_t.findIndex(ee,function(_e){return _e.rowId===(h==null?void 0:h.uuid)});let pe=(q=a[oe])==null?void 0:q.repeatableFields;pe={...pe,[fe==null?void 0:fe.uuid]:ne},ee[oe]={...ee[oe],repeatableFields:pe},i(ee)}T(ne),ne!==""?fe.isValid=1:fe.isValid=0},R=5,ue=()=>{const Te=[],ye=[HT,zT,YT,$T,jT],fe=["Awful","Not Very Good","Okay","Really Good","Fantastic"];for(let ne=0;ne<R;ne++)Te.push(o.jsxs("label",{children:[o.jsx("input",{onChange:q=>{h!=null&&h.rowIsRepeatable?X(f,d,c,q.target.value):ce(q)},checked:parseInt(S)===ne,name:"liker-Emoji-scale"+(c==null?void 0:c.uuid),type:"radio",value:ne}),o.jsxs("span",{className:"grid m-0",children:[o.jsx("div",{className:"col-12 flex justify-content-center",children:o.jsx("img",{src:ye[ne]})}),o.jsx("div",{children:fe[ne]})]})]},`field-${c==null?void 0:c.uuid}-likertEmojiScale-${ne} ${parseInt(S)===ne?"scale-selected":""}`));return Te},Y=o.jsxs("div",{onMouseOver:P,onMouseOut:H,children:[A&&O&&o.jsx(Wr,{handleFieldSettingsSidebar:z,...t}),o.jsxs("div",{className:`field ${A&&" py-3 px-4 builder-element-wrapper "}${(c==null?void 0:c.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12 ",children:[(c==null?void 0:c.showHeaderText)&&o.jsx("h6",{children:(ie=c==null?void 0:c.headerText)==null?void 0:ie[s==null?void 0:s.type]}),(c==null?void 0:c.showLabel)&&o.jsxs("label",{htmlFor:`label${u}`,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((re=c==null?void 0:c.attributes)==null?void 0:re.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",A?o.jsx(aa,{...t}):o.jsx(o.Fragment,{children:(Z=c==null?void 0:c.label)==null?void 0:Z[s==null?void 0:s.type]}),o.jsx("span",{className:"ml-3",children:(c==null?void 0:c.showToolTip)&&o.jsx(zi,{message:(K=c==null?void 0:c.toolTip)==null?void 0:K[s==null?void 0:s.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsx("div",{children:o.jsx("div",{className:"emoji",children:ue()})}),o.jsx("div",{children:((W=c==null?void 0:c.attributes)==null?void 0:W.required)&&o.jsx("small",{className:"error",children:C===1&&!S?(me=c==null?void 0:c.validationMesssage)==null?void 0:me.english:""})}),o.jsx("div",{children:(c==null?void 0:c.showHelperText)&&o.jsx("small",{children:(be=c==null?void 0:c.helperText)==null?void 0:be[s==null?void 0:s.type]})})]})]})}),m&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[o.jsx(Qi,{visibilty:w,closeSettingFieldSidebar:U,...t}),o.jsx(xi,{...t,fieldWrap:Y})]})},Pye=t=>{var N,z,U,ce,X,R,ue,Y,ie,re,Z;const{userTaskSubmitFormData:e}=Ar(),{userSelectedLanguage:n,fieldSettingUpdate:r}=sn(),{isAdmin:i,isBuilderMode:a}=Ht(),{field:s,fieldIndex:l,sectionIndex:c,pageIndex:u,row:d,rowIndex:f,columnIndex:h}=t,[g,v]=k.useState(!1),[m,A]=k.useState(""),[w,x]=k.useState(0),[S,T]=k.useState(!1),[C,E]=k.useState(!1),_=()=>{E(!0)},M=()=>{E(!1)},O=()=>{var K,W,me;if(d!=null&&d.rowIsRepeatable){if(d!=null&&d.repeatableFields){const be=[...d.repeatableFields],Te=_t.findIndex(be,function(ye){return ye.uuid===(s==null?void 0:s.uuid)});Te>=0&&be[Te].fieldData?A(be[Te].fieldData):A("")}}else{const be=e;if(be!=null&&be.length){for(const Te of be)if(Te.fieldId===t.field.uuid&&((K=Te==null?void 0:Te.postData[0])==null?void 0:K.postValue)!==""&&((W=Te==null?void 0:Te.postData[0])!=null&&W.postValue)){A((me=Te==null?void 0:Te.postData[0])==null?void 0:me.postValue);break}}}T(!0)};k.useEffect(()=>{S||O();const K=Gt.addListener("clearRepeatableFields",Te=>{Te===(d==null?void 0:d.uuid)&&(A(""),x(0),s.isValid=0,r(u,c,f,h,l,s))}),W=Gt.addListener("onSubmitUserForm",()=>{var Te,ye;(Te=s==null?void 0:s.attributes)!=null&&Te.required?m&&(m==null?void 0:m.length)<((ye=s==null?void 0:s.attributes)==null?void 0:ye.minLength)?s.isValid=1:s.isValid=0:s.isValid=1}),me=Gt.addListener("OnInvalidFieldCatch",Te=>{s.uuid===(Te==null?void 0:Te.fieldId)?x(1):x(0)}),be=Gt.addListener("OnGetFieldValue",Te=>{var fe;const ye=(fe=Te==null?void 0:Te.repeatableColumn)==null?void 0:fe.filter(ne=>(ne==null?void 0:ne.fieldUuid)===(s==null?void 0:s.uuid));ye!=null&&ye.length});return()=>{W.remove(),me.remove(),be.remove(),K.remove()}});const F=K=>{v(K)},P=()=>{v(!1)},H=o.jsxs("div",{onMouseOver:_,onMouseOut:M,children:[a&&C&&o.jsx(Wr,{handleFieldSettingsSidebar:F,...t}),o.jsxs("div",{className:`field ${a&&" py-3 px-4 builder-element-wrapper "}${(s==null?void 0:s.isFluid)===!0&&" p-fluid"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:i?"col-6 ":"col-12 p-fluid",children:[(s==null?void 0:s.showHeaderText)&&o.jsx("h6",{children:(N=s==null?void 0:s.headerText)==null?void 0:N[n==null?void 0:n.type]}),(s==null?void 0:s.showLabel)&&o.jsxs("label",{htmlFor:l,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((z=s==null?void 0:s.attributes)==null?void 0:z.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",a?o.jsx(aa,{...t}):o.jsx(o.Fragment,{children:(U=s==null?void 0:s.label)==null?void 0:U[n==null?void 0:n.type]}),(s==null?void 0:s.showToolTip)&&o.jsx("span",{className:"ml-3",children:o.jsx(zi,{message:(ce=s==null?void 0:s.toolTip)==null?void 0:ce[n==null?void 0:n.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsx("span",{className:"p-input-icon-"+(s==null?void 0:s.iconAlignment),children:(s==null?void 0:s.showIcon)&&o.jsx("i",{className:"pi pi-"+((R=(X=s==null?void 0:s.icon)==null?void 0:X.properties)==null?void 0:R.name)})}),o.jsx("div",{children:((ue=s==null?void 0:s.attributes)==null?void 0:ue.required)&&o.jsxs(o.Fragment,{children:[o.jsx("small",{className:"error",children:w===1&&!m?(Y=s==null?void 0:s.validationMesssage)==null?void 0:Y.english:""}),o.jsx("small",{className:"error",children:w===1&&(m==null?void 0:m.length)<((ie=s==null?void 0:s.attributes)==null?void 0:ie.minLength)?`Mini length ${(re=s==null?void 0:s.attributes)==null?void 0:re.minLength}`:""})]})}),o.jsx("div",{children:(s==null?void 0:s.showHelperText)&&o.jsx("small",{children:(Z=s==null?void 0:s.helperText)==null?void 0:Z[n==null?void 0:n.type]})})]})]})}),i&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[o.jsx(Qi,{visibilty:g,closeSettingFieldSidebar:P,...t}),o.jsx(xi,{...t,fieldWrap:H})]})},Mye=t=>{var H,N,z,U,ce,X,R;const{field:e,fieldIndex:n,columnIndex:r,sectionIndex:i,rowIndex:a,pageIndex:s,ref:l}=t,{isBuilderMode:c}=Ht(),{userSelectedLanguage:u,fieldSettingUpdate:d}=sn(),{userTaskSubmitFormData:f}=Ar(),[h,g]=k.useState(!1),[v,m]=k.useState(""),[A,w]=k.useState(0),[x,S]=k.useState(!1),[T,C]=k.useState(!1),E=()=>{C(!0)},_=()=>{C(!1)},M=()=>{var Y;const ue=f;if(ue.length){for(const ie of ue)if(ie.fieldId===t.field.uuid){m((Y=ie==null?void 0:ie.postData[0])==null?void 0:Y.postValue),S(!0);break}}};k.useEffect(()=>{x||M();const ue=Gt.addListener("onSubmitUserForm",()=>{var ie;(ie=e==null?void 0:e.attributes)!=null&&ie.required&&(v?e.isValid=1:e.isValid=0,d(s,i,a,r,n,e))}),Y=Gt.addListener("OnInvalidFieldCatch",ie=>{e.uuid===(ie==null?void 0:ie.fieldId)?w(1):w(0)});return()=>{ue.remove(),Y.remove()}});const O=ue=>{g(ue)},F=()=>{g(!1)},P=o.jsxs("div",{onMouseOver:E,onMouseOut:_,children:[c&&T&&o.jsx(Wr,{handleFieldSettingsSidebar:O,...t}),o.jsx("div",{className:c?"field-form-builder":"",ref:l,children:o.jsx("div",{className:"field",children:o.jsx("div",{className:"grid",children:o.jsxs("div",{className:c?"col-11":"col-12",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(H=e==null?void 0:e.headerText)==null?void 0:H[u==null?void 0:u.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:`${n}`,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[((N=e==null?void 0:e.attributes)==null?void 0:N.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",i+1,".",r+1,".",n+1," ",(z=e==null?void 0:e.label)==null?void 0:z[u==null?void 0:u.type],o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(zi,{message:(U=e==null?void 0:e.toolTip)==null?void 0:U[u==null?void 0:u.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsx("p",{children:"Anchor Tag"}),o.jsx("div",{children:((ce=e==null?void 0:e.attributes)==null?void 0:ce.required)&&o.jsx("small",{className:"error",children:A===1&&!v?(X=e==null?void 0:e.validationMesssage)==null?void 0:X.language:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(R=e==null?void 0:e.helperText)==null?void 0:R[u==null?void 0:u.type]})})]})]})})})})]});return o.jsxs(o.Fragment,{children:[h&&o.jsx(Qi,{visibilty:h,closeSettingFieldSidebar:F,...t}),o.jsx(xi,{...t,fieldWrap:P})]})},Lc=t=>{const{data:e,path:n,field:r}=t,{renderType:i,isAdmin:a,isBuilderMode:s}=Ht(),{task_status:l,TASK_PUBLISHED:c}=Ar(),u=k.useRef(null),[d,f]=k.useState(!1),[{isDragging:h},g]=ra({item:{...e,type:z1,uuid:e==null?void 0:e.uuid,path:n},type:z1,collect:T=>({isDragging:T.isDragging()})}),v=h&&s?.25:1;g(u);const m=l===c||a,A=T=>{switch(r==null?void 0:r.componentType){case"text":return o.jsx(Mse,{typeName:"Text",field:r,...T});case"number":return o.jsx(Use,{typeName:"Number",field:r,...T});case"email":return o.jsx(zue,{typeName:"Email",field:r,...T});case"textarea":return o.jsx(Hue,{typeName:"Text Area",field:r,...T});case"editor":return o.jsx(cde,{typeName:"Editor",field:r,...T});case"question":return o.jsx(jde,{typeName:"Exam",field:r,...T});case"select":return o.jsx(Que,{typeName:"Select",field:r,...T});case"multi-select":return o.jsx(Ede,{typeName:"Multi Select",field:r,...T});case"checkbox":return o.jsx(_de,{typeName:"Checkbox",field:r,...T});case"radio":return o.jsx(Ode,{typeName:"Radio",field:r,...T});case"radio-hierarchal":return o.jsx(Oye,{typeName:"Radio Progressive",field:r,...T});case"href":return o.jsx(qse,{typeName:"Hyperlink",field:r,...T});case"heading":return o.jsx(Mde,{typeName:"Heading",field:r,...T});case"paragraph":return o.jsx(r4e,{typeName:"Paragraph",field:r,...T});case"image":return o.jsx(RO,{typeName:"Image",field:r,...T});case"video":return o.jsx(ime,{typeName:"Video",field:r,...T});case"hr":return o.jsx(ame,{typeName:"Hr",field:r,...T});case"date-picker":return o.jsx(sme,{typeName:"Date Picker",field:r,...T});case"signature":return o.jsx(ome,{typeName:"Signature",field:r,...T});case"file-upload":return o.jsx(V6e,{typeName:"File Upload",field:r,...T});case"facebook-login":return o.jsx(Pye,{typeName:"Facebook Login",field:r,...T});case"anchor":return o.jsx(Mye,{ref:u,typeName:"Anchor Tag",field:r,...T});case"image-gallery":return o.jsx(e4e,{typeName:"Image gallery",field:r,...T});case"quiz":return o.jsx(J6e,{typeName:"Quiz",field:r,...T});case"document":return o.jsx(q6e,{typeName:"Document",field:r,...T});case"list":return o.jsx(t8e,{typeName:"List",field:r,...T});case"country":return o.jsx(Pse,{typeName:"Country",field:r,...T});case"phone":return o.jsx(uye,{typeName:"Phone",field:r,...T});case"web-url":return o.jsx(dye,{typeName:"Website Url",field:r,...T});case"rating":return o.jsx(gye,{typeName:"Rating",field:r,...T});case"slider":return o.jsx(mye,{typeName:"Rating",field:r,...T});case"hidden-field":return o.jsx(vye,{typeName:"Hidden Field",field:r,...T});case"likert-scale":return o.jsx(bye,{typeName:"Likert Scale Field",field:r,...T});case"type-signature":return o.jsx(yye,{typeName:"Likert Scale Field",field:r,...T});case"address":return o.jsx(wye,{typeName:"Address",field:r,...T});case"grid-component":return o.jsx(IU,{typeName:"Grid",field:r,...T});case"matrix-scale":return o.jsx(IU,{typeName:"Grid",field:r,...T});case"matrix-dropdown":return o.jsx(Tye,{typeName:"Grid",field:r,...T});case"thumbs":return o.jsx(Fye,{typeName:"Thumbs Up and Down",field:r,...T});case"likert-emoji-scale":return o.jsx(kye,{typeName:"Thumbs Up and Down",field:r,...T});case"table":return o.jsx(Dye,{typeName:"Grid",field:r,...T});case"dynamic-listing":return o.jsx(Nye,{typeName:"Grid",field:r,...T});default:return o.jsx(o.Fragment,{children:"Empty"})}},w=()=>{f(!0)},x=()=>{f(!1)},S=()=>{let T="";return s===!0?(T=T+" component draggable field-form-builder-not-preview",i===H1?T=T+" pdf-component":T=T+" px-2 pdf-component"):(T=T+" component ",i===H1?T=T+" ":T=T+" px-2 "),T};return o.jsx(o.Fragment,{children:o.jsxs("div",{style:{opacity:v},className:S(),onMouseOver:w,onMouseOut:x,children:[s&&d&&o.jsx("i",{ref:s===!0?u:null,className:"elementDrag-icon pi pi-arrows-alt cursor-move",style:{fontSize:"1em"}}),A({...t,isDisabled:m})]})})},Lye={position:"relative"},Bye=t=>{var M,O,F,P,H;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,section:l,row:c,page:u}=t,d=k.useRef(null),{removeColumn:f,addColumn:h,cloneColumn:g,formBuilderFormLayout:v,handleDrop:m}=sn(),{isAdvanceView:A,isBuilderMode:w,emitSocketData:x}=Ht(),[{isDragging:S},T]=ra({type:As,item:{type:As,uuid:e==null?void 0:e.uuid,children:e.children,path:n},collect:N=>({isDragging:N.isDragging()})}),C=S&&w?.25:1;T(d);const E=(N,z,U,ce,X,R,ue)=>o.jsx(Lc,{page:u,type:"field",row:c,column:e,section:l,field:N,data:N,path:z,pageIndex:U,sectionIndex:ce,rowIndex:X,columnIndex:R,fieldIndex:ue},`component-${n}-${N==null?void 0:N.uuid}`),_=(N,z,U,ce,X)=>{var ie,re,Z,K;const R=N.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",ue=`${N.className} justify-content-space-between`,Y=`${N.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".add-column-tool"}),o.jsxs("div",{className:ue,children:[o.jsxs("span",{ref:w===!0?d:null,children:[o.jsx("button",{className:N.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:N.togglerClassName,onClick:N.onTogglerClick,children:[o.jsx("span",{className:R}),o.jsx(Qt,{})]}),o.jsx("span",{className:Y,children:"Column"})]}),w===!0&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-column-tool","data-pr-tooltip":"Add Column",children:o.jsxs("button",{className:N.togglerClassName,onClick:()=>{h(z,U,ce),x()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((K=(Z=(re=(ie=v[z])==null?void 0:ie.children[U])==null?void 0:re.children[ce])==null?void 0:Z.children)==null?void 0:K.length)>1&&o.jsxs("button",{className:N.togglerClassName,onClick:()=>{f(z,U,ce,X),x()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:N.togglerClassName,onClick:()=>{g(e,z,U,ce,X),x()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsx("div",{style:A&&w?{...Lye,opacity:C}:{},className:w?"draggable form-builder-column container-column":"form-builder-column container-column",children:w===!0?o.jsx(o.Fragment,{children:A===!0?o.jsxs(ci,{className:"builder-row-column",header:"Column",toggleable:!0,headerTemplate:N=>_(N,r,i,a,s),children:[((M=e==null?void 0:e.children)==null?void 0:M.length)>0?(O=e==null?void 0:e.children)==null?void 0:O.map((N,z)=>{const U=`${n}-${z}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:A,fieldDropArea:!0,data:{path:U,childrenCount:e.children.length,droppedField:e},onDrop:m}),E(N,U,r,i,a,s,z)]},U)}):o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]}),o.jsx(Fr,{isAdvanceView:A,fieldDropArea:!0,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:m,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((F=e==null?void 0:e.children)==null?void 0:F.length)>0?(P=e==null?void 0:e.children)==null?void 0:P.map((N,z)=>{const U=`${n}-${z}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:A,fieldDropArea:!0,data:{path:U,childrenCount:e.children.length,droppedField:e},onDrop:m}),E(N,U,r,i,a,s,z)]},U)}):o.jsx(o.Fragment,{children:o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]})}),o.jsx(Fr,{isAdvanceView:A,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:m,isLast:!0})]})})}):o.jsx(o.Fragment,{children:(H=e==null?void 0:e.children)==null?void 0:H.map((N,z)=>{const U=`${n}-${z}`;return o.jsx(k.Fragment,{children:E(N,U,r,i,a,s,z)},U)})})})},Vye=t=>{var i,a,s;const{language:e,onHandleChange:n,stateRow:r}=t;return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Row heading"}),o.jsx(wn,{value:(i=r==null?void 0:r.heading)==null?void 0:i[e==null?void 0:e.type],placeholder:"Enter row heading",onChange:l=>n("heading",e,l.target.value)})]}),o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Row description"}),o.jsx(so,{value:(a=r==null?void 0:r.subHeadingText)==null?void 0:a[e==null?void 0:e.type],placeholder:"Enter row description",onChange:l=>n("subHeadingText",e,l.target.value)})]}),(r==null?void 0:r.rowIsRepeatable)===!0&&o.jsxs("div",{className:"field",children:[o.jsx("span",{className:"must-required",children:"*"})," ",o.jsx("label",{children:"Add To List Button Label"}),o.jsx(wn,{value:(s=r.addToListButtonLabel)==null?void 0:s[e==null?void 0:e.type],onChange:l=>n("addToListButtonLabel",e,l.target.value)})]})]})},qye=t=>{const{stateRow:e,onHandleChangeAdvanceSettings:n}=t,{renderType:r}=Ht();return o.jsxs("div",{className:"p-fluid",children:[r===F0&&o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"rowIsRepeatable",checked:e==null?void 0:e.rowIsRepeatable,onChange:i=>n("rowIsRepeatable",i==null?void 0:i.checked)}),o.jsx("label",{htmlFor:"isRepeatable",children:"Row is repeatable ?"})]}),(e==null?void 0:e.rowIsRepeatable)&&o.jsxs("div",{className:"field",children:[o.jsx("span",{className:"must-required",children:"*"})," ",o.jsx("label",{children:"Row Minimum Entries"}),o.jsx(eo,{value:e==null?void 0:e.minimumEntries,onChange:i=>n("minimumEntries",i.value)})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"isManualEnumerationEnabled",checked:(e==null?void 0:e.isManualEnumerationEnabled)||!1,onChange:i=>n("isManualEnumerationEnabled",i==null?void 0:i.checked)}),o.jsx("label",{htmlFor:"isManualEnumerationEnabled",children:"Enable manual enumeration for row components?"}),o.jsxs("small",{children:[" ","You need to set mannual enumeration for every component from its settings."," "]})]})]})},bg=t=>{var x;const{visibilty:e,setVisibility:n,row:r,pageIndex:i,sectionIndex:a,rowIndex:s}=t,{formBuilderSchemaLanguages:l,rowSettingUpdate:c,userSelectedLanguage:u,formBuilderPublishedStatus:d}=sn(),[f,h]=k.useState(r),{updateGlobalToast:g,emitSocketData:v}=Ht(),m=(S,T,C)=>{h(E=>{const _=E[S];return Object.assign({},E,{[S]:Object.assign({},_,{[T==null?void 0:T.type]:C})})})},A=(S,T)=>{h(C=>({...C,[S]:T}))},w=()=>{const S={...f,children:r==null?void 0:r.children};c(i,a,s,S),v(),g({showToast:!0,toastMessage:"Updated",toastDetail:"Row updated",toastType:"success"})};return o.jsx(o.Fragment,{children:o.jsxs(To,{visible:e,position:"left",className:"p-sidebar-lg",onHide:()=>n(!1),children:[o.jsxs("div",{className:"flex justify-content-between flex-wrap card-container ",children:[o.jsxs("div",{className:"flex align-items-center justify-content-center ",children:[" ",o.jsxs("h5",{children:["Row settings - ",(x=r==null?void 0:r.heading)==null?void 0:x[u==null?void 0:u.type]]})," "]}),!d&&o.jsx("div",{className:"flex align-items-center justify-content-center",children:o.jsx(Ft,{className:"mt-3",label:"Update",type:"button",onClick:()=>w(),"aria-label":"Update"})})]}),o.jsxs(ts,{children:[o.jsx(wr,{header:"Text",children:o.jsx(ao,{activeIndex:0,children:l!=null&&l.length?l.map((S,T)=>o.jsx(io,{tabIndex:T,header:S==null?void 0:S.language,children:o.jsx(Vye,{language:S,stateRow:f,onHandleChange:m,...t})},T)):""})}),o.jsx(wr,{header:"Advance",children:o.jsx(qye,{stateRow:f,onHandleChangeAdvanceSettings:A})}),o.jsx(wr,{header:"Layout",children:o.jsxs("div",{className:"p-fluid",children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"showRowTitle",checked:f==null?void 0:f.showRowTitle,onChange:S=>A("showRowTitle",S==null?void 0:S.checked)}),o.jsx("label",{htmlFor:"showRowTitle",children:"Show Row Title?"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"showRowSubTitle",checked:f==null?void 0:f.showRowSubTitle,onChange:S=>A("showRowSubTitle",S==null?void 0:S.checked)}),o.jsx("label",{htmlFor:"showRowSubTitle",children:"Show Row Sub Title?"})]})]})})]})]})})},Uye={},$ye=t=>{var ne,q,ee,oe,pe,_e,Ne,ve,Ae,Be,Ee,$,ge;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,c=k.useRef(null),{removeRow:u,addRow:d,cloneRow:f,formBuilderFormLayout:h,userSelectedLanguage:g,handleDrop:v}=sn(),{userTaskSubmitFormData:m,taskRegisterData:A,updateTaskRegisterData:w,updateTaskProgressValue:x,addUserDataFormRowRepeatableData:S,removeUserDataFormSectionRepeatableData:T,task_status:C,TASK_PUBLISHED:E}=Ar(),{isRenderView:_,isAdvanceView:M,isBuilderMode:O,renderType:F,isAdmin:P,emitSocketData:H,updateGlobalToast:N}=Ht(),[z,U]=k.useState(!1),[ce,X]=k.useState(!1),[{isDragging:R},ue]=ra({type:Ao,item:{type:Ao,uuid:e.uuid,children:e.children,path:n,data:e},collect:le=>({isDragging:le.isDragging()})}),Y=R?.25:1;ue(c);const ie=(le,se,he,Se,De,Me)=>o.jsx(Bye,{page:l,row:e,section:s,data:le,path:se,pageIndex:he,sectionIndex:Se,rowIndex:De,columnIndex:Me,isAdmin:P,emitSocketData:H},`column-${n}-${le.uuid}`),re=(le,se,he,Se)=>{var tt,it,ht,Ut;const De=le.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Me=`${le.className} justify-content-space-between`,ze=`${le.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-row-tool"}),o.jsxs("div",{className:Me,children:[o.jsxs("span",{ref:O===!0?c:null,children:[o.jsx("button",{className:le.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:le.togglerClassName,onClick:le.onTogglerClick,children:[o.jsx("span",{className:De}),o.jsx(Qt,{})]}),o.jsxs("span",{className:ze,children:["Row:"," ",((tt=e==null?void 0:e.heading)==null?void 0:tt[g==null?void 0:g.type])!==""?(it=e==null?void 0:e.heading)==null?void 0:it[g==null?void 0:g.type]:"Untitled"]})]}),O===!0&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-row-tool","data-pr-tooltip":"Add Row",children:o.jsxs("button",{className:le.togglerClassName,onClick:()=>{d(se,he),H()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((Ut=(ht=h[se])==null?void 0:ht.children[he])==null?void 0:Ut.children.length)>1&&o.jsxs("button",{className:le.togglerClassName,onClick:()=>{u(se,he,Se),H()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:le.togglerClassName,onClick:()=>{f(e,se,he,Se),H()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"setting-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{onClick:()=>U(!0),className:le.togglerClassName,children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})},[Z,K]=k.useState(-1);k.useEffect(()=>{if(m.length>0&&(e!=null&&e.uuid)&&Z===-1){const le=m.findIndex(se=>se.rowId===e.uuid);K(le)}},[m,e==null?void 0:e.uuid]);const W=()=>{var he,Se,De;const le=_t.cloneDeep(A);((Se=(he=m[Z])==null?void 0:he.repeatableFieldsData)==null?void 0:Se.length)>=(e==null?void 0:e.minimumEntries)?le[e==null?void 0:e.uuid]=(De=m[Z])==null?void 0:De.repeatableFields:delete le[e==null?void 0:e.uuid];const se=Object.keys(le).length;w(le),x(se)},me=(ne=e==null?void 0:e.repeatableFields)==null?void 0:ne.map(le=>{var se;return{fieldUuid:le==null?void 0:le.uuid,field:le==null?void 0:le.uuid,header:(se=le==null?void 0:le.label)==null?void 0:se.english}}),be=(le,se)=>o.jsx(o.Fragment,{children:o.jsx("div",{className:"post__content_repetable",dangerouslySetInnerHTML:{__html:le[se==null?void 0:se.field]}})}),Te=me==null?void 0:me.map(le=>o.jsx(xr,{field:le.field,header:le.header,body:se=>be(se,le)},le.field)),ye=()=>{var Se,De,Me;const le=[...m],se=[];let he=!0;e:for(const[,ze]of e.children.entries()){for(const[,tt]of ze.children.entries())if(tt!=null&&tt.isPostField&&((Se=tt==null?void 0:tt.attributes)!=null&&Se.required)&&tt.isValid!==__){const it={fieldId:tt.uuid,rowIndex:a};console.log("inValidData",it),se.push(it),Gt.emit("OnInvalidFieldCatch",it),he=!1;break e}he=!0}console.log("userFormSubmitData before submit",le),console.log("repeatableRowIndex",Z),console.log("userFormSubmitData[repeatableRowIndex]?.repeatableFields",(De=le[Z])==null?void 0:De.repeatableFields),he&&(se==null?void 0:se.length)===0&&(alert("addToSectionRepeatableList"+(e==null?void 0:e.uuid)),S(e==null?void 0:e.uuid,(Me=le[Z])==null?void 0:Me.repeatableFields),Gt.emit("clearRepeatableFields",e==null?void 0:e.uuid),W(),N({showToast:!0,toastMessage:"Record Added",toastDetail:"",toastType:"success"}))},fe=le=>o.jsx(o.Fragment,{children:!P&&o.jsx(Ft,{text:!0,size:"small",type:"button",className:"p-button-danger ",onClick:()=>{T(e==null?void 0:e.uuid,le==null?void 0:le.rowIndex),setTimeout(()=>{W()},1e3)},icon:"pi pi-trash"})});return o.jsxs("div",{style:{...Uye,opacity:Y,marginTop:`${(q=e==null?void 0:e.margin)==null?void 0:q.top}px`,marginBottom:`${(ee=e==null?void 0:e.margin)==null?void 0:ee.bottom}px`,marginLeft:`${(oe=e==null?void 0:e.margin)==null?void 0:oe.left}px`,marginRight:`${(pe=e==null?void 0:e.margin)==null?void 0:pe.right}px`},className:_?"row container-row":"draggable row container-row",children:[z&&o.jsx(bg,{renderType:F,visibilty:z,setVisibility:U,row:e,pageIndex:r,sectionIndex:i,rowIndex:a,emitSocketData:H},"row_settings_"+r+i+a),O===!0?o.jsx(o.Fragment,{children:M===!0?o.jsx(ci,{header:"Row",toggleable:!0,headerTemplate:le=>re(le,r,i,a),children:o.jsxs("div",{className:"form-builder-columns",style:{overflowX:"auto"},children:[(_e=e==null?void 0:e.children)==null?void 0:_e.map((le,se)=>{const he=`${n}-${se}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:M,data:{path:he,childrenCount:e.children.length},onDrop:v,className:"horizontalDrag"}),ie(le,he,r,i,a,se)]},he)}),o.jsx(Fr,{isAdvanceView:M,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:v,className:"horizontalDrag",isLast:!0})]})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:M?"form-builder-columns":"",style:M?{overflowX:"auto"}:{},children:(Ne=e==null?void 0:e.children)==null?void 0:Ne.map((le,se)=>{const he=`${n}-${se}`;return o.jsx(k.Fragment,{children:ie(le,he,r,i,a,se)},he)})})})}):o.jsx(o.Fragment,{children:e!=null&&e.rowIsRepeatable?o.jsx(o.Fragment,{children:o.jsx(Os,{header:((Be=e==null?void 0:e.heading)==null?void 0:Be[g==null?void 0:g.type])||"Untitled",footer:()=>{var le;return o.jsx(o.Fragment,{children:(e==null?void 0:e.rowIsRepeatable)&&C!==E&&o.jsx(Ft,{size:"small",type:"button",outlined:!0,className:" mb-3",onClick:()=>{ye()},label:(le=e.addToListButtonLabel)==null?void 0:le[g==null?void 0:g.type]})})},visible:ce,style:{width:"50vw"},onHide:()=>{ce&&X(!1)},children:o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(Ee=e==null?void 0:e.heading)==null?void 0:Ee[g==null?void 0:g.type]}),o.jsx("span",{children:($=e==null?void 0:e.subHeadingText)==null?void 0:$[g==null?void 0:g.type]}),o.jsx("div",{className:"form-builder-columns p-3",style:{maxHeight:"500px",overflowY:"scroll"},children:e.children.map((le,se)=>{const he=`${n}-${se}`;return o.jsx(k.Fragment,{children:ie(le,he,r,i,a,se)},he)})})]})})}):o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(ve=e==null?void 0:e.heading)==null?void 0:ve[g==null?void 0:g.type]}),o.jsx("span",{children:(Ae=e==null?void 0:e.subHeadingText)==null?void 0:Ae[g==null?void 0:g.type]}),o.jsx("div",{className:"form-builder-columns",children:e.children.map((le,se)=>{const he=`${n}-${se}`;return o.jsx(k.Fragment,{children:ie(le,he,r,i,a,se)},he)})})]})}),!P&&(e==null?void 0:e.rowIsRepeatable)&&C!==E&&o.jsx("div",{className:"text-right mb-2",children:o.jsx(Ft,{outlined:!0,size:"small",type:"button",className:"",onClick:()=>X(!0),label:"Add Record"})}),(e==null?void 0:e.rowIsRepeatable)&&o.jsxs("div",{children:[o.jsxs(ro,{scrollable:!0,reorderableRows:!P,value:(m==null?void 0:m.length)>0?(ge=m[Z])==null?void 0:ge.repeatableFieldsData:[],children:[Te,C!==E&&o.jsx(xr,{frozen:!0,style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"left",overflow:"visible"},body:(le,se)=>fe(se)})]}),P&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{field:e})]})]})]})},jye=t=>{var i,a;const{language:e,onHandleChange:n,stateSection:r}=t;return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Section heading"}),o.jsx(wn,{value:(i=r.heading)==null?void 0:i[e==null?void 0:e.type],placeholder:"Enter section heading",onChange:s=>n("heading",e,s.target.value)})]}),o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Section description"}),o.jsx(so,{value:(a=r.subHeadingText)==null?void 0:a[e==null?void 0:e.type],placeholder:"Enter section description",onChange:s=>n("subHeadingText",e,s.target.value)})]})]})},Ih=t=>{const{visibilty:e,setVisibility:n,section:r,pageIndex:i,sectionIndex:a}=t,[s,l]=k.useState(r),{formBuilderSchemaLanguages:c,sectionSettingUpdate:u,userSelectedLanguage:d,formBuilderPublishedStatus:f}=sn(),{emitSocketData:h}=Ht(),{updateGlobalToast:g}=Ht(),v=(w,x,S)=>{l(T=>Object.assign({},T,{[w]:Object.assign({},T[w],{[x==null?void 0:x.type]:S})}))},m=(w,x)=>{l(S=>({...S,[w]:x}))},A=()=>{const w={...s,children:r==null?void 0:r.children};u(i,a,w),h(),g({showToast:!0,toastMessage:"Updated",toastDetail:"Section updated",toastType:"success"})};return o.jsx(o.Fragment,{children:o.jsxs(To,{visible:e,position:"left",className:"p-sidebar-lg",onHide:()=>n(!1),children:[o.jsxs("div",{className:"flex justify-content-between flex-wrap card-container ",children:[o.jsxs("div",{className:"flex align-items-center justify-content-center ",children:[" ",o.jsxs("h5",{children:["Section settings - ",r==null?void 0:r.heading[d==null?void 0:d.type]," "]})," "]}),!f&&o.jsx("div",{className:"flex align-items-center justify-content-center",children:o.jsx(Ft,{className:"mt-3",label:"Update",type:"button",onClick:()=>A(),"aria-label":"Update"})})]}),o.jsxs(ts,{children:[o.jsx(wr,{header:"Text",children:o.jsx(ao,{activeIndex:0,children:c!=null&&c.length?c.map((w,x)=>o.jsx(io,{tabIndex:x,header:w==null?void 0:w.language,children:o.jsx(jye,{language:w,stateSection:s,onHandleChange:v,...t})},x)):""})}),o.jsx(wr,{header:"Layout",children:o.jsxs("div",{className:"p-fluid",children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"showSectionTitle",checked:s==null?void 0:s.showSectionHeader,onChange:w=>m("showSectionHeader",w==null?void 0:w.checked)}),o.jsx("label",{htmlFor:"showSectionTitle",children:"Show section header?"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"showSectionTitle",checked:s==null?void 0:s.showSectionTitle,onChange:w=>m("showSectionTitle",w==null?void 0:w.checked)}),o.jsx("label",{htmlFor:"showSectionTitle",children:"Show section title?"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Yr,{inputId:"showSectionSubTitle",checked:s==null?void 0:s.showSectionSubTitle,onChange:w=>m("showSectionSubTitle",w==null?void 0:w.checked)}),o.jsx("label",{htmlFor:"showSectionSubTitle",children:"Show section sub title?"})]})]})})]})]})})},_h=t=>{const{saveBuilderElementModalData:e,saveElementModal:n,setSaveElementModal:r}=t,{saveComponent:i}=Ht(),a=E3({initialValues:{builder_element_title:"",builder_element_description:""},validate:c=>{const u={};return c.builder_element_title||(u.builder_element_title="Title is required."),c.builder_element_description||(u.builder_element_description="Description is required."),u},onSubmit:c=>{const u={...c,reusable_template_schema:e==null?void 0:e.reusable_template_schema};i(u,()=>{a.resetForm(),r(!1)})}}),s=c=>!!(a.touched[c]&&a.errors[c]),l=()=>o.jsx("div",{children:o.jsx(Ft,{text:!0,className:"p-button-success",label:"Save",icon:"pi pi-file",onClick:()=>{a.handleSubmit()},autoFocus:!0})});return o.jsxs(Os,{header:"Save Custom Element",visible:n,style:{width:"20vw"},footer:l(),onHide:()=>r(!1),children:[o.jsxs("div",{className:"p-field field",children:[o.jsxs("label",{htmlFor:"username",children:[o.jsx("span",{className:"must-required",children:"*"})," Builder element title"]}),o.jsx(wn,{id:"builder_element_title",name:"builder_element_title",value:a.values.builder_element_title,onChange:a.handleChange,className:`${u3({invalid:s("builder_element_title")})} w-full`})]}),o.jsxs("div",{className:"p-field field",children:[o.jsxs("label",{htmlFor:"username",children:[o.jsx("span",{className:"must-required",children:"*"})," Builder element description"]}),o.jsx(so,{id:"builder_element_description",name:"builder_element_description",value:a.values.builder_element_description,onChange:a.handleChange,className:`${u3({invalid:s("builder_element_title")})} w-full`})]})]})},zye=t=>{var ce,X,R,ue,Y,ie,re,Z;const{data:e,path:n,pageIndex:r,sectionIndex:i,section:a,page:s}=t,{removeSection:l,addSection:c,cloneSection:u,formBuilderFormLayout:d,userSelectedLanguage:f,handleDrop:h}=sn(),{isAdvanceView:g,renderType:v,isBuilderMode:m,emitSocketData:A}=Ht(),[w,x]=k.useState(!1),[S,T]=k.useState(!1),[C,E]=k.useState(null),[_,M]=k.useState(!1),O=k.useRef(null),F=(K,W)=>{E(me=>({...me,[K]:W}))},[{isDragging:P},H]=ra({type:na,item:{type:na,uuid:e.uuid,children:e.children,path:n},collect:K=>({isDragging:K.isDragging()})}),N=P&&m||e!=null&&e.isHidden?.25:1;H(O);const z=(K,W,me,be,Te)=>o.jsx($ye,{page:s,section:a,data:K,path:W,pageIndex:me,sectionIndex:be,rowIndex:Te},`row-${n}-${K.uuid}`),U=(K,W,me)=>{var fe,ne;const be=K.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Te=`${K.className} justify-content-space-between panel-tab-section`,ye=`${K.titleClassName} pl-1 text-primary`;return o.jsxs("div",{className:Te,children:[o.jsxs("span",{ref:m===!0?O:null,children:[o.jsx("button",{className:K.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:K.togglerClassName,onClick:K.onTogglerClick,children:[o.jsx("span",{className:be}),o.jsx(Qt,{})]}),o.jsxs("span",{className:ye,children:[me+1," ",(fe=e==null?void 0:e.heading)==null?void 0:fe[f==null?void 0:f.type]]})]}),m===!0&&o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".del-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-section-tool"}),o.jsx(cn,{target:".save-tool"}),o.jsx(cn,{target:".settings-tool"}),o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-section-tool","data-pr-tooltip":"Add Section",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{c(W),A()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((ne=d[W])==null?void 0:ne.children.length)>1&&o.jsx("span",{className:"del-tool","data-pr-tooltip":"Delete",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{l(W,me),A()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"save-tool","data-pr-tooltip":"Save",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{F("reusable_template_schema",e),T(!0)},children:[o.jsx("span",{className:"pi pi-save"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{u(e,W,me),A()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"settings-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>x(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsxs("div",{style:{opacity:N,marginBottom:20},className:m&&g?"draggable row":"",children:[m===!0&&o.jsx(_h,{saveBuilderElementModalData:C,setSaveBuilderElementModalData:E,saveElementModal:S,setSaveElementModal:T}),w===!0&&m===!0&&o.jsx(Ih,{renderType:v,visibilty:w,setVisibility:x,section:e,pageIndex:r,sectionIndex:i,emitSocketData:A},"section_settings_"+r+i),m===!0?o.jsx(o.Fragment,{children:g===!0?o.jsxs(ci,{header:(ce=e==null?void 0:e.heading)==null?void 0:ce.english,toggleable:!0,headerTemplate:K=>U(K,r,i),onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),children:[((X=e==null?void 0:e.subHeadingText)==null?void 0:X[f==null?void 0:f.type])&&o.jsx("p",{children:(R=e==null?void 0:e.subHeadingText)==null?void 0:R[f==null?void 0:f.type]}),o.jsxs("div",{children:[e.children.map((K,W)=>{const me=`${n}-${W}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:g,data:{path:me,childrenCount:e.children.length},onDrop:h}),z(K,me,r,i,W)]},me)}),o.jsx(Fr,{isAdvanceView:g,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:h,isLast:!0})]}),_&&o.jsxs("div",{className:"m-3 flex justify-content-end",children:[o.jsx("span",{className:"add-section-tool ","data-pr-tooltip":"Add Section",children:o.jsx("i",{className:"pi pi-plus",onClick:()=>{c(r),A()},children:o.jsx(Qt,{})})}),((ue=d[r])==null?void 0:ue.children.length)>1&&o.jsx("span",{className:"del-tool ml-2",children:o.jsx("i",{className:"pi pi-trash","data-pr-tooltip":"Delete",onClick:()=>{l(r,i),A()},children:o.jsx(Qt,{})})})]})]}):o.jsxs(o.Fragment,{children:[((Y=e==null?void 0:e.subHeadingText)==null?void 0:Y[f==null?void 0:f.type])&&o.jsx("p",{children:(ie=e==null?void 0:e.subHeadingText)==null?void 0:ie[f==null?void 0:f.type]}),o.jsx("div",{children:e.children.map((K,W)=>{const me=`${n}-${W}`;return o.jsx(k.Fragment,{children:z(K,me,r,i,W)},me)})})]})}):o.jsx(o.Fragment,{children:o.jsxs("div",{className:"",children:[(e==null?void 0:e.showSectionHeader)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:(re=e==null?void 0:e.heading)==null?void 0:re[f==null?void 0:f.type]}),o.jsx("p",{children:(Z=e==null?void 0:e.subHeadingText)==null?void 0:Z[f==null?void 0:f.type]}),o.jsx("hr",{})]}),e.children.map((K,W)=>{const me=`${n}-${W}`;return o.jsx(k.Fragment,{children:o.jsx("div",{className:"",children:z(K,me,r,i,W)},me)},me)})]})})]})},Hye={position:"relative"},Yye=t=>{var S,T,C;const{data:e,data:n,path:r,pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,section:c,row:u,page:d}=t,f=k.useRef(null),{handleDrop:h}=sn(),{isAdvanceView:g,isBuilderMode:v}=Ht(),[{isDragging:m},A]=ra({type:As,item:{type:As,uuid:e==null?void 0:e.uuid,children:e.children,path:r},collect:E=>({isDragging:E.isDragging()})}),w=m&&v?.25:1;A(f);const x=(E,_,M,O,F,P,H)=>o.jsx(Lc,{page:d,section:c,row:u,column:n,field:E,pageIndex:M,sectionIndex:O,rowIndex:F,columnIndex:P,fieldIndex:H,type:"field",data:E,path:_},`component-${r}-${E==null?void 0:E.uuid}`);return o.jsx("div",{style:g?{...Hye,opacity:w}:{},className:v&&"draggable column container-column",children:v===!0?o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((S=e==null?void 0:e.children)==null?void 0:S.length)>0?(T=e==null?void 0:e.children)==null?void 0:T.map((E,_)=>{const M=`${r}-${_}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:g,fieldDropArea:!0,data:{path:M,childrenCount:e.children.length,droppedField:e},onDrop:h}),x(E,M,i,a,s,l,_)]},M)}):o.jsx(o.Fragment,{children:o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]})}),v&&o.jsx(Fr,{isAdvanceView:g,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${r}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:h,isLast:!0})]})}):o.jsx(o.Fragment,{children:(C=e==null?void 0:e.children)==null?void 0:C.map((E,_)=>{const M=`${r}-${_}`;return o.jsx(k.Fragment,{children:x(E,M,i,a,s,l,_)},M)})})})},Kye=t=>{var l;const{isAdvanceView:e}=Ht(),{data:n,page:r,path:i,pageIndex:a}=t,s=(c,u,d,f,h,g,v,m)=>o.jsx(Yye,{page:r,row:m,section:v,data:c,path:`${d}-${f}-${h}-${g}`,pageIndex:d,sectionIndex:f,rowIndex:h,columnIndex:g},`column-${i}-${c.uuid}`);return o.jsx(o.Fragment,{children:(l=n==null?void 0:n.children)==null?void 0:l.map((c,u)=>{var d;return(d=c==null?void 0:c.children)==null?void 0:d.map((f,h)=>{var g;return o.jsx("div",{className:e?"columns":"",style:e?{overflowX:"auto"}:{},children:(g=f==null?void 0:f.children)==null?void 0:g.map((v,m)=>{const A=`${i}-${u}-${h}-${m}`;return o.jsx(k.Fragment,{children:s(v,A,a,u,h,m,c,f)},A)})},`basic_view_section_${i}-${u}-${h}`)})})})},Xye=t=>{const{data:e,path:n,pageIndex:r}=t,{isAdvanceView:i,isBuilderMode:a}=Ht(),{formBuilderFormSchema:s,handleDrop:l}=sn(),c=k.useRef(null),[u,d]=ra({type:na,item:{type:na,uuid:e.uuid,children:e.children,path:n},collect:h=>({isDragging:h.isDragging()})});d(c);const f=(h,g,v,m)=>o.jsx(zye,{data:h,page:e,section:h,path:g,pageIndex:v,sectionIndex:m},`section_${v}_${m}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${a&&"draggable p-3 pb-4"}`,"data-image-src":e==null?void 0:e.bgImage,"data-bg-color":`#${e==null?void 0:e.bgColor}`,children:a===!0?o.jsx(o.Fragment,{children:i?o.jsxs(o.Fragment,{children:[e.children.map((h,g)=>{const v=`${n}-${g}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:i,data:{path:v,childrenCount:e.children.length},onDrop:l}),f(h,v,r,g)]},`section-${g}-${h.uuid}`)}),o.jsx(Fr,{isAdvanceView:i,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:l,isLast:!0})]}):o.jsx(Kye,{page:e,path:n,data:e,pageIndex:r},`basic_view-${r}-${e.uuid}`)}):o.jsx(o.Fragment,{children:o.jsx("div",{className:"p-1",children:e.children.map((h,g)=>{const v=`${n}-${g}`;return o.jsx(k.Fragment,{children:s!=null&&s.showConditionalFields?o.jsx("div",{children:f(h,v,r,g)}):((h==null?void 0:h.isHidden)===!1||a)&&f(h,v,r,g)},`section-${g}-${h.uuid}`)})})})})},Rye=()=>{const{isAdvanceView:t,isBuilderMode:e,isPreview:n}=Ht(),[r,i]=k.useState(!1),[a,s]=k.useState(!1),[l,c]=k.useState(0),{formBuilderFormLayout:u}=sn(),{emitSocketData:d}=Ht(),f=["Mobile","Desktop"],[h,g]=k.useState(f[1]),v=(m,A,w)=>o.jsx(Xye,{data:m,path:A,pageIndex:w},`page-${m.uuid}`);return o.jsxs("div",{children:[n===!0&&o.jsx("div",{className:"flex justify-content-center align-items-center",children:o.jsx(tf,{value:h,onChange:m=>g(m.value),options:f})}),(u==null?void 0:u.length)===S9&&e===!1?o.jsx(o.Fragment,{children:o.jsx("div",{className:"mt-3 flex card justify-content-center",children:(u==null?void 0:u.length)&&u.map((m,A)=>{const w=`${A}`;return o.jsx("div",{className:"flex flex-column justify-content-start",style:{width:h==="Mobile"?375:800},children:o.jsx("div",{className:"w-full",children:v(m,w,A)})},`preview-${m.uuid}-${A}`)})})}):o.jsx(o.Fragment,{children:t===!0&&e===!0?o.jsx(ts,{scrollable:!0,activeIndex:l,onTabChange:m=>c(m.index),children:(u==null?void 0:u.length)&&u.map((m,A)=>{const w=`${A}`;return o.jsxs(wr,{disabled:!((m==null?void 0:m.isHidden)===!1||e),header:"Page",headerTemplate:x=>o.jsx(F8,{options:x,pageIndex:A,setTabSidebarSetting:i,setPageActiveIndex:c,page:m,pages:u}),children:[e===!0&&o.jsx(mf,{reusableBuilderElementModalVisibility:a,setReusableBuilderElementModalVisibility:s,pageIndex:A}),e===!0&&o.jsx(j0,{setVisibility:i,visibilty:r,pageIndex:A,page:m,emitSocketData:d}),v(m,w,A)]},`advanced_${m.uuid}-${A}`)})}):o.jsx(o.Fragment,{children:(u==null?void 0:u.length)>0&&(u==null?void 0:u.map((m,A)=>{const w=`${A}`;return o.jsxs(k.Fragment,{children:[e===!0&&o.jsx(mf,{reusableBuilderElementModalVisibility:a,setReusableBuilderElementModalVisibility:s,pageIndex:A}),e===!0&&o.jsx(j0,{setVisibility:i,visibilty:r,pageIndex:A,page:m,emitSocketData:d}),v(m,w,A)]},`basic_${m.uuid}-${A}`)}))})})]})},Gye={position:"relative"},Wye=t=>{var O,F,P,H,N;const{isAdvanceView:e,isBuilderMode:n,emitSocketData:r,isRenderView:i}=Ht(),{data:a,path:s,pageIndex:l,sectionIndex:c,rowIndex:u,columnIndex:d,section:f,row:h,page:g}=t,v=k.useRef(null),{removeColumn:m,addColumn:A,cloneColumn:w,formBuilderFormLayout:x,handleDrop:S}=sn(),[{isDragging:T},C]=ra({type:As,item:{type:As,uuid:a==null?void 0:a.uuid,children:a.children,path:s},collect:z=>({isDragging:z.isDragging()})}),E=T&&!i?.25:1;C(v);const _=(z,U,ce,X,R,ue,Y)=>o.jsx(Lc,{page:g,column:a,type:"field",row:h,section:f,field:z,data:z,path:U,pageIndex:ce,sectionIndex:X,rowIndex:R,columnIndex:ue,fieldIndex:Y},`component-${s}-${z==null?void 0:z.uuid}`),M=(z,U,ce,X,R)=>{var re,Z,K,W;const ue=z.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Y=`${z.className} justify-content-space-between`,ie=`${z.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".add-column-tool"}),o.jsxs("div",{className:Y,children:[o.jsxs("span",{ref:n===!0?v:null,children:[o.jsx("button",{className:z.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:z.togglerClassName,onClick:z.onTogglerClick,children:[o.jsx("span",{className:ue}),o.jsx(Qt,{})]}),o.jsx("span",{className:ie,children:"Column"})]}),n===!0&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-column-tool","data-pr-tooltip":"Add Column",children:o.jsxs("button",{className:z.togglerClassName,onClick:()=>{A(U,ce,X),r()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((W=(K=(Z=(re=x[U])==null?void 0:re.children[ce])==null?void 0:Z.children[X])==null?void 0:K.children)==null?void 0:W.length)>1&&o.jsxs("button",{className:z.togglerClassName,onClick:()=>{m(U,ce,X,R),r()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:z.togglerClassName,onClick:()=>{w(a,U,ce,X,R),r()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsx("div",{style:e?{...Gye,opacity:E}:{},className:i?"form-builder-column container-column":"draggable form-builder-column container-column",children:n===!0?o.jsx(o.Fragment,{children:e===!0?o.jsxs(ci,{className:"builder-row-column",header:"Column",toggleable:!0,headerTemplate:z=>M(z,l,c,u,d),children:[((O=a==null?void 0:a.children)==null?void 0:O.length)>0?(F=a==null?void 0:a.children)==null?void 0:F.map((z,U)=>{const ce=`${s}-${U}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:ce,childrenCount:a.children.length,droppedField:a},onDrop:S}),_(z,ce,l,c,u,d,U)]},ce)}):o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]}),o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:S,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((P=a==null?void 0:a.children)==null?void 0:P.length)>0?(H=a==null?void 0:a.children)==null?void 0:H.map((z,U)=>{const ce=`${s}-${U}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:ce,childrenCount:a.children.length,droppedField:a},onDrop:S}),_(z,ce,l,c,u,d,U)]},ce)}):o.jsx(o.Fragment,{children:o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]})}),o.jsx(Fr,{isAdvanceView:e,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:S,isLast:!0})]})})}):o.jsx(o.Fragment,{children:(N=a==null?void 0:a.children)==null?void 0:N.map((z,U)=>{const ce=`${s}-${U}`;return o.jsx(k.Fragment,{children:_(z,ce,l,c,u,d,U)},ce)})})})},Qye={},Jye=t=>{var me,be,Te,ye,fe,ne,q,ee,oe,pe,_e,Ne,ve,Ae,Be,Ee;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,{isRenderView:c,isAdvanceView:u,isAdmin:d,isBuilderMode:f,emitSocketData:h,renderType:g}=Ht(),v=k.useRef(null),{removeRow:m,addRow:A,cloneRow:w,formBuilderFormLayout:x,userSelectedLanguage:S,handleDrop:T}=sn(),{userTaskSubmitFormData:C,taskRegisterData:E,updateTaskRegisterData:_,updateTaskProgressValue:M,addUserDataFormRowRepeatableData:O,removeUserDataFormSectionRepeatableData:F,task_status:P,TASK_PUBLISHED:H}=Ar(),[N,z]=k.useState(!1),[{isDragging:U},ce]=ra({type:Ao,item:{type:Ao,uuid:e.uuid,children:e.children,path:n,data:e},collect:$=>({isDragging:$.isDragging()})}),X=U?.25:1;ce(v);const R=($,ge,le,se,he,Se)=>o.jsx(Wye,{page:l,row:e,section:s,data:$,path:ge,pageIndex:le,sectionIndex:se,rowIndex:he,columnIndex:Se,isAdmin:d,emitSocketData:h},`column-${n}-${$.uuid}`),ue=($,ge,le,se)=>{var Me,ze,tt,it;const he=$.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Se=`${$.className} justify-content-space-between`,De=`${$.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-row-tool"}),o.jsxs("div",{className:Se,children:[o.jsxs("span",{ref:f===!0?v:null,children:[o.jsx("button",{className:$.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:$.togglerClassName,onClick:$.onTogglerClick,children:[o.jsx("span",{className:he}),o.jsx(Qt,{})]}),o.jsxs("span",{className:De,children:["Row:"," ",((Me=e==null?void 0:e.heading)==null?void 0:Me[S==null?void 0:S.type])!==""?(ze=e==null?void 0:e.heading)==null?void 0:ze[S==null?void 0:S.type]:"Untitled"]})]}),f===!0&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-row-tool","data-pr-tooltip":"Add Row",children:o.jsxs("button",{className:$.togglerClassName,onClick:()=>{A(ge,le),h()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((it=(tt=x[ge])==null?void 0:tt.children[le])==null?void 0:it.children.length)>1&&o.jsxs("button",{className:$.togglerClassName,onClick:()=>{m(ge,le,se),h()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:$.togglerClassName,onClick:()=>{w(e,ge,le,se),h()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"setting-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{onClick:()=>z(!0),className:$.togglerClassName,children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})},Y=_t.findIndex(C,function($){return($==null?void 0:$.rowId)===(e==null?void 0:e.uuid)}),ie=()=>{var le,se,he;const $=_t.cloneDeep(E);((se=(le=C[Y])==null?void 0:le.repeatableFieldsData)==null?void 0:se.length)>=(e==null?void 0:e.minimumEntries)?$[e==null?void 0:e.uuid]=(he=C[Y])==null?void 0:he.repeatableFields:delete $[e==null?void 0:e.uuid];const ge=Object.keys($).length;_($),M(ge)},re=(me=e==null?void 0:e.repeatableFields)==null?void 0:me.map($=>{var ge;return{fieldUuid:$==null?void 0:$.uuid,field:$==null?void 0:$.uuid,header:(ge=$==null?void 0:$.label)==null?void 0:ge.english}}),Z=re==null?void 0:re.map($=>o.jsx(xr,{field:$.field,header:$.header,body:ge=>o.jsx(o.Fragment,{children:o.jsx("div",{className:"post__content_repetable",dangerouslySetInnerHTML:{__html:ge[$==null?void 0:$.field]}})})},$.field)),K=()=>{var se;const $=[...C],ge=[];let le=!0;e:for(const[,he]of e.children.entries()){for(const[,Se]of he.children.entries())if(Se!=null&&Se.isPostField&&Se.isValid!==1){const De={fieldId:Se.uuid,rowIndex:a};ge.push(De),Gt.emit("OnInvalidFieldCatch",De),le=!1;break e}le=!0}le&&(ge==null?void 0:ge.length)===0&&(O(e==null?void 0:e.uuid,(se=$[Y])==null?void 0:se.repeatableFields),Gt.emit("clearRepeatableFields",e==null?void 0:e.uuid),ie())},W=$=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,size:"small",type:"button",className:"p-button-danger ",onClick:()=>{F(e==null?void 0:e.uuid,$==null?void 0:$.rowIndex),setTimeout(()=>{ie()},1e3)},icon:"pi pi-trash"})});return o.jsxs("div",{style:{...Qye,opacity:X,marginTop:`${(be=e==null?void 0:e.margin)==null?void 0:be.top}px`,marginBottom:`${(Te=e==null?void 0:e.margin)==null?void 0:Te.bottom}px`,marginLeft:`${(ye=e==null?void 0:e.margin)==null?void 0:ye.left}px`,marginRight:`${(fe=e==null?void 0:e.margin)==null?void 0:fe.right}px`},className:c?"row container-row":"draggable row container-row",children:[N&&o.jsx(bg,{renderType:g,visibilty:N,setVisibility:z,row:e,pageIndex:r,sectionIndex:i,rowIndex:a,emitSocketData:h},"row_settings_"+r+i+a),g===im&&o.jsxs("div",{className:"form-builder-columns",children:[e.children.map(($,ge)=>{const le=`${n}-${ge}`;return o.jsxs(k.Fragment,{children:[g===zd&&o.jsx(Fr,{isAdvanceView:u,data:{path:le,childrenCount:e.children.length},onDrop:T,className:"horizontalDrag"}),R($,le,r,i,a,ge)]},le)}),o.jsx(Fr,{isAdvanceView:u,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:T,className:"horizontalDrag",isLast:!0})]}),(g===k0||g===F0||g===rm||g===w9||g===Gh)&&(f===!0?o.jsx(o.Fragment,{children:u===!0?o.jsx(ci,{header:"Row",toggleable:!0,headerTemplate:$=>ue($,r,i,a),children:o.jsxs("div",{className:"form-builder-columns",style:{overflowX:"auto"},children:[(ne=e==null?void 0:e.children)==null?void 0:ne.map(($,ge)=>{const le=`${n}-${ge}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:u,data:{path:le,childrenCount:e.children.length},onDrop:T,className:"horizontalDrag"}),R($,le,r,i,a,ge)]},le)}),o.jsx(Fr,{isAdvanceView:u,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:T,className:"horizontalDrag",isLast:!0})]})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:u?"form-builder-columns":"",style:u?{overflowX:"auto"}:{},children:(q=e==null?void 0:e.children)==null?void 0:q.map(($,ge)=>{const le=`${n}-${ge}`;return o.jsx(k.Fragment,{children:R($,le,r,i,a,ge)},le)})})})}):o.jsx(o.Fragment,{children:!(e!=null&&e.rowIsRepeatable&&P===H)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(ee=e==null?void 0:e.heading)==null?void 0:ee[S==null?void 0:S.type]}),o.jsx("span",{children:(oe=e==null?void 0:e.subHeadingText)==null?void 0:oe[S==null?void 0:S.type]}),o.jsx("div",{className:"form-builder-columns",children:e.children.map(($,ge)=>{const le=`${n}-${ge}`;return o.jsx(k.Fragment,{children:R($,le,r,i,a,ge)},le)})})]})})),g===H1&&(f===!0?o.jsxs("div",{children:[o.jsx("span",{className:"row-setting-block-pdf-editor",children:o.jsxs("div",{className:"pdf-setting-container",children:[o.jsxs("button",{onClick:()=>{A(r,i),h()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]}),((_e=(pe=x[r])==null?void 0:pe.children[i])==null?void 0:_e.children.length)>1&&o.jsxs("button",{onClick:()=>{m(r,i,a),h()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsxs("button",{onClick:()=>{w(e,r,i,a),h()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]}),o.jsxs("button",{onClick:()=>z(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})]})}),o.jsx("div",{className:"form-builder-columns",children:(Ne=e==null?void 0:e.children)==null?void 0:Ne.map(($,ge)=>{const le=`${n}-${ge}`;return o.jsx(k.Fragment,{children:R($,le,r,i,a,ge)},le)})})]}):o.jsx(o.Fragment,{children:!(e!=null&&e.rowIsRepeatable&&P===H)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(ve=e==null?void 0:e.heading)==null?void 0:ve[S==null?void 0:S.type]}),o.jsx("span",{children:(Ae=e==null?void 0:e.subHeadingText)==null?void 0:Ae[S==null?void 0:S.type]}),o.jsx("div",{className:"form-builder-columns",children:e.children.map(($,ge)=>{const le=`${n}-${ge}`;return o.jsx(k.Fragment,{children:R($,le,r,i,a,ge)},le)})})]})})),g===zd&&o.jsx("div",{className:"form-builder-columns",children:e.children.map(($,ge)=>{const le=`${n}-${ge}`;return o.jsx(k.Fragment,{children:R($,le,r,i,a,ge)},le)})}),(e==null?void 0:e.rowIsRepeatable)&&P!==H&&o.jsx(Ft,{text:!0,size:"small",type:"button",className:"p-button-success mb-3",onClick:()=>K(),label:(Be=e.addToListButtonLabel)==null?void 0:Be[S==null?void 0:S.type]}),(e==null?void 0:e.rowIsRepeatable)&&o.jsxs("div",{className:"card",children:[o.jsxs(ro,{value:(C==null?void 0:C.length)>0?(Ee=C[Y])==null?void 0:Ee.repeatableFieldsData:[],children:[Z,P!==H&&o.jsx(xr,{style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"left",overflow:"visible"},body:$=>W($)})]}),d&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{field:e})]})]})]})},Zye=t=>{var ce,X,R,ue,Y,ie,re,Z;const{isAdvanceView:e,isBuilderMode:n,renderType:r,emitSocketData:i}=Ht(),{handleDrop:a}=sn(),{data:s,path:l,pageIndex:c,sectionIndex:u,section:d,page:f}=t,{removeSection:h,addSection:g,cloneSection:v,formBuilderFormLayout:m,userSelectedLanguage:A}=sn(),[w,x]=k.useState(!1),[S,T]=k.useState(!1),[C,E]=k.useState({reusable_template_schema:""}),[_,M]=k.useState(!1),O=k.useRef(null),F=(K,W)=>{E(me=>({...me,[K]:W}))},[{isDragging:P},H]=ra({type:na,item:{type:na,uuid:s.uuid,children:s.children,path:l},collect:K=>({isDragging:K.isDragging()})}),N=P?.25:1;H(O);const z=(K,W,me,be,Te)=>o.jsx(Jye,{page:f,section:d,data:K,path:W,pageIndex:me,sectionIndex:be,rowIndex:Te},`row-${l}-${K.uuid}`),U=(K,W,me)=>{var fe,ne;const be=K.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Te=`${K.className} justify-content-space-between panel-tab-section`,ye=`${K.titleClassName} pl-1 text-primary`;return o.jsxs("div",{className:Te,children:[o.jsxs("span",{ref:n===!0?O:null,children:[o.jsx("button",{className:K.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:K.togglerClassName,onClick:K.onTogglerClick,children:[o.jsx("span",{className:be}),o.jsx(Qt,{})]}),o.jsxs("span",{className:ye,children:[me+1," ",(fe=s==null?void 0:s.heading)==null?void 0:fe[A==null?void 0:A.type]]})]}),n===!0&&o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".del-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-section-tool"}),o.jsx(cn,{target:".save-tool"}),o.jsx(cn,{target:".settings-tool"}),o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-section-tool","data-pr-tooltip":"Add Section",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{g(W),i()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((ne=m[W])==null?void 0:ne.children.length)>1&&o.jsx("span",{className:"del-tool","data-pr-tooltip":"Delete",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{h(W,me),i()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"save-tool","data-pr-tooltip":"Save",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{F("reusable_template_schema",s),T(!0)},children:[o.jsx("span",{className:"pi pi-save"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{v(s,W,me),i()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"settings-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>x(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsxs("div",{style:{opacity:N,marginBottom:20},className:e?"draggable row":"",children:[n===!0&&o.jsx(_h,{saveBuilderElementModalData:C,setSaveBuilderElementModalData:E,saveElementModal:S,setSaveElementModal:T}),w===!0&&n===!0&&o.jsx(Ih,{renderType:r,visibilty:w,setVisibility:x,section:s,pageIndex:c,sectionIndex:u,emitSocketData:i},"section_settings_"+c+u),n===!0?o.jsx(o.Fragment,{children:e===!0?o.jsxs(ci,{header:(ce=s==null?void 0:s.heading)==null?void 0:ce.english,toggleable:!0,headerTemplate:K=>U(K,c,u),onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),children:[((X=s==null?void 0:s.subHeadingText)==null?void 0:X[A==null?void 0:A.type])&&o.jsx("p",{children:(R=s==null?void 0:s.subHeadingText)==null?void 0:R[A==null?void 0:A.type]}),o.jsxs("div",{children:[s.children.map((K,W)=>{const me=`${l}-${W}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,data:{path:me,childrenCount:s.children.length},onDrop:a}),z(K,me,c,u,W)]},me)}),o.jsx(Fr,{isAdvanceView:e,data:{path:`${l}-${s.children.length}`,childrenCount:s.children.length,droppedField:s},onDrop:a,isLast:!0})]}),_&&o.jsxs("div",{className:"m-3 flex justify-content-end",children:[o.jsx("span",{className:"add-section-tool ","data-pr-tooltip":"Add Section",children:o.jsx("i",{className:"pi pi-plus",onClick:()=>{g(c),i()},children:o.jsx(Qt,{})})}),((ue=m[c])==null?void 0:ue.children.length)>1&&o.jsx("span",{className:"del-tool ml-2",children:o.jsx("i",{className:"pi pi-trash","data-pr-tooltip":"Delete",onClick:()=>{h(c,u),i()},children:o.jsx(Qt,{})})})]})]}):o.jsxs(o.Fragment,{children:[((Y=s==null?void 0:s.subHeadingText)==null?void 0:Y[A==null?void 0:A.type])&&o.jsx("p",{children:(ie=s==null?void 0:s.subHeadingText)==null?void 0:ie[A==null?void 0:A.type]}),o.jsx("div",{children:s.children.map((K,W)=>{const me=`${l}-${W}`;return o.jsx(k.Fragment,{children:z(K,me,c,u,W)},me)})})]})}):o.jsx(o.Fragment,{children:o.jsxs("div",{className:"",children:[(s==null?void 0:s.showSectionHeader)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:(re=s==null?void 0:s.heading)==null?void 0:re[A==null?void 0:A.type]}),o.jsx("p",{children:(Z=s==null?void 0:s.subHeadingText)==null?void 0:Z[A==null?void 0:A.type]}),o.jsx("hr",{})]}),s.children.map((K,W)=>{const me=`${l}-${W}`;return o.jsx(k.Fragment,{children:o.jsx("div",{className:"",children:z(K,me,c,u,W)},me)},me)})]})})]})},eAe=t=>{var s;const{data:e,currentPath:n,pageIndex:r,page:i}=t,a=k.useRef(null);return o.jsx(o.Fragment,{children:o.jsxs(DA,{ref:a,modules:[xB,Q3e],spaceBetween:50,slidesPerView:1,navigation:{prevEl:".prev",nextEl:".next"},pagination:{clickable:!1},scrollbar:{el:".swiper-scrollbar",draggable:!1},onSwiper:l=>console.log(l),onSlideChange:()=>console.log("slide change"),children:[(s=e==null?void 0:e.children)==null?void 0:s.map((l,c)=>{var u;return(u=l==null?void 0:l.children)==null?void 0:u.map((d,f)=>{var h;return(h=d==null?void 0:d.children)==null?void 0:h.map((g,v)=>{var m;return(m=g==null?void 0:g.children)==null?void 0:m.map((A,w)=>{const x=`${n}-${c}-${f}-${v}-${w}`;return o.jsx(NA,{children:o.jsx("div",{className:"",children:o.jsx(Lc,{page:i,column:g,type:"field",row:d,section:l,field:A,data:A,path:x,pageIndex:r,sectionIndex:c,rowIndex:f,columnIndex:v,fieldIndex:w},`component-${x}-${A==null?void 0:A.uuid}`)})},`swiper_slide_${x}`)})})})}),o.jsxs("div",{className:"flex justify-content-center",children:[o.jsx(Ft,{className:"mr-2 p-button-info prev",size:"large",label:"Previous",icon:"pi pi-arrow-left",onClick:()=>{}}),o.jsx(Ft,{size:"large",className:"p-button-info next",icon:"pi pi-arrow-right",label:"Next"})]})]})})},tAe=t=>{const{isAdvanceView:e,isBuilderMode:n}=Ht(),{handleDrop:r}=sn(),{data:i,path:a,pageIndex:s}=t,{formBuilderFormSchema:l}=sn(),c=k.useRef(null),[{},u]=ra({type:na,item:{type:na,uuid:i.uuid,children:i.children,path:a},collect:f=>({isDragging:f.isDragging()})});u(c);const d=(f,h,g,v)=>o.jsx(Zye,{data:f,section:f,path:h,page:i,pageIndex:g,sectionIndex:v},`section_${g}_${v}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${n&&"draggable page-css p-3 pb-4"}`,"data-image-src":i==null?void 0:i.bgImage,"data-bg-color":`#${i==null?void 0:i.bgColor}`,children:n===!0?o.jsxs(o.Fragment,{children:[i.children.map((f,h)=>{const g=`${a}-${h}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,data:{path:g,childrenCount:i.children.length},onDrop:r}),d(f,g,s,h)]},`section-${h}-${f.uuid}`)}),o.jsx(Fr,{isAdvanceView:e,data:{path:`${a}-${i.children.length}`,childrenCount:i.children.length,droppedField:i},onDrop:r,isLast:!0})]}):o.jsx(o.Fragment,{children:(l==null?void 0:l.surveyQuestionSlide)===!0?o.jsx(o.Fragment,{children:o.jsx(eAe,{page:i,data:i,currentPath:a,pageIndex:s})}):o.jsx("div",{className:"p-1",children:i.children.map((f,h)=>{const g=`${a}-${h}`;return o.jsx(k.Fragment,{children:((f==null?void 0:f.isHidden)===!1||!n)&&d(f,g,s,h)},`section-${h}-${f.uuid}`)})})})})},nAe=()=>{const[t,e]=k.useState(!1),{isAdvanceView:n,isBuilderMode:r,emitSocketData:i}=Ht(),[a,s]=k.useState(!1),[l,c]=k.useState(0),{removePage:u,userSelectedLanguage:d,formBuilderFormLayout:f,formBuilderFormLayout:h,clonePage:g}=sn(),v=(m,A,w)=>o.jsx(tAe,{data:m,path:A,pageIndex:w},`page-${m.uuid}`);return o.jsx(o.Fragment,{children:o.jsx("div",{className:"page",children:(h==null?void 0:h.length)===S9&&r===!1?o.jsx(o.Fragment,{children:(h==null?void 0:h.length)&&h.map((m,A)=>{const w=`${A}`;return o.jsx("div",{children:v(m,w,A)},`${m.uuid}-${A}`)})}):o.jsx(o.Fragment,{children:n===!0||r===!1?o.jsx(ts,{scrollable:!0,activeIndex:l,onTabChange:m=>c(m.index),children:(h==null?void 0:h.length)&&h.map((m,A)=>{const w=`${A}`;return o.jsxs(wr,{disabled:!((m==null?void 0:m.isHidden)===!1||r),header:"Page",headerTemplate:x=>o.jsx(F8,{options:x,pageIndex:A,page:m,setTabSidebarSetting:s,clonePage:g,emitSocketData:i,formBuilderFormLayout:f,userSelectedLanguage:d,removePage:u,setPageActiveIndex:c,pages:h}),children:[r===!0&&o.jsx(mf,{reusableBuilderElementModalVisibility:t,setReusableBuilderElementModalVisibility:e,pageIndex:A}),o.jsx(j0,{setVisibility:s,visibilty:a,pageIndex:A,page:m,emitSocketData:i}),v(m,w,A)]},`${m.uuid}-${A}`)})}):o.jsx(o.Fragment,{children:(h==null?void 0:h.length)>0&&(h==null?void 0:h.map((m,A)=>{const w=`${A}`;return o.jsxs(k.Fragment,{children:[r===!0&&o.jsx(mf,{reusableBuilderElementModalVisibility:t,setReusableBuilderElementModalVisibility:e,pageIndex:A}),o.jsx(j0,{setVisibility:s,visibilty:a,pageIndex:A,page:m,emitSocketData:i}),v(m,w,A)]},`${m.uuid}-${A}`)}))})})})})},rAe={position:"relative"},iAe=t=>{var S,T,C;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,section:l,row:c,page:u}=t,d=k.useRef(null),{handleDrop:f}=sn(),{isRenderView:h,isAdvanceView:g,isBuilderMode:v}=Ht(),[{isDragging:m},A]=ra({type:As,item:{type:As,uuid:e==null?void 0:e.uuid,children:e.children,path:n},collect:E=>({isDragging:E.isDragging()})}),w=m&&v?.25:1;A(d);const x=(E,_,M,O,F,P,H)=>o.jsx(Lc,{page:u,type:"field",row:c,section:l,field:E,data:E,path:_,pageIndex:M,sectionIndex:O,rowIndex:F,columnIndex:P,fieldIndex:H},`component-${n}-${E==null?void 0:E.uuid}`);return o.jsx("div",{style:g?{...rAe,opacity:w}:{},className:h?"form-builder-column container-column":"draggable form-builder-column container-column",children:v===!0?o.jsxs("div",{className:"builder-row-column",children:[((S=e==null?void 0:e.children)==null?void 0:S.length)>0?(T=e==null?void 0:e.children)==null?void 0:T.map((E,_)=>{const M=`${n}-${_}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:g,data:{path:M,childrenCount:e.children.length,droppedField:e},onDrop:f}),x(E,M,r,i,a,s,_)]},M)}):o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]}),o.jsx(Fr,{isAdvanceView:!0,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},isLast:!0,onDrop:f})]}):o.jsx(o.Fragment,{children:(C=e==null?void 0:e.children)==null?void 0:C.map((E,_)=>{const M=`${n}-${_}`;return o.jsx(k.Fragment,{children:x(E,M,r,i,a,s,_)},M)})})})},aAe={},sAe=t=>{var M,O,F,P,H,N,z,U,ce;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,c=k.useRef(null),{removeRow:u,addRow:d,cloneRow:f,formBuilderFormLayout:h,userSelectedLanguage:g}=sn(),{isRenderView:v,isBuilderMode:m}=Ht(),{task_status:A,TASK_PUBLISHED:w}=Ar(),[x,S]=k.useState(!1),[{isDragging:T},C]=ra({type:Ao,item:{type:Ao,uuid:e.uuid,children:e.children,path:n,data:e},collect:X=>({isDragging:X.isDragging()})}),E=T?.25:1;C(c);const _=(X,R,ue,Y,ie,re)=>o.jsx(iAe,{page:l,row:e,section:s,data:X,path:R,pageIndex:ue,sectionIndex:Y,rowIndex:ie,columnIndex:re},`column-${n}-${X.uuid}`);return o.jsxs("div",{style:{...aAe,opacity:E,marginTop:`${(M=e==null?void 0:e.margin)==null?void 0:M.top}px`,marginBottom:`${(O=e==null?void 0:e.margin)==null?void 0:O.bottom}px`,marginLeft:`${(F=e==null?void 0:e.margin)==null?void 0:F.left}px`,marginRight:`${(P=e==null?void 0:e.margin)==null?void 0:P.right}px`},className:v?"row container-row":"draggable row container-row",children:[x&&o.jsx(bg,{visibilty:x,setVisibility:S,row:e,pageIndex:r,sectionIndex:i,rowIndex:a},"row_settings_"+r+i+a),m===!0?o.jsxs("div",{children:[o.jsx("span",{className:"row-setting-block-pdf-editor",children:o.jsxs("div",{className:"pdf-setting-container",children:[o.jsxs("button",{onClick:()=>{d(r,i)},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]}),((N=(H=h[r])==null?void 0:H.children[i])==null?void 0:N.children.length)>1&&o.jsxs("button",{onClick:()=>{u(r,i,a)},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsxs("button",{onClick:()=>{f(e,r,i,a)},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]}),o.jsxs("button",{onClick:()=>S(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})]})}),o.jsx("div",{className:"form-builder-columns",children:(z=e==null?void 0:e.children)==null?void 0:z.map((X,R)=>{const ue=`${n}-${R}`;return o.jsx(k.Fragment,{children:_(X,ue,r,i,a,R)},ue)})})]}):o.jsx(o.Fragment,{children:!(e!=null&&e.rowIsRepeatable&&A===w)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(U=e==null?void 0:e.heading)==null?void 0:U[g==null?void 0:g.type]}),o.jsx("span",{children:(ce=e==null?void 0:e.subHeadingText)==null?void 0:ce[g==null?void 0:g.type]}),o.jsx("div",{className:"form-builder-columns",children:e.children.map((X,R)=>{const ue=`${n}-${R}`;return o.jsx(k.Fragment,{children:_(X,ue,r,i,a,R)},ue)})})]})})]})},oAe=t=>{var C,E,_;const{data:e,path:n,pageIndex:r,sectionIndex:i,section:a,page:s}=t,{userSelectedLanguage:l}=sn(),{isAdvanceView:c,isBuilderMode:u}=Ht(),[d,f]=k.useState(!1),[h,g]=k.useState(!1),[v,m]=k.useState(null),A=k.useRef(null),[{isDragging:w},x]=ra({type:na,item:{type:na,uuid:e.uuid,children:e.children,path:n},collect:M=>({isDragging:M.isDragging()})}),S=w?.25:1;x(A);const T=(M,O,F,P,H)=>o.jsx(sAe,{page:s,section:a,data:M,path:O,pageIndex:F,sectionIndex:P,rowIndex:H},`row-${n}-${M.uuid}`);return o.jsxs("div",{style:{opacity:S,marginBottom:20},className:c?"draggable row":"",children:[u===!0&&o.jsx(_h,{saveBuilderElementModalData:v,setSaveBuilderElementModalData:m,saveElementModal:h,setSaveElementModal:g}),d===!0&&o.jsx(Ih,{visibilty:d,setVisibility:f,section:e,pageIndex:r,sectionIndex:i},"section_settings_"+r+i),u===!0?o.jsx("div",{children:o.jsx("div",{children:e.children.map((M,O)=>{const F=`${n}-${O}`;return o.jsx(k.Fragment,{children:T(M,F,r,i,O)},F)})})}):o.jsx(o.Fragment,{children:o.jsxs("div",{children:[(e==null?void 0:e.showSectionHeader)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:(C=e==null?void 0:e.heading)==null?void 0:C[l==null?void 0:l.type]}),((E=e==null?void 0:e.subHeadingText)==null?void 0:E[l==null?void 0:l.type])&&o.jsx("p",{children:(_=e==null?void 0:e.subHeadingText)==null?void 0:_[l==null?void 0:l.type]}),o.jsx("hr",{})]}),e.children.map((M,O)=>{const F=`${n}-${O}`;return o.jsx(k.Fragment,{children:o.jsx("div",{className:"",children:T(M,F,r,i,O)},F)},F)})]})})]})},v5={},b5={height:"1280px",width:"100%"},lAe=t=>{var d,f,h,g;const{data:e,path:n,pageIndex:r}=t,{isBuilderMode:i}=Ht(),a=k.useRef(null),[{isDragging:s},l]=ra({type:na,item:{type:na,uuid:e.uuid,children:e.children,path:n},collect:v=>({isDragging:v.isDragging()})}),c=s?0:1;l(a);const u=(v,m,A,w)=>o.jsx(oAe,{data:v,section:v,path:m,page:e,pageIndex:A,sectionIndex:w},`section_${A}_${w}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${i&&"draggable page-css p-3 pb-4"}`,"data-image-src":e==null?void 0:e.bgImage,"data-bg-color":`#${e==null?void 0:e.bgColor}`,children:o.jsx("div",{className:"pdf flex justify-content-center",children:i===!0?o.jsx("div",{id:e==null?void 0:e.uuid,className:"page-block ",style:(e==null?void 0:e.bgType)==="image"?{...v5,...b5,opacity:c,backgroundImage:`url("${e==null?void 0:e.bgImage}")`}:{...v5,...b5,opacity:c,backgroundColor:`#${e==null?void 0:e.bgColor}`},children:((e==null?void 0:e.isCoverPage)===!1||(e==null?void 0:e.isCoverPage)===void 0)&&o.jsx(o.Fragment,{children:e.children.map((v,m)=>{const A=`${n}-${m}`;return o.jsx(k.Fragment,{children:u(v,A,r,m)},`section-${m}-${v.uuid}`)})})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:"page-block",style:(e==null?void 0:e.bgType)==="image"?{...v5,...b5,opacity:c,backgroundImage:`url("${e==null?void 0:e.bgImage}")`,backgroundSize:"cover"}:{...v5,...b5,opacity:c,backgroundColor:`#${e==null?void 0:e.bgColor}`},children:o.jsx("div",{style:{marginTop:`${(d=e==null?void 0:e.margin)==null?void 0:d.top}px`,marginBottom:`${(f=e==null?void 0:e.margin)==null?void 0:f.bottom}px`,marginLeft:`${(h=e==null?void 0:e.margin)==null?void 0:h.left}px`,marginRight:`${(g=e==null?void 0:e.margin)==null?void 0:g.right}px`},children:e.children.map((v,m)=>{const A=`${n}-${m}`;return o.jsx(k.Fragment,{children:((v==null?void 0:v.isHidden)===!1||i)&&u(v,A,r,m)},`section-${m}-${v.uuid}`)})})})})})})},cAe=()=>{const{isBuilderMode:t}=Ht(),[e,n]=k.useState(!1),[r,i]=k.useState(0),[a,s]=k.useState(!1),{formBuilderFormLayout:l}=sn(),c=(u,d,f)=>o.jsx(lAe,{data:u,path:d,pageIndex:f},`page-${u.uuid}`);return o.jsx("div",{className:"page",children:(l==null?void 0:l.length)===S9&&t===!1?o.jsx(o.Fragment,{children:(l==null?void 0:l.length)&&l.map((u,d)=>{const f=`${d}`;return o.jsx("div",{className:"scroll-height-400",children:c(u,f,d)},`${u.uuid}-${d}`)})}):o.jsx(o.Fragment,{children:t===!0?o.jsx(ts,{scrollable:!0,activeIndex:r,onTabChange:u=>i(u.index),children:(l==null?void 0:l.length)&&l.map((u,d)=>{const f=`${d}`;if((u==null?void 0:u.isHidden)===!1||t)return o.jsxs(wr,{header:"Page",headerTemplate:h=>o.jsx(F8,{options:h,pageIndex:d,page:u,setTabSidebarSetting:n,setPageActiveIndex:i,pages:l}),children:[t===!0&&o.jsx(mf,{reusableBuilderElementModalVisibility:a,setReusableBuilderElementModalVisibility:s,pageIndex:d}),o.jsxs("div",{className:"p-3",children:[o.jsx(j0,{setVisibility:n,visibilty:e,pageIndex:d,page:u}),o.jsx("div",{children:c(u,f,d)})]})]},`${u.uuid}-${d}`)})}):o.jsx("div",{className:"",children:(l==null?void 0:l.length)&&l.map((u,d)=>{var h;const f=`${d}`;if((u==null?void 0:u.isHidden)===!1||t)return o.jsxs("section",{id:u==null?void 0:u.uuid,"data-nav-title":(h=u==null?void 0:u.title)==null?void 0:h.english,"data-scrollspy":!0,children:[t===!0&&o.jsx(mf,{reusableBuilderElementModalVisibility:a,setReusableBuilderElementModalVisibility:s,pageIndex:d}),o.jsxs("div",{className:"p-3",children:[o.jsx(j0,{setVisibility:n,visibilty:e,pageIndex:d,page:u}),o.jsx("div",{children:c(u,f,d)})]})]},`${u.uuid}-${d}`)})})})})},uAe=t=>{var w,x,S,T;const e=k.useRef(null),{removeColumn:n,addColumn:r,cloneColumn:i,formBuilderFormLayout:a}=sn(),{emitSocketData:s,isBuilderMode:l}=Ht(),{options:c,pageIndex:u,sectionIndex:d,rowIndex:f,columnIndex:h,data:g}=t,v=c.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",m=`${c.className} justify-content-space-between`,A=`${c.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".add-column-tool"}),o.jsxs("div",{className:m,children:[o.jsxs("span",{ref:l===!0?e:null,children:[o.jsx("button",{className:c.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:c.togglerClassName,onClick:c.onTogglerClick,children:[o.jsx("span",{className:v}),o.jsx(Qt,{})]}),o.jsx("span",{className:A,children:"Column"})]}),l===!0&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-column-tool","data-pr-tooltip":"Add Column",children:o.jsxs("button",{className:c.togglerClassName,onClick:()=>{r(u,d,f),s()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((T=(S=(x=(w=a[u])==null?void 0:w.children[d])==null?void 0:x.children[f])==null?void 0:S.children)==null?void 0:T.length)>1&&o.jsxs("button",{className:c.togglerClassName,onClick:()=>{n(u,d,f,h),s()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:c.togglerClassName,onClick:()=>{i(g,u,d,f,h),s()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})})]})]})]})},dAe={position:"relative"},fAe=t=>{var S,T,C,E,_;const{isAdvanceView:e,isRenderView:n,isBuilderMode:r}=Ht(),{handleDrop:i}=sn(),{data:a,path:s,pageIndex:l,sectionIndex:c,rowIndex:u,columnIndex:d,section:f,row:h,page:g}=t,v=k.useRef(null),[{isDragging:m},A]=ra({type:As,item:{type:As,uuid:a==null?void 0:a.uuid,children:a.children,path:s},collect:M=>({isDragging:M.isDragging()})}),w=m&&!n?.25:1;A(v);const x=(M,O,F,P,H,N,z)=>o.jsx(Lc,{page:g,column:a,type:"field",row:h,section:f,field:M,data:M,path:O,pageIndex:F,sectionIndex:P,rowIndex:H,columnIndex:N,fieldIndex:z},`component-${s}-${M==null?void 0:M.uuid}`);return o.jsx("div",{style:e?{...dAe,opacity:w}:{},className:n?"form-builder-column container-column":"draggable form-builder-column container-column",children:r===!0?o.jsx(o.Fragment,{children:e===!0?o.jsxs(ci,{className:"builder-row-column",header:"Column",toggleable:!0,headerTemplate:M=>o.jsx(uAe,{options:M,pageIndex:l,sectionIndex:c,rowIndex:u,data:a,columnIndex:d}),children:[((S=a==null?void 0:a.children)==null?void 0:S.length)>0?(T=a==null?void 0:a.children)==null?void 0:T.map((M,O)=>{const F=`${s}-${O}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:F,childrenCount:a.children.length,droppedField:a},onDrop:i}),x(M,F,l,c,u,d,O)]},F)}):o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]}),o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:i,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((C=a==null?void 0:a.children)==null?void 0:C.length)>0?(E=a==null?void 0:a.children)==null?void 0:E.map((M,O)=>{const F=`${s}-${O}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:F,childrenCount:a.children.length,droppedField:a},onDrop:i}),x(M,F,l,c,u,d,O)]},F)}):o.jsx(o.Fragment,{children:o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]})}),o.jsx(Fr,{isAdvanceView:e,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:i,isLast:!0})]})})}):o.jsx(o.Fragment,{children:(_=a==null?void 0:a.children)==null?void 0:_.map((M,O)=>{const F=`${s}-${O}`;return o.jsx(k.Fragment,{children:x(M,F,l,c,u,d,O)},F)})})})},hAe=t=>{var x,S,T,C;const{options:e,pageIndex:n,sectionIndex:r,rowIndex:i,data:a}=t,[,s]=k.useState(!1),l=k.useRef(null),{isBuilderMode:c,emitSocketData:u}=Ht(),{removeRow:d,addRow:f,cloneRow:h,formBuilderFormLayout:g,userSelectedLanguage:v}=sn(),m=e!=null&&e.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",A=`${e==null?void 0:e.className} justify-content-space-between`,w=`${e==null?void 0:e.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-row-tool"}),o.jsxs("div",{className:A,children:[o.jsxs("span",{ref:c===!0?l:null,children:[o.jsx("button",{className:e==null?void 0:e.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:e==null?void 0:e.togglerClassName,onClick:e==null?void 0:e.onTogglerClick,children:[o.jsx("span",{className:m}),o.jsx(Qt,{})]}),o.jsxs("span",{className:w,children:["Row:"," ",((x=a==null?void 0:a.heading)==null?void 0:x[v==null?void 0:v.type])!==""?(S=a==null?void 0:a.heading)==null?void 0:S[v==null?void 0:v.type]:"Untitled"]})]}),c===!0&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-row-tool","data-pr-tooltip":"Add Row",children:o.jsxs("button",{className:e==null?void 0:e.togglerClassName,onClick:()=>{f(n,r),u()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((C=(T=g[n])==null?void 0:T.children[r])==null?void 0:C.children.length)>1&&o.jsxs("button",{className:e==null?void 0:e.togglerClassName,onClick:()=>{d(n,r,i),u()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:e==null?void 0:e.togglerClassName,onClick:()=>{h(a,n,r,i),u()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"setting-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{onClick:()=>s(!0),className:e==null?void 0:e.togglerClassName,children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})},pAe={},gAe=t=>{var ie,re,Z,K,W,me,be,Te,ye,fe,ne;const{isAdvanceView:e,isRenderView:n,isBuilderMode:r,isAdmin:i,renderType:a,emitSocketData:s}=Ht(),{handleDrop:l}=sn(),{data:c,path:u,pageIndex:d,sectionIndex:f,rowIndex:h,section:g,page:v}=t,m=k.useRef(null),{userSelectedLanguage:A}=sn(),{userTaskSubmitFormData:w,taskRegisterData:x,updateTaskRegisterData:S,updateTaskProgressValue:T,addUserDataFormRowRepeatableData:C,removeUserDataFormSectionRepeatableData:E,task_status:_,TASK_PUBLISHED:M}=Ar(),[O,F]=k.useState(!1),[{isDragging:P},H]=ra({type:Ao,item:{type:Ao,uuid:c.uuid,children:c.children,path:u,data:c},collect:q=>({isDragging:q.isDragging()})}),N=P?.25:1;H(m);const z=(q,ee,oe,pe,_e,Ne)=>o.jsx(fAe,{page:v,row:c,section:g,data:q,path:ee,pageIndex:oe,sectionIndex:pe,rowIndex:_e,columnIndex:Ne,emitSocketData:s},`column-${u}-${q.uuid}`),U=_t.findIndex(w,function(q){return(q==null?void 0:q.rowId)===(c==null?void 0:c.uuid)}),ce=()=>{var oe,pe,_e;const q=_t.cloneDeep(x);((pe=(oe=w[U])==null?void 0:oe.repeatableFieldsData)==null?void 0:pe.length)>=(c==null?void 0:c.minimumEntries)?q[c==null?void 0:c.uuid]=(_e=w[U])==null?void 0:_e.repeatableFields:delete q[c==null?void 0:c.uuid];const ee=Object.keys(q).length;S(q),T(ee)},X=(ie=c==null?void 0:c.repeatableFields)==null?void 0:ie.map(q=>{var ee;return{fieldUuid:q==null?void 0:q.uuid,field:q==null?void 0:q.uuid,header:(ee=q==null?void 0:q.label)==null?void 0:ee.english}}),R=X==null?void 0:X.map(q=>o.jsx(xr,{field:q.field,header:q.header,body:ee=>o.jsx(o.Fragment,{children:o.jsx("div",{className:"post__content_repetable",dangerouslySetInnerHTML:{__html:ee[q==null?void 0:q.field]}})})},q.field)),ue=()=>{var pe;const q=[...w],ee=[];let oe=!0;e:for(const[,_e]of c.children.entries()){for(const[,Ne]of _e.children.entries())if(Ne!=null&&Ne.isPostField&&Ne.isValid!==1){const ve={fieldId:Ne.uuid,rowIndex:h};console.log("inValidData",ve),ee.push(ve),Gt.emit("OnInvalidFieldCatch",ve),oe=!1;break e}oe=!0}oe&&(ee==null?void 0:ee.length)===0&&(C(c==null?void 0:c.uuid,(pe=q[U])==null?void 0:pe.repeatableFields),Gt.emit("clearRepeatableFields",c==null?void 0:c.uuid),ce())},Y=q=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,size:"small",type:"button",className:"p-button-danger ",onClick:()=>{E(c==null?void 0:c.uuid,q==null?void 0:q.rowIndex),setTimeout(()=>{ce()},1e3)},icon:"pi pi-trash"})});return o.jsxs("div",{style:{...pAe,opacity:N,marginTop:`${(re=c==null?void 0:c.margin)==null?void 0:re.top}px`,marginBottom:`${(Z=c==null?void 0:c.margin)==null?void 0:Z.bottom}px`,marginLeft:`${(K=c==null?void 0:c.margin)==null?void 0:K.left}px`,marginRight:`${(W=c==null?void 0:c.margin)==null?void 0:W.right}px`},className:n?"row container-row":"draggable row container-row",children:[O&&o.jsx(bg,{renderType:a,visibilty:O,setVisibility:F,row:c,pageIndex:d,sectionIndex:f,rowIndex:h,emitSocketData:s},"row_settings_"+d+f+h),r===!0?o.jsx(o.Fragment,{children:e===!0?o.jsx(ci,{header:"Row",toggleable:!0,headerTemplate:q=>o.jsx(hAe,{options:q,pageIndex:d,sectionIndex:f,rowIndex:h,data:c}),children:o.jsxs("div",{className:"form-builder-columns",style:{overflowX:"auto"},children:[(me=c==null?void 0:c.children)==null?void 0:me.map((q,ee)=>{const oe=`${u}-${ee}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,data:{path:oe,childrenCount:c.children.length},onDrop:l,className:"horizontalDrag"}),z(q,oe,d,f,h,ee)]},oe)}),o.jsx(Fr,{isAdvanceView:e,data:{path:`${u}-${c.children.length}`,childrenCount:c.children.length},onDrop:l,className:"horizontalDrag",isLast:!0})]})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:e?"form-builder-columns":"",style:e?{overflowX:"auto"}:{},children:(be=c==null?void 0:c.children)==null?void 0:be.map((q,ee)=>{const oe=`${u}-${ee}`;return o.jsx(k.Fragment,{children:z(q,oe,d,f,h,ee)},oe)})})})}):o.jsx(o.Fragment,{children:!(c!=null&&c.rowIsRepeatable&&_===M)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(Te=c==null?void 0:c.heading)==null?void 0:Te[A==null?void 0:A.type]}),o.jsx("span",{children:(ye=c==null?void 0:c.subHeadingText)==null?void 0:ye[A==null?void 0:A.type]}),o.jsx("div",{className:"form-builder-columns",children:c.children.map((q,ee)=>{const oe=`${u}-${ee}`;return o.jsx(k.Fragment,{children:z(q,oe,d,f,h,ee)},oe)})})]})}),(c==null?void 0:c.rowIsRepeatable)&&_!==M&&o.jsx(Ft,{text:!0,size:"small",type:"button",className:"p-button-success mb-3",onClick:()=>ue(),label:((fe=c.addToListButtonLabel)==null?void 0:fe[A==null?void 0:A.type])+"9999999999"}),(c==null?void 0:c.rowIsRepeatable)&&o.jsxs("div",{className:"card",children:[o.jsxs(ro,{value:(w==null?void 0:w.length)>0?(ne=w[U])==null?void 0:ne.repeatableFieldsData:[],children:[R,_!==M&&o.jsx(xr,{style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"left",overflow:"visible"},body:q=>Y(q)})]}),i&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{field:c})]})]})]})},mAe=t=>{var ce,X,R,ue,Y,ie,re,Z;const{isAdvanceView:e,isBuilderMode:n,renderType:r,emitSocketData:i}=Ht(),{handleDrop:a}=sn(),{data:s,path:l,pageIndex:c,sectionIndex:u,section:d,page:f}=t,{removeSection:h,addSection:g,cloneSection:v,formBuilderFormLayout:m,userSelectedLanguage:A}=sn(),[w,x]=k.useState(!1),[S,T]=k.useState(!1),[C,E]=k.useState({reusable_template_schema:""}),[_,M]=k.useState(!1),O=k.useRef(null),F=(K,W)=>{E(me=>({...me,[K]:W}))},[{isDragging:P},H]=ra({type:na,item:{type:na,uuid:s.uuid,children:s.children,path:l},collect:K=>({isDragging:K.isDragging()})}),N=P?.25:1;H(O);const z=(K,W,me,be,Te)=>o.jsx(gAe,{page:f,section:d,data:K,path:W,pageIndex:me,sectionIndex:be,rowIndex:Te,emitSocketData:i},`row-${l}-${K.uuid}`),U=(K,W,me)=>{var fe,ne;const be=K.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Te=`${K.className} justify-content-space-between panel-tab-section`,ye=`${K.titleClassName} pl-1 text-primary`;return o.jsxs("div",{className:Te,children:[o.jsxs("span",{ref:n===!0?O:null,children:[o.jsx("button",{className:K.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:K.togglerClassName,onClick:K.onTogglerClick,children:[o.jsx("span",{className:be}),o.jsx(Qt,{})]}),o.jsxs("span",{className:ye,children:[me+1," ",(fe=s==null?void 0:s.heading)==null?void 0:fe[A==null?void 0:A.type]]})]}),n===!0&&o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".del-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-section-tool"}),o.jsx(cn,{target:".save-tool"}),o.jsx(cn,{target:".settings-tool"}),o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-section-tool","data-pr-tooltip":"Add Section",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{g(W),i()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((ne=m[W])==null?void 0:ne.children.length)>1&&o.jsx("span",{className:"del-tool","data-pr-tooltip":"Delete",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{h(W,me),i()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"save-tool","data-pr-tooltip":"Save",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{F("reusable_template_schema",s),T(!0)},children:[o.jsx("span",{className:"pi pi-save"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{v(s,W,me),i()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"settings-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>x(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsxs("div",{style:{opacity:N,marginBottom:20},className:e?"draggable row":"",children:[n===!0&&o.jsx(_h,{saveBuilderElementModalData:C,setSaveBuilderElementModalData:E,saveElementModal:S,setSaveElementModal:T}),w===!0&&n===!0&&o.jsx(Ih,{renderType:r,visibilty:w,setVisibility:x,section:s,pageIndex:c,sectionIndex:u,emitSocketData:i},"section_settings_"+c+u),n===!0?o.jsx(o.Fragment,{children:e===!0?o.jsxs(ci,{header:(ce=s==null?void 0:s.heading)==null?void 0:ce.english,toggleable:!0,headerTemplate:K=>U(K,c,u),onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),children:[((X=s==null?void 0:s.subHeadingText)==null?void 0:X[A==null?void 0:A.type])&&o.jsx("p",{children:(R=s==null?void 0:s.subHeadingText)==null?void 0:R[A==null?void 0:A.type]}),o.jsxs("div",{children:[s.children.map((K,W)=>{const me=`${l}-${W}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,data:{path:me,childrenCount:s.children.length},onDrop:a}),z(K,me,c,u,W)]},me)}),o.jsx(Fr,{isAdvanceView:e,data:{path:`${l}-${s.children.length}`,childrenCount:s.children.length,droppedField:s},onDrop:a,isLast:!0})]}),_&&o.jsxs("div",{className:"m-3 flex justify-content-end",children:[o.jsx("span",{className:"add-section-tool ","data-pr-tooltip":"Add Section",children:o.jsx("i",{className:"pi pi-plus",onClick:()=>{g(c),i()},children:o.jsx(Qt,{})})}),((ue=m[c])==null?void 0:ue.children.length)>1&&o.jsx("span",{className:"del-tool ml-2",children:o.jsx("i",{className:"pi pi-trash","data-pr-tooltip":"Delete",onClick:()=>{h(c,u),i()},children:o.jsx(Qt,{})})})]})]}):o.jsxs(o.Fragment,{children:[((Y=s==null?void 0:s.subHeadingText)==null?void 0:Y[A==null?void 0:A.type])&&o.jsx("p",{children:(ie=s==null?void 0:s.subHeadingText)==null?void 0:ie[A==null?void 0:A.type]}),o.jsx("div",{children:s.children.map((K,W)=>{const me=`${l}-${W}`;return o.jsx(k.Fragment,{children:z(K,me,c,u,W)},me)})})]})}):o.jsx(o.Fragment,{children:o.jsxs("div",{className:"",children:[(s==null?void 0:s.showSectionHeader)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:(re=s==null?void 0:s.heading)==null?void 0:re[A==null?void 0:A.type]}),o.jsx("p",{children:(Z=s==null?void 0:s.subHeadingText)==null?void 0:Z[A==null?void 0:A.type]}),o.jsx("hr",{})]}),s.children.map((K,W)=>{const me=`${l}-${W}`;return o.jsx(k.Fragment,{children:o.jsx("div",{className:"",children:z(K,me,c,u,W)},me)},me)})]})})]})},vAe={position:"relative"},bAe=t=>{var S,T,C;const{isAdvanceView:e,isRenderView:n,isBuilderMode:r}=Ht(),{handleDrop:i}=sn(),{data:a,path:s,pageIndex:l,sectionIndex:c,rowIndex:u,columnIndex:d,section:f,row:h,page:g}=t,v=k.useRef(null),[{isDragging:m},A]=ra({type:As,item:{type:As,uuid:a==null?void 0:a.uuid,children:a.children,path:s},collect:E=>({isDragging:E.isDragging()})}),w=m&&!n?.25:1;A(v);const x=(E,_,M,O,F,P,H)=>o.jsx(Lc,{page:g,type:"field",row:h,column:a,section:f,field:E,data:E,path:_,pageIndex:M,sectionIndex:O,rowIndex:F,columnIndex:P,fieldIndex:H},`component-${s}-${E==null?void 0:E.uuid}`);return o.jsx("div",{style:e?{...vAe,opacity:w}:{},className:n?"":"draggable column container-column",children:r===!0?o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((S=a==null?void 0:a.children)==null?void 0:S.length)>0?(T=a==null?void 0:a.children)==null?void 0:T.map((E,_)=>{const M=`${s}-${_}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:e,fieldDropArea:!0,data:{path:M,childrenCount:a.children.length,droppedField:a},onDrop:i}),x(E,M,l,c,u,d,_)]},M)}):o.jsx(o.Fragment,{}),o.jsx(Fr,{isAdvanceView:e,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:i,isLast:!0})]})}):o.jsx(o.Fragment,{children:(C=a==null?void 0:a.children)==null?void 0:C.map((E,_)=>{const M=`${s}-${_}`;return o.jsx(k.Fragment,{children:x(E,M,l,c,u,d,_)},M)})})})},yAe=t=>{var l;const{isAdvanceView:e}=Ht(),{data:n,page:r,currentPath:i,pageIndex:a}=t,s=(c,u,d,f,h,g,v,m)=>o.jsx(bAe,{page:r,row:m,section:v,data:c,path:`${d}-${f}-${h}-${g}`,pageIndex:d,sectionIndex:f,rowIndex:h,columnIndex:g},`column-${i}-${c.uuid}`);return o.jsx(o.Fragment,{children:(l=n==null?void 0:n.children)==null?void 0:l.map((c,u)=>{var d;return(d=c==null?void 0:c.children)==null?void 0:d.map((f,h)=>{var g;return o.jsx(o.Fragment,{children:o.jsx("div",{className:e?"columns":"",style:e?{overflowX:"auto"}:{},children:(g=f==null?void 0:f.children)==null?void 0:g.map((v,m)=>{const A=`${i}-${u}-${h}-${m}`;return o.jsx(k.Fragment,{children:s(v,A,a,u,h,m,c,f)},A)})})})})})})},AAe=t=>{const{data:e,path:n,pageIndex:r}=t,{isAdvanceView:i,isBuilderMode:a}=Ht(),{formBuilderFormSchema:s,handleDrop:l}=sn(),c=k.useRef(null),[{},u]=ra({type:na,item:{type:na,uuid:e.uuid,children:e.children,path:n},collect:f=>({isDragging:f.isDragging()})});u(c);const d=(f,h,g,v)=>o.jsx(mAe,{data:f,section:f,path:h,page:e,pageIndex:g,sectionIndex:v},`section_${g}_${v}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${a&&"draggable page-css p-3 pb-4"}`,"data-image-src":e==null?void 0:e.bgImage,"data-bg-color":`#${e==null?void 0:e.bgColor}`,children:a===!0?o.jsx(o.Fragment,{children:i?o.jsxs(o.Fragment,{children:[e.children.map((f,h)=>{const g=`${n}-${h}`;return o.jsxs(k.Fragment,{children:[i===!0&&o.jsx(Fr,{isAdvanceView:i,data:{path:g,childrenCount:e.children.length},onDrop:l}),d(f,g,r,h)]},`section-${h}-${f.uuid}`)}),i===!0&&o.jsx(Fr,{isAdvanceView:i,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:l,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsx(yAe,{page:e,data:e,path:n,pageIndex:r})})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:"p-1",children:e.children.map((f,h)=>{const g=`${n}-${h}`;return o.jsx(k.Fragment,{children:s!=null&&s.showConditionalFields?o.jsx(o.Fragment,{children:o.jsx("div",{children:d(f,g,r,h)})}):((f==null?void 0:f.isHidden)===!1||!a)&&d(f,g,r,h)},`section-${h}-${f.uuid}`)})})})})},wAe=()=>{const[t,e]=k.useState(!1),{formBuilderFormLayout:n}=sn(),{isBuilderMode:r}=Ht(),i=()=>{},a=(s,l,c)=>o.jsx(AAe,{data:s,path:l,pageIndex:c},`page-${s.uuid}`);return o.jsx(o.Fragment,{children:o.jsx("div",{className:"page",children:o.jsx("div",{children:(n==null?void 0:n.length)&&n.map((s,l)=>{const c=`${l}`;if((s==null?void 0:s.isHidden)===!1||r)return o.jsxs("div",{children:[o.jsx(j0,{setVisibility:e,visibilty:t,pageIndex:l,page:s,emitSocketData:i}),a(s,c,l)]},`policie-page-${l}`)})})})})},SAe={position:"relative"},CAe=t=>{var S;const{isRenderView:e,isAdvanceView:n,isBuilderMode:r}=Ht(),{data:i,path:a,pageIndex:s,sectionIndex:l,rowIndex:c,columnIndex:u,section:d,row:f,page:h}=t,g=k.useRef(null),{handleDrop:v}=sn(),[{isDragging:m},A]=ra({type:As,item:{type:As,uuid:i==null?void 0:i.uuid,children:i.children,path:a},collect:T=>({isDragging:T.isDragging()})}),w=m&&!e?.25:1;A(g);const x=(T,C,E,_,M,O,F)=>o.jsx(Lc,{page:h,type:"field",row:f,section:d,field:T,data:T,path:C,pageIndex:E,sectionIndex:_,rowIndex:M,columnIndex:O,fieldIndex:F},`component-${a}-${T==null?void 0:T.uuid}`);return o.jsx("div",{style:n?{...SAe,opacity:w}:{},className:e?"form-builder-column container-column":"draggable form-builder-column container-column",children:r&&o.jsxs("div",{children:[(S=i==null?void 0:i.children)==null?void 0:S.map((T,C)=>{const E=`${a}-${C}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{fieldDropArea:!0,isAdvanceView:n,data:{path:E,childrenCount:i.children.length,droppedField:i},onDrop:v}),x(T,E,s,l,c,u,C)]},E)}),i.children.length===0&&o.jsx("p",{className:"text-center",children:"Add element by dragging and dropping element from the sidebar into the dropzone area"}),o.jsx(Fr,{fieldDropArea:!0,isAdvanceView:n,data:{path:`${a}-${i.children.length}`,childrenCount:i.children.length,droppedField:i},onDrop:v,isLast:!0})]})})},xAe={},TAe=t=>{var Y,ie,re,Z,K,W,me;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,c=k.useRef(null),{userSelectedLanguage:u,handleDrop:d}=sn(),{userTaskSubmitFormData:f,taskRegisterData:h,updateTaskRegisterData:g,updateTaskProgressValue:v,addUserDataFormRowRepeatableData:m,removeUserDataFormSectionRepeatableData:A,task_status:w,TASK_PUBLISHED:x}=Ar(),{isRenderView:S,isAdmin:T,isAdvanceView:C,emitSocketData:E,renderType:_}=Ht(),[M,O]=k.useState(!1),[{isDragging:F},P]=ra({type:Ao,item:{type:Ao,uuid:e.uuid,children:e.children,path:n,data:e},collect:be=>({isDragging:be.isDragging()})}),H=F?.25:1;P(c);const N=(be,Te,ye,fe,ne,q)=>o.jsx(CAe,{page:l,row:e,section:s,data:be,path:Te,pageIndex:ye,sectionIndex:fe,rowIndex:ne,columnIndex:q},`column-${n}-${be.uuid}`),z=_t.findIndex(f,function(be){return(be==null?void 0:be.rowId)===(e==null?void 0:e.uuid)}),U=()=>{var ye,fe,ne;const be=_t.cloneDeep(h);((fe=(ye=f[z])==null?void 0:ye.repeatableFieldsData)==null?void 0:fe.length)>=(e==null?void 0:e.minimumEntries)?be[e==null?void 0:e.uuid]=(ne=f[z])==null?void 0:ne.repeatableFields:delete be[e==null?void 0:e.uuid];const Te=Object.keys(be).length;g(be),v(Te)},ce=(Y=e==null?void 0:e.repeatableFields)==null?void 0:Y.map(be=>{var Te;return{fieldUuid:be==null?void 0:be.uuid,field:be==null?void 0:be.uuid,header:(Te=be==null?void 0:be.label)==null?void 0:Te.english}}),X=ce==null?void 0:ce.map(be=>o.jsx(xr,{field:be.field,header:be.header,body:Te=>o.jsx(o.Fragment,{children:o.jsx("div",{className:"post__content_repetable",dangerouslySetInnerHTML:{__html:Te[be==null?void 0:be.field]}})})},be.field)),R=()=>{var fe;const be=[...f],Te=[];let ye=!0;e:for(const[,ne]of e.children.entries()){for(const[,q]of ne.children.entries())if(q!=null&&q.isPostField&&q.isValid!==1){const ee={fieldId:q.uuid,rowIndex:a};Te.push(ee),Gt.emit("OnInvalidFieldCatch",ee),ye=!1;break e}ye=!0}ye&&(Te==null?void 0:Te.length)===0&&(m(e==null?void 0:e.uuid,(fe=be[z])==null?void 0:fe.repeatableFields),Gt.emit("clearRepeatableFields",e==null?void 0:e.uuid),U())},ue=be=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,type:"button",size:"small",className:"p-button-danger ",onClick:()=>{A(e==null?void 0:e.uuid,be==null?void 0:be.rowIndex),setTimeout(()=>{U()},1e3)},icon:"pi pi-trash"})});return o.jsxs("div",{style:{...xAe,opacity:H,marginTop:`${(ie=e==null?void 0:e.margin)==null?void 0:ie.top}px`,marginBottom:`${(re=e==null?void 0:e.margin)==null?void 0:re.bottom}px`,marginLeft:`${(Z=e==null?void 0:e.margin)==null?void 0:Z.left}px`,marginRight:`${(K=e==null?void 0:e.margin)==null?void 0:K.right}px`},className:S?"row container-row":"draggable row container-row",children:[M&&o.jsx(bg,{renderType:_,visibilty:M,setVisibility:O,row:e,pageIndex:r,sectionIndex:i,rowIndex:a,emitSocketData:E},"row_settings_"+r+i+a),o.jsxs("div",{className:"form-builder-columns",children:[e.children.map((be,Te)=>{const ye=`${n}-${Te}`;return o.jsxs(k.Fragment,{children:[_===zd&&o.jsx(Fr,{isAdvanceView:C,data:{path:ye,childrenCount:e.children.length},onDrop:d,className:"horizontalDrag"}),N(be,ye,r,i,a,Te)]},ye)}),o.jsx(Fr,{isAdvanceView:C,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:d,className:"horizontalDrag",isLast:!0})]}),(e==null?void 0:e.rowIsRepeatable)&&w!==x&&o.jsx(Ft,{text:!0,size:"small",type:"button",className:"p-button-success mb-3",onClick:()=>R(),label:(W=e.addToListButtonLabel)==null?void 0:W[u==null?void 0:u.type]}),(e==null?void 0:e.rowIsRepeatable)&&o.jsxs("div",{className:"card",children:[o.jsxs(ro,{value:(f==null?void 0:f.length)>0?(me=f[z])==null?void 0:me.repeatableFieldsData:[],children:[X,w!==x&&o.jsx(xr,{style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"left",overflow:"visible"},body:be=>ue(be)})]}),T&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{field:e})]})]})]})},EAe=t=>{var N,z;const{data:e,path:n,pageIndex:r,sectionIndex:i,section:a,page:s}=t,{removeSection:l,addSection:c,cloneSection:u,formBuilderFormLayout:d,userSelectedLanguage:f,handleDrop:h}=sn(),{isBuilderMode:g,isAdvanceView:v,renderType:m,emitSocketData:A}=Ht(),[w,x]=k.useState(!1),[S,T]=k.useState(!1),[C,E]=k.useState({reusable_template_schema:""}),_=k.useRef(null),[{isDragging:M},O]=ra({type:na,item:{type:na,uuid:e.uuid,children:e.children,path:n},collect:U=>({isDragging:U.isDragging()})}),F=M?.25:1;O(_);const P=(U,ce,X,R,ue)=>o.jsx(TAe,{page:s,section:a,data:U,path:ce,pageIndex:X,sectionIndex:R,rowIndex:ue},`row-${n}-${U.uuid}`),H=(U,ce,X)=>{var ie,re;const R=U.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",ue=`${U.className} justify-content-space-between panel-tab-section`,Y=`${U.titleClassName} pl-1 text-primary`;return o.jsxs("div",{className:ue,children:[o.jsxs("span",{ref:g===!0?_:null,children:[o.jsx("button",{className:U.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:U.togglerClassName,onClick:U.onTogglerClick,children:[o.jsx("span",{className:R}),o.jsx(Qt,{})]}),o.jsxs("span",{className:Y,children:[X+1," ",(ie=e==null?void 0:e.heading)==null?void 0:ie[f==null?void 0:f.type]]})]}),g===!0&&o.jsxs(o.Fragment,{children:[o.jsx(cn,{target:".clone-tool"}),o.jsx(cn,{target:".del-tool"}),o.jsx(cn,{target:".setting-tool"}),o.jsx(cn,{target:".add-section-tool"}),o.jsx(cn,{target:".save-tool"}),o.jsx(cn,{target:".settings-tool"}),o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-section-tool","data-pr-tooltip":"Add Section",children:o.jsxs("button",{className:U.togglerClassName,onClick:()=>{c(ce),A()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((re=d[ce])==null?void 0:re.children.length)>1&&o.jsx("span",{className:"del-tool","data-pr-tooltip":"Delete",children:o.jsxs("button",{className:U.togglerClassName,onClick:()=>{l(ce,X),A()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:U.togglerClassName,onClick:()=>{u(e,ce,X),A()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"settings-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{className:U.togglerClassName,onClick:()=>x(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsxs("div",{style:{opacity:F,marginBottom:20},className:v?"draggable row":"",children:[g===!0&&o.jsx(_h,{saveBuilderElementModalData:C,setSaveBuilderElementModalData:E,saveElementModal:S,setSaveElementModal:T}),w===!0&&g===!0&&o.jsx(Ih,{renderType:m,visibilty:w,setVisibility:x,section:e,pageIndex:r,sectionIndex:i,emitSocketData:A},"section_settings_"+r+i),g===!0&&o.jsxs(ci,{className:"mb-5",header:(N=e==null?void 0:e.heading)==null?void 0:N.english,toggleable:!0,headerTemplate:U=>H(U,r,i),children:[o.jsx("p",{children:(z=e==null?void 0:e.subHeadingText)==null?void 0:z[f==null?void 0:f.type]}),o.jsxs("div",{className:"",children:[e.children.map((U,ce)=>{const X=`${n}-${ce}`;return o.jsx(k.Fragment,{children:P(U,X,r,i,ce)},X)}),o.jsx(Fr,{isAdvanceView:v,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:h,className:"horizontalDrag",isLast:!0})]})]})]})},IAe=t=>{const{isRenderView:e,isBuilderMode:n}=Ht(),{data:r,path:i,pageIndex:a}=t,s=k.useRef(null),[,l]=ra({type:na,item:{type:na,uuid:r.uuid,children:r.children,path:i},collect:u=>({isDragging:u.isDragging()})});l(s);const c=(u,d,f,h)=>o.jsx(EAe,{data:u,section:u,path:d,pageIndex:f,sectionIndex:h,page:r},`section_${f}_${h}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${n&&"draggable page-css p-3 pb-4"}`,"data-image-src":r==null?void 0:r.bgImage,"data-bg-color":`#${r==null?void 0:r.bgColor}`,children:n?o.jsx("div",{className:"p-1",children:r.children.map((u,d)=>{const f=`${i}-${d}`;return o.jsx(k.Fragment,{children:c(u,f,a,d)},`section-${d}-${u.uuid}`)})}):o.jsx(o.Fragment,{})})},y5=t=>{const{handleSelectCourseItem:e,icon:n,currentItem:r,field:i,fieldIndex:a,title:s}=t,[l,c]=k.useState(!1),{userTrainingSaveData:u}=Ar(),d=h=>{var g,v;if(u!==null&&h){const m=u==null?void 0:u.findIndex(A=>(A==null?void 0:A.fieldId)===(h==null?void 0:h.uuid));return(g=u[m])!=null&&g.isSeen?(v=u[m])==null?void 0:v.isSeen:!1}else return!1},f=()=>{let h=[];if(u!==null){const v=u.findIndex(m=>(m==null?void 0:m.fieldId)===(i==null?void 0:i.uuid));h=u[v].logs}else h=[];return h==null?void 0:h.map((v,m)=>o.jsxs("li",{className:"flex flex-column md:flex-row md:align-items-center md:justify-content-between mb-4",children:[o.jsxs("div",{className:"mr-8 md:mr-8",children:[o.jsxs("span",{className:"inline-block text-900 font-medium mr-2 mb-1 md:mb-0",children:[v==null?void 0:v.action," on ",((v==null?void 0:v.videoTime)/60).toFixed(3)," seconds"]}),o.jsx("span",{className:"text-600",children:Ln(v==null?void 0:v.timeState).format("Do, MMMM, YYYY HH:ss")})]}),o.jsxs("div",{className:"mt-2 md:mt-0 ml-0 md:ml-8 flex align-items-center",children:[o.jsx("div",{className:"surface-300 border-round overflow-hidden",style:{height:"8px",width:"200px"},children:o.jsx("div",{className:(v==null?void 0:v.action)==="Play"?"bg-green-500 h-full":"bg-orange-500 h-full",style:{width:`${Math.floor((v==null?void 0:v.videoTime)/(v==null?void 0:v.totalTime)*100)}%`}})}),o.jsxs("span",{className:"text-orange-500 ml-3 font-medium",children:[Math.floor((v==null?void 0:v.videoTime)/(v==null?void 0:v.totalTime)*100),"%"]})]})]},`logs_${m}`))};return o.jsxs("ul",{className:"list-none p-0 m-0 cursor-pointer",onClick:()=>{e(i)},children:[o.jsxs("li",{className:"flex flex-column md:flex-row md:align-items-center md:justify-content-between mb-3",style:{borderRadius:"10px"},children:[o.jsx("div",{children:o.jsxs("div",{children:[d(i)?o.jsx(Ft,{text:!0,size:"small",type:"button",icon:"pi pi-check",className:"p-button-rounded p-button-primary mr-2 p-button-outlined","aria-label":"Search"}):o.jsx(Ft,{text:!0,size:"small",type:"button",icon:"pi pi-dot",className:"p-button-rounded p-button-secondary mr-2 p-button-outlined","aria-label":"Search"}),(i==null?void 0:i.uuid)===(r==null?void 0:r.uuid)?o.jsxs("span",{children:[o.jsx(Ft,{text:!0,size:"small",type:"button",icon:n,className:"p-button-rounded p-button-primary mr-2 inline-flex justify-content-center align-items-center w-2rem h-2rem","aria-label":"Search"}),o.jsxs("span",{className:"inline-flex justify-content-center align-items-center h-2rem",style:{color:"#0f8bfd"},children:[a+1," - ",s]})]}):o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"inline-flex justify-content-center align-items-center w-2rem h-2rem border-circle border-1",children:o.jsx("i",{className:n})}),o.jsxs("span",{className:"font-medium text-500 ml-2 hoverSelect",children:[a+1," - ",s]})]})]})}),o.jsxs("div",{className:"flex align-items-center justify-content-between md:justify-content-end mt-3 md:mt-0",children:[o.jsx("div",{className:"text-right mr-3",children:o.jsxs("span",{className:" font-bold",children:[" ",i==null?void 0:i.videoDuration]})}),o.jsx(Ft,{text:!0,size:"small",type:"button",onClick:()=>c(!l),icon:"pi pi-eye",className:"p-button-rounded p-button-secondary mr-2 ","aria-label":"Search"})]})]}),l&&o.jsxs("div",{className:"surface-card shadow-2 border-round p-4",children:[o.jsx("div",{className:"flex justify-content-between align-items-center mb-5",children:o.jsx("span",{className:"text-xl text-900 font-medium",children:"Logs"})}),o.jsx("ul",{className:"list-none p-0 m-0",children:f()})]})]},`ul-list-${a}`)},_Ae=t=>{var S,T,C,E,_,M;const{field:e,fieldIndex:n,currentItem:r,setCurrentItem:i,setCurrentSection:a,setvideoJsOptions:s,section:l,setImage:c,setDocuments:u}=t,{taskOptions:d,userTrainingSaveData:f,updateUserTraining:h}=Ar(),g=(S=d==null?void 0:d.training)!=null&&S.getAssessmentSelectedQuiz?(T=d==null?void 0:d.training)==null?void 0:T.getAssessmentSelectedQuiz:()=>{},v=O=>{if(f!==null){const F=[...f],P=F.findIndex(H=>(H==null?void 0:H.fieldId)===(O==null?void 0:O.uuid));P>=0&&(F[P]={...F[P],isSeen:!0}),h([...F])}},m=O=>{var F;i(O),a(l),s({autoplay:!1,controls:!0,responsive:!0,fluid:!0,sources:[{src:(F=O==null?void 0:O.media_url)==null?void 0:F.english}]})},A=O=>{var F;v(O),i(O),c((F=O==null?void 0:O.media_url)==null?void 0:F.english),a(l)},w=O=>{v(O),i(O),u(O==null?void 0:O.documents),a(l)},x=O=>{var F,P;(F=O==null?void 0:O.quizSchema)!=null&&F.assessment_id&&(g((P=O==null?void 0:O.quizSchema)==null?void 0:P.assessment_id),a(l),i(O))};switch(e==null?void 0:e.componentType){case"video":return o.jsx(y5,{title:(C=e==null?void 0:e.title)==null?void 0:C.english,type:"video",icon:"pi pi-video",handleSelectCourseItem:m,field:e,fieldIndex:n,currentItem:r,userTrainingSaveData:f},`${e==null?void 0:e.uuid}-list`);case"image":return o.jsx(y5,{title:(E=e==null?void 0:e.title)==null?void 0:E.english,type:"image",icon:"pi pi-image",handleSelectCourseItem:A,field:e,fieldIndex:n,currentItem:r,userTrainingSaveData:f},`${e==null?void 0:e.uuid}-list`);case"document":return o.jsx(y5,{title:(_=e==null?void 0:e.title)==null?void 0:_.english,type:"document",icon:"pi pi-image",handleSelectCourseItem:w,field:e,fieldIndex:n,currentItem:r,userTrainingSaveData:f},`${e==null?void 0:e.uuid}-list`);case"quiz":return o.jsx(y5,{title:(M=e==null?void 0:e.quizSchema)==null?void 0:M.assessment_title,type:"quiz",icon:"pi pi-image",handleSelectCourseItem:x,field:e,fieldIndex:n,currentItem:r,userTrainingSaveData:f},`${e==null?void 0:e.uuid}-list`);default:return o.jsx(o.Fragment,{})}},DAe=t=>{const{fields:e,setImage:n,setvideoJsOptions:r,setDocuments:i,setQuizSchema:a,setCurrentItem:s,currentItem:l,setCurrentSection:c,section:u,updateTrainingProgress:d}=t;return o.jsx(o.Fragment,{children:o.jsx("div",{className:"surface-card border-round p-4 ",children:e==null?void 0:e.map((f,h)=>o.jsxs("div",{children:[o.jsx(_Ae,{field:f,fieldIndex:h,currentItem:l,setCurrentItem:s,setCurrentSection:c,setvideoJsOptions:r,section:u,setImage:n,setDocuments:i,setQuizSchema:a,updateTrainingProgress:d},`${h}-list-sidebar`)," ",o.jsx("hr",{})," "]},`sidebar-item-card-${h}`))})})},NAe=t=>{var v,m,A,w,x,S,T,C,E,_;const{setSelectedOption:e,quiz:n,userSelectedLanguage:r,onSetAnswer:i,setIsOptionSelected:a,index:s,eleIndex:l,ele:c,setCorrectAnswerCheck:u,correctAnswerCheck:d,selectedOption:f}=t,{media:h}=Ht(),g=(v=h==null?void 0:h.image)!=null&&v.MediaImage?(m=h==null?void 0:h.image)==null?void 0:m.MediaImage:o.jsx(o.Fragment,{});return o.jsxs("div",{onClick:M=>{e(O=>{var F;return(F=n==null?void 0:n.answersText)==null?void 0:F[r==null?void 0:r.type]}),i(M,s,l,n,c),a(!0),u({isCorrect:null,text:null})},className:"field-radiobutton card",style:(d==null?void 0:d.text)===((A=n.answersText)==null?void 0:A[r==null?void 0:r.type])?(d==null?void 0:d.isCorrect)===!0?{borderColor:"green",borderWidth:1,borderStyle:"solid",position:"relative"}:{borderColor:"red",borderWidth:1,borderStyle:"solid",position:"relative"}:((w=n.answersText)==null?void 0:w[r==null?void 0:r.type])===f?{backgroundColor:"#0F8BFD",color:"#fff"}:{},children:[o.jsx(ia,{inputId:s,value:n.answersText,checked:((x=n.answersText)==null?void 0:x[r==null?void 0:r.type])===f,onChange:M=>{u({isCorrect:null,text:null}),e(O=>{var F;return(F=M.target.value)==null?void 0:F[r==null?void 0:r.type]}),i(M,s,l,n,c),a(!0)}}),((S=n.answersTextImage)==null?void 0:S[r==null?void 0:r.type])&&((T=n.answersTextImage)==null?void 0:T[r==null?void 0:r.type])!==""&&o.jsx(g,{mediaId:(C=n.answersTextImage)==null?void 0:C[r==null?void 0:r.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:s,children:(E=n.answersText)==null?void 0:E[r==null?void 0:r.type]}),o.jsx("span",{style:{position:"absolute",right:10},children:(d==null?void 0:d.text)===((_=n.answersText)==null?void 0:_[r==null?void 0:r.type])?(d==null?void 0:d.isCorrect)===!0?o.jsxs("span",{style:{color:"green"},children:[" ","Correct answer"]}):o.jsxs("span",{style:{color:"red"},children:[" ","Wrong answer"]}):""})]},s)},OAe=t=>{var g,v,m,A,w,x,S;const{media:e}=Ht(),n=(g=e==null?void 0:e.image)!=null&&g.MediaImage?(v=e==null?void 0:e.image)==null?void 0:v.MediaImage:o.jsx(o.Fragment,{}),{setSelectedOption:r,quiz:i,userSelectedLanguage:a,setIsOptionSelected:s,index:l,ele:c,setCorrectAnswerCheck:u,correctAnswerCheck:d,selectedOption:f,onChangeCheckbox:h}=t;return k.useEffect(()=>(Array.isArray(f)||r([]),()=>{}),[]),o.jsx(o.Fragment,{children:Array.isArray(f)&&o.jsxs("div",{onClick:()=>{var T;h(!(f!=null&&f.some(C=>{var E;return C===((E=i.answersText)==null?void 0:E[a==null?void 0:a.type])})),(T=i==null?void 0:i.answersText)==null?void 0:T[a==null?void 0:a.type]),s(!0),u({isCorrect:null,text:null})},className:"field-radiobutton card",style:d!=null&&d.length&&(d!=null&&d.some(T=>{var C;return(T==null?void 0:T.text)===((C=i.answersText)==null?void 0:C[a==null?void 0:a.type])}))?d!=null&&d.some(T=>{var C;return(T==null?void 0:T.text)===((C=i.answersText)==null?void 0:C[a==null?void 0:a.type])&&(T==null?void 0:T.isCorrect)===!0})?{borderColor:"green",borderWidth:1,borderStyle:"solid",position:"relative"}:{borderColor:"red",borderWidth:1,borderStyle:"solid",position:"relative"}:((m=i.answersText)==null?void 0:m[a==null?void 0:a.type])===f?{backgroundColor:"#0F8BFD"}:{},children:[o.jsx(Yr,{inputId:l,value:i.answersText,checked:f==null?void 0:f.some(T=>{var C;return T===((C=i.answersText)==null?void 0:C[a==null?void 0:a.type])}),onChange:T=>{var C;h(T.checked,(C=T.target.value)==null?void 0:C[a==null?void 0:a.type],i,c),s(!0)}}),((A=i.answersTextImage)==null?void 0:A[a==null?void 0:a.type])&&((w=i.answersTextImage)==null?void 0:w[a==null?void 0:a.type])!==""&&o.jsx(n,{mediaId:(x=i.answersTextImage)==null?void 0:x[a==null?void 0:a.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:l,children:(S=i.answersText)==null?void 0:S[a==null?void 0:a.type]}),o.jsx("span",{style:{position:"absolute",right:10},children:d!=null&&d.length&&(d!=null&&d.some(T=>{var C;return(T==null?void 0:T.text)===((C=i.answersText)==null?void 0:C[a==null?void 0:a.type])}))?d!=null&&d.some(T=>{var C;return(T==null?void 0:T.text)===((C=i.answersText)==null?void 0:C[a==null?void 0:a.type])&&(T==null?void 0:T.isCorrect)===!0})?o.jsx("span",{style:{color:"green"},children:" Correct Answer"}):o.jsx("span",{style:{color:"red"},children:" Wrong Answer"}):""})]},l)})};function NU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function FAe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function OU(t,e,n){return e&&FAe(t.prototype,e),t}function FU(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Lw(t,e)}function A5(t){return A5=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},A5(t)}function Lw(t,e){return Lw=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},Lw(t,e)}function kAe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function PAe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function MAe(t,e){return e&&(typeof e=="object"||typeof e=="function")?e:PAe(t)}function kU(t){var e=kAe();return function(){var r=A5(t),i;if(e){var a=A5(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return MAe(this,i)}}function LAe(t){return BAe(t)||VAe(t)||qAe(t)||UAe()}function BAe(t){if(Array.isArray(t))return Bw(t)}function VAe(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function qAe(t,e){if(t){if(typeof t=="string")return Bw(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bw(t,e)}}function Bw(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function UAe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
4267
4267
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yg(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,n=String(t);if(e===0)return n;var r=n.match(/(.*?)([0-9]+)(.*)/),i=r?r[1]:"",a=r?r[3]:"",s=r?r[2]:n,l=s.length>=e?s:(LAe(Array(e)).map(function(){return"0"}).join("")+s).slice(e*-1);return"".concat(i).concat(l).concat(a)}var PU={daysInHours:!1,zeroPadTime:2};function $Ae(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.now,r=n===void 0?Date.now:n,i=e.precision,a=i===void 0?0:i,s=e.controlled,l=e.offsetTime,c=l===void 0?0:l,u=e.overtime,d;typeof t=="string"?d=new Date(t).getTime():t instanceof Date?d=t.getTime():d=t,s||(d+=c);var f=s?d:d-r(),h=Math.min(20,Math.max(0,a)),g=Math.round(parseFloat(((u?f:Math.max(0,f))/1e3).toFixed(h))*1e3),v=Math.abs(g)/1e3;return{total:g,days:Math.floor(v/(3600*24)),hours:Math.floor(v/3600%24),minutes:Math.floor(v/60%60),seconds:Math.floor(v%60),milliseconds:Number((v%1*1e3).toFixed()),completed:g<=0}}function jAe(t,e){var n=t.days,r=t.hours,i=t.minutes,a=t.seconds,s=Object.assign(Object.assign({},PU),e),l=s.daysInHours,c=s.zeroPadTime,u=s.zeroPadDays,d=u===void 0?c:u,f=Math.min(2,c),h=l?yg(r+n*24,c):yg(r,f);return{days:l?"":yg(n,d),hours:h,minutes:yg(i,f),seconds:yg(a,f)}}var MU=function(t){FU(n,t);var e=kU(n);function n(){var r;return NU(this,n),r=e.apply(this,arguments),r.state={count:r.props.count||3},r.startCountdown=function(){r.interval=window.setInterval(function(){var i=r.state.count-1;i===0?(r.stopCountdown(),r.props.onComplete&&r.props.onComplete()):r.setState(function(a){return{count:a.count-1}})},1e3)},r.stopCountdown=function(){clearInterval(r.interval)},r.addTime=function(i){r.stopCountdown(),r.setState(function(a){return{count:a.count+i}},r.startCountdown)},r}return OU(n,[{key:"componentDidMount",value:function(){this.startCountdown()}},{key:"componentWillUnmount",value:function(){clearInterval(this.interval)}},{key:"render",value:function(){return this.props.children?k.cloneElement(this.props.children,{count:this.state.count}):null}}]),n}(k.Component);MU.propTypes={count:la.number,children:la.element,onComplete:la.func};var Ag=function(t){FU(n,t);var e=kU(n);function n(r){var i;if(NU(this,n),i=e.call(this,r),i.mounted=!1,i.initialTimestamp=i.calcOffsetStartTimestamp(),i.offsetStartTimestamp=i.props.autoStart?0:i.initialTimestamp,i.offsetTime=0,i.legacyMode=!1,i.legacyCountdownRef=null,i.tick=function(){var s=i.calcTimeDelta(),l=s.completed&&!i.props.overtime?void 0:i.props.onTick;i.setTimeDeltaState(s,void 0,l)},i.setLegacyCountdownRef=function(s){i.legacyCountdownRef=s},i.start=function(){if(!i.isStarted()){var s=i.offsetStartTimestamp;i.offsetStartTimestamp=0,i.offsetTime+=s?i.calcOffsetStartTimestamp()-s:0;var l=i.calcTimeDelta();i.setTimeDeltaState(l,"STARTED",i.props.onStart),!i.props.controlled&&(!l.completed||i.props.overtime)&&(i.clearTimer(),i.interval=window.setInterval(i.tick,i.props.intervalDelay))}},i.pause=function(){i.isPaused()||(i.clearTimer(),i.offsetStartTimestamp=i.calcOffsetStartTimestamp(),i.setTimeDeltaState(i.state.timeDelta,"PAUSED",i.props.onPause))},i.stop=function(){i.isStopped()||(i.clearTimer(),i.offsetStartTimestamp=i.calcOffsetStartTimestamp(),i.offsetTime=i.offsetStartTimestamp-i.initialTimestamp,i.setTimeDeltaState(i.calcTimeDelta(),"STOPPED",i.props.onStop))},i.isStarted=function(){return i.isStatus("STARTED")},i.isPaused=function(){return i.isStatus("PAUSED")},i.isStopped=function(){return i.isStatus("STOPPED")},i.isCompleted=function(){return i.isStatus("COMPLETED")},r.date){var a=i.calcTimeDelta();i.state={timeDelta:a,status:a.completed?"COMPLETED":"STOPPED"}}else i.legacyMode=!0;return i}return OU(n,[{key:"componentDidMount",value:function(){this.legacyMode||(this.mounted=!0,this.props.onMount&&this.props.onMount(this.calcTimeDelta()),this.props.autoStart&&this.start())}},{key:"componentDidUpdate",value:function(i){this.legacyMode||this.props.date!==i.date&&(this.initialTimestamp=this.calcOffsetStartTimestamp(),this.offsetStartTimestamp=this.initialTimestamp,this.offsetTime=0,this.setTimeDeltaState(this.calcTimeDelta()))}},{key:"componentWillUnmount",value:function(){this.legacyMode||(this.mounted=!1,this.clearTimer())}},{key:"calcTimeDelta",value:function(){var i=this.props,a=i.date,s=i.now,l=i.precision,c=i.controlled,u=i.overtime;return $Ae(a,{now:s,precision:l,controlled:c,offsetTime:this.offsetTime,overtime:u})}},{key:"calcOffsetStartTimestamp",value:function(){return Date.now()}},{key:"addTime",value:function(i){this.legacyCountdownRef.addTime(i)}},{key:"clearTimer",value:function(){window.clearInterval(this.interval)}},{key:"isStatus",value:function(i){return this.state.status===i}},{key:"setTimeDeltaState",value:function(i,a,s){var l=this;if(this.mounted){var c=i.completed&&!this.state.timeDelta.completed,u=i.completed&&a==="STARTED";c&&!this.props.overtime&&this.clearTimer();var d=function(){s&&s(l.state.timeDelta),l.props.onComplete&&(c||u)&&l.props.onComplete(i,u)};return this.setState(function(f){var h=a||f.status;return i.completed&&!l.props.overtime?h="COMPLETED":!a&&h==="COMPLETED"&&(h="STOPPED"),{timeDelta:i,status:h}},d)}}},{key:"getApi",value:function(){return this.api=this.api||{start:this.start,pause:this.pause,stop:this.stop,isStarted:this.isStarted,isPaused:this.isPaused,isStopped:this.isStopped,isCompleted:this.isCompleted}}},{key:"getRenderProps",value:function(){var i=this.props,a=i.daysInHours,s=i.zeroPadTime,l=i.zeroPadDays,c=this.state.timeDelta;return Object.assign(Object.assign({},c),{api:this.getApi(),props:this.props,formatted:jAe(c,{daysInHours:a,zeroPadTime:s,zeroPadDays:l})})}},{key:"render",value:function(){if(this.legacyMode){var i=this.props,a=i.count,s=i.children,l=i.onComplete;return k.createElement(MU,{ref:this.setLegacyCountdownRef,count:a,onComplete:l},s)}var c=this.props,u=c.className,d=c.overtime,f=c.children,h=c.renderer,g=this.getRenderProps();if(h)return h(g);if(f&&this.state.timeDelta.completed&&!d)return k.cloneElement(f,{countdown:g});var v=g.formatted,m=v.days,A=v.hours,w=v.minutes,x=v.seconds;return k.createElement("span",{className:u},g.total<0?"-":"",m,m?":":"",A,":",w,":",x)}}]),n}(k.Component);Ag.defaultProps=Object.assign(Object.assign({},PU),{controlled:!1,intervalDelay:1e3,precision:0,autoStart:!0}),Ag.propTypes={date:la.oneOfType([la.instanceOf(Date),la.string,la.number]),daysInHours:la.bool,zeroPadTime:la.number,zeroPadDays:la.number,controlled:la.bool,intervalDelay:la.number,precision:la.number,autoStart:la.bool,overtime:la.bool,className:la.string,children:la.element,renderer:la.func,now:la.func,onMount:la.func,onStart:la.func,onPause:la.func,onStop:la.func,onTick:la.func,onComplete:la.func};const zAe=({assessmentData:t,setDisplaySummary:e})=>{var r,i,a,s;const n=l=>{if(l.seconds<10&&(l.seconds="0"+l.seconds),l.minutes===0&&(l.minutes="0"+l.minutes),l.completed)e(!0);else return o.jsxs("span",{children:["Time Remaining:"," ",o.jsxs("span",{style:l.minutes===0?{color:"black"}:{color:"black"},children:[l.minutes,":",l.seconds]})]})};return o.jsx(o.Fragment,{children:t&&((i=(r=t==null?void 0:t.time_limit)==null?void 0:r.type)==null?void 0:i.key)==="PerExam"&&o.jsx(Ag,{renderer:n,date:Date.now()+parseInt((s=(a=t==null?void 0:t.time_limit)==null?void 0:a.time_limit_info)==null?void 0:s.num_of_mins)*60*1e3})})},HAe=k.memo(zAe),YAe=t=>{var d,f,h,g;const{assessmentData:e,onNextQuestion:n,currentQuestionIndex:r}=t,[i,a]=k.useState(Date.now()),[s,l]=k.useState(!1),c=k.useCallback(()=>{a(Date.now()),l(!1)},[r]);k.useEffect(()=>{c()},[r,c]);const u=v=>(v.seconds<10&&(v.seconds="0"+v.seconds),v.minutes===0&&(v.minutes="0"+v.minutes),v.completed&&!s?(l(!0),setTimeout(()=>{n()},500),o.jsx(o.Fragment,{})):o.jsxs("span",{children:["Time Remaining:"," ",o.jsxs("span",{style:{color:"black"},children:[v.minutes,":",v.seconds]})]}));return o.jsx(o.Fragment,{children:((f=(d=e==null?void 0:e.time_limit)==null?void 0:d.type)==null?void 0:f.key)==="PerQuestion"&&o.jsx(Ag,{renderer:u,date:i+parseInt((g=(h=e==null?void 0:e.time_limit)==null?void 0:h.time_limit_info)==null?void 0:g.time_per_question)*1e3,intervalDelay:0},i)})},KAe=()=>{const t=()=>{const a=new Audio("https://api.goenterprise.io/assets/sounds/sound4.mp3");i(a)},e=()=>{const a=new Audio("https://api.goenterprise.io/assets/sounds/sound2.mp3");i(a)},n=()=>{const a=new Audio("https://api.goenterprise.io/assets/sounds/sound8.mp3");i(a)},r=()=>{const a=new Audio("https://api.goenterprise.io/assets/sounds/sound6.mp3");i(a)},i=a=>{a.play().then(()=>{}).catch(s=>{console.info("Not Played,"+s.error+s.name)})};return{socketConnection:t,socketDisconnect:e,errorOcurred:n,quizStartAlert:r}},XAe="1",LU=t=>{var Ae,Be,Ee,$,ge,le,se,he,Se,De;const e=Me=>{const[ze,tt]=k.useState(Me),it=k.useRef(ze);return k.useEffect(()=>{it.current=ze},[ze]),[ze,it,tt]},{endQuiz:n,AddUserAssessmentAnswer:r,assessmentData:i,taskData:a}=Ar(),[s,l]=k.useState(new Date),{session_id:c,quizData:u,saveProgress:d,renderIn:f,onOpenQuiz:h,setDisplay:g,setAssessmentModal:v=()=>{},saveNewQuizData:m}=t,{quizStartAlert:A}=KAe(),{userSelectedLanguage:w}=sn(),[x,,S]=e(0),{media:T}=Ht(),C=(Ae=T==null?void 0:T.image)!=null&&Ae.MediaImage?(Be=T==null?void 0:T.image)==null?void 0:Be.MediaImage:o.jsx(o.Fragment,{}),[E,_,M]=e(null),[O,F]=k.useState(!1),[P,H,N]=e([]),[z,U]=k.useState(!1),[ce,X]=k.useState(!1),[R,ue]=k.useState(0),[Y,ie]=k.useState(0),[re,Z]=k.useState(0),[K,W]=k.useState(!1),[me,be]=k.useState({isCorrect:null,text:null});window.onbeforeunload=function(){return!1},k.useEffect(()=>{z||U(!0)},[P,O,z]),k.useEffect(()=>{u!==null&&(A(),Te())},[]);const Te=()=>{ie(u.quizConfiguration.quizPassMark)},ye=k.useCallback((Me,ze,tt,it,ht)=>{const Ut=[...P];if((ht==null?void 0:ht.answerInputType)!=="checkbox"){const hn={uuid:ht==null?void 0:ht.uuid,question:ht==null?void 0:ht.questionText,isCorrect:it.isCorrect,selectedAnswer:it.answersText,viewed:!0},$t=P.findIndex(mn=>(mn==null?void 0:mn.uuid)===ht.uuid);$t>=0?(Ut[$t]={...Ut[$t],...hn},N(Ut)):N([...P,hn])}},[E]),fe=()=>{if(x===0)return;const Me=x-1,ze=u.quizElements[Me],tt=H.current.find(it=>it.uuid===ze.uuid);if(tt){const it=tt.selectedAnswer;M(Array.isArray(it)?it:it[w.type]??it),F(!0)}else M(null),F(!1);S(Me)},ne=Me=>{for(const ze of P)if(ze.questionIndex===x+Me){M(ze.selectedAnswerEnglish);break}},q=(Me,ze,tt,it)=>{var hn;const ht=[...E];if(Me)ht.push(ze);else{const $t=ht.findIndex(mn=>mn===ze);$t>=0&&ht.splice($t,1)}M(ht);const Ut=[...P];if((it==null?void 0:it.answerInputType)==="checkbox"){let $t=!1;for(const[,Tt]of(it==null?void 0:it.answerOptions.entries())||[])if(Tt.isCorrect===!0)if(_t.includes(ht,(hn=Tt==null?void 0:Tt.answersText)==null?void 0:hn[w==null?void 0:w.type]))$t=!0;else{$t=!1;break}const mn={uuid:it==null?void 0:it.uuid,question:it==null?void 0:it.questionText,isCorrect:$t,selectedAnswer:tt.answersText,viewed:!0},En=P.findIndex(Tt=>(Tt==null?void 0:Tt.uuid)===it.uuid);En>=0?(Ut[En]={...Ut[En],...mn},N(Ut)):N([...P,mn])}},ee=k.useCallback(()=>{var hn,$t,mn,En,Tt,je,He,ot,rn,nn,Jt,_n;const Me=_.current,ze=_t.findIndex((hn=u==null?void 0:u.quizElements[x])==null?void 0:hn.answerOptions,function(wt){return wt.isCorrect===!0}),tt=u==null?void 0:u.quizElements[x],it=(mn=($t=tt==null?void 0:tt.answerOptions[ze])==null?void 0:$t.answersText)!=null&&mn[w==null?void 0:w.type]?(Tt=(En=tt==null?void 0:tt.answerOptions[ze])==null?void 0:En.answersText)==null?void 0:Tt[w==null?void 0:w.type]:"",ht=P.findIndex(wt=>(wt==null?void 0:wt.uuid)===tt.uuid),Ut=(je=P[ht])!=null&&je.isCorrect?1:0;if(u!=null&&u.quizElements&&x+1!==(u==null?void 0:u.quizElements.length)){const wt={assessment_user_attempt_id:(ot=i==null?void 0:i.assesment_user_attempts[((He=i==null?void 0:i.assesment_user_attempts)==null?void 0:He.length)-1])==null?void 0:ot.assessment_user_attempt_id,session_id:c,assessment_id:1,question:(rn=tt.questionText)==null?void 0:rn[w==null?void 0:w.type],question_uid:tt==null?void 0:tt.uuid,start_time:s,finish_time:new Date,correct_answer:it,selected_answer:Array.isArray(Me)?Me.toString():Me,is_correct_answer:Ut};r(wt),M(null),S(x+1),l(new Date),ne(2)}else if((u==null?void 0:u.quizElements.length)===x+1){const wt={assessment_user_attempt_id:(Jt=i==null?void 0:i.assesment_user_attempts[((nn=i==null?void 0:i.assesment_user_attempts)==null?void 0:nn.length)-1])==null?void 0:Jt.assessment_user_attempt_id,session_id:c,assessment_id:1,question_uid:tt==null?void 0:tt.uuid,question:(_n=tt.questionText)==null?void 0:_n[w==null?void 0:w.type],start_time:s,finish_time:new Date,correct_answer:it,selected_answer:Array.isArray(Me)?Me.toString():Me,is_correct_answer:Ut};r(wt),oe(),_e()}if(F(!1),x+1<u.quizElements.length){const wt=x+1,Ke=u.quizElements[wt],st=P.find(vt=>vt.uuid===Ke.uuid);if(st){const vt=st.selectedAnswer,Vt=Array.isArray(vt)?vt:vt[w.type]??vt;M(Vt),F(!0)}else M(null),F(!1)}},[x,P]),oe=()=>{X(!0)},pe=()=>{ve?(g(Jm),m(),U(!0),A(),Te(),S(0),M(null),F(!1),N([]),X(!1),ue(0),Z(0),W(!1),be({isCorrect:null,text:null})):(g(Cp),v(!1))},_e=()=>{var ht,Ut;let Me=0,ze=0,tt=!1;for(const hn of P)hn!=null&&hn.isCorrect&&Me++;ue(Me),ze=Me/((ht=u==null?void 0:u.quizElements)==null?void 0:ht.length)*100,ze=Math.round(ze),Z(ze),tt=ze>=Y,W(tt);const it={...u,...i,result:ze,status:tt,selectedAnswers:P};d(it),n({session_id:c,is_pass:tt?1:0,score:Me,out_of:(Ut=u==null?void 0:u.quizElements)==null?void 0:Ut.length,finish_time:new Date,status:1})},Ne=()=>{var Me,ze,tt,it,ht,Ut,hn;if(((Me=u==null?void 0:u.quizElements[x])==null?void 0:Me.answerInputType)==="radio"){const $t=_t.findIndex((ze=u==null?void 0:u.quizElements[x])==null?void 0:ze.answerOptions,function(mn){return mn.isCorrect===!0});E===((ht=(it=(tt=u==null?void 0:u.quizElements[x])==null?void 0:tt.answerOptions[$t])==null?void 0:it.answersText)==null?void 0:ht[w==null?void 0:w.type])?be({isCorrect:!0,text:E}):be({isCorrect:!1,text:E})}if(((Ut=u==null?void 0:u.quizElements[x])==null?void 0:Ut.answerInputType)==="checkbox"){const $t=(hn=u==null?void 0:u.quizElements[x])==null?void 0:hn.answerOptions.filter(mn=>mn.isCorrect===!0);if(E!=null&&E.length){const mn=E==null?void 0:E.map(En=>({isCorrect:$t==null?void 0:$t.some(Tt=>{var je;return((je=Tt==null?void 0:Tt.answersText)==null?void 0:je[w==null?void 0:w.type])===En}),text:En}));be(mn)}}},ve=(i==null?void 0:i.noOfAttempts)-((Ee=i==null?void 0:i.assesment_user_attempts)==null?void 0:Ee.length)>0&&!K;return o.jsx(o.Fragment,{children:u!==null&&o.jsxs("div",{children:[ce&&o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-6 col-offset-3",children:o.jsxs("div",{className:"card text-center",children:[o.jsxs("h5",{children:["Assessment Result for"," ",($=a==null?void 0:a.assessment)==null?void 0:$.assessment_title]}),o.jsxs("div",{children:[o.jsxs("p",{children:["You answered ",R," out of"," ",(ge=u==null?void 0:u.quizElements)==null?void 0:ge.length," questions"]}),o.jsxs("p",{children:["Your assessment result: ",re,"%"]}),o.jsxs("p",{children:["Score Needed To Pass: ",Y,"%"]}),o.jsx("br",{}),o.jsxs("p",{children:["Status:"," ",K?o.jsx(fu,{severity:"success",value:"Passed"}):o.jsx(fu,{severity:"danger",value:"Failed"})]}),K&&o.jsx("p",{children:"Congratulations you have passed!"}),o.jsx(o.Fragment,{children:ce&&o.jsx("div",{className:"text-center my-5",children:o.jsx(Ft,{label:ve?"Restart":"End",onClick:()=>pe()})})})]})]})})}),ce&&((le=i==null?void 0:i.assessment_type)==null?void 0:le.key)===XAe&&o.jsxs("div",{children:[o.jsx("h5",{className:"text-center",children:"Summary "}),o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-6 col-offset-3",children:P==null?void 0:P.map((Me,ze)=>{var tt,it;return o.jsxs("div",{className:"card",children:[o.jsxs("span",{className:"text-strong",children:[o.jsx("b",{children:"Question:"})," ",o.jsx("br",{}),(tt=Me==null?void 0:Me.question)==null?void 0:tt[w==null?void 0:w.type]]}),o.jsx("br",{}),o.jsx("br",{}),o.jsxs("span",{children:[o.jsx("b",{children:"Selected Answer:"})," ",o.jsx("br",{}),(it=Me==null?void 0:Me.selectedAnswer)==null?void 0:it[w==null?void 0:w.type]]}),o.jsx("br",{}),o.jsx("br",{}),o.jsx("p",{children:"In Correct:"}),Me!=null&&Me.isCorrect?o.jsxs(o.Fragment,{children:[o.jsx(l4,{value:"",severity:"success",className:"mr-2"})," ","Yes"]}):o.jsxs(o.Fragment,{children:[o.jsx(l4,{value:"",severity:"danger",className:"mr-2"})," ","No"]})]},ze)})})})]}),f!==I_?o.jsx(o.Fragment,{children:ce&&o.jsx("div",{className:"text-center my-5",children:o.jsx(Ft,{text:!0,className:"p-button-danger",icon:"pi pi-times",label:"Close",onClick:()=>{g(Cp)}})})}):o.jsx(o.Fragment,{}),z&&!ce&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-6 col-offset-3",children:[o.jsx("h5",{className:"text-center",children:o.jsxs("span",{children:[o.jsx(HAe,{assessmentData:i,setDisplaySummary:X}),o.jsx(YAe,{currentQuestionIndex:x,assessmentData:i,onNextQuestion:ee})]})}),o.jsxs("h2",{className:"text-center pb-6",children:[u==null?void 0:u.name," "]}),(se=u==null?void 0:u.quizElements)==null?void 0:se.map((Me,ze)=>{var tt,it,ht,Ut,hn;return o.jsxs("div",{className:"quiz-card-box",children:[x===ze&&((tt=Me==null?void 0:Me.questionTextImage)==null?void 0:tt[w==null?void 0:w.type])&&((it=Me==null?void 0:Me.questionTextImage)==null?void 0:it[w==null?void 0:w.type])!==""&&o.jsx("div",{className:"text-center assessment_image_container",children:o.jsx(C,{mediaId:(ht=Me==null?void 0:Me.questionTextImage)==null?void 0:ht[w==null?void 0:w.type],style:{height:"100px",width:"100px",objectFit:"cover",borderRadius:100},className:"text-center",alt:"questionImage"})}),o.jsx("h3",{className:"mb-5",children:x===ze&&((Ut=Me==null?void 0:Me.questionText)==null?void 0:Ut[w==null?void 0:w.type])}),x===ze&&((hn=Me==null?void 0:Me.answerOptions)==null?void 0:hn.map(($t,mn)=>(Me==null?void 0:Me.answerInputType)==="checkbox"?o.jsx(k.Fragment,{children:o.jsx(OAe,{onChangeCheckbox:q,setSelectedOption:M,quiz:$t,userSelectedLanguage:w,onSetAnswer:ye,setIsOptionSelected:F,index:mn,eleIndex:ze,ele:Me,setCorrectAnswerCheck:be,correctAnswerCheck:me,selectedOption:E})},`checkbox-question-${mn}`):o.jsx(k.Fragment,{children:o.jsx(NAe,{setSelectedOption:M,quiz:$t,userSelectedLanguage:w,onSetAnswer:ye,setIsOptionSelected:F,index:mn,eleIndex:ze,ele:Me,setCorrectAnswerCheck:be,correctAnswerCheck:me,selectedOption:E})},`radio-question-${mn}`)))]},ze)})]})}),o.jsxs("div",{className:"text-center my-5",children:[o.jsxs("div",{className:"mb-1",children:["Question :"," ",x+1+"/"+(u==null?void 0:u.quizElements.length)]}),o.jsx("br",{}),x>0&&((Se=(he=i==null?void 0:i.time_limit)==null?void 0:he.type)==null?void 0:Se.key)!=="PerQuestion"&&o.jsx(Ft,{size:"large",className:"mx-2",label:"Previous",onClick:Me=>fe()}),((i==null?void 0:i.skippable)===!0||O===!0)&&o.jsx(Ft,{size:"large",label:(u==null?void 0:u.quizElements.length)===x+1?"Finish":O===!0?"Next":"Skip",onClick:ee}),O===!0&&((De=i==null?void 0:i.assessment_type)==null?void 0:De.key)==="1"&&o.jsx(Ft,{size:"large",className:"ml-2 p-button-info",label:"Check Answer",onClick:()=>Ne()})]})]})]})})},RAe=t=>{const{getAssessmentByIdFromStore:e,quizSchema:n,setQuizSchema:r,renderIn:i,updateTrainingProgress:a,currentItem:s}=t,{userTrainingSaveData:l}=Ar();k.useEffect(()=>(c(),()=>{}),[]);const c=()=>{var g,v,m,A;const d=JSON.parse(e.form_template_schema),f=JSON.parse(e.assessment_meta_data);let h=[...((A=(m=(v=(g=d==null?void 0:d.layout[0])==null?void 0:g.children[0])==null?void 0:v.children[0])==null?void 0:m.children[0])==null?void 0:A.children)||[]];f!=null&&f.randomiseQuestions&&(h=tm.shuffle(h).map((w,x)=>({...w}))),f!=null&&f.randomiseAnswers&&(h=h.map((w,x)=>({...w,answerOptions:tm.shuffle(w==null?void 0:w.answerOptions)}))),f!=null&&f.enableNoOfAssessmentQuestions&&(h=h.slice(0,parseInt(f==null?void 0:f.noOfAssessmentQuestions))),r({assessment_id:1,name:e==null?void 0:e.assessment_title,label:"assessment_title",quizConfiguration:d==null?void 0:d.quizConfiguration,quizElements:h})},u=d=>{if((d==null?void 0:d.status)===!0){if(l!==null){const h=l.findIndex(g=>(g==null?void 0:g.fieldId)===(s==null?void 0:s.uuid));h>=0&&(l[h]={...l[h],isSeen:!0})}a()}};return o.jsx("div",{children:n&&o.jsx(LU,{renderIn:i,quizData:n,taskSchema:e==null?void 0:e.form_template_schema,saveProgress:d=>{u(d)}})})},GAe=t=>{var m,A;const{currentItem:e,videoJsOptions:n}=t,r=k.useRef(null),{userTrainingSaveData:i,updateUserTraining:a,taskRegisterData:s}=Ar(),{media:l}=Ht(),c=(m=l==null?void 0:l.video)!=null&&m.MediaVideo?(A=l==null?void 0:l.video)==null?void 0:A.MediaVideo:()=>o.jsx(o.Fragment,{}),u=w=>{r.current=w,w.on("waiting",()=>{Dt.log("player is waiting")}),w.on("dispose",()=>{Dt.log("player will dispose")})},d=w=>{if(i!==null){const x=[...i],S=x==null?void 0:x.findIndex(T=>(T==null?void 0:T.fieldId)===(e==null?void 0:e.uuid));S>=0&&(x[S].seenTime=w==null?void 0:w.target.currentTime)}},f=w=>{const x=[...i],S=x==null?void 0:x.findIndex(T=>(T==null?void 0:T.fieldId)===(w==null?void 0:w.uuid));S>=0&&(i[S]={...i[S],isSeen:!0},a(x),h("Ended"))},h=w=>{const x=r.current,S=i!==null?i==null?void 0:i.findIndex(T=>(T==null?void 0:T.fieldId)===(e==null?void 0:e.uuid)):-1;S>=0&&i[S].logs.push({action:w,videoTime:i[S].seenTime,totalTime:x.duration,timeState:new Date})},g=w=>{const{mediaId:x}=w,[S,T]=k.useState(!1);return k.useEffect(()=>{if(!S&&i!==null){const C=i.findIndex(E=>(E==null?void 0:E.fieldId)===(e==null?void 0:e.uuid));if(C>=0){T(!0);const E=r.current;E.currentTime=i[C].seenTime}T(!0)}return()=>{}},[i]),o.jsx(c,{mediaId:x,ref:r,className:"my-video",style:{borderRadius:"10px"},onPlay:()=>h("Play"),onPause:()=>h("Pause"),onEnded:()=>f(e),onTimeUpdate:d,controls:!0})},v=k.useCallback(w=>o.jsx(g,{mediaId:w}),[e==null?void 0:e.media_file_id]);return o.jsx("div",{children:(e==null?void 0:e.isExternalSource)===!1&&(e==null?void 0:e.media_file_id)!==void 0&&(e==null?void 0:e.media_file_id)!==null?o.jsx(o.Fragment,{children:v(e==null?void 0:e.media_file_id)}):o.jsx(o.Fragment,{children:o.jsx(RL,{onUpdate:()=>{},options:n,onReady:u,currentItem:e},e==null?void 0:e.uuid)})})},BU=t=>{var _,M,O,F,P,H;const{sections:e,showInfoPanel:n,updateTrainingProgress:r}=t,{taskOptions:i}=Ar(),[a]=k.useState(!1),[,s]=k.useState(c4),[l,c]=k.useState([]),[u,d]=k.useState(null),{userSelectedLanguage:f}=sn(),{isAdmin:h}=Ht(),[g,v]=k.useState(null),[m,A]=k.useState(null),w=(_=i==null?void 0:i.training)!=null&&_.getAssessmentByIdFromStore?(M=i==null?void 0:i.training)==null?void 0:M.getAssessmentByIdFromStore:()=>{},x=(O=i==null?void 0:i.training)!=null&&O.TrainingOverView?(F=i==null?void 0:i.training)==null?void 0:F.TrainingOverView:()=>o.jsx(o.Fragment,{}),[S,T]=k.useState({autoplay:!1,controls:!0,responsive:!0,fluid:!0,sources:[{src:"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"}]});k.useEffect(()=>{a||C()},[a]);const C=()=>{var N,z,U,ce,X,R,ue,Y,ie,re,Z,K,W,me,be,Te,ye,fe,ne,q,ee;switch(v((U=(z=(N=e[0])==null?void 0:N.children[0])==null?void 0:z.children[0])==null?void 0:U.children[0]),A(e[0]),(ue=(R=(X=(ce=e[0])==null?void 0:ce.children[0])==null?void 0:X.children[0])==null?void 0:R.children[0])==null?void 0:ue.componentType){case"video":T({autoplay:!1,controls:!0,responsive:!0,fluid:!0,sources:[{src:(K=(Z=(re=(ie=(Y=e[0])==null?void 0:Y.children[0])==null?void 0:ie.children[0])==null?void 0:re.children[0])==null?void 0:Z.media_url)==null?void 0:K.english}]});break;case"image":s((ye=(Te=(be=(me=(W=e[0])==null?void 0:W.children[0])==null?void 0:me.children[0])==null?void 0:be.children[0])==null?void 0:Te.media_url)==null?void 0:ye.english);break;case"document":c((ee=(q=(ne=(fe=e[0])==null?void 0:fe.children[0])==null?void 0:ne.children[0])==null?void 0:q.children[0])==null?void 0:ee.documents);break}},E=N=>{switch(N==null?void 0:N.componentType){case"video":return o.jsx("div",{children:o.jsx(GAe,{videoJsOptions:S,currentItem:N},N==null?void 0:N.uuid)});case"image":return o.jsx(RO,{field:N});case"document":return o.jsxs("div",{children:[o.jsx("h6",{children:"Documents"}),o.jsx("ul",{children:(l==null?void 0:l.length)>0&&l.map((z,U)=>o.jsx("li",{children:o.jsx("a",{href:z==null?void 0:z.url,children:z==null?void 0:z.url})},`document-item-${U}`))})]});case"quiz":return w!=null&&w.form_template_schema?o.jsx(RAe,{renderIn:I_,getAssessmentByIdFromStore:w,quizSchema:u,setQuizSchema:d,updateTrainingProgress:r,currentItem:N}):o.jsx("div",{});case"slides":return o.jsx("div",{children:"Show slides"});case"html":return o.jsx("div",{children:"Show custom HTML Here"});default:return o.jsx("div",{})}};return o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-8 scroll-height-100",children:[o.jsxs("div",{className:"flex justify-content-center text-2xl font-bold mb-3",children:[(P=m==null?void 0:m.heading)==null?void 0:P[f==null?void 0:f.type]," -"," ",(H=g==null?void 0:g.title)==null?void 0:H[f==null?void 0:f.type]," "]}),E(g),!h&&n&&o.jsx(x,{})]}),o.jsx("div",{className:"col-4 scroll-height-100",children:e.map((N,z)=>{var U,ce;return o.jsxs(ci,{className:"mb-2",header:(U=N==null?void 0:N.heading)==null?void 0:U.english,toggleable:!0,children:[o.jsxs("div",{children:[(ce=N==null?void 0:N.subHeadingText)==null?void 0:ce[f==null?void 0:f.type],"333-999"]}),N.children.map((X,R)=>{const ue=`${R}`;return o.jsx("div",{children:X.children.map((Y,ie)=>{const re=`${R}-${ue}`;return o.jsx(DAe,{setCurrentSection:A,section:N,setCurrentItem:v,currentItem:g,path:re,fields:Y.children,setvideoJsOptions:T,setImage:s,setDocuments:c,setQuizSchema:d,updateTrainingProgress:r},`training-sidebar-${ie}`)})},`training-sidebar-container-${R}`)})]},`train-sidebar-panel-${z}`)})})]})},WAe=()=>{var r;const{formBuilderFormLayout:t}=sn(),{isBuilderMode:e}=Ht(),n=(i,a,s)=>o.jsx(IAe,{data:i,path:a,pageIndex:s},`page-${i.uuid}`);return e?o.jsx(o.Fragment,{children:o.jsx("div",{className:"page",children:(t==null?void 0:t.length)&&t.map((i,a)=>{const s=`${a}`;return o.jsx("div",{children:n(i,s,a)},`exam-page-${a}`)})})}):o.jsx(BU,{sections:((r=t[0])==null?void 0:r.children)||[],showInfoPanel:!1,updateTrainingProgress:()=>{}})},QAe=t=>{var E,_,M,O,F;const{userSelectedLanguage:e,formBuilderConfigurationType:n,builderTemplateName:r,formBuilderFormSchema:i}=sn(),a=[{label:{english:"List main maintenance safety tips? "},componentType:"question",questionText:{french:"Quels sont les principaux conseils de sécurité pour la maintenance?? ",english:"List main maintenance safety tips? "},answerOptions:[],isHidden:!1,uuid:"rtest",options:[],underLined:!1,isAllowMultipleAnswer:!1,resizableColumns:!1,reorderableColumns:!1,timeLimit:0,score:0,subject_id:0,course_category_id:0,TextEditorProps:!1}],{questions:s}=t,[l,c]=k.useState(),[u,d]=k.useState([]),{media:f}=Ht(),h=(E=f==null?void 0:f.image)!=null&&E.MediaImage?(_=f==null?void 0:f.image)==null?void 0:_.MediaImage:o.jsx(o.Fragment,{}),g={assessment_id:"abc123",name:`${n==null?void 0:n.name} - ${r}`,label:"Quiz 1",quizConfiguration:{quizPassMark:75,quizTimeLimit:2,quizMaxAttempts:99,quizSequentialAnswer:0,isAllCorrectMandatory:!0,quizRandomiseQuestions:1,quizUniqueAnswersPerAttempt:"1"},quizElements:(s==null?void 0:s.length)>0?s:a},[v,m]=k.useState(0),[A,w]=k.useState(!1);function x(P,H){return(P==null?void 0:P.length)<=H?P:(P==null?void 0:P.slice(0,H))+"..."}k.useEffect(()=>{w(!0)},[]);const S=()=>{v!==0&&m(v-1)},T=()=>{if(g!=null&&g.quizElements&&v+1!==(g==null?void 0:g.quizElements.length))m(v+1);else if((g==null?void 0:g.quizElements.length)===v+1)return},C=(P,H)=>{let N=[...u];P.checked?N.push(H):N=N.filter(z=>(z==null?void 0:z[e==null?void 0:e.type])!==(H==null?void 0:H[e==null?void 0:e.type])),d(N)};return o.jsxs("div",{className:"mb-2",children:[A&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12",children:[o.jsxs("h3",{children:[g==null?void 0:g.name," "]}),(M=g==null?void 0:g.quizElements)==null?void 0:M.map((P,H)=>{var N,z,U,ce,X,R,ue,Y,ie;return(P==null?void 0:P.answerInputType)==="radio"?o.jsxs("div",{className:v===H?"card":" flex align-items-center p-field-radiobutton",children:[((N=P==null?void 0:P.questionTextImage)==null?void 0:N[e==null?void 0:e.type])&&((z=P==null?void 0:P.questionTextImage)==null?void 0:z[e==null?void 0:e.type])!==""&&o.jsx("div",{className:"text-center assessment_image_container",children:o.jsx(h,{mediaId:(U=P==null?void 0:P.questionTextImage)==null?void 0:U[e==null?void 0:e.type],style:{height:"100px",width:"100px",objectFit:"cover",borderRadius:100},className:"text-center",alt:"questionImage"})}),o.jsx("h3",{className:"mb-5",children:v===H&&((ce=P==null?void 0:P.questionText)==null?void 0:ce[e==null?void 0:e.type])}),v===H&&((X=P==null?void 0:P.answerOptions)==null?void 0:X.map((re,Z)=>{var K,W,me,be;return o.jsxs("div",{className:"field-radiobutton",children:[o.jsx(ia,{inputId:`${Z}-preview`,value:re==null?void 0:re.answersText,checked:l===Z,onChange:()=>{c(Z)}}),((K=re.answersTextImage)==null?void 0:K[e==null?void 0:e.type])&&((W=re.answersTextImage)==null?void 0:W[e==null?void 0:e.type])!==""&&o.jsx(h,{mediaId:(me=re.answersTextImage)==null?void 0:me[e==null?void 0:e.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:`${Z}-preview`,children:(be=re.answersText)==null?void 0:be[e==null?void 0:e.type]})]},Z)}))]},H):(P==null?void 0:P.answerInputType)==="checkbox"?o.jsxs("div",{className:v===H?"card":" flex align-items-center p-field-radiobutton",children:[o.jsx("h3",{className:"mb-5",children:v===H&&((R=P==null?void 0:P.questionText)==null?void 0:R[e==null?void 0:e.type])}),v===H&&((ue=P==null?void 0:P.answerOptions)==null?void 0:ue.map((re,Z)=>{var K,W,me,be;return o.jsxs("div",{className:"field-radiobutton",children:[o.jsx(Yr,{inputId:Z,value:re==null?void 0:re.answersText,onChange:Te=>{C(Te,re==null?void 0:re.answersText)},checked:u.some(Te=>{var ye;return(Te==null?void 0:Te[e==null?void 0:e.type])===((ye=re==null?void 0:re.answersText)==null?void 0:ye[e==null?void 0:e.type])})}),((K=re.answersTextImage)==null?void 0:K[e==null?void 0:e.type])&&((W=re.answersTextImage)==null?void 0:W[e==null?void 0:e.type])!==""&&o.jsx(h,{mediaId:(me=re.answersTextImage)==null?void 0:me[e==null?void 0:e.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:Z,children:(be=re.answersText)==null?void 0:be[e==null?void 0:e.type]})]},Z)}))]},H):o.jsxs("div",{className:v===H?"card":"",children:[o.jsx("h3",{className:"mb-5",children:v===H&&((Y=P==null?void 0:P.questionText)==null?void 0:Y[e==null?void 0:e.type])}),v===H&&((ie=P==null?void 0:P.answerOptions)==null?void 0:ie.map((re,Z)=>{var K,W,me,be;return o.jsxs("div",{className:"field-radiobutton",children:[o.jsx(ia,{inputId:Z,value:re==null?void 0:re.answersText,onChange:()=>{}}),((K=re.answersTextImage)==null?void 0:K[e==null?void 0:e.type])&&((W=re.answersTextImage)==null?void 0:W[e==null?void 0:e.type])!==""&&o.jsx(h,{mediaId:(me=re.answersTextImage)==null?void 0:me[e==null?void 0:e.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:Z,children:(be=re.answersText)==null?void 0:be[e==null?void 0:e.type]})]},Z)}))]},H)})]})}),o.jsxs("div",{className:"text-center my-5",children:[o.jsxs("div",{className:"mb-1",children:["Viewing:"," ",v+1+"/"+(g==null?void 0:g.quizElements.length)]}),o.jsx("br",{}),v>0&&o.jsx(Ft,{text:!0,className:"mx-2",label:"Previous",onClick:()=>S()}),o.jsx(Ft,{outlined:!0,label:(g==null?void 0:g.quizElements.length)===v+1?"Finish":"Next",onClick:()=>T()})]})]}),o.jsxs("div",{className:"surface-card p-4 border-round",children:[o.jsx("div",{className:"font-medium text-3xl text-900 mb-3",children:"Summary"}),o.jsx("div",{className:"text-500 mb-5",children:`${n==null?void 0:n.name} - ${r}`}),o.jsxs("ul",{className:"list-none p-0 m-0 border-top-1 surface-border",children:[o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Total Questions:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:(O=g==null?void 0:g.quizElements)==null?void 0:O.length})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Has Maximum Number of questions:"}),o.jsxs("div",{className:"text-900 w-full md:w-9 line-height-3",children:[i==null?void 0:i.noOfAssessmentQuestions," "]})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Show Answers Randomly"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:i!=null&&i.randomiseAnswers?o.jsx(fu,{className:"mr-2",severity:"success",value:"True"}):o.jsx(fu,{className:"mr-2",severity:"warning",value:"False"})})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Question time limit"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:"0.45 seconds"})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Exam time limit:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:"2 mins"})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Show questions randomly:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:o.jsx("div",{className:"grid mt-0 mr-0",children:(F=g==null?void 0:g.quizElements)==null?void 0:F.map((P,H)=>{var N;return o.jsx("div",{className:"col-12 md:col-6",children:o.jsx("div",{className:"p-3 border-1 surface-border border-round surface-card",children:o.jsx("div",{className:"text-700",children:x(((N=P==null?void 0:P.questionText)==null?void 0:N[e==null?void 0:e.type])||"",30)})})},`preview-question-${H}`)})})})]})]})]})]})},JAe=t=>{var T;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,section:l,row:c,page:u}=t,d=k.useRef(null),{handleDrop:f}=sn(),{isRenderView:h,isAdvanceView:g,isBuilderMode:v}=Ht(),[{isDragging:m},A]=ra({type:As,item:{type:As,uuid:e==null?void 0:e.uuid,children:e.children,path:n},collect:C=>({isDragging:C.isDragging()})}),x={position:"relative",opacity:m&&!h?.25:1};A(d);const S=(C,E,_,M,O,F,P)=>o.jsx(Lc,{page:u,type:"field",row:c,section:l,field:C,data:C,path:E,pageIndex:_,sectionIndex:M,rowIndex:O,columnIndex:F,fieldIndex:P},`component-${n}-${C==null?void 0:C.uuid}`);return o.jsx("div",{style:g?x:{},className:v?"draggable form-builder-column container-column":"form-builder-column container-column",children:v===!0?o.jsxs("div",{children:[e.children.length>0&&((T=e==null?void 0:e.children)==null?void 0:T.map((C,E)=>{const _=`${n}-${E}`;return o.jsxs(k.Fragment,{children:[o.jsx(Fr,{isAdvanceView:g,fieldDropArea:!0,data:{path:_,childrenCount:e.children.length,droppedField:e},onDrop:f}),S(C,_,r,i,a,s,E)]},_)})),e.children.length===0&&o.jsx("p",{className:"text-center",children:"Drag and drop from sidebar items"}),o.jsx(Fr,{isAdvanceView:g,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:f,isLast:!0})]}):o.jsx(o.Fragment,{children:e.children.length>0?o.jsx(QAe,{questions:e.children}):o.jsx("p",{className:"text-center",children:"No items to show"})})})},ZAe={},ewe=t=>{var v,m,A,w;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,c=k.useRef(null),{isRenderView:u}=Ht(),[{isDragging:d},f]=ra({type:Ao,item:{type:Ao,uuid:e.uuid,children:e.children,path:n,data:e},collect:x=>({isDragging:x.isDragging()})}),h=d?.25:1;f(c);const g=(x,S,T,C,E,_)=>o.jsx(JAe,{page:l,row:e,section:s,data:x,path:S,pageIndex:T,sectionIndex:C,rowIndex:E,columnIndex:_},`column-${n}-${x.uuid}`);return o.jsx("div",{style:{...ZAe,opacity:h,marginTop:`${(v=e==null?void 0:e.margin)==null?void 0:v.top}px`,marginBottom:`${(m=e==null?void 0:e.margin)==null?void 0:m.bottom}px`,marginLeft:`${(A=e==null?void 0:e.margin)==null?void 0:A.left}px`,marginRight:`${(w=e==null?void 0:e.margin)==null?void 0:w.right}px`},className:u?"row container-row":"draggable row container-row",children:o.jsx("div",{className:"form-builder-columns",children:e.children.map((x,S)=>{const T=`${n}-${S}`;return o.jsx(k.Fragment,{children:g(x,T,r,i,a,S)},T)})})})},twe=t=>{const{data:e,path:n,pageIndex:r,sectionIndex:i,section:a,page:s}=t,{renderType:l,emitSocketData:c,isAdvanceView:u,isBuilderMode:d}=Ht(),[f,h]=k.useState(!1),[g,v]=k.useState(!1),[m,A]=k.useState(null),w=k.useRef(null),[{isDragging:x},S]=ra({type:na,item:{type:na,uuid:e.uuid,children:e.children,path:n},collect:E=>({isDragging:E.isDragging()})}),T=x?.25:1;S(w);const C=(E,_,M,O,F)=>o.jsx(ewe,{page:s,section:a,data:E,path:_,pageIndex:M,sectionIndex:O,rowIndex:F},`row-${n}-${E.uuid}`);return o.jsxs("div",{style:{opacity:T,marginBottom:20},className:u?"draggable row":"",children:[d===!0&&o.jsx(_h,{saveBuilderElementModalData:m,setSaveBuilderElementModalData:A,saveElementModal:g,setSaveElementModal:v}),d===!0&&f===!0&&o.jsx(Ih,{renderType:l,visibilty:f,setVisibility:h,section:e,pageIndex:r,sectionIndex:i,emitSocketData:c},"section_settings_"+r+i),o.jsx("div",{className:"",children:e.children.map((E,_)=>{const M=`${n}-${_}`;return o.jsx(k.Fragment,{children:C(E,M,r,i,_)},M)})})]})},nwe=t=>{const{data:e,path:n,pageIndex:r}=t,{isBuilderMode:i}=Ht(),a=k.useRef(null),[{},s]=ra({type:na,item:{type:na,uuid:e.uuid,children:e.children,path:n},collect:c=>({isDragging:c.isDragging()})});s(a);const l=(c,u,d,f)=>o.jsx(twe,{data:c,section:c,path:u,page:e,pageIndex:d,sectionIndex:f},`section_${d}_${f}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${i&&"draggable page-css p-3 pb-4"}`,"data-image-src":e==null?void 0:e.bgImage,"data-bg-color":`#${e==null?void 0:e.bgColor}`,children:o.jsx("div",{className:"",children:e.children.map((c,u)=>{const d=`${n}-${u}`;return o.jsx(k.Fragment,{children:l(c,d,r,u)},`section-${u}-${c.uuid}`)})})})},rwe=()=>{const{formBuilderFormLayout:t}=sn(),e=(n,r,i)=>o.jsx(nwe,{data:n,path:r,pageIndex:i},`page-${n.uuid}`);return o.jsx(o.Fragment,{children:o.jsx("div",{className:"page",children:(t==null?void 0:t.length)&&t.map((n,r)=>{const i=`${r}`;return o.jsx("div",{children:e(n,i,r)},`exam-page-${r}`)})})})},w5=()=>{const{renderType:t}=Ht();switch(t){case F0:return o.jsx(Rye,{});case k0:return o.jsx(nAe,{});case H1:return o.jsx(cAe,{});case rm:return o.jsx(wAe,{});case im:return o.jsx(WAe,{});case zd:return o.jsx(rwe,{})}},iwe=t=>{var l;const{taskSchema:e,taskId:n,endPoints:r}=t,{userTrainingSaveData:i,saveProgressDataHook:a,updateTaskProgressValue:s}=Ar();return k.useEffect(()=>{const c=setTimeout(()=>{const u=i==null?void 0:i.filter(d=>(d==null?void 0:d.isSeen)===!0).length;s(u),a(i,n,r==null?void 0:r.submitFormData)},1e3);return()=>clearTimeout(c)},[i]),o.jsx("div",{children:e!==null&&o.jsx(BU,{updateTrainingProgress:()=>{},sections:(l=e==null?void 0:e.layout[0])==null?void 0:l.children})})},awe=({taskId:t,onStart:e})=>{var w,x,S,T,C,E,_,M,O,F,P,H,N,z,U,ce;const[n,r]=k.useState(Cp),[i,a]=k.useState(null),{examComplete:s,assessmentData:l,taskSchema:c,taskData:u,startQuiz:d}=Ar();k.useEffect(()=>{var X,R,ue,Y,ie;if(((X=c==null?void 0:c.formType)==null?void 0:X.key)==="exam"){let re=[...((Y=(ue=(R=c==null?void 0:c.layout[0])==null?void 0:R.children[0])==null?void 0:ue.children[0])==null?void 0:Y.children[0].children)||[]];l!=null&&l.randomiseQuestions&&(re=tm.shuffle(re).map(Z=>({...Z}))),l!=null&&l.randomiseAnswers&&(re=re.map(Z=>({...Z,answerOptions:tm.shuffle(Z==null?void 0:Z.answerOptions)}))),l!=null&&l.enableNoOfAssessmentQuestions&&(re=re.slice(0,parseInt(l==null?void 0:l.noOfAssessmentQuestions))),a({assessment_id:1,name:(ie=u==null?void 0:u.assessment)==null?void 0:ie.assessment_title,label:"assessment_title",quizConfiguration:c==null?void 0:c.quizConfiguration,quizElements:re})}},[c]);const f=o.jsxs("div",{children:[o.jsx(Ft,{text:!0,label:"Cancel",icon:"pi pi-times",className:"mx-2 p-button-danger",onClick:()=>r(Cp)}),o.jsx(Ft,{label:"Start Immediately",onClick:()=>{g(),r(Jm)}})]}),h=X=>X.completed?(g(),r(Jm),o.jsx(o.Fragment,{})):o.jsxs("span",{className:"text-2xl",children:["Your quiz is about to start in ",X.seconds," seconds"]}),g=()=>{const X={task_id:t,session_id:nt(),start_time:new Date,finish_time:new Date};a(R=>({...R,...X})),d(X,a)},v=()=>{r(T8),g()},m=((w=l==null?void 0:l.assesment_user_attempts)==null?void 0:w.length)>0?(x=l==null?void 0:l.assesment_user_attempts)==null?void 0:x.some(X=>(X==null?void 0:X.is_pass)===1):!1;function A(){var Y;const X=l==null?void 0:l.assesment_user_attempts[((Y=l==null?void 0:l.assesment_user_attempts)==null?void 0:Y.length)-1],R=X==null?void 0:X.start_time,ue=X==null?void 0:X.finish_time;return jue(R,ue)}return o.jsxs(o.Fragment,{children:[n===T8&&o.jsx(o.Fragment,{children:o.jsx("div",{className:"card surface-section flex justify-content-center align-items-center",style:{minHeight:"100vh"},children:o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-6 col-offset-3",children:o.jsxs("div",{className:"text-center",children:[o.jsx(Ag,{date:Date.now()+15e3,renderer:h}),f]})})})})}),o.jsxs("div",{children:[n===Cp&&o.jsx("div",{className:" fadein animation-duration-500 animation-iteration-1 surface-section px-4 py-5 md:px-6 lg:px-8 scroll-height-150",children:o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-12 md:col-6 md:col-offset-3 sm:col-12 sm:col-offset-0",children:o.jsxs("div",{className:"text-center",children:[o.jsxs("div",{children:[o.jsx("h3",{children:(S=u==null?void 0:u.assessment)==null?void 0:S.assessment_title}),o.jsxs("div",{className:"card",children:[o.jsx("h3",{children:"Overview"}),o.jsx("div",{dangerouslySetInnerHTML:{__html:c==null?void 0:c.intro}})]}),o.jsxs("div",{className:"surface-card p-4 shadow-2 border-round",children:[o.jsx("div",{className:"font-medium text-3xl text-900 mb-3",children:"Guidance"}),o.jsxs("div",{className:"text-500 mb-5",children:["You have a total of ",l==null?void 0:l.noOfAttempts," ","attempts for the entire Quiz"," "]}),o.jsxs("ul",{className:"list-none p-0 m-0 border-top-1 surface-border",children:[o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Expires on:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:Ln(u==null?void 0:u.task_due_date).format("Do MMM YYYY ")})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Total attempts:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:l==null?void 0:l.noOfAttempts})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Attempts made:"}),o.jsx("div",{className:"text-900 w-full md:w-9 line-height-3",children:(T=l==null?void 0:l.assesment_user_attempts)==null?void 0:T.length})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Remaining attempts:"}),o.jsx("div",{className:"text-900 w-full md:w-9 line-height-3",children:(l==null?void 0:l.noOfAttempts)-((C=l==null?void 0:l.assesment_user_attempts)==null?void 0:C.length)})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Number of questions:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:(E=i==null?void 0:i.quizElements)==null?void 0:E.length})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Exam time:"}),o.jsxs("div",{className:"text-900 w-full md:w-9",children:[" ",l&&((M=(_=l==null?void 0:l.time_limit)==null?void 0:_.type)==null?void 0:M.key)==="PerExam"&&o.jsxs(o.Fragment,{children:[Math.floor((F=(O=l==null?void 0:l.time_limit)==null?void 0:O.time_limit_info)==null?void 0:F.num_of_mins)," ","mins"]}),l&&((H=(P=l==null?void 0:l.time_limit)==null?void 0:P.type)==null?void 0:H.key)==="PerQuestion"&&o.jsx(o.Fragment,{children:(()=>{var Y,ie,re;const X=((ie=(Y=l==null?void 0:l.time_limit)==null?void 0:Y.time_limit_info)==null?void 0:ie.time_per_question)*((re=i==null?void 0:i.quizElements)==null?void 0:re.length),R=Math.floor(X/60),ue=X%60;return o.jsxs(o.Fragment,{children:[R," min",ue>0&&` ${ue} sec`]})})()}),l&&((z=(N=l==null?void 0:l.time_limit)==null?void 0:N.type)==null?void 0:z.key)==="NoTimeLimit"&&o.jsx(o.Fragment,{children:"No time limit"})]})]}),((U=l==null?void 0:l.assesment_user_attempts)==null?void 0:U.length)>0&&o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Time taken:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:A()})]})]})]})]}),o.jsx("div",{className:"my-5",children:(l==null?void 0:l.noOfAttempts)-((ce=l==null?void 0:l.assesment_user_attempts)==null?void 0:ce.length)>0?o.jsx(o.Fragment,{children:o.jsx(Ft,{size:"large",label:m===!0?"Passed":"Start now",disabled:m,className:"p-button-info",onClick:()=>{r(T8),e&&e()}})}):o.jsx(_8,{classes:"text-2xl p-3",value:"No attempts remaining",level:"info"})})]})})})}),n===Jm&&i!==null&&o.jsx("div",{className:"fadein animation-duration-500",children:o.jsx(LU,{session_id:i==null?void 0:i.session_id,setDisplay:r,onOpenQuiz:v,saveNewQuizData:g,quizData:i,taskSchema:c,saveProgress:s,setAssessmentModal:()=>{}})})]})]})},swe=t=>{var F,P,H,N,z,U,ce,X,R,ue;const{taskId:e,endPoints:n,isRenderView:r,showFieldsAfterSubmit:i=!1,className:a="",onStart:s,showFromTitle:l=!0}=t,{setLayout:c}=sn(),{isAdmin:u}=Ht(),{taskProgressValue:d,taskRegisterData:f,task_status:h,taskSchema:g,taskData:v,updateTaskFormData:m,TasksLoading:A,userTaskSubmitFormData:w,TasksHTTPRequest:x,TasksSubmitLoading:S,clearTaskSchema:T,TASK_PUBLISHED:C,saveProgressDataHook:E,taskOptions:_}=Ar(),M=_!=null&&_.successMessage?_==null?void 0:_.successMessage:"Submitted Successfully";k.useEffect(()=>{if(g!==null&&c((g==null?void 0:g.layout)||[]),h!==x8&&!u&&e){const ie={viewed_at:new Date().toISOString()};m(w,e,n==null?void 0:n.updateFormData,Qm,()=>{},ie)}return()=>{T()}},[e]);const O=()=>o.jsx(o.Fragment,{children:o.jsxs("div",{className:"w-full",children:[o.jsx("p",{children:"Loading form data....."}),o.jsx(Ci,{className:"mb-2"}),o.jsx(Ci,{className:"mb-2"}),o.jsx(Ci,{className:"mb-2"}),o.jsx(Ci,{className:"mb-5"}),o.jsx(Ci,{className:"mb-2"}),o.jsx(Ci,{className:"mb-2"}),o.jsx(Ci,{className:"mb-2"}),o.jsx(Ci,{className:"mb-2"}),o.jsx(Ci,{className:"mb-2"}),o.jsx(Ci,{className:"mb-2"}),o.jsx(Ci,{className:"mb-2"})]})});return o.jsx("div",{className:"relative",children:A||S||x?o.jsx("div",{className:"w-full",children:o.jsx(O,{})}):o.jsxs(o.Fragment,{children:[(((F=g==null?void 0:g.formType)==null?void 0:F.key)===e3||((P=g==null?void 0:g.formType)==null?void 0:P.key)===I8)&&o.jsx(o.Fragment,{children:o.jsxs("div",{className:`px-0 ${r===!1&&"builder_container"}`,children:[o.jsxs("div",{className:"flex justify-content-center mb-2 align-items-center",children:[l===!0&&o.jsx("div",{className:"text-center text-900 text-3xl font-medium",children:v==null?void 0:v.task_title}),o.jsx("div",{className:"ml-4 ",children:h===x8&&o.jsx(_8,{classes:"",value:"Completed",level:"success"})})]}),h===x8&&o.jsx("div",{className:"flex justify-content-center mb-2 align-items-center",children:o.jsxs("div",{className:"text-center text-900 text-xl",children:["Submitted on ",Ln(v==null?void 0:v.submitted_date).format("Do MMM YYYY HH:mm")]})}),i===!1&&h===C?o.jsx(o.Fragment,{children:o.jsx("h3",{className:"text-center mt-5",children:M})}):o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12",children:[A&&o.jsx(O,{}),!A&&o.jsxs(o.Fragment,{children:[o.jsx(NZ,{}),o.jsx("div",{className:`${a} mt-2 mb-2`,children:g!==null&&((H=g==null?void 0:g.layout)==null?void 0:H.length)&&o.jsx(w5,{})})]})]})})]})}),((N=g==null?void 0:g.formType)==null?void 0:N.key)===E_&&o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-12",children:o.jsx("div",{className:"card",children:o.jsx("div",{className:`${a} mt-2 mb-2`,children:o.jsx(wp,{backend:Sp,children:g!==null&&((z=g==null?void 0:g.layout)==null?void 0:z.length)&&o.jsx(w5,{})})})})})}),(((U=g==null?void 0:g.formType)==null?void 0:U.key)==="page"||((ce=g==null?void 0:g.formType)==null?void 0:ce.key)==="pdf")&&o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-12",children:o.jsx("div",{className:"card",children:o.jsx(wp,{backend:Sp,children:g!==null&&((X=g==null?void 0:g.layout)==null?void 0:X.length)&&o.jsx(w5,{})})})})}),((R=g==null?void 0:g.formType)==null?void 0:R.key)==="training"&&o.jsx(iwe,{renderIn:gZ,taskSchema:g,taskId:e,endPoints:n}),((ue=g==null?void 0:g.formType)==null?void 0:ue.key)==="exam"&&o.jsx(awe,{taskId:e,endPoints:n,onStart:s})]})})},owe=t=>{var H;const[e,n]=k.useState(!1),r=k.useRef(!1),{taskId:i,endPoints:a,messageWhileSubmittingForm:s,showProgressSavedToast:l=!0,showTaskSubmitToast:c=!0,showProgressSave:u=!0,showTaskSubmit:d=!0,submitLabel:f="Submit",afterSubmit:h=()=>{}}=t,g=(N,z,U,ce)=>{var ue,Y;let X=ce;const R={fieldId:N.uuid};if(U!=null&&U[N==null?void 0:N.uuid]){if((z==null?void 0:z.length)>0){e:for(const[,ie]of z.entries())if(((ue=ie==null?void 0:ie.children)==null?void 0:ue.length)>0&&(ie==null?void 0:ie.enableConditionalField)===!0){for(const[,re]of(ie==null?void 0:ie.children.entries())||[])if((Y=re==null?void 0:re.attributes)!=null&&Y.required&&(X=g(re,re==null?void 0:re.options,U,X),X===!1))break e}}}else Gt.emit("OnInvalidFieldCatch",R),X=!1,_();return X},{task_status:v,taskProgressLoading:m,taskSchema:A,updateTaskFormData:w,submitTaskFormData:x,userTaskSubmitFormData:S,TasksSubmitLoading:T,taskOptions:C}=Ar(),E=()=>o.jsxs("div",{className:"text-right",children:[o.jsx(Ft,{text:!0,label:"No",icon:"pi pi-times",onClick:()=>n(!1),className:"p-button-danger"}),o.jsx(Ft,{label:"Yes",icon:"pi pi-check",onClick:()=>F(),autoFocus:!0})]}),_=(N="One or more field is required")=>{r.current.show({severity:"error",summary:"Alert",detail:N,life:3e3})},M=k.useCallback(()=>{var z,U,ce,X,R,ue,Y,ie,re,Z,K,W,me,be,Te,ye,fe,ne,q,ee,oe,pe,_e,Ne;let N=!1;e:for(const[ve,Ae]of A.layout.entries())if((Ae==null?void 0:Ae.isHidden)===!1)for(const[Be,Ee]of Ae.children.entries())for(const[,$]of Ee.children.entries())if($!=null&&$.rowIsRepeatable){const ge=S.findIndex(le=>(le==null?void 0:le.rowId)===$.uuid);if(ge>=0){if(((z=S[ge].repeatableFieldsData)==null?void 0:z.length)<($==null?void 0:$.minimumEntries)){_(`Need minimun ${$==null?void 0:$.minimumEntries} entries`),N=!1;break e}N=!0}}else for(const[,ge]of $.children.entries())for(const[,le]of ge.children.entries()){if(le.isValid===0&&le.isPostField===!0&&(le==null?void 0:le.componentType)!=="hidden-field"){console.log("field",le);const se={pageIndex:ve,fieldId:le.uuid,sectionIndex:Be},he=S.findIndex(Se=>(Se==null?void 0:Se.fieldId)===le.uuid);if(console.log("userTaskSubmitFormData![foundFieldIndex]?.postData",(U=S[he])==null?void 0:U.postData),!(he===-1||(ce=S[he])!=null&&ce.postData[0]&&(((R=(X=S[he])==null?void 0:X.postData[0].postValue)==null?void 0:R.length)>0||((ue=S[he])==null?void 0:ue.postData[0].postValue)>0||(ie=(Y=S[he])==null?void 0:Y.postData[0].postValue)!=null&&ie.name))){console.log("inValidData",se),Gt.emit("OnInvalidFieldCatch",se),N=!1,_();break e}}if((le==null?void 0:le.componentType)==="radio-hierarchal"){const se=S.findIndex(he=>(he==null?void 0:he.fieldId)===le.uuid);if(se>=0&&(N=g(le,le==null?void 0:le.options,(re=S[se])==null?void 0:re.postData[0].postValue,!0),!N))break e}if(((Z=le==null?void 0:le.children)==null?void 0:Z.length)>0)for(const[,se]of le.children.entries()){const he=Object.keys(se);if(he[0]){const Se=se[he[0]],De={fieldId:Se.uuid,sectionIndex:Be},Me=S.findIndex(ze=>(ze==null?void 0:ze.fieldId)===Se.uuid);if(!((K=S[Me])!=null&&K.postData[0]&&(((me=(W=S[Me])==null?void 0:W.postData[0].postValue)==null?void 0:me.length)>0||((be=S[Me])==null?void 0:be.postData[0].postValue)>0||((fe=(ye=(Te=S[Me])==null?void 0:Te.postData[0])==null?void 0:ye.postValue)==null?void 0:fe.addressOne)!==""))){Gt.emit("OnInvalidFieldCatch",De),N=!1,_();break e}}}if(le!=null&&le.inlineConditionalRules&&((q=(ne=le==null?void 0:le.inlineConditionalRules)==null?void 0:ne.rules)==null?void 0:q.length)>0){for(const[,se]of((ee=le==null?void 0:le.inlineConditionalRules)==null?void 0:ee.rules.entries())||[])for(const[,he]of(se==null?void 0:se.conditions.entries())||[])for(const[,Se]of(he==null?void 0:he.children.entries())||[])if(Se.isValid===0){const De={fieldId:Se.uuid,sectionIndex:Be},Me=S.findIndex(ze=>(ze==null?void 0:ze.fieldId)===Se.uuid);if(Me>=0&&!((oe=S[Me])!=null&&oe.postData[0]&&(((_e=(pe=S[Me])==null?void 0:pe.postData[0].postValue)==null?void 0:_e.length)>0||((Ne=S[Me])==null?void 0:Ne.postData[0].postValue)>0))){Gt.emit("OnInvalidFieldCatch",De),N=!1,_();break e}}}N=!0}N&&n(!0)},[S]),O=()=>{Gt.emit("onSubmitUserForm","complete"),M()},F=()=>{x(S,i,a==null?void 0:a.submitFormData),n(!1),h()},P=N=>{w(N,i,a==null?void 0:a.updateFormData,Qm,()=>{var z;l&&((z=r==null?void 0:r.current)==null||z.show({severity:"success",summary:"Progress Saved",detail:"",life:3e3}))})};return o.jsxs("div",{children:[e&&o.jsxs("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"30vw",padding:"20px",backgroundColor:"white",boxShadow:"0 4px 8px rgba(0, 0, 0, 0.1)",borderRadius:"8px",zIndex:1e3},children:[o.jsx("p",{className:"text-center",children:s}),E()]}),o.jsx(o5,{ref:r}),((H=A==null?void 0:A.formType)==null?void 0:H.key)!==""&&(v===Qm||v===null)&&o.jsx("span",{children:o.jsxs("div",{className:" flex justify-content-center",children:[u===!0&&o.jsx(Ft,{text:!0,className:"mr-2 p-button-info",label:"Save progress",onClick:()=>P(S),loading:m,disabled:T}),d===!0&&o.jsx(Ft,{label:`${f}`,type:"button",onClick:()=>O(),disabled:m,loading:T})]})})]})};/**
4268
4268
  * React Router v6.28.0
4269
4269
  *