1import{a as Qe,b as Ze}from"./chunk-64WGMCQL.js";import{a as Le,b as Ne}from"./chunk-TEFEWVO6.js";import{$g as Ke,B as Ie,C as pe,D as se,E as ce,Eg as He,Fb as Be,Gb as _e,Hb as Ae,Je as ee,Le as qe,Ne as Ge,Od as $e,Pe as Ue,Sc as xe,Se as je,Tg as Je,Vf as We,Wf as Xe,a as Y,b as G,c as I,d as R,e as re,jb as Ve,k as Q,kh as Ye,l as le,m as ye,n as Fe,p as Ee,q as we,r as ae,rc as ze,s as de,t as U,u as B,ub as Re,v as A,w as Te,x as ke}from"./chunk-X5J6QTCG.js";import{$ as X,$a as c,Ad as ve,Db as Z,Fa as a,Fb as F,G as Se,Gb as ge,Hb as ie,Ib as e,J as Oe,Jb as g,Ka as j,Kb as S,Lb as T,Ma as k,Na as J,Qb as D,Rb as L,Sa as K,Sb as N,U as Pe,Zd as me,_a as ue,ac as Me,ad as oe,bb as m,be as fe,cc as Ce,d as be,db as y,dc as he,eb as O,fa as v,fb as P,ga as b,gb as _,hb as i,ib as o,jb as f,ma as V,nb as $,ob as q,pj as De,qb as M,ra as H,sb as h,tb as s}from"./chunk-SMW7PHYX.js";import{a as w,b as W}from"./chunk-BMIYOSOG.js";var u=(function(n){return n.TITLE="title",n.TEXT_FIELD="text_field",n.TEXT_AREA="text_area",n.DATE="date",n.CHECKBOX="checkbox",n.CHECKBOX_GROUP="checkbox_group",n.RADIO_BUTTON="radio_button",n.RADIO_GROUP="radio_group",n.SELECT="select",n.FILE_UPLOAD="file_upload",n.TOGGLE="toggle",n})(u||{}),E=(function(n){return n.SINGLE_COLUMN="single_column",n.TWO_COLUMN="two_column",n})(E||{});var et=[{type:u.TITLE,label:"Title",icon:"fa-regular fa-heading",defaultProperties:{label:"Section Title",validation:{}}},{type:u.TEXT_FIELD,label:"Text Field",icon:"fa-regular fa-minus",defaultProperties:{label:"Text Field",placeholder:"Enter text...",validation:{required:!1,maxLength:255}}},{type:u.TEXT_AREA,label:"Text Area",icon:"fa-regular fa-align-left",defaultProperties:{label:"Text Area",placeholder:"Enter text...",rows:3,validation:{required:!1,maxLength:1e3}}},{type:u.DATE,label:"Date",icon:"fa-regular fa-calendar",defaultProperties:{label:"Date",validation:{required:!1}}},{type:u.CHECKBOX,label:"Checkbox",icon:"fa-regular fa-square-check",defaultProperties:{label:"Checkbox",validation:{}}},{type:u.CHECKBOX_GROUP,label:"Checkbox Group",icon:"fa-regular fa-list",defaultProperties:{label:"Checkbox Group",options:[{label:"Option 1",value:"option1"},{label:"Option 2",value:"option2"}],validation:{}}},{type:u.RADIO_BUTTON,label:"Radio Button",icon:"fa-regular fa-circle",defaultProperties:{label:"Radio Button",validation:{}}},{type:u.RADIO_GROUP,label:"Radio Group",icon:"fa-regular fa-list",defaultProperties:{label:"Radio Group",options:[{label:"Option 1",value:"option1"},{label:"Option 2",value:"option2"}],validation:{required:!1}}},{type:u.SELECT,label:"Select Dropdown",icon:"fa-regular fa-chevron-down",defaultProperties:{label:"Select",placeholder:"Choose an option...",options:[{label:"Option 1",value:"option1"},{label:"Option 2",value:"option2"}],validation:{required:!1}}},{type:u.FILE_UPLOAD,label:"File Upload",icon:"fa-regular fa-upload",defaultProperties:{label:"File Upload",acceptedFileTypes:[".pdf",".doc",".docx",".jpg",".png"],multiple:!1,validation:{required:!1}}},{type:u.TOGGLE,label:"Toggle Switch",icon:"fa-regular fa-power-off",defaultProperties:{label:"Toggle",validation:{}}}];function mt(n,d){if(n&1&&(e(0,` 2 `),i(1,"p",2),e(2),o(),e(3,` 3 `)),n&2){let t=s(2);a(2),g(t.field.properties.description)}}function ft(n,d){if(n&1&&(e(0,` 4 `),i(1,"div",1),e(2,` 5 `),i(3,"h3"),e(4),o(),e(5,` 6 `),c(6,mt,4,1),o(),e(7,` 7 `)),n&2){let t=s();a(4),g(t.field.properties.label),a(2),m(t.field.properties.description?6:-1)}}function _t(n,d){if(n&1&&(e(0,` 8 `),i(1,"small",5),e(2),o(),e(3,` 9 `)),n&2){let t=s(2);a(2),g(t.field.properties.description)}}function xt(n,d){if(n&1&&(e(0,` 10 `),i(1,"div",3),e(2,` 11 `),i(3,"label"),e(4),o(),e(5,` 12 `),f(6,"input",4),e(7,` 13 `),c(8,_t,4,1),o(),e(9,` 14 `)),n&2){let t=s();a(4),T("",t.field.properties.label,"",t.getRequiredText()),a(2),_("placeholder",t.field.properties.placeholder||"")("value",t.field.properties.defaultValue||""),a(2),m(t.field.properties.description?8:-1)}}function ut(n,d){if(n&1&&(e(0,` 15 `),i(1,"small",5),e(2),o(),e(3,` 16 `)),n&2){let t=s(2);a(2),g(t.field.properties.description)}}function gt(n,d){if(n&1&&(e(0,` 17 `),i(1,"div",3),e(2,` 18 `),i(3,"label"),e(4),o(),e(5,` 19 `),i(6,"textarea",6),e(7),o(),e(8,` 20 `),c(9,ut,4,1),o(),e(10,` 21 `)),n&2){let t=s();a(4),T("",t.field.properties.label,"",t.getRequiredText()),a(2),_("rows",t.field.properties.rows||3)("placeholder",t.field.properties.placeholder||""),a(),g(t.field.properties.defaultValue||""),a(2),m(t.field.properties.description?9:-1)}}function Ct(n,d){if(n&1&&(e(0,` 22 `),i(1,"small",5),e(2),o(),e(3,` 23 `)),n&2){let t=s(2);a(2),g(t.field.properties.description)}}function ht(n,d){if(n&1&&(e(0,` 24 `),i(1,"div",3),e(2,` 25 `),i(3,"label"),e(4),o(),e(5,` 26 `),f(6,"input",7),e(7,` 27 `),c(8,Ct,4,1),o(),e(9,` 28 `)),n&2){let t=s();a(4),T("",t.field.properties.label,"",t.getRequiredText()),a(2),_("value",t.field.properties.defaultValue||""),a(2),m(t.field.properties.description?8:-1)}}function vt(n,d){if(n&1&&(e(0,` 29 `),i(1,"small",5),e(2),o(),e(3,` 30 `)),n&2){let t=s(2);a(2),g(t.field.properties.description)}}function bt(n,d){if(n&1&&(e(0,` 31 `),i(1,"div",3),e(2,` 32 `),i(3,"div",8),e(4,` 33 `),f(5,"input",9),e(6,` 34 `),i(7,"label",10),e(8),o(),e(9,` 35 `),o(),e(10,` 36 `),c(11,vt,4,1),o(),e(12,` 37 `)),n&2){let t=s();a(5),_("checked",t.field.properties.defaultValue||!1),a(3),T("",t.field.properties.label,"",t.getRequiredText()),a(3),m(t.field.properties.description?11:-1)}}function St(n,d){if(n&1&&(e(0,` 38 `),i(1,"div",8),e(2,` 39 `),f(3,"input",12),e(4,` 40 `),i(5,"label",10),e(6),o(),e(7,` 41 `),o(),e(8,` 42 `)),n&2){let t=d.$implicit;a(3),_("value",t.value),a(3),g(t.label)}}function Ot(n,d){if(n&1&&(e(0,` 43 `),i(1,"small",5),e(2),o(),e(3,` 44 `)),n&2){let t=s(2);a(2),g(t.field.properties.description)}}function Pt(n,d){if(n&1&&(e(0,` 45 `),i(1,"small",13),e(2),o(),e(3,` 46 `)),n&2){let t=s(2);a(2),g(t.getOptionsText())}}function Mt(n,d){if(n&1&&(e(0,` 47 `),i(1,"div",3),e(2,` 48 `),i(3,"label"),e(4),o(),e(5,` 49 `),i(6,"div",11),e(7,` 50 `),O(8,St,9,2,null,null,y),o(),e(10,` 51 `),c(11,Ot,4,1),c(12,Pt,4,1),o(),e(13,` 52 `)),n&2){let t=s();a(4),T("",t.field.properties.label,"",t.getRequiredText()),a(2),F("inline",t.field.properties.inline),a(2),P(t.field.properties.options),a(3),m(t.field.properties.description?11:-1),a(),m(t.field.properties.options!=null&&t.field.properties.options.length?-1:12)}}function yt(n,d){if(n&1&&(e(0,` 53 `),i(1,"small",5),e(2),o(),e(3,` 54 `)),n&2){let t=s(2);a(2),g(t.field.properties.description)}}function Ft(n,d){if(n&1&&(e(0,` 55 `),i(1,"div",3),e(2,` 56 `),i(3,"div",8),e(4,` 57 `),f(5,"input",14),e(6,` 58 `),i(7,"label",10),e(8),o(),e(9,` 59 `),o(),e(10,` 60 `),c(11,yt,4,1),o(),e(12,` 61 `)),n&2){let t=s();a(5),_("checked",t.field.properties.defaultValue||!1),a(3),T("",t.field.properties.label,"",t.getRequiredText()),a(3),m(t.field.properties.description?11:-1)}}function Et(n,d){if(n&1&&(e(0,` 62 `),i(1,"div",8),e(2,` 63 `),f(3,"input",16),e(4,` 64 `),i(5,"label",10),e(6),o(),e(7,` 65 `),o(),e(8,` 66 `)),n&2){let t=d.$implicit,r=s(2);a(3),_("value",t.value)("name",r.field.id),a(3),g(t.label)}}function wt(n,d){if(n&1&&(e(0,` 67 `),i(1,"small",5),e(2),o(),e(3,` 68 `)),n&2){let t=s(2);a(2),g(t.field.properties.description)}}function Tt(n,d){if(n&1&&(e(0,` 69 `),i(1,"small",13),e(2),o(),e(3,` 70 `)),n&2){let t=s(2);a(2),g(t.getOptionsText())}}function kt(n,d){if(n&1&&(e(0,` 71 `),i(1,"div",3),e(2,` 72 `),i(3,"label"),e(4),o(),e(5,` 73 `),i(6,"div",15),e(7,` 74 `),O(8,Et,9,3,null,null,y),o(),e(10,` 75 `),c(11,wt,4,1),c(12,Tt,4,1),o(),e(13,` 76 `)),n&2){let t=s();a(4),T("",t.field.properties.label,"",t.getRequiredText()),a(2),F("inline",t.field.properties.inline),a(2),P(t.field.properties.options),a(3),m(t.field.properties.description?11:-1),a(),m(t.field.properties.options!=null&&t.field.properties.options.length?-1:12)}}function It(n,d){if(n&1&&(e(0,` 77 `),i(1,"option",19),e(2),o(),e(3,` 78 `)),n&2){let t=d.$implicit;a(),_("value",t.value),a(),S(` 79 `,t.label,` 80 `)}}function Dt(n,d){if(n&1&&(e(0,` 81 `),i(1,"small",5),e(2),o(),e(3,` 82 `)),n&2){let t=s(2);a(2),g(t.field.properties.description)}}function Lt(n,d){if(n&1&&(e(0,` 83 `),i(1,"small",13),e(2),o(),e(3,` 84 `)),n&2){let t=s(2);a(2),g(t.getOptionsText())}}function Nt(n,d){if(n&1&&(e(0,` 85 `),i(1,"div",3),e(2,` 86 `),i(3,"label"),e(4),o(),e(5,` 87 `),i(6,"select",17),e(7,` 88 `),i(8,"option",18),e(9),o(),e(10,` 89 `),O(11,It,4,2,null,null,y),o(),e(13,` 90 `),c(14,Dt,4,1),c(15,Lt,4,1),o(),e(16,` 91 `)),n&2){let t=s();a(4),T("",t.field.properties.label,"",t.getRequiredText()),a(5),g(t.field.properties.placeholder||"Choose an option..."),a(2),P(t.field.properties.options),a(3),m(t.field.properties.description?14:-1),a(),m(t.field.properties.options!=null&&t.field.properties.options.length?-1:15)}}function Vt(n,d){if(n&1&&(e(0,` 92 `),i(1,"small",5),e(2),o(),e(3,` 93 `)),n&2){let t=s(2);a(2),g(t.field.properties.description)}}function Rt(n,d){n&1&&(e(0,` 94 `),i(1,"small",23),e(2,"Multiple files allowed"),o(),e(3,` 95 `))}function Bt(n,d){if(n&1&&(e(0,` 96 `),i(1,"div",3),e(2,` 97 `),i(3,"label"),e(4),o(),e(5,` 98 `),i(6,"div",20),e(7,` 99 `),f(8,"i",21),e(9,` 100 `),i(10,"span"),e(11,"Choose file..."),o(),e(12,` 101 `),i(13,"small",22),e(14),o(),e(15,` 102 `),o(),e(16,` 103 `),c(17,Vt,4,1),c(18,Rt,4,0),o(),e(19,` 104 `)),n&2){let t=s();a(4),T("",t.field.properties.label,"",t.getRequiredText()),a(10),g(t.getFileTypesText()),a(3),m(t.field.properties.description?17:-1),a(),m(t.field.properties.multiple?18:-1)}}function At(n,d){if(n&1&&(e(0,` 105 `),i(1,"small",5),e(2),o(),e(3,` 106 `)),n&2){let t=s(2);a(2),g(t.field.properties.description)}}function zt(n,d){if(n&1&&(e(0,` 107 `),i(1,"div",3),e(2,` 108 `),i(3,"div",24),e(4,` 109 `),i(5,"label"),e(6),o(),e(7,` 110 `),i(8,"div",25),e(9,` 111 `),f(10,"div",26),e(11,` 112 `),o(),e(12,` 113 `),o(),e(13,` 114 `),c(14,At,4,1),o(),e(15,` 115 `)),n&2){let t=s();a(6),T("",t.field.properties.label,"",t.getRequiredText()),a(2),F("on",t.f
115ield.properties.defaultValue),a(6),m(t.field.properties.description?14:-1)}}function $t(n,d){if(n&1&&(e(0,` 116 `),i(1,"div",3),e(2,` 117 `),i(3,"label"),e(4),o(),e(5,` 118 `),i(6,"div",27),e(7,` 119 `),f(8,"i",28),e(9,` 120 `),i(10,"span"),e(11),o(),e(12,` 121 `),o(),e(13,` 122 `),o(),e(14,` 123 `)),n&2){let t=s();a(4),g(t.field.properties.label),a(7),S("Unknown field type: ",t.field.type)}}var tt=(()=>{let d=class d{constructor(){this.FormFieldType=u}getRequiredText(){return this.field.properties.validation?.required?" *":""}getOptionsText(){return!this.field.properties.options||this.field.properties.options.length===0?"No options defined":this.field.properties.options.map(r=>r.label).join(", ")}getFileTypesText(){return!this.field.properties.acceptedFileTypes||this.field.properties.acceptedFileTypes.length===0?"All file types":this.field.properties.acceptedFileTypes.join(", ")}};d.\u0275fac=function(l){return new(l||d)},d.\u0275cmp=k({type:d,selectors:[["app-form-field-preview"]],inputs:{field:"field"},standalone:!1,decls:16,vars:1,consts:[[1,"form-field-preview"],[1,"preview-title"],[1,"description"],[1,"preview-field"],["type","text","disabled","",1,"form-control",3,"placeholder","value"],[1,"form-text","text-muted"],["disabled","",1,"form-control",3,"rows","placeholder"],["type","date","disabled","",1,"form-control",3,"value"],[1,"form-check"],["type","checkbox","disabled","",1,"form-check-input",3,"checked"],[1,"form-check-label"],[1,"checkbox-group"],["type","checkbox","disabled","",1,"form-check-input",3,"value"],[1,"form-text","text-warning"],["type","radio","disabled","",1,"form-check-input",3,"checked"],[1,"radio-group"],["type","radio","disabled","",1,"form-check-input",3,"value","name"],["disabled","",1,"form-control"],["value",""],[3,"value"],[1,"file-upload-preview"],[1,"fa-regular","fa-upload"],[1,"file-types"],[1,"form-text","text-info"],[1,"toggle-preview"],[1,"toggle-switch"],[1,"toggle-slider"],[1,"unknown-field"],[1,"fa-regular","fa-circle-question"]],template:function(l,p){if(l&1&&(i(0,"div",0),e(1,` 124 `),c(2,ft,8,2)(3,xt,10,5)(4,gt,11,6)(5,ht,10,4)(6,bt,13,4)(7,Mt,14,6)(8,Ft,13,4)(9,kt,14,6)(10,Nt,17,5)(11,Bt,20,5)(12,zt,16,5)(13,$t,15,2),e(14,` 125`),o(),e(15,` 126`)),l&2){let x;a(2),m((x=p.field.type)===p.FormFieldType.TITLE?2:x===p.FormFieldType.TEXT_FIELD?3:x===p.FormFieldType.TEXT_AREA?4:x===p.FormFieldType.DATE?5:x===p.FormFieldType.CHECKBOX?6:x===p.FormFieldType.CHECKBOX_GROUP?7:x===p.FormFieldType.RADIO_BUTTON?8:x===p.FormFieldType.RADIO_GROUP?9:x===p.FormFieldType.SELECT?10:x===p.FormFieldType.FILE_UPLOAD?11:x===p.FormFieldType.TOGGLE?12:13)}},dependencies:[B,A],styles:[".form-field-preview[_ngcontent-%COMP%]{pointer-events:none}.form-field-preview[_ngcontent-%COMP%] .preview-title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 .5rem;font-size:var(--text-large);font-weight:600;color:#495057}.form-field-preview[_ngcontent-%COMP%] .preview-title[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{margin:0;color:var(--grey-700);font-size:var(--text-medium)}.form-field-preview[_ngcontent-%COMP%] .preview-field[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:block;margin-bottom:.5rem;font-weight:500;color:#495057;font-size:var(--text-medium)}.form-field-preview[_ngcontent-%COMP%] .preview-field[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]{background-color:#f8f9fa;border:1px solid #ced4da;font-size:var(--text-medium)}.form-field-preview[_ngcontent-%COMP%] .preview-field[_ngcontent-%COMP%] .form-text[_ngcontent-%COMP%]{font-size:var(--text-small);margin-top:.25rem}.form-field-preview[_ngcontent-%COMP%] .preview-field[_ngcontent-%COMP%] .checkbox-group[_ngcontent-%COMP%], .form-field-preview[_ngcontent-%COMP%] .preview-field[_ngcontent-%COMP%] .radio-group[_ngcontent-%COMP%]{margin-top:.5rem}.form-field-preview[_ngcontent-%COMP%] .preview-field[_ngcontent-%COMP%] .checkbox-group[_ngcontent-%COMP%] .form-check[_ngcontent-%COMP%], .form-field-preview[_ngcontent-%COMP%] .preview-field[_ngcontent-%COMP%] .radio-group[_ngcontent-%COMP%] .form-check[_ngcontent-%COMP%]{margin-bottom:.5rem}.form-field-preview[_ngcontent-%COMP%] .preview-field[_ngcontent-%COMP%] .checkbox-group[_ngcontent-%COMP%] .form-check[_ngcontent-%COMP%] .form-check-label[_ngcontent-%COMP%], .form-field-preview[_ngcontent-%COMP%] .preview-field[_ngcontent-%COMP%] .radio-group[_ngcontent-%COMP%] .form-check[_ngcontent-%COMP%] .form-check-label[_ngcontent-%COMP%]{margin-left:.25rem;font-size:var(--text-medium)}.form-field-preview[_ngcontent-%COMP%] .preview-field[_ngcontent-%COMP%] .checkbox-group.inline[_ngcontent-%COMP%], .form-field-preview[_ngcontent-%COMP%] .preview-field[_ngcontent-%COMP%] .radio-group.inline[_ngcontent-%COMP%]{display:flex;gap:1rem;flex-wrap:wrap}.form-field-preview[_ngcontent-%COMP%] .preview-field[_ngcontent-%COMP%] .checkbox-group.inline[_ngcontent-%COMP%] .form-check[_ngcontent-%COMP%], .form-field-preview[_ngcontent-%COMP%] .preview-field[_ngcontent-%COMP%] .radio-group.inline[_ngcontent-%COMP%] .form-check[_ngcontent-%COMP%]{margin-bottom:0}.form-field-preview[_ngcontent-%COMP%] .preview-field[_ngcontent-%COMP%] .file-upload-preview[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem;border:1px dashed #ced4da;border-radius:4px;background-color:#f8f9fa;color:var(--grey-700);font-size:var(--text-medium)}.form-field-preview[_ngcontent-%COMP%] .preview-field[_ngcontent-%COMP%] .file-upload-preview[_ngcontent-%COMP%] .file-types[_ngcontent-%COMP%]{margin-left:auto;font-size:var(--text-small);opacity:.7}.form-field-preview[_ngcontent-%COMP%] .preview-field[_ngcontent-%COMP%] .toggle-preview[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.form-field-preview[_ngcontent-%COMP%] .preview-field[_ngcontent-%COMP%] .toggle-preview[_ngcontent-%COMP%] .toggle-switch[_ngcontent-%COMP%]{position:relative;width:44px;height:24px;background:#ced4da;border-radius:12px;transition:background .2s ease}.form-field-preview[_ngcontent-%COMP%] .preview-field[_ngcontent-%COMP%] .toggle-preview[_ngcontent-%COMP%] .toggle-switch.on[_ngcontent-%COMP%]{background:#007bff}.form-field-preview[_ngcontent-%COMP%] .preview-field[_ngcontent-%COMP%] .toggle-preview[_ngcontent-%COMP%] .toggle-switch.on[_ngcontent-%COMP%] .toggle-slider[_ngcontent-%COMP%]{transform:translate(20px)}.form-field-preview[_ngcontent-%COMP%] .preview-field[_ngcontent-%COMP%] .toggle-preview[_ngcontent-%COMP%] .toggle-switch[_ngcontent-%COMP%] .toggle-slider[_ngcontent-%COMP%]{position:absolute;top:2px;left:2px;width:20px;height:20px;background:#fff;border-radius:50%;transition:transform .2s ease}.form-field-preview[_ngcontent-%COMP%] .preview-field[_ngcontent-%COMP%] .unknown-field[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem;background:#fff3cd;border:1px solid #ffeaa7;border-radius:4px;color:#856404;font-size:var(--text-medium)}"]}
126);let n=d;return n})();function Wt(n,d){if(n&1&&(e(0,` 127 `),i(1,"option",13),e(2),o(),e(3,` 128 `)),n&2){let t=d.$implicit;a(),_("value",t.value),a(),S(` 129 `,t.label,` 130 `)}}function Xt(n,d){if(n&1){let t=M();e(0,` 131 `),i(1,"app-dialog-footer"),e(2,` 132 `),$(3,14),e(4,` 133 `),i(5,"button",15),h("click",function(){v(t);let l=s();return b(l.onCancel())}),e(6,"Cancel"),o(),e(7,` 134 `),q(),e(8,` 135 `),$(9,16),e(10,` 136 `),i(11,"button",17),h("click",function(){v(t);let l=s();return b(l.onSave())}),e(12),o(),e(13,` 137 `),q(),e(14,` 138 `),o(),e(15,` 139 `)}if(n&2){let t=s();a(11),_("disabled",!(t.editForm.title!=null&&t.editForm.title.trim())),a(),g(t.isNewStep?"Add Step":"Save Changes")}}var nt=(()=>{let d=class d{constructor(){this.visible=!1,this.step=null,this.isNewStep=!1,this.visibleChange=new V,this.stepSaved=new V,this.stepCanceled=new V,this.editForm={},this.layoutOptions=[{label:"Single Column",value:E.SINGLE_COLUMN},{label:"Two Column",value:E.TWO_COLUMN}]}ngOnInit(){this.resetForm()}ngOnChanges(){this.resetForm()}resetForm(){this.step?this.editForm={id:this.step.id,title:this.step.title,description:this.step.description,layout:this.step.layout,required:this.step.required,order:this.step.order}:this.isNewStep&&(this.editForm={title:"New Step",description:"",layout:E.SINGLE_COLUMN,required:!1})}onSave(){if(!this.editForm.title?.trim())return;let r={id:this.editForm.id||this.generateStepId(),title:this.editForm.title.trim(),description:this.editForm.description?.trim()||"",layout:this.editForm.layout||E.SINGLE_COLUMN,required:this.editForm.required||!1,order:this.editForm.order||0,fields:this.step?.fields||[]};this.stepSaved.emit(r),this.onCancel()}onCancel(){this.visible=!1,this.visibleChange.emit(!1),this.stepCanceled.emit(),this.resetForm()}generateStepId(){return"step_"+Math.random().toString(36).substr(2,9)+"_"+Date.now()}};d.\u0275fac=function(l){return new(l||d)},d.\u0275cmp=k({type:d,selectors:[["app-step-edit-dialog"]],inputs:{visible:"visible",step:"step",isNewStep:"isNewStep"},outputs:{visibleChange:"visibleChange",stepSaved:"stepSaved",stepCanceled:"stepCanceled"},standalone:!1,features:[H],decls:46,vars:9,consts:[["styleClass","smallWidthDialog",3,"visibleChange","visible","modal","closable","draggable","header"],[1,"step-edit-form"],[1,"form-group"],["for","stepTitle"],["id","stepTitle","type","text","placeholder","Enter step title","maxlength","100",1,"form-control",3,"ngModelChange","ngModel"],["for","stepDescription"],["id","stepDescription","placeholder","Optional description for this step","rows","3","maxlength","500",1,"form-control",3,"ngModelChange","ngModel"],["for","stepLayout"],["id","stepLayout",1,"form-control",3,"ngModelChange","ngModel"],[1,"form-check"],["id","stepRequired","type","checkbox",1,"form-check-input",3,"ngModelChange","ngModel"],["for","stepRequired",1,"form-check-label"],["pTemplate","footer"],[3,"value"],["slot","secondary"],["type","button",1,"btn","btn-secondary",3,"click"],["slot","primary"],["type","button",1,"btn","btn-primary",3,"click","disabled"]],template:function(l,p){l&1&&(i(0,"p-dialog",0),N("visibleChange",function(C){return L(p.visible,C)||(p.visible=C),C}),e(1,` 140 141 `),i(2,"div",1),e(3,` 142 `),i(4,"div",2),e(5,` 143 `),i(6,"label",3),e(7,"Step Title *"),o(),e(8,` 144 `),i(9,"input",4),N("ngModelChange",function(C){return L(p.editForm.title,C)||(p.editForm.title=C),C}),o(),e(10,` 145 `),o(),e(11,` 146 147 `),i(12,"div",2),e(13,` 148 `),i(14,"label",5),e(15,"Step Description"),o(),e(16,` 149 `),i(17,"textarea",6),N("ngModelChange",function(C){return L(p.editForm.description,C)||(p.editForm.description=C),C}),o(),e(18,` 150 `),o(),e(19,` 151 152 `),i(20,"div",2),e(21,` 153 `),i(22,"label",7),e(23,"Layout"),o(),e(24,` 154 `),i(25,"select",8),N("ngModelChange",function(C){return L(p.editForm.layout,C)||(p.editForm.layout=C),C}),e(26,` 155 `),O(27,Wt,4,2,null,null,y),o(),e(29,` 156 `),o(),e(30,` 157 158 `),i(31,"div",2),e(32,` 159 `),i(33,"div",9),e(34,` 160 `),i(35,"input",10),N("ngModelChange",function(C){return L(p.editForm.required,C)||(p.editForm.required=C),C}),o(),e(36,` 161 `),i(37,"label",11),e(38,` 162 Required step (users must complete this step) 163 `),o(),e(39,` 164 `),o(),e(40,` 165 `),o(),e(41,` 166 `),o(),e(42,` 167 168 `),K(43,Xt,16,2,"ng-template",12),e(44,` 169`),o(),e(45,` 170`)),l&2&&(D("visible",p.visible),_("modal",!0)("closable",!1)("draggable",!1)("header",p.isNewStep?"Add New Step":"Edit Step"),a(9),D("ngModel",p.editForm.title),a(8),D("ngModel",p.editForm.description),a(8),D("ngModel",p.editForm.layout),a(2),P(p.layoutOptions),a(8),D("ngModel",p.editForm.required))},dependencies:[B,A,G,Y,U,R,Ie,Q,fe,xe,_e],styles:[".step-edit-dialog[_ngcontent-%COMP%] .step-edit-form[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%]{margin-bottom:1rem}.step-edit-dialog[_ngcontent-%COMP%] .step-edit-form[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:block;margin-bottom:.5rem;font-weight:600;color:var(--grey-900)}.step-edit-dialog[_ngcontent-%COMP%] .step-edit-form[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]{width:100%;padding:.5rem;border:1px solid #ddd;border-radius:4px;font-size:var(--text-medium)}.step-edit-dialog[_ngcontent-%COMP%] .step-edit-form[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{outline:none;border-color:#2196f3;box-shadow:0 0 0 2px #2196f31a}.step-edit-dialog[_ngcontent-%COMP%] .step-edit-form[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%] textarea.form-control[_ngcontent-%COMP%]{resize:vertical;min-height:80px}.step-edit-dialog[_ngcontent-%COMP%] .step-edit-form[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%] .form-check[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.step-edit-dialog[_ngcontent-%COMP%] .step-edit-form[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%] .form-check[_ngcontent-%COMP%] .form-check-input[_ngcontent-%COMP%]{margin:0}.step-edit-dialog[_ngcontent-%COMP%] .step-edit-form[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%] .form-check[_ngcontent-%COMP%] .form-check-label[_ngcontent-%COMP%]{margin:0;font-weight:400;cursor:pointer}.step-edit-dialog[_ngcontent-%COMP%] .dialog-footer[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;
170gap:.5rem;padding-top:1rem;border-top:1px solid #e0e0e0;margin-top:1rem}"]});let n=d;return n})();var it=n=>[n];function Jt(n,d){if(n&1&&(e(0,` 171 `),i(1,"span",32),e(2),o(),e(3,` 172 `)),n&2){let t=s().$index;a(2),g(t+1)}}function Kt(n,d){n&1&&(e(0,` 173 `),f(1,"i",33),e(2,` 174 `))}function Yt(n,d){if(n&1&&(e(0,` 175 `),i(1,"div",34),e(2),o(),e(3,` 176 `)),n&2){let t=s().$implicit;a(2),g(t.description)}}function Qt(n,d){if(n&1){let t=M();e(0,` 177 `),i(1,"div",18),h("click",function(){let l=v(t).$index,p=s(3);return b(p.onStepChange(l))}),e(2,` 178 `),i(3,"div",19),e(4,` 179 `),f(5,"i",20),e(6,` 180 `),o(),e(7,` 181 `),i(8,"div",21),e(9,` 182 `),c(10,Jt,4,1),c(11,Kt,3,0),o(),e(12,` 183 `),i(13,"div",22),e(14,` 184 `),i(15,"div",23),e(16),o(),e(17,` 185 `),c(18,Yt,4,1),i(19,"div",24),e(20,` 186 `),i(21,"span",25),e(22),o(),e(23,` 187 `),i(24,"span",26),e(25),o(),e(26,` 188 `),o(),e(27,` 189 `),o(),e(28,` 190 `),i(29,"div",27),e(30,` 191 `),i(31,"button",28),h("click",function(l){let p=v(t).$index;return s(3).onStepEdit(p),b(l.stopPropagation())}),e(32,` 192 `),f(33,"i",29),e(34,` 193 `),o(),e(35,` 194 `),i(36,"button",30),h("click",function(l){let p=v(t).$index;return s(3).onStepDelete(p),b(l.stopPropagation())}),e(37,` 195 `),f(38,"i",31),e(39,` 196 `),o(),e(40,` 197 `),o(),e(41,` 198 `),o(),e(42,` 199 `)}if(n&2){let t=d.$implicit,r=d.$index,l=s(3);a(),F("active",l.isStepActive(r))("completed",l.isStepCompleted(r))("clickable",l.canNavigateToStep(r)),_("cdkDragData",t),a(9),m(l.isStepCompleted(r)?-1:10),a(),m(l.isStepCompleted(r)?11:-1),a(5),g(t.title),a(2),m(t.description?18:-1),a(4),T("",t.fields.length," field",t.fields.length!==1?"s":""),a(3),g(t.layout==="TWO_COLUMN"?"2-Column":"1-Column"),a(11),_("disabled",l.configuration.steps.length===1)}}function Zt(n,d){if(n&1){let t=M();e(0,` 200 `),i(1,"div",16),e(2,` 201 `),i(3,"div",17,2),h("cdkDropListDropped",function(l){v(t);let p=s(2);return b(p.onStepReorder(l))}),e(5,` 202 `),O(6,Qt,43,15,null,null,y),o(),e(8,` 203 `),o(),e(9,` 204 `)}if(n&2){let t=s(2);a(3),_("cdkDropListData",t.configuration.steps),a(3),P(t.configuration.steps)}}function en(n,d){if(n&1){let t=M();e(0,` 205 `),i(1,"div",11),e(2,` 206 `),i(3,"div",12),e(4,` 207 `),i(5,"h4"),e(6,` 208 `),f(7,"i",13),e(8,` 209 Form Steps 210 `),o(),e(9,` 211 `),i(10,"button",14),h("click",function(){v(t);let l=s();return b(l.onStepAdd())}),e(11,` 212 `),f(12,"i",15),e(13,` Add Step 213 `),o(),e(14,` 214 `),o(),e(15,` 215 `),e(16,` 216 `),c(17,Zt,10,1),o(),e(18,` 217 `)}if(n&2){let t=s();a(17),m(t.configuration.steps&&t.configuration.steps.length>0?17:-1)}}function tn(n,d){if(n&1&&(e(0,` 218 `),i(1,"div",35),e(2,` 219 `),f(3,"i"),e(4,` 220 `),i(5,"span"),e(6),o(),e(7,` 221 `),o(),e(8,` 222 `)),n&2){let t=d.$implicit;a(),_("cdkDragData",t),a(2),ie(t.icon),a(3),g(t.label)}}function nn(n,d){n&1&&(e(0,` 223 `),i(1,"span"),e(2,"Form Builder"),o(),e(3,` 224 `))}function on(n,d){if(n&1&&(e(0,` 225 `),i(1,"span"),e(2),o(),e(3,` 226 `)),n&2){let t=s();a(2),T("Step ",t.currentStepIndex+1,": ",t.currentStep.title)}}function rn(n,d){if(n&1){let t=M();e(0,` 227 `),i(1,"div",36),e(2,` 228 `),i(3,"button",37),h("click",function(){v(t);let l=s();return b(l.clearForm())}),e(4,` 229 `),f(5,"i",31),e(6,` Clear All 230 `),o(),e(7,` 231 `),o(),e(8,` 232 `)}if(n&2){let t=s();a(3),_("disabled",t.getCurrentFields().length===0)}}function ln(n,d){if(n&1){let t=M();e(0,` 233 `),i(1,"div",38),e(2,`
234 `),i(3,"label"),e(4,"Step Layout:"),o(),e(5,` 235 `),i(6,"select",39),N("ngModelChange",function(l){v(t);let p=s();return L(p.currentStep.layout,l)||(p.currentStep.layout=l),b(l)}),h("change",function(){v(t);let l=s();return b(l.onStepLayoutChange())}),e(7,` 236 `),i(8,"option",40),e(9,"Single Column"),o(),e(10,` 237 `),i(11,"option",41),e(12,"Two Column"),o(),e(13,` 238 `),o(),e(14,` 239 `),o(),e(15,` 240 `)}if(n&2){let t=s();a(6),D("ngModel",t.currentStep.layout)}}function an(n,d){n&1&&(e(0,` 241 `),i(1,"div",42),e(2,` 242 `),f(3,"i",43),e(4,` 243 `),i(5,"p"),e(6,"Drag form fields here to build your form"),o(),e(7,` 244 `),o(),e(8,` 245 `))}function dn(n,d){if(n&1){let t=M();e(0,` 246 `),i(1,"button",57),h("click",function(l){v(t);let p=s(2).$implicit;return s().toggleFieldColumnSpan(p),b(l.stopPropagation())}),e(2,` 247 `),f(3,"i"),e(4,` 248 `),o(),e(5,` 249 `)}if(n&2){let t=s(2).$implicit;a(),_("title",t.properties.columnSpan===2?"Make half width":"Make full width"),a(2),ie(t.properties.columnSpan===2?"fa-regular fa-minus":"fa-regular fa-plus")}}function pn(n,d){if(n&1){let t=M();e(0,` 250 `),i(1,"div",49),e(2," "),i(3,"button",50),h("click",function(l){v(t);let p=s().$implicit;return s().moveFieldUp(p),b(l.stopPropagation())}),e(4,` 251 `),f(5,"i",51),e(6,` 252 `),o(),e(7,` 253 `),i(8,"button",52),h("click",function(l){v(t);let p=s().$implicit;return s().moveFieldDown(p),b(l.stopPropagation())}),e(9,` 254 `),f(10,"i",53),e(11,` 255 `),o(),e(12,` 256 `),i(13,"button",54),h("click",function(l){v(t);let p=s().$implicit;return s().duplicateField(p),b(l.stopPropagation())}),e(14,` 257 `),f(15,"i",55),e(16,` 258 `),o(),e(17,` 259 `),e(18,` 260 `),c(19,dn,6,3),i(20,"button",56),h("click",function(l){v(t);let p=s().$implicit;return s().deleteField(p),b(l.stopPropagation())}),e(21,` 261 `),f(22,"i",31),e(23,` 262 `),o(),e(24,` 263 `),o(),e(25,` 264 `)}if(n&2){let t=s().$index,r=s();a(3),_("disabled",t===0),a(5),_("disabled",t===r.getCurrentFields().length-1),a(11),m(r.isCurrentStepTwoColumn()?19:-1)}}function sn(n,d){n&1&&(e(0,` 265 `),i(1,"span",58),e(2,"*"),o(),e(3,` 266 `))}function cn(n,d){if(n&1){let t=M();e(0,` 267 `),i(1,"div",44),h("click",function(){let l=v(t).$implicit,p=s();return b(p.selectField(l))}),e(2,` 268 `),i(3,"div",45),e(4,` 269 `),f(5,"app-form-field-preview",46),e(6,` 270 `),o(),e(7,` 271 `),c(8,pn,26,3),i(9,"div",47),e(10,` 272 `),f(11,"i"),e(12,` 273 `),i(13,"span",48),e(14),o(),e(15,` 274 `),c(16,sn,4,0),o(),e(17,` 275 `),o(),e(18,` 276 `)}if(n&2){let t=d.$implicit,r=s();a(),F("selected",r.selectedField===t)("full-width",t.properties.columnSpan===2),a(4),_("field",t),a(3),m(r.readonly?-1:8),a(3),ie(r.getFieldIcon(t.type)),a(3),g(r.getFieldLabel(t)),a(2),m(t.properties.validation!=null&&t.properties.validation.required?16:-1)}}var ot=(()=>{let d=class d{constructor(){this.configuration={steps:[],multiStep:!0},this.readonly=!1,this.configurationChange=new V,this.fieldSelected=new V,this.fieldTemplates=et,this.selectedField=null,this.draggedFieldIndex=null,this.currentStepIndex=0,this.showStepEditDialog=!1,this.editingStep=null,this.isNewStep=!1}ngOnInit(){this.configuration.multiStep=!0,this.migrateToStepsIfNeeded(),this.ensureAtLeastOneStep(),this.sortStepsAndFields()}onDrop(r){if(this.readonly)return;let l=this.getCurrentStep();if(l){if(r.previousContainer===r.container)ee(l.fields,r.previousIndex,r.currentIndex),this.updateFieldOrder();else{let p=this.fieldTemplates[r.previousIndex],x={id:this.generateFieldId(),type:p.type,properties:W(w({},p.defaultProperties),{validation:w({},p.defaultProperties.validation)}),order:r.currentIndex};l.fields.splice(r.currentIndex,0,x),this.updateFieldOrder(),this.selectField(x)}this.emitConfigurationChange()}}selectField(r){this.readonly||(this.selectedField=r,this.fieldSelected.emit(r))}deleteField(r){if(this.readonly)return;let l=this.getCurrentStep();if(!l)return;let p=l.fields.indexOf(r);p>-1&&(l.fields.splice(p,1),this.updateFieldOrder(),this.selectedField===r&&(this.selectedField=null,this.fieldSelected.emit(null)),this.emitConfigurationChange())}duplicateField(r){if(this.readonly)return;let l=this.getCurrentStep();if(!l)return;let p=l.fields.indexOf(r),x=W(w({},r),{id:this.generateFieldId(),properties:W(w({},r.properties),{label:r.properties.label+" (Copy)",validation:w({},r.properties.validation),options:r.properties.options?[...r.properties.options]:void 0})});l.fields.splice(p+1,0,x),this.updateFieldOrder(),this.selectField(x),this.emitConfigurationChange()}moveFieldUp(r){if(this.readonly)return;let l=this.getCurrentStep();if(!l)return;let p=l.fields.indexOf(r);p>0&&(ee(l.fields,p,p-1),this.updateFieldOrder(),this.emitConfigurationChange())}moveFieldDown(r){if(this.readonly)return;let l=this.getCurrentStep();if(!l)return;let p=l.fields.indexOf(r);p<l.fields.length-1&&(ee(l.fields,p,p+1),this.updateFieldOrder(),this.emitConfigurationChange())}clearForm(){if(this.readonly)return;let r=this.getCurrentStep();r&&(r.fields=[],this.selectedField=null,this.fieldSelected.emit(null),this.emitConfigurationChange())}generateFieldId(){return"field_"+Math.random().toString(36).substr(2,9)+"_"+Date.now()}updateFieldOrder(){this.configuration.steps[this.currentStepIndex].fields.forEach((r,l)=>{r.order=l}),this.sortFields()}sortFields(){this.configuration.steps[this.currentStepIndex].fields.sort((r,l)=>r.order-l.order)}
276emitConfigurationChange(){this.configurationChange.emit(w({},this.configuration))}onStepReorder(r){this.readonly||r.previousIndex!==r.currentIndex&&(this.currentStepIndex===r.previousIndex?this.currentStepIndex=r.currentIndex:this.currentStepIndex>r.previousIndex&&this.currentStepIndex<=r.currentIndex?this.currentStepIndex--:this.currentStepIndex>=r.currentIndex&&this.currentStepIndex<r.previousIndex&&this.currentStepIndex++,ee(this.configuration.steps,r.previousIndex,r.currentIndex),this.updateStepOrder(),this.emitConfigurationChange())}isStepActive(r){return r===this.currentStepIndex}isStepCompleted(r){return r<this.currentStepIndex}canNavigateToStep(r){return!this.readonly&&r>=0}getFieldIcon(r){return this.fieldTemplates.find(p=>p.type===r)?.icon||"fa-regular fa-question"}getFieldLabel(r){return r.properties.label||this.getFieldTypeLabel(r.type)}getFieldTypeLabel(r){return this.fieldTemplates.find(p=>p.type===r)?.label||r.toString()}migrateToStepsIfNeeded(){if(this.configuration.fields&&this.configuration.fields.length>0&&this.configuration.steps.length===0){let r={id:this.generateFieldId(),title:"Form Fields",description:"",fields:[...this.configuration.fields],layout:E.SINGLE_COLUMN,order:0,required:!1};this.configuration.steps=[r],this.configuration.multiStep=!1}}ensureAtLeastOneStep(){if(this.configuration.steps.length===0){let r={id:this.generateFieldId(),title:"Step 1",description:"",fields:[],layout:E.SINGLE_COLUMN,order:0,required:!1};this.configuration.steps=[r]}}sortStepsAndFields(){this.configuration.steps.sort((r,l)=>r.order-l.order),this.configuration.steps.forEach(r=>{r.fields.sort((l,p)=>l.order-p.order)})}addStep(){if(this.readonly)return;let r={id:this.generateFieldId(),title:"Step "+(this.configuration.steps.length+1),description:"",fields:[],layout:E.SINGLE_COLUMN,order:this.configuration.steps.length,required:!1};this.configuration.steps.push(r),this.updateFieldOrder(),this.selectStep(r),this.emitConfigurationChange()}selectStep(r){this.readonly||(this.currentStepIndex=this.configuration.steps.indexOf(r),this.sortFields())}deleteStep(r){if(this.readonly)return;let l=this.configuration.steps.indexOf(r);l>-1&&(this.configuration.steps.splice(l,1),this.updateStepOrder(),this.currentStepIndex===l&&(this.currentStepIndex=Math.max(0,this.currentStepIndex-1)),this.emitConfigurationChange())}editStep(r){this.readonly||(this.editingStep=w({},r),this.isNewStep=!1,this.showStepEditDialog=!0)}onStepAdd(){this.editingStep=null,this.isNewStep=!0,this.showStepEditDialog=!0}onStepSaved(r){if(this.isNewStep)r.order=this.configuration.steps.length,this.configuration.steps.push(r),this.currentStepIndex=this.configuration.steps.length-1;else{let l=this.configuration.steps.findIndex(p=>p.id===r.id);l>-1&&(this.configuration.steps[l]=r)}this.updateStepOrder(),this.emitConfigurationChange()}onStepCanceled(){this.showStepEditDialog=!1,this.editingStep=null,this.isNewStep=!1}onStepChange(r){this.currentStepIndex=r,this.selectedField=null,this.fieldSelected.emit(null)}getCurrentStep(){return this.configuration.steps[this.currentStepIndex]||null}updateStepOrder(){this.configuration.steps.forEach((r,l)=>{r.order=l}),this.sortStepsAndFields()}getCurrentFields(){let r=this.getCurrentStep();return r?r.fields:[]}onStepLayoutChange(){if(this.readonly)return;let r=this.getCurrentStep();r&&(r.fields.forEach(l=>{r.layout===E.SINGLE_COLUMN&&(l.properties.columnSpan=1)}),this.emitConfigurationChange())}isCurrentStepTwoColumn(){let r=this.getCurrentStep();return r?r.layout===E.TWO_COLUMN:!1}toggleFieldColumnSpan(r){if(this.readonly)return;let l=this.getCurrentStep();l&&l.layout===E.TWO_COLUMN&&(r.properties.columnSpan=r.properties.columnSpan===2?1:2,this.emitConfigurationChange())}get currentStep(){return this.getCurrentStep()}trackByFieldId(r,l){return l.id}onStepEdit(r){if(this.readonly)return;let l=this.configuration.steps[r];l&&this.editStep(l)}onStepDelete(r){if(this.readonly)return;let l=this.configuration.steps[r];l&&this.deleteStep(l)}};d.\u0275fac=function(l){return new(l||d)},d.\u0275cmp=k({type:d,selectors:[["app-form-builder"]],inputs:{configuration:"configuration",readonly:"readonly"},outputs:{configurationChange:"configurationChange",fieldSelected:"fieldSelected"},standalone:!1,decls:46,vars:19,consts:[["templatesList","cdkDropList"],["formArea","cdkDropList"],["stepsList","cdkDropList"],[1,"form-builder"],[1,"form-builder
276-container"],[1,"field-palette"],["cdkDropList","",1,"field-templates",3,"cdkDropListData","cdkDropListConnectedTo"],[1,"form-area"],[1,"form-header"],["cdkDropList","",1,"form-canvas",3,"cdkDropListDropped","cdkDropListData","cdkDropListConnectedTo"],[3,"visibleChange","stepSaved","stepCanceled","visible","step","isNewStep"],[1,"step-management"],[1,"step-header"],[1,"fa-regular","fa-list"],["type","button","pTooltip","Add a new step to the form","tooltipPosition","bottom",1,"btn","btn-sm","btn-outline-primary",3,"click"],[1,"fa-regular","fa-plus"],[1,"steps-list"],["cdkDropList","",1,"steps-drop-list",3,"cdkDropListDropped","cdkDropListData"],["cdkDrag","",1,"step-item",3,"click","cdkDragData"],["cdkDragHandle","",1,"step-drag-handle"],[1,"fa-regular","fa-bars"],[1,"step-indicator"],[1,"step-content"],[1,"step-title"],[1,"step-meta"],[1,"field-count"],[1,"layout-type"],[1,"step-actions"],["type","button","title","Edit Step",1,"btn","btn-sm","btn-link",3,"click"],[1,"fa-regular","fa-pencil"],["type","button","title","Delete Step",1,"btn","btn-sm","btn-link","text-danger",3,"click","disabled"],[1,"fa-regular","fa-trash"],[1,"step-number"],[1,"fa-regular","fa-check","step-check"],[1,"step-description"],["cdkDrag","",1,"field-template",3,"cdkDragData"],[1,"form-actions"],["type","button",1,"btn","btn-sm","btn-outline-secondary",3,"click","disabled"],[1,"layout-selection"],[1,"form-select","form-select-sm",3,"ngModelChange","change","ngModel"],["value","SINGLE_COLUMN"],["value","TWO_COLUMN"],[1,"drop-zone"],[1,"fa-regular","fa-circle-plus"],["cdkDrag","",1,"form-field-item",3,"click"],[1,"field-preview"],[3,"field"],[1,"field-indicator"],[1,"field-type"],[1,"field-controls"],["type","button","title","Move Up",1,"btn","btn-sm","btn-link",3,"click","disabled"],[1,"fa-regular","fa-angle-up"],["type","button","title","Move Down",1,"btn","btn-sm","btn-link",3,"click","disabled"],[1,"fa-regular","fa-angle-down"],["type","button","title","Duplicate",1,"btn","btn-sm","btn-link",3,"click"],[1,"fa-regular","fa-copy"],["type","button","title","Delete",1,"btn","btn-sm","btn-link","text-danger",3,"click"],["type","button",1,"btn","btn-sm","btn-link",3,"click","title"],[1,"required-indicator"]],template:function(l,p){if(l&1&&(i(0,"div",3),e(1,` 277 `),i(2,"div",4),e(3," "),e(4,` 278 `),c(5,en,19,1),i(6,"div",5),e(7,` 279 `),i(8,"h4"),e(9,"Form Fields"),o(),e(10,` 280 `),i(11,"div",6,0),e(13,` 281 `),O(14,tn,9,4,null,null,y),o(),e(16,` 282 `),o(),e(17,` 283 284 `),e(18,` 285 `),i(19,"div",7),e(20," "),i(21,"div",8),e(22,` 286 `),i(23,"h4"),e(24,` 287 `),c(25,nn,4,0),c(26,on,4,2),o(),e(27,` 288 `),c(28,rn,9,1),o(),e(29," "),e(30,` 289 `),c(31,ln,16,1),i(32,"div",9,1),h("cdkDropListDropped",function(C){return p.onDrop(C)}),e(34,` 290 291 `),c(35,an,9,0),O(36,cn,19,10,null,null,p.trackByFieldId,!0),o(),e(38,` 292`),o(),e(39,` 293`),o(),e(40,` 294`),o(),e(41,` 295 296`),e(42,` 297`),i(43,"app-step-edit-dialog",10),h("visibleChange",function(C){return p.showStepEditDialog=C})("stepSaved",function(C){return p.onStepSaved(C)})("stepCanceled",function(){return p.onStepCanceled()}),e(44,` 298`),o(),e(45,` 299`)),l&2){let x=Z(12),C=Z(33);a(5),m(p.readonly?-1:5),a(6),_("cdkDropListData",p.fieldTemplates)("cdkDropListConnectedTo",he(15,it,C)),a(3),P(p.fieldTemplates),a(11),m(p.configuration.steps.length===1?25:-1),a(),m(p.configuration.steps.length>1&&p.currentStep?26:-1),a(2),m(p.readonly?-1:28),a(3),m(p.currentStep&&!p.readonly?31:-1),a(),F("two-column",p.isCurrentStepTwoColumn()),_("cdkDropListData",p.getCurrentFields())("cdkDropListConnectedTo",he(17,it,x)),a(3),m(p.getCurrentFields().length===0?35:-1),a(),P(p.getCurrentFields()),a(7),_("visible",p.showStepEditDialog)("step",p.editingStep)("isNewStep",p.isNewStep)}},dependencies:[B,A,U,R,Q,Ue,Ge,qe,Ve,tt,nt],styles:[`.form-builder{display:flex;height:600px;border:1px solid #e0e0e0;border-radius:4px;overflow:hidden}.form-builder .form-builder-container{display:flex;width:100%}.form-builder .field-palette{width:250px;background:#f8f9fa;border-right:1px solid #e0e0e0;padding:1rem;overflow-y:auto}.form-builder .field-palette h4{margin:0 0 1rem;font-size:var(--text-default);font-weight:600;color:#495057}.form-builder .field-palette .field-templates{display:flex;flex-direction:column;gap:.5rem}.form-builder .field-palette .field-template{display:flex;align-items:center;gap:.5rem;padding:.75rem;background:#fff;border:1px solid #dee2e6;border-radius:4px;cursor:grab;transition:all .2s ease}.form-builder .field-palette .field-template:hover{background:#e9ecef;border-color:#007bff}.form-builder .field-palette .field-template.cdk-drag-dragging{cursor:grabbing;opacity:.8;transform:rotate(5deg)}.form-builder .field-palette .field-template i{color:var(--grey-700);width:16px;text-align:center}.form-builder .field-palette .field-template span{font-size:var(--text-medium);font-weight:500;color:#495057}.form-builder .form-area{flex:1;display:flex;flex-direction:column;background:#fff}.form-builder .form-area .form-header{display:flex;justify-content:space-between;align-items:center;padding:1rem;border-bottom:1px solid #e0e0e0;background:#f8f9fa}.form-builder .form-area .form-header h4{margin:0;font-size:var(--text-default);font-weight:600;color:#495057}.form-builder .form-area .form-header .form-actions{display:flex;gap:.5rem}.form-builder .form-area .form-canvas{flex:1;padding:1rem;overflow-y:auto;min-height:400px;position:relative}.form-builder .form-area .form-canvas .drop-zone{display:flex;flex-direction:column;align-items:center;justify-content:center;height:200px;border:2px dashed #dee2e6;border-radius:8px;color:var(--grey-700);font-size:var(--text-medium)}.form-builder .form-area .form-canvas .drop-zone i{font-size:2rem;margin-bottom:.5rem;opacity:.5}.form-builder .form-area .form-canvas .drop-zone p{margin:0;opacity:.7}.form-builder .form-area .form-canvas .form-field-item{position:relative;margin-bottom:1rem;border:2px solid transparent;border-radius:4px;padding:.75rem;background:#f8f9fa;cursor:pointer;transition:all .2s ease}.form-builder .form-area .form-canvas .form-field-item:hover{border-color:#007bff;background:#e3f2fd}.form-builder .form-area .form-canvas .form-field-item.selected{border-color:#007bff;background:#e3f2fd;box-shadow:0 0 0 3px #007bff1a}.form-builder .form-area .form-canvas .form-field-item.cdk-drag-dragging{opacity:.8;transform:rotate(2deg);z-index:1000}.form-builder .form-area .form-canvas .form-field-item .field-preview{pointer-events:none}.form-builder .form-area .form-canvas .form-field-item .field-controls{position:absolute;top:.5rem;right:.5rem;display:flex;gap:.25rem;opacity:0;transition:opacity .2s ease}.form-builder .form-area .form-canvas .form-field-item .field-controls .btn{padding:.25rem;line-height:1;border:none;background:#ffffffe6;border-radius:3px}.form-builder .form-area .form-canvas .form-field-item .field-controls .btn:hover{background:#fff}.form-builder .form-area .form-canvas .form-field-item .field-controls .btn:disabled{opacity:.5;cursor:not-allowed}.form-builder .form-area .form-canvas .form-field-item:hover .field-controls,.form-builder .form-area .form-canvas .form-field-item.selected .field-controls{opacity:1}.form-builder .form-area .form-canvas .form-field-item .field-indicator{display:none}.form-builder .form-area .form-canvas.two-column{display:grid;grid-template-columns:1fr 1fr;gap:1rem;padding:1rem}.form-builder .form-area .form-canvas.two-column .form-field-item.full-width{grid-column:1/-1}.cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:.4;background:#f0f0f0;border:2px dashed #ccc}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drop-list-dragging .form-field-item:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.step-management{padding:1rem;border-bottom:1px solid #e0e0e0;background:#f8f9fa}.step-management .step-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.step-management .step-header h4{margin:0;font-size:var(--text-default);font-weight:600;color:#495057;display:flex;align-items:center;gap:.5rem}.step-management .step-header h4 i{color:#007bff}.step-management .step-header button{display:flex;align-items:center;gap:.25rem}.step-management .steps-list .steps-drop-list{min-height:60px;display:flex;flex-direction:column;gap:.5rem}.step-management .steps-list .step-item{display:flex;align-items:center;padding:.75rem;background:#fff;border:1px solid #dee2e6;border-radius:6px;cursor:pointer;transition:all .2s ease;position:relative}.step-management .steps-list .step-item:hover{border-color:#007bff;background:#f8f9ff;transform:translateY(-1px);box-shadow:0 2px 4px #0000001a}.step-management .steps-list .step-item.active{border-color:#007bff;background:#e3f2fd;box-shadow:0 0 0 3px #007bff1a}.step-management .steps-list .step-item.completed{border-color:#28a745}.step-management .steps-list .step-item.completed .step-indicator{background:#28a745;color:#fff}.step-management .steps-list .step-item.cdk-drag-dragging{opacity:.8;transform:rotate(2deg);z-index:1000;box-shadow:0 5px 15px #0000004d}.step-management .steps-list .step-item .step-drag-handle{display:flex;align-items:center;justify-content:center;width:20px;height:20px;margin-right:.75rem;cursor:grab;color:var(--grey-700);opacity:.6;transition:opacity .2s ease}.step-management .steps-list .step-item .step-drag-handle:hover{opacity:1}.step-management .steps-list .step-item .step-drag-handle:active{cursor:grabbing}.step-management .steps-list .step-item .step-drag-handle i{font-size:var(--text-medium)}.step-management .steps-list .step-item .step-indicator{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;background:#e9ecef;color:#495057;font-weight:600;font-size:var(--text-medium);margin-right:.75rem;flex-shrink:0}.step-management .steps-list .step-item .step-indicator .step-check{color:#fff}.step-management .steps-list .step-item .step-content{flex:1;min-width:0}.step-management .steps-list .step-item .step-content .step-title{font-weight:600;color:#495057;margin-bottom:.25rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.step-management .steps-list .step-item .step-content .step-description{font-size:var(--text-medium);color:var(--grey-700);margin-bottom:.25rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.step-management .steps-list .step-item .step-content .step-meta{display:flex;gap:1rem;font-size:var(--text-small);color:var(--grey-700)}.step-management .steps-list .step-item .step-content .step-meta .field-count{font-weight:500}.step-management .steps-list .step-item .step-content .step-meta .layout-type{opacity:.8}.step-management .steps-list .step-item .step-actions{display:flex;gap:.25rem;opacity:0;transition:opacity .2s ease}.step-management .steps-list .step-item .step-actions .btn{padding:.25rem;line-height:1;border:none;background:#ffffffe6;border-radius:3px;color:var(--grey-700)}.step-management .steps-list .step-item .step-actions .btn:hover{background:#fff;color:#495057}.step-management .steps-list .step-item .step-actions .btn.text-danger:hover{color:#dc3545}.step-management .steps-list .step-item .step-actions .btn:disabled{opacity:.5;cursor:not-allowed}
299.step-management .steps-list .step-item:hover .step-actions{opacity:1}.step-management .steps-list .cdk-drag-placeholder{opacity:.4;background:#f0f0f0;border:2px dashed #ccc}.step-management .steps-list .cdk-drag-placeholder .step-content,.step-management .steps-list .cdk-drag-placeholder .step-indicator,.step-management .steps-list .cdk-drag-placeholder .step-actions,.step-management .steps-list .cdk-drag-placeholder .step-drag-handle{visibility:hidden}.step-management .steps-list .cdk-drop-list-dragging .step-item:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.stepper-container{border-bottom:1px solid #e0e0e0;background:#fff}.layout-selection{padding:.5rem 1rem;background:#f8f9fa;border-bottom:1px solid #e0e0e0;display:flex;align-items:center;gap:.5rem}.layout-selection label{margin:0;font-weight:500;font-size:var(--text-medium)}.layout-selection .form-select{width:auto;min-width:150px} 300`],encapsulation:2});let n=d;return n})();function fn(n,d){n&1&&(e(0,` 301 `),i(1,"div",6),e(2,` 302 `),i(3,"label",11),e(4,"Placeholder"),o(),e(5,` 303 `),f(6,"input",12),e(7,` 304 `),o(),e(8,` 305 `))}function _n(n,d){n&1&&(e(0,` 306 `),i(1,"div",6),e(2,` 307 `),i(3,"label",13),e(4,"Default Value"),o(),e(5,` 308 `),f(6,"input",14),e(7,` 309 `),o(),e(8,` 310 `))}function xn(n,d){n&1&&(e(0,` 311 `),i(1,"div",18),e(2,` 312 `),i(3,"div",19),e(4,` 313 `),i(5,"label",20),e(6,"Min Length"),o(),e(7,` 314 `),f(8,"input",21),e(9,` 315 `),o(),e(10,` 316 `),i(11,"div",19),e(12,` 317 `),i(13,"label",22),e(14,"Max Length"),o(),e(15,` 318 `),f(16,"input",23),e(17,` 319 `),o(),e(18,` 320 `),o(),e(19,` 321 `),i(20,"div",6),e(21,` 322 `),i(22,"label",24),e(23,"Pattern (RegEx)"),o(),e(24,` 323 `),f(25,"input",25),e(26,` 324 `),o(),e(27,` 325 `),i(28,"div",15),e(29,` 326 `),f(30,"input",26),e(31,` 327 `),i(32,"label",27),e(33,"Email validation"),o(),e(34,` 328 `),o(),e(35,` 329 `),i(36,"div",15),e(37,` 330 `),f(38,"input",28),e(39,` 331 `),i(40,"label",29),e(41,"URL validation"),o(),e(42,` 332 `),o(),e(43,` 333 `))}function un(n,d){n&1&&(e(0,` 334 `),i(1,"div",18),e(2,` 335 `),i(3,"div",19),e(4,` 336 `),i(5,"label",30),e(6,"Min Date"),o(),e(7,` 337 `),f(8,"input",31),e(9,` 338 `),o(),e(10,` 339 `),i(11,"div",19),e(12,` 340 `),i(13,"label",32),e(14,"Max Date"),o(),e(15,` 341 `),f(16,"input",33),e(17,` 342 `),o(),e(18,` 343 `),o(),e(19,` 344 `))}function gn(n,d){n&1&&(e(0,` 345 `),i(1,"div",18),e(2,` 346 `),i(3,"div",19),e(4,` 347 `),i(5,"label",34),e(6,"Min Value"),o(),e(7,` 348 `),f(8,"input",35),e(9,` 349 `),o(),e(10,` 350 `),i(11,"div",19),e(12,` 351 `),i(13,"label",36),e(14,"Max Value"),o(),e(15,` 352 `),f(16,"input",37),e(17,` 353 `),o(),e(18,` 354 `),o(),e(19,` 355 `))}function Cn(n,d){if(n&1&&(e(0,` 356 `),i(1,"div",5),e(2,` 357 `),i(3,"h5"),e(4,"Validation"),o(),e(5,` 358 `),i(6,"div",15),e(7,` 359 `),f(8,"input",16),e(9,` 360 `),i(10,"label",17),e(11,"Required field"),o(),e(12,` 361 `),o(),e(13,` 362 `),e(14,` 363 `),c(15,xn,44,0),c(16,un,20,0),c(17,gn,20,0),o(),e(18,` 364 `)),n&2){let t=s(2);a(15),m(t.needsTextValidation()?15:-1),a(),m(t.needsDateValidation()?16:-1),a(),m(t.needsNumberValidation()?17:-1)}}function hn(n,d){if(n&1){let t=M();e(0,` 365 `),i(1,"div",41),e(2,` 366 `),i(3,"div",18),e(4,` 367 `),i(5,"div",19),e(6,` 368 `),f(7,"input",42),e(8,` 369 `),o(),e(9,` 370 `),i(10,"div",43),e(11,` 371 `),f(12,"input",44),e(13,` 372 `),o(),e(14,` 373 `),i(15,"div",45),e(16,` 374 `),i(17,"button",46),h("click",function(){let l=v(t).$index,p=s(3);return b(p.removeOption(l))}),e(18,`
375 `),f(19,"i",47),e(20,` 376 `),o(),e(21,` 377 `),o(),e(22,` 378 `),o(),e(23,` 379 `),o(),e(24,` 380 `)}if(n&2){let t=d.$index,r=s(3);a(),_("formGroupName",t),a(16),_("disabled",r.optionsArray.length<=1)}}function vn(n,d){if(n&1){let t=M();e(0,` 381 `),i(1,"div",5),e(2,` 382 `),i(3,"h5"),e(4,"Options"),o(),e(5,` 383 `),i(6,"div",38),e(7,` 384 `),O(8,hn,25,2,null,null,y),o(),e(10,` 385 `),i(11,"button",39),h("click",function(){v(t);let l=s(2);return b(l.addOption())}),e(12,` 386 `),f(13,"i",40),e(14,` 387 Add Option 388 `),o(),e(15,` 389 `),o(),e(16,` 390 `)}if(n&2){let t=s(2);a(8),P(t.optionsArray.controls)}}function bn(n,d){n&1&&(e(0,` 391 `),i(1,"div",5),e(2,` 392 `),i(3,"h5"),e(4,"File Settings"),o(),e(5,` 393 `),i(6,"div",6),e(7,` 394 `),i(8,"label",48),e(9,"Accepted File Types"),o(),e(10,` 395 `),f(11,"input",49),e(12,` 396 `),i(13,"small",50),e(14,"Separate multiple types with commas"),o(),e(15,` 397 `),o(),e(16,` 398 `),i(17,"div",15),e(18,` 399 `),f(19,"input",51),e(20,` 400 `),i(21,"label",52),e(22,"Allow multiple files"),o(),e(23,` 401 `),o(),e(24,` 402 `),o(),e(25,` 403 `))}function Sn(n,d){n&1&&(e(0,` 404 `),i(1,"div",5),e(2,` 405 `),i(3,"h5"),e(4,"Text Area Settings"),o(),e(5,` 406 `),i(6,"div",6),e(7,` 407 `),i(8,"label",53),e(9,"Rows"),o(),e(10,` 408 `),f(11,"input",54),e(12,` 409 `),o(),e(13,` 410 `),o(),e(14,` 411 `))}function On(n,d){n&1&&(e(0,` 412 `),i(1,"div",5),e(2,` 413 `),i(3,"h5"),e(4,"Layout Settings"),o(),e(5,` 414 `),i(6,"div",15),e(7,` 415 `),f(8,"input",55),e(9,` 416 `),i(10,"label",56),e(11,"Display options inline"),o(),e(12,` 417 `),o(),e(13,` 418 `),o(),e(14,` 419 `))}function Pn(n,d){n&1&&(e(0,` 420 `),i(1,"div",5),e(2,` 421 `),i(3,"h5"),e(4,"Appearance"),o(),e(5,` 422 `),i(6,"div",6),e(7,` 423 `),i(8,"label",57),e(9,"Size"),o(),e(10,` 424 `),i(11,"select",58),e(12,` 425 `),i(13,"option",59),e(14,"Small"),o(),e(15,` 426 `),i(16,"option",60),e(17,"Medium"),o(),e(18,` 427 `),i(19,"option",61),e(20,"Large"),o(),e(21,` 428 `),o(),e(22,` 429 `),o(),e(23,` 430 `),o(),e(24,` 431 `))}function Mn(n,d){if(n&1&&(e(0,` 432 `),i(1,"div",0),e(2,` 433 `),i(3,"div",1),e(4,` 434 `),i(5,"h4"),e(6,` 435 `),f(7,"i",2),e(8,` 436 Field Properties 437 `),o(),e(9,` 438 `),i(10,"span",3),e(11),o(),e(12,` 439 `),o(),e(13,` 440 `),i(14,"form",4),e(15,` 441 `),e(16,` 442 `),i(17,"div",5),e(18,` 443 `),i(19,"h5"),e(20,"Basic Settings"),o(),e(21,` 444 `),i(22,"div",6),e(23,` 445 `),i(24,"label",7),e(25,"Label *"),o(),e(26,` 446 `),f(27,"input",8),e(28,` 447 `),o(),e(29,` 448 `),c(30,fn,9,0),i(31,"div",6),e(32,` 449 `),i(33,"label",9),e(34,"Description"),o(),e(35,` 450 `),f(36,"textarea",10),e(37,` 451 `),o(),e(38,` 452 `),c(39,_n,9,0),o(),e(40,` 453 `),e(41,` 454 `),c(42,Cn,19,3),c(43,vn,17,0),c(44,bn,26,0),c(45,Sn,15,0),c(46,On,15,0),c(47,Pn,25,0),o(),e(48,` 455 `),o(),e(49,` 456`)),n&2){let t=s();a(11),g(t.getFieldTypeName()),a(3),_("formGroup",t.propertiesForm),a(16),m(t.field.type!==t.FormFieldType.TITLE?30:-1),a(9),m(t.field.type!==t.FormFieldType.TITLE?39:-1),a(3),m(t.field.type!==t.FormFieldType.TITLE?42:-1),a(),m(t.needsOptions()?43:-1),a(),m(t.needsFileSettings()?44:-1),a(),m(t.needsTextAreaSettings()?45:-1),a(),m(t.needsGroupSettings()?46:-1),a(),m(t.field.type!==t.FormFieldType.TITLE?47:-1)}}function yn(n,d){n&1&&(e(0,` 457 `),i(1,"div",62),e(2,` 458 `),i(3,"div",63),e(4,` 459 `),f(5,"i",64),e(6,` 460 `),i(7,"h5"),e(8,"No Field Selected"),o(),e(9,` 461 `),i(10,"p"),e(11,"Select a field from the form builder to edit its properties."),o(),e(12,` 462 `),o(),e(13,` 463 `),o(),e(14,` 464`))}var rt=(()=>{let d=class d{constructor(r){this.fb=r,this.field=null,this.fieldChange=new V,this.FormFieldType=u,this.destroy$=new be}ngOnInit(){this.initializeForm()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}ngOnChanges(){this.field&&this.propertiesForm?this.updateFormFromField():!this.field&&this.propertiesForm&&this.propertiesForm.reset()}initializeForm(){this.propertiesForm=this.fb.group({label:["",I.required],placeholder:[""],description:[""],defaultValue:[""],required:[!1],minLength:[""],maxLength:[""],minDate:[""],maxDate:[""],pattern:[""],min:[""],max:[""],email:[!1],url:[!1],rows:[3],multiple:[!1],inline:[!1],size:["medium"],acceptedFileTypes:[""],options:this.fb.array([])}),this.propertiesForm.valueChanges.pipe(Se(300),Oe(),Pe(this.destroy$)).subscribe(()=>
464{this.field&&this.propertiesForm.valid&&this.updateFieldFromForm()}),this.field&&this.updateFormFromField()}updateFormFromField(){if(!this.field)return;let r=this.field.properties,l=r.validation||{};this.propertiesForm.patchValue({label:r.label||"",placeholder:r.placeholder||"",description:r.description||"",defaultValue:r.defaultValue||"",required:l.required||!1,minLength:l.minLength||"",maxLength:l.maxLength||"",minDate:l.minDate?this.formatDateForInput(l.minDate):"",maxDate:l.maxDate?this.formatDateForInput(l.maxDate):"",pattern:l.pattern||"",min:l.min||"",max:l.max||"",email:l.email||!1,url:l.url||!1,rows:r.rows||3,multiple:r.multiple||!1,inline:r.inline||!1,size:r.size||"medium",acceptedFileTypes:r.acceptedFileTypes?.join(", ")||""}),this.setOptions(r.options||[])}updateFieldFromForm(){if(!this.field)return;let r=this.propertiesForm.value,l=this.getOptionsFromForm();this.field.properties=W(w({},this.field.properties),{label:r.label,placeholder:r.placeholder,description:r.description,defaultValue:r.defaultValue,rows:r.rows,multiple:r.multiple,inline:r.inline,size:r.size,acceptedFileTypes:r.acceptedFileTypes?r.acceptedFileTypes.split(",").map(p=>p.trim()).filter(Boolean):[],options:l,validation:{required:r.required,minLength:r.minLength||void 0,maxLength:r.maxLength||void 0,minDate:r.minDate?new Date(r.minDate):void 0,maxDate:r.maxDate?new Date(r.maxDate):void 0,pattern:r.pattern||void 0,min:r.min||void 0,max:r.max||void 0,email:r.email||void 0,url:r.url||void 0}}),this.fieldChange.emit(w({},this.field))}get optionsArray(){return this.propertiesForm.get("options")}setOptions(r){let l=this.optionsArray;l.clear(),r.forEach(p=>{l.push(this.fb.group({label:[p.label,I.required],value:[p.value,I.required]}))}),this.needsOptions()&&l.length===0&&this.addOption()}getOptionsFromForm(){return this.optionsArray.value.filter(r=>r.label&&r.value)}addOption(){this.optionsArray.push(this.fb.group({label:["",I.required],value:["",I.required]}))}removeOption(r){this.optionsArray.removeAt(r)}needsOptions(){return this.field?.type===u.SELECT||this.field?.type===u.RADIO_GROUP||this.field?.type===u.CHECKBOX_GROUP}needsTextValidation(){return this.field?.type===u.TEXT_FIELD||this.field?.type===u.TEXT_AREA}needsDateValidation(){return this.field?.type===u.DATE}needsNumberValidation(){return this.field?.type===u.TEXT_FIELD}needsFileSettings(){return this.field?.type===u.FILE_UPLOAD}needsTextAreaSettings(){return this.field?.type===u.TEXT_AREA}needsGroupSettings(){return this.field?.type===u.CHECKBOX_GROUP||this.field?.type===u.RADIO_GROUP}needsToggleSettings(){return this.field?.type===u.TOGGLE}formatDateForInput(r){return r instanceof Date||(r=new Date(r)),r.toISOString().split("T")[0]}getFieldTypeName(){return this.field?{[u.TITLE]:"Title",[u.TEXT_FIELD]:"Text Field",[u.TEXT_AREA]:"Text Area",[u.DATE]:"Date",[u.CHECKBOX]:"Checkbox",[u.CHECKBOX_GROUP]:"Checkbox Group",[u.RADIO_BUTTON]:"Radio Button",[u.RADIO_GROUP]:"Radio Group",[u.SELECT]:"Select Dropdown",[u.FILE_UPLOAD]:"File Upload",[u.TOGGLE]:"Toggle Switch"}[this.field.type]||this.field.type:""}};d.\u0275fac=function(l){return new(l||d)(j(pe))},d.\u0275cmp=k({type:d,selectors:[["app-field-properties-editor"]],inputs:{field:"field"},outputs:{fieldChange:"fieldChange"},standalone:!1,features:[H],decls:2,vars:2,consts:[[1,"field-properties-editor"],[1,"properties-header"],[1,"fa-regular","fa-gear"],[1,"field-type-badge"],[1,"properties-form",3,"formGroup"],[1,"property-section"],[1,"form-group"],["for","label"],["type","text","id","label","formControlName","label","placeholder","Enter field label",1,"form-control"],["for","description"],["id","description","formControlName","description","rows","2","placeholder","Optional description or help text",1,"form-control"],["for","placeholder"],["type","text","id","placeholder","formControlName","placeholder","placeholder","Enter placeholder text",1,"form-control"],["for","defaultValue"],["type","text","id","defaultValue","formControlName","defaultValue","placeholder","Enter default value",1,"form-control"],[1,"form-check"],["type","checkbox","id","required","formControlName","required",1,"form-check-input"],["for","required",1,"form-check-label"],[1,"form-row"],[1,"col-6"],["for","minLength"],["type","number","id","minLength","formControlName","minLength","min","0",1,"form-control"],["for","maxLength"],["type","number","id","maxLength","formControlName","maxLength","min","1",1,"form-control"],["for","pattern"],["type","text","id","pattern","formControlName","pattern","placeholder","e.g., ^[A-Za-z]+$",1,"form-control"],["type","checkbox","id","email","formControlName","email",1,"form-check-input"],["for","email",1,"form-check-label"],["type","checkbox","id","url","formControlName","url",1,"form-check-input"],["for","url",1,"form-check-label"],["for","minDate"],["type","date","id","minDate","formControlName","minDate",1,"form-control"],["for","maxDate"],["type","date","id","maxDate","formControlName","maxDate",1,"form-control"],["for","min"],["type","number","id","min","formControlName","min",1,"form-control"],["for","max"],["type","number","id","max","formControlName","max",1,"form-control"],["formArrayName","options",1,"options-list"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click"],[1,"fa-regular","fa-plus"],[1,"option-item",3,"formGroupName"],["type","text","formControlName","label","placeholder","Label",1,"form-control"],[1,"col-5"],["type","text","formControlName","value","placeholder","Value",1,"form-control"],[1,"col-1"],["type","button",1,"btn","btn-sm","btn-outline-danger",3,"click","disabled"],[1,"fa-regular","fa-tras
464h"],["for","acceptedFileTypes"],["type","text","id","acceptedFileTypes","formControlName","acceptedFileTypes","placeholder","e.g., .pdf, .doc, .jpg, .png",1,"form-control"],[1,"form-text","text-muted"],["type","checkbox","id","multiple","formControlName","multiple",1,"form-check-input"],["for","multiple",1,"form-check-label"],["for","rows"],["type","number","id","rows","formControlName","rows","min","1","max","20",1,"form-control"],["type","checkbox","id","inline","formControlName","inline",1,"form-check-input"],["for","inline",1,"form-check-label"],["for","size"],["id","size","formControlName","size",1,"form-control"],["value","small"],["value","medium"],["value","large"],[1,"no-field-selected"],[1,"text-center"],[1,"fa-regular","fa-circle-info"]],template:function(l,p){l&1&&(c(0,Mn,50,10),c(1,yn,15,0)),l&2&&(m(p.field?0:-1),a(),m(p.field?-1:1))},dependencies:[le,B,A,G,ye,Y,U,R,re,ke,Te,de,ae,Ee,we],styles:[".field-properties-editor[_ngcontent-%COMP%] .properties-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:1rem;border-bottom:1px solid var(--border-color);background:var(--grey-100)}.field-properties-editor[_ngcontent-%COMP%] .properties-header[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0;font-size:var(--text-default);font-weight:600;color:var(--grey-700);display:flex;align-items:center;gap:.5rem}.field-properties-editor[_ngcontent-%COMP%] .properties-header[_ngcontent-%COMP%] .field-type-badge[_ngcontent-%COMP%]{font-size:var(--text-small);font-weight:500;padding:.25rem .5rem;background:var(--primary-link);color:var(--color-white);border-radius:12px}.field-properties-editor[_ngcontent-%COMP%] .properties-form[_ngcontent-%COMP%]{padding:1rem;max-height:500px;overflow-y:auto}.field-properties-editor[_ngcontent-%COMP%] .property-section[_ngcontent-%COMP%]{margin-bottom:1.5rem;padding-bottom:1rem;border-bottom:1px solid var(--border-color)}.field-properties-editor[_ngcontent-%COMP%] .property-section[_ngcontent-%COMP%]:last-child{border-bottom:none;margin-bottom:0}.field-properties-editor[_ngcontent-%COMP%] .property-section[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{margin:0 0 1rem;font-size:var(--text-medium);font-weight:600;color:var(--grey-700);text-transform:uppercase;letter-spacing:.5px}.field-properties-editor[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%]{margin-bottom:1rem}.field-properties-editor[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:block;margin-bottom:.25rem;font-weight:500;color:var(--grey-700);font-size:var(--text-medium)}.field-properties-editor[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]{font-size:var(--text-medium)}.field-properties-editor[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{margin-bottom:1rem}.field-properties-editor[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%] .col-6[_ngcontent-%COMP%], .field-properties-editor[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%] .col-5[_ngcontent-%COMP%], .field-properties-editor[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%] .col-1[_ngcontent-%COMP%]{padding-left:.25rem;padding-right:.25rem}.field-properties-editor[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%] .col-6[_ngcontent-%COMP%]:first-child, .field-properties-editor[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%] .col-5[_ngcontent-%COMP%]:first-child, .field-properties-editor[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%] .col-1[_ngcontent-%COMP%]:first-child{padding-left:0}.field-properties-editor[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%] .col-6[_ngcontent-%COMP%]:last-child, .field-properties-editor[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%] .col-5[_ngcontent-%COMP%]:last-child, .field-properties-editor[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%] .col-1[_ngcontent-%COMP%]:last-child{padding-right:0}.field-properties-editor[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:var(--text-small)}.field-properties-editor[_ngcontent-%COMP%] .form-check[_ngcontent-%COMP%]{margin-bottom:.75rem}
464.field-properties-editor[_ngcontent-%COMP%] .form-check[_ngcontent-%COMP%] .form-check-label[_ngcontent-%COMP%]{font-size:var(--text-medium);color:var(--grey-700)}.field-properties-editor[_ngcontent-%COMP%] .options-list[_ngcontent-%COMP%]{margin-bottom:1rem}.field-properties-editor[_ngcontent-%COMP%] .options-list[_ngcontent-%COMP%] .option-item[_ngcontent-%COMP%]{margin-bottom:.5rem}.field-properties-editor[_ngcontent-%COMP%] .options-list[_ngcontent-%COMP%] .option-item[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{height:calc(1.5em + .75rem + 2px);display:flex;align-items:center;justify-content:center}.field-properties-editor[_ngcontent-%COMP%] .form-text[_ngcontent-%COMP%]{font-size:var(--text-small)}.no-field-selected[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:300px;text-align:center;color:var(--grey-700)}.no-field-selected[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:3rem;margin-bottom:1rem;opacity:.5}.no-field-selected[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{margin-bottom:.5rem;font-weight:600}.no-field-selected[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;opacity:.8}"]});let n=d;return n})();function En(n,d){if(n&1&&(e(0,` 465 `),i(1,"div",4),e(2,` 466 `),i(3,"h2"),e(4),o(),e(5,` 467 `),o(),e(6,` 468 `)),n&2){let t=s(2);a(4),g(t.configuration.title)}}function wn(n,d){if(n&1&&(e(0,` 469 `),i(1,"div",5),e(2,` 470 `),i(3,"p"),e(4),o(),e(5,` 471 `),o(),e(6,` 472 `)),n&2){let t=s(2);a(4),g(t.configuration.description)}}function Tn(n,d){if(n&1&&(e(0,` 473 `),i(1,"div",8),e(2,` 474 `),i(3,"div",9),e(4),o(),e(5,` 475 `),i(6,"div",10),e(7),o(),e(8,` 476 `),o(),e(9,` 477 `)),n&2){let t=d.$implicit,r=d.$index,l=s(3);a(),F("active",r===l.currentStepIndex)("completed",r<l.currentStepIndex),a(3),g(r+1),a(3),g(t.title)}}function kn(n,d){if(n&1&&(e(0,` 478 `),i(1,"div",6),e(2,` 479 `),i(3,"div",7),e(4,` 480 `),O(5,Tn,10,6,null,null,ue().trackByStepId,!0),o(),e(7,` 481 `),o(),e(8,` 482 `)),n&2){let t=s(2);a(5),P(t.configuration.steps)}}function In(n,d){if(n&1&&(e(0,` 483 `),i(1,"p",12),e(2),o(),e(3,` 484 `)),n&2){let t,r=s(3);a(2),g((t=r.getCurrentStep())==null?null:t.description)}}function Dn(n,d){if(n&1&&(e(0,` 485 `),i(1,"div",11),e(2,` 486 `),i(3,"h3"),e(4),o(),e(5,` 487 `),c(6,In,4,1),o(),e(7,` 488 `)),n&2){let t,r,l=s(2);a(4),g((t=l.getCurrentStep())==null?null:t.title),a(2),m((r=l.getCurrentStep())!=null&&r.description?6:-1)}}function Ln(n,d){if(n&1&&(e(0,` 489 `),i(1,"p",15),e(2),o(),e(3,` 490 `)),n&2){let t=s(2).$implicit;a(2),g(t.properties.description)}}function Nn(n,d){if(n&1&&(e(0,` 491 `),i(1,"div",14),e(2,` 492 `),i(3,"h3"),e(4),o(),e(5,` 493 `),c(6,Ln,4,1),o(),e(7,` 494 `)),n&2){let t=s().$implicit;a(4),g(t.properties.label),a(2),m(t.properties.description?6:-1)}}function Vn(n,d){n&1&&(e(0,` 495 `),i(1,"span",19),e(2,"*"),o(),e(3,` 496 `))}function Rn(n,d){if(n&1&&(e(0,` 497 `),i(1,"div",15),e(2),o(),e(3,` 498 `)),n&2){let t=s(2).$implicit;a(2),S(` 499 `,t.properties.description,` 500 `)}}function Bn(n,d){if(n&1&&(e(0,` 501 `),i(1,"div"),e(2),o(),e(3,` 502 `)),n&2){let t=d.$implicit;a(2),g(t)}}function An(n,d){if(n&1&&(e(0,` 503 `),i(1,"div",20),e(2,` 504 `),O(3,Bn,4,1,null,null,y),o(),e(5,` 505 `)),n&2){let t=s(2).$implicit,r=s(2);a(3),P(r.getFieldErrors(t.id))}}function zn(n,d){if(n&1&&(e(0,` 506 `),i(1,"div",16),e(2,` 507 `),i(3,"label",17),e(4),c(5,Vn,4,0),o(),e(6,` 508 `),f(7,"input",18),e(8,` 509 `),c(9,Rn,4,1),c(10,An,6,0),o(),e(11,` 510 `)),n&2){let t=s().$implicit,r=s(2);a(3),_("for",t.id),a(),S(` 511 `,t.properties.label,` 512 `),a(),m(t.properties.validation!=null&&t.properties.validation.required?5:-1),a(2),F("is-invalid",r.isFieldInvalid(t.id)),_("id",t.id)("formControlName",t.id)("placeholder",t.properties.placeholder||"")("readonly",r.preview),a(2),m(t.properties.description?9:-1),a(),m(r.isFieldInvalid(t.id)?10:-1)}}function $n(n,d){n&1&&(e(0,` 513 `),i(1,"span",19),e(2,"*"),o(),e(3,` 514 `))}function qn(n,d){if(n&1&&(e(0,` 515 `),i(1,"div",15),e(2),o(),e(3,` 516 `)),n&2){let t=s(2).$implicit;a(2),S(` 517 `,t.properties.description,` 518 `)}}function Gn(n,d){if(n&1&&(e(0,` 519 `),i(1,"div"),e(2),o(),e(3,` 520 `)),n&2){let t=d.$implicit;a(2),g(t)}}function Un(n,d){if(n&1&&(e(0,` 521 `),i(1,"div",20),e(2,`
522 `),O(3,Gn,4,1,null,null,y),o(),e(5,` 523 `)),n&2){let t=s(2).$implicit,r=s(2);a(3),P(r.getFieldErrors(t.id))}}function jn(n,d){if(n&1&&(e(0,` 524 `),i(1,"div",16),e(2,` 525 `),i(3,"label",17),e(4),c(5,$n,4,0),o(),e(6,` 526 `),f(7,"textarea",21),e(8,` 527 `),c(9,qn,4,1),c(10,Un,6,0),o(),e(11,` 528 `)),n&2){let t=s().$implicit,r=s(2);a(3),_("for",t.id),a(),S(` 529 `,t.properties.label,` 530 `),a(),m(t.properties.validation!=null&&t.properties.validation.required?5:-1),a(2),F("is-invalid",r.isFieldInvalid(t.id)),_("id",t.id)("formControlName",t.id)("rows",t.properties.rows||3)("placeholder",t.properties.placeholder||"")("readonly",r.preview),a(2),m(t.properties.description?9:-1),a(),m(r.isFieldInvalid(t.id)?10:-1)}}function Wn(n,d){n&1&&(e(0,` 531 `),i(1,"span",19),e(2,"*"),o(),e(3,` 532 `))}function Xn(n,d){if(n&1&&(e(0,` 533 `),i(1,"div",15),e(2),o(),e(3,` 534 `)),n&2){let t=s(2).$implicit;a(2),S(` 535 `,t.properties.description,` 536 `)}}function Hn(n,d){if(n&1&&(e(0,` 537 `),i(1,"div"),e(2),o(),e(3,` 538 `)),n&2){let t=d.$implicit;a(2),g(t)}}function Jn(n,d){if(n&1&&(e(0,` 539 `),i(1,"div",20),e(2,` 540 `),O(3,Hn,4,1,null,null,y),o(),e(5,` 541 `)),n&2){let t=s(2).$implicit,r=s(2);a(3),P(r.getFieldErrors(t.id))}}function Kn(n,d){if(n&1&&(e(0,` 542 `),i(1,"div",16),e(2,` 543 `),i(3,"label",17),e(4),c(5,Wn,4,0),o(),e(6,` 544 `),f(7,"input",22),e(8,` 545 `),c(9,Xn,4,1),c(10,Jn,6,0),o(),e(11,` 546 `)),n&2){let t=s().$implicit,r=s(2);a(3),_("for",t.id),a(),S(` 547 `,t.properties.label,` 548 `),a(),m(t.properties.validation!=null&&t.properties.validation.required?5:-1),a(2),F("is-invalid",r.isFieldInvalid(t.id)),_("id",t.id)("formControlName",t.id)("readonly",r.preview),a(2),m(t.properties.description?9:-1),a(),m(r.isFieldInvalid(t.id)?10:-1)}}function Yn(n,d){n&1&&(e(0,` 549 `),i(1,"span",19),e(2,"*"),o(),e(3,` 550 `))}function Qn(n,d){if(n&1&&(e(0,` 551 `),i(1,"div",15),e(2),o(),e(3,` 552 `)),n&2){let t=s(2).$implicit;a(2),S(` 553 `,t.properties.description,` 554 `)}}function Zn(n,d){if(n&1&&(e(0,` 555 `),i(1,"div"),e(2),o(),e(3,` 556 `)),n&2){let t=d.$implicit;a(2),g(t)}}function ei(n,d){if(n&1&&(e(0,` 557 `),i(1,"div",20),e(2,` 558 `),O(3,Zn,4,1,null,null,y),o(),e(5,` 559 `)),n&2){let t=s(2).$implicit,r=s(2);a(3),P(r.getFieldErrors(t.id))}}function ti(n,d){if(n&1&&(e(0,` 560 `),i(1,"div",16),e(2,` 561 `),i(3,"div",23),e(4,` 562 `),f(5,"input",24),e(6,` 563 `),i(7,"label",25),e(8),c(9,Yn,4,0),o(),e(10,` 564 `),o(),e(11,` 565 `),c(12,Qn,4,1),c(13,ei,6,0),o(),e(14,` 566 `)),n&2){let t=s().$implicit,r=s(2);a(5),F("is-invalid",r.isFieldInvalid(t.id)),_("id",t.id)("formControlName",t.id)("disabled",r.preview),a(2),_("for",t.id),a(),S(` 567 `,t.properties.label,` 568 `),a(),m(t.properties.validation!=null&&t.properties.validation.required?9:-1),a(3),m(t.properties.description?12:-1),a(),m(r.isFieldInvalid(t.id)?13:-1)}}function ni(n,d){n&1&&(e(0,` 569 `),i(1,"span",19),e(2,"*"),o(),e(3,` 570 `))}function ii(n,d){if(n&1){let t=M();e(0,` 571 `),i(1,"div",23),e(2,` 572 `),i(3,"input",28,0),h("change",function(){let l=v(t).$index,p=Z(4),x=s(2).$implicit,C=s(2);return b(C.onCheckboxGroupChange(x.id,l,p.checked))}),o(),e(5,` 573 `),i(6,"label",25),e(7),o(),e(8,` 574 `),o(),e(9,` 575 `)}if(n&2){let t=d.$implicit,r=d.$index,l=s(2).$implicit,p=s(2);a(3),_("id",l.id+"_"+r)("value",t.value)("disabled",p.preview),a(3),_("for",l.id+"_"+r),a(),S(` 576 `,t.label,` 577 `)}}function oi(n,d){if(n&1&&(e(0,` 578 `),i(1,"div",15),e(2),o(),e(3,` 579 `)),n&2){let t=s(2).$implicit;a(2),S(` 580 `,t.properties.description,` 581 `)}}function ri(n,d){if(n&1&&(e(0,` 582 `),i(1,"div",16),e(2,` 583 `),i(3,"label",26),e(4),c(5,ni,4,0),o(),e(6,` 584 `),i(7,"div",27),e(8,` 585 `),O(9,ii,10,5,null,null,y),o(),e(11,` 586 `),c(12,oi,4,1),o(),e(13,` 587 `)),n&2){let t=s().$implicit;a(4),S(` 588 `,t.properties.label,` 589 `),a(),m(t.properties.validation!=null&&t.properties.validation.required?5:-1),a(2),F("inline",t.properties.inline),a(2),P(t.properties.options),a(3),m(t.properties.description?12:-1)}}function li(n,d){n&1&&(e(0,` 590 `),i(1,"span",19),e(2,"*"),o(),e(3,` 591 `))}function ai(n,d){if(n&1&&(e(0,` 592 `),i(1,"div",23),e(2,` 593 `),f(3,"input",30),e(4,` 594 `),i(5,"label",25),e(6),o(),e(7,` 595 `),o(),e(8,` 596 `)),n&2){let t=d.$implicit,r=d.$index,l=s(2).$implicit,p=s(2);a(3),F("is-invalid",p.isFieldInvalid(l.id)),_("id",l.id+"_"+r)("formControlName",l.id)("value",t.value)("disabled",p.preview),a(2),_("for",l.id+"_"+r),a(),S(` 597 `,t.label,` 598 `)}}function di(n,d){if(n&1&&(e(0,` 599 `),i(1,"div",15),e(2),o(),e(3,` 600 `)),n&2){let t=s(2).$implicit;a(2),S(` 601 `,t.properties.description,` 602 `)}}function pi(n,d){if(n&1&&(e(0,` 603 `),i(1,"div"),e(2),o(),e(3,` 604 `)),n&2){let t=d.$implicit;a(2),g(t)}}function si(n,d){if(n&1&&(e(0,` 605 `),i(1,"div",20),e(2,` 606 `),O(3,pi,4,1,null,null,y),o(),e(5,` 607 `)),n&2){let t=s(2).$implicit,r=s(2);a(3),P(r.getFieldErrors(t.id))}}function ci(n,d){if(n&1&&(e(0,` 608 `),i(1,"div",16),e(2,` 609 `),i(3,"label",26),e(4),c(5,li,4,0),o(),e(6,` 610 `),i(7,"div",29),e(8,` 611 `),O(9,ai,9,8,null,null,y),o(),e(11,` 612 `),c(12,di,4,1),c(13,si,6,0),o(),e(14,` 613 `)),n&2){let t=s().$implicit,r=s(2);a(4),S(` 614 `,t.properties.label,` 615 `),a(),m(t.properties.validation!=null&&t.properties.validation.required?5:-1),a(2),F("inline",t.properties.inline),a(2),P(t.properties.options),a(3),m(t.properties.description?12:-1),a(),m(r.isFieldInvalid(t.id)?13:-1)}}function mi(n,d){n&1&&(e(0,` 616 `),i(1,"span",19),e(2,"*"),o(),e(3,` 617 `))}function fi(n,d){if(n&1&&(e(0,` 618 `),i(1,"option",33),e(2),o(),e(3,` 619 `)),n&2){let t=d.$implicit;a(),_("value",t.value),a(),S(` 620 `,t.label,` 621 `)}}function _i(n,d){if(n&1&&(e(0,` 622 `),i(1,"div",15),e(2),o(),e(3,` 623 `)),n&2){let t=s(2).$implicit;a(2),S(` 624 `,t.properties.description,` 625 `)}}function xi(n,d){if(n&1&&(e(0,` 626 `),i(1,"div"),e(2),o(),e(3,` 627 `)),n&2){let t=d.$implicit;a(2),g(t)}}function ui(n,d){if(n&1&&(e(0,` 628 `),i(1,"div",20),e(2,` 629 `),O(3,xi,4,1,null,null,y),o(),e(5,` 630 `)),n&2){let t=s(2).$implicit,r=s(2);a(3),P(r.getFieldErrors(t.id))}}function gi(n,d){if(n&1&&(e(0,` 631 `),i(1,"div",16),e(2,` 632 `),i(3,"label",17),e(4),c(5,mi,4,0),o(),e(6,` 633 `),i(7,"select",31),e(8,` 634 `),i(9,"option",32),e(10),o(),e(11,` 635 `),O(12,fi,4,2,null,null,y),o(),e(14,` 636 `),c(15,_i,4,1),c(16,ui,6,0),o(),e(17,` 637 `)),n&2){let t=s().$implicit,r=s(2);a(3),_("for",t.id),a(),S(` 638 `,t.properties.label,` 639 `),a(),m(t.properties.validation!=null&&t.properties.validation.required?5:-1),a(2),F("is-invalid",r.isFieldInvalid(t.id)),_("id",t.id)("formControlName",t.id)("disabled",r.preview),a(3),g(t.properties.placeholder||"Choose an option..."),a(2),P(t.properties.options),a(3),m(t.properties.description?15:-1),a(),m(r.isFieldInvalid(t.id)?16:-1)}}function Ci(n,d){n&1&&(e(0,` 640 `),i(1,"span",19),e(2,"*"),o(),e(3,` 641 `))}function hi(n,d){if(n&1&&(e(0,` 642 `),i(1,"div",15),e(2),o(),e(3,` 643 `)),n&2){let t=s(2).$implicit;a(2),S(` 644 `,t.properties.description,` 645 `)}}function vi(n,d){if(n&1&&(e(0,` 646 `),i(1,"div",35),e(2),o(),e(3,` 647 `)),n&2){let t=s(2).$implicit;a(2),S(` 648 Accepted files: `,t.properties.acceptedFileTypes.join(", "),` 649 `)}}function bi(n,d){if(n&1&&(e(0,` 650 `),i(1,"div"),e(2),o(),e(3,` 651 `)),n&2){let t=d.$implicit;a(2),g(t)}}function Si(n,d){if(n&1&&(e(0,` 652 `),i(1,"div",20),e(2,` 653 `),O(3,bi,4,1,null,null,y),o(),e(5,` 654 `)),n&2){let t=s(2).$implicit,r=s(2);a(3),P(r.getFieldErrors(t.id))}}function Oi(n,d){if(n&1){let t=M();e(0,` 655 `),i(1,"div",16),e(2,` 656 `),i(3,"label",17),e(4),c(5,Ci,4,0),o(),e(6,` 657 `),i(7,"input",34),h("change",function(l){v(t);let p=s().$implicit,x=s(2);return b(x.onFileChange(p.id,l))}),o(),e(8,` 658 `),c(9,hi,4,1),c(10,vi,4,1),c(11,Si,6,0),o(),e(12,` 659 `)}if(n&2){let t=s().$implicit,r=s(2);a(3),_("for",t.id),a(),S(` 660 `,t.properties.label,` 661 `),a(),m(t.properties.validation!=null&&t.properties.validation.required?5:-1),a(2),F("is-invalid",r.isFieldInvalid(t.id)),_("id",t.id)("accept",t.properties.acceptedFileTypes==null?null:t.properties.acceptedFileTypes.join(","))("multiple",t.properties.multiple)("disabled",r.preview),a(2),m(t.properties.description?9:-1),a(),m(t.properties.acceptedFileTypes!=null&&t.properties.acceptedFileTypes.length?10:-1),a(),m(r.isFieldInvalid(t.id)?11:-1)}}function Pi(n,d){n&1&&(e(0,` 662 `),i(1,"span",19),e(2,"*"),o(),e(3,` 663 `))}function Mi(n,d){if(n&1&&(e(0,` 664 `),i(1,"div",15),e(2),o(),e(3,` 665 `)),n&2){let t=s(2).$implicit;a(2),S(` 666 `,t.properties.description,` 667 `)}}function yi(n,d){if(n&1&&(e(0,` 668 `),i(1,"div",16),e(2,` 669 `),i(3,"div",36),e(4,` 670 `),i(5,"label",37),e(6),c(7,Pi,4,0),o(),e(8,` 671 `),i(9,"div",38),e(10,` 672 `),f(11,"input",39),e(12,` 673 `),f(13,"span",40),e(14,` 674 `),o(),e(15,` 675 `),o(),e(16,` 676 `),c(17,Mi,4,1),o(),e(18,` 677 `)),n&2){let t=s().$implicit,r=s(2);a(5),_("for",t.id),a(),S(` 678 `,t.properties.label,` 679 `),a(),m(t.properties.validation!=null&&t.properties.validation.required?7:-1),a(2),F("disabled",r.preview),a(2),_("id",t.id)("formControlName",t.id)("disabled",r.preview),a(6),m(t.properties.description?17:-1)}}function Fi(n,d){if(n&1&&(e(0,` 680 `),i(1,"div",13),e(2,` 681 `),c(3,Nn,8,2)(4,zn,12,11)(5,jn,12,12)(6,Kn,12,10)(7,ti,15,10)(8,ri,14,5)(9,ci,15,6)(10,gi,18,11)(11,Oi,13,12)(12,yi,19,9),e(13,` 682 `),o(),e(14,` 683 `)),n&2){let t,r=d.$implicit,l=s(2);a(),F("full-width",r.properties.columnSpan===2),a(2),m((t=r.type)===l.FormFieldType.TITLE?3:t===l.FormFieldType.TEXT_FIELD?4:t===l.FormFieldType.TEXT_AREA?5:t===l.FormFieldType.DATE?6:t===l.FormFieldType.CHECKBOX?7:t===l.FormFieldType.CHECKBOX_GROUP?8:t===l.FormFieldType.RADIO_GROUP?9:t===l.FormFieldType.SELECT?10:t===l.FormFieldType.FILE_UPLOAD?11:t===l.FormFieldType.TOGGLE?12:-1)}}function Ei(n,d){if(n&1){let t=M();e(0,` 684 `),i(1,"button",44),h("click",function(){v(t);let l=s(3);return b(l.nextStep())}),e(2,` 685 Next 686 `),o(),e(3,` 687 `)}if(n&2){let t=s(3);a(),_("disabled",!t.canGoToNextStep()||!t.isCurrentStepValid())}}function wi(n,d){if(n&1&&(e(0,` 688 `),i(1,"button",45),e(2,` 689 Submit 690 `),o(),e(3,` 691 `)),n&2){let t=s(3);a(),_("disabled",!t.isCurrentStepValid())}}function Ti(n,d){if(n&1){let t=M();e(0,` 692 `),i(1,"div",41),e(2,` 693 `),i(3,"button",42),h("click",function(){v(t);let l=s(2);return b(l.previousStep())}),e(4,` 694 Previous 695 `),o(),e(5,` 696 `),i(6,"div",43),e(7),o(),e(8,` 697 `),c(9,Ei,4,1),c(10,wi,4,1),o(),e(11,` 698 `)}if(n&2){let t=s(2);a(3),_("disabled",!t.canGoToPreviousStep()),a(4),T(` 699 Step `,t.currentStepIndex+1," of ",t.configuration.steps==null?null:t.configuration.steps.length,` 700 `),a(2),m(t.canGoToNextStep()?9:-1),a(),m(t.canGoToNextStep()?-1:10)}}function ki(n,d){if(n&1&&(e(0,` 701`),i(1,"form",1),e(2,` 702 `),c(3,En,7,1),c(4,wn,7,1),c(5,kn,9,0),i(6,"div",2),e(7,` 703 `),e(8,` 704 `),c(9,Dn,8,2),i(10,"div",3),e(11,` 705 `),O(12,Fi,15,3,null,null,ue().trackByFieldId,!0),o(),e(14,` 706 `),o(),e(15,` 707 `),e(16,` 708 `),c(17,Ti,12,5),o(),e(18,` 709`)),n&2){let t,r,l=s();a(),_("formGroup",l.rendererForm),a(2),m(l.configuration.title?3:-1),a(),m(l.configuration.description?4:-1),a(),m(l.isMultiStep()&&l.configuration.steps?5:-1),a(4),m(l.isMultiStep()&&l.getCurrentStep()?9:-1),a(),F("tw
709o-column",((t=l.getCurrentStep())==null?null:t.layout)===l.FormLayoutType.TWO_COLUMN)("single-column",!l.getCurrentStep()||((r=l.getCurrentStep())==null?null:r.layout)===l.FormLayoutType.SINGLE_COLUMN),a(2),P(l.getCurrentStepFields()),a(5),m(l.isMultiStep()&&!l.preview?17:-1)}}var lt=(()=>{let d=class d{constructor(r){this.fb=r,this.preview=!1,this.data={},this.FormFieldType=u,this.FormLayoutType=E,this.currentStepIndex=0}ngOnInit(){this.buildForm()}ngOnChanges(){this.configuration&&this.buildForm()}buildForm(){let r={};this.getAllFields().forEach(p=>{if(p.type===u.TITLE)return;let x=this.getValidators(p),C=this.getDefaultValue(p);if(p.type===u.CHECKBOX_GROUP){let ne=this.fb.array([]);p.properties.options?.forEach(()=>{ne.push(this.fb.control(!1))}),r[p.id]=ne}else r[p.id]=this.fb.control(C,x)}),this.rendererForm=this.fb.group(r),this.data&&Object.keys(this.data).length>0&&this.rendererForm.patchValue(this.data)}getValidators(r){let l=[],p=r.properties.validation;return p?.required&&l.push(I.required),p?.minLength&&l.push(I.minLength(p.minLength)),p?.maxLength&&l.push(I.maxLength(p.maxLength)),p?.min!==void 0&&l.push(I.min(p.min)),p?.max!==void 0&&l.push(I.max(p.max)),p?.email&&l.push(I.email),p?.pattern&&l.push(I.pattern(p.pattern)),l}getDefaultValue(r){switch(r.type){case u.CHECKBOX:case u.TOGGLE:return r.properties.defaultValue||!1;case u.FILE_UPLOAD:return null;default:return r.properties.defaultValue||""}}getFormControl(r){return this.rendererForm.get(r)}getFormArray(r){return this.rendererForm.get(r)}isFieldInvalid(r){let l=this.getFormControl(r);return l?l.invalid&&(l.dirty||l.touched):!1}getFieldErrors(r){let l=this.getFormControl(r),p=[];return l?.errors&&(l.errors.required&&p.push("This field is required"),l.errors.minlength&&p.push(`Minimum length is ${l.errors.minlength.requiredLength}`),l.errors.maxlength&&p.push(`Maximum length is ${l.errors.maxlength.requiredLength}`),l.errors.min&&p.push(`Minimum value is ${l.errors.min.min}`),l.errors.max&&p.push(`Maximum value is ${l.errors.max.max}`),l.errors.email&&p.push("Please enter a valid email address"),l.errors.pattern&&p.push("Please enter a valid format")),p}onCheckboxGroupChange(r,l,p){this.getFormArray(r).at(l).setValue(p)}onFileChange(r,l){let p=l.target.files,x=this.getFormControl(r);p&&p.length>0?x.setValue(p.length===1?p[0]:Array.from(p)):x.setValue(null)}getFormData(){if(!this.rendererForm)return{};let r=w({},this.rendererForm.value);return this.configuration.fields.forEach(l=>{if(l.type===u.CHECKBOX_GROUP){let p=r[l.id],x=[];l.properties.options?.forEach((C,ne)=>{p[ne]&&x.push(C.value)}),r[l.id]=x}}),r}isFormValid(){return this.rendererForm?this.rendererForm.valid:!1}markAllFieldsTouched(){this.rendererForm&&this.rendererForm.markAllAsTouched()}getAllFields(){return this.configuration.multiStep&&this.configuration.steps?this.configuration.steps.flatMap(r=>r.fields):this.configuration.fields||[]}getCurrentStep(){return this.configuration.multiStep&&this.configuration.steps&&this.configuration.steps[this.currentStepIndex]||null}getCurrentStepFields(){let r=this.getCurrentStep();return r?r.fields:this.getAllFields()}isMultiStep(){return this.configuration.multiStep||!1}nextStep(){this.canGoToNextStep()&&this.currentStepIndex++}previousStep(){this.canGoToPreviousStep()&&this.currentStepIndex--}canGoToNextStep(){return this.isMultiStep()?this.currentStepIndex<(this.configuration.steps?.length||0)-1:!1}canGoToPreviousStep(){return this.isMultiStep()?this.currentStepIndex>0:!1}isCurrentStepValid(){return this.getCurrentStepFields().every(l=>{let p=this.rendererForm.get(l.id);return!p||p.valid})}trackByFieldId(r,l){return l.id}trackByStepId(r,l){return l.id}};d.\u0275fac=function(l){return new(l||d)(j(pe))},d.\u0275cmp=k({type:d,selectors:[["app-form-renderer"]],inputs:{configuration:"configuration",preview:"preview",data:"data"},standalone:!1,features:[H],decls:1,vars:1,consts:[["checkboxInput",""],[1,"form-renderer",3,"formGroup"],[1,"form-content"],[1,"form-fields"],[1,"form-title"],[1,"form-description"],[1,"step-progress"],[1,"step-indicators"],[1,"step-indicator"],[1,"step-number"],[1,"step-title"],[1,"current-step-header"],[1,"step-description"],[1,"form-field"],[1,"field-title"],[1,"field-description"],[1,"field-group"],[3,"for"],["type","text",1,"form-control",3,"id","formControlName","placeholder","readonly"],[1,"required"],[1,"invalid-feedback"],[1,"form-control",3,"id","formControlName","rows","placeholder","readonly"],["type","date",1,"form-control",3,"id","formControlName","readonly"],[1,"form-check"],["type","checkbox",1,"form-check-input",3,"id","formControlName","disabled"],[1,"form-check-label",3,"for"],[1,"field-label"],[1,"checkbox-group"],["type","checkbox",1,"form-check-input",3,"change","id","value","disabled"],[1,"radio-group"],["type","radio",1,"form-check-input",3,"id","formControlName","value","disabled"],[1,"form-control",3,"id","formControlName","disabled"],["value",""],[3,"value"],["type","file",1,"form-control",3,"change","id","accept","multiple","disabled"],[1,"file-info"],[1,"toggle-field"],[1,"toggle-label",3,"for"],[1,"toggle-switch"],["type","checkbox",3,"id","formControlName","disabled"],[1,"slider"],[1,"step-navigation"],["type","button",1,"btn","btn-secondary",3,"click","disabled"],[1,"step-info"],["type","button",1,"btn","btn-primary",3,"click","disabled"],["type","submit",1,"btn","btn-success",3,"disabled"]],template:function(l,p){l&1&&c(0,ki,19,10),l&2&&m(p.rendererForm?0:-1)},dependencies:[le,B,A,G,Y,U,Fe,R,re,de,ae,$e],styles:['@charset "UTF-8";.form-renderer[_ngcontent-%COMP%]{padding:20px;background:var(--color-white);border-radius:8px;box-shadow:0 2px 8px #0000001a}.form-renderer__title[_ngcontent-%COMP%]{margin-bottom:24px;color:var(--grey-900);font-size:var(--text-larger);font-weight:600}.form-renderer__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.form-renderer__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.form-renderer__field--horizontal[_ngcontent-%COMP%]{flex-direction:row;align-items:center;gap:12px}.form-renderer__field--horizontal[_ngcontent-%COMP%] .form-renderer__label[_ngcontent-%COMP%]{margin-bottom:0;min-width:fit-content}.form-renderer__label[_ngcontent-%COMP%]{font-weight:500;color:#555;margin-bottom:4px;font-size:var(--text-medium)}.form-renderer__label--required[_ngcontent-%COMP%]:after{content:" *";
709color:#e74c3c}.form-renderer__label--title[_ngcontent-%COMP%]{font-size:var(--text-large);font-weight:600;color:var(--grey-900);margin-bottom:8px}.form-renderer__input[_ngcontent-%COMP%]{padding:12px;border:1px solid #ddd;border-radius:6px;font-size:var(--text-medium);transition:border-color .3s ease,box-shadow .3s ease}.form-renderer__input[_ngcontent-%COMP%]:focus{outline:none;border-color:#007bff;box-shadow:0 0 0 3px #007bff1a}.form-renderer__input--error[_ngcontent-%COMP%]{border-color:#e74c3c;box-shadow:0 0 0 3px #e74c3c1a}.form-renderer__input--textarea[_ngcontent-%COMP%]{min-height:100px;resize:vertical}.form-renderer__input--file[_ngcontent-%COMP%]{padding:8px;cursor:pointer}.form-renderer__input--file[_ngcontent-%COMP%]::-webkit-file-upload-button{background:#007bff;color:#fff;border:none;padding:8px 16px;border-radius:4px;margin-right:12px;cursor:pointer;font-size:var(--text-small)}.form-renderer__select[_ngcontent-%COMP%]{padding:12px;border:1px solid #ddd;border-radius:6px;font-size:var(--text-medium);background:#fff;cursor:pointer;transition:border-color .3s ease,box-shadow .3s ease}.form-renderer__select[_ngcontent-%COMP%]:focus{outline:none;border-color:#007bff;box-shadow:0 0 0 3px #007bff1a}.form-renderer__select--error[_ngcontent-%COMP%]{border-color:#e74c3c;box-shadow:0 0 0 3px #e74c3c1a}.form-renderer__checkbox-group[_ngcontent-%COMP%], .form-renderer__radio-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;padding:12px;border:1px solid #eee;border-radius:6px;background:#fafafa}.form-renderer__checkbox-group--horizontal[_ngcontent-%COMP%], .form-renderer__radio-group--horizontal[_ngcontent-%COMP%]{flex-direction:row;flex-wrap:wrap;gap:20px}.form-renderer__checkbox-group--error[_ngcontent-%COMP%], .form-renderer__radio-group--error[_ngcontent-%COMP%]{border-color:#e74c3c;background:#fef5f5}.form-renderer__option[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;cursor:pointer;transition:background-color .2s ease;padding:4px 8px;border-radius:4px}.form-renderer__option[_ngcontent-%COMP%]:hover{background:#007bff0d}.form-renderer__option[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%], .form-renderer__option[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{margin:0;cursor:pointer}.form-renderer__option[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:pointer;margin:0;font-size:var(--text-medium);color:#555}.form-renderer__toggle[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;cursor:pointer;-webkit-user-select:none;user-select:none}.form-renderer__toggle[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{display:none}.form-renderer__toggle-switch[_ngcontent-%COMP%]{position:relative;width:50px;height:24px;background:#ccc;border-radius:12px;transition:background-color .3s ease;cursor:pointer}.form-renderer__toggle-switch[_ngcontent-%COMP%]:before{content:"";position:absolute;top:2px;left:2px;width:20px;height:20px;background:#fff;border-radius:50%;transition:transform .3s ease;box-shadow:0 2px 4px #0003}.form-renderer__toggle-switch--checked[_ngcontent-%COMP%]{background:#007bff}.form-renderer__toggle-switch--checked[_ngcontent-%COMP%]:before{transform:translate(26px)}.form-renderer__toggle-label[_ngcontent-%COMP%]{font-size:var(--text-medium);color:#555;cursor:pointer}.form-renderer__error[_ngcontent-%COMP%]{color:#e74c3c;font-size:var(--text-small);margin-top:4px;display:flex;align-items:center;gap:4px}.form-renderer__error[_ngcontent-%COMP%]:before{content:"\\26a0";font-size:var(--text-small)}.form-renderer__help-text[_ngcontent-%COMP%]{color:var(--grey-700);font-size:var(--text-small);margin-top:4px;font-style:italic}.form-renderer__actions[_ngcontent-%COMP%]{margin-top:32px;padding-top:20px;border-top:1px solid #eee;display:flex;gap:12px;flex-wrap:wrap}.form-renderer__submit-btn[_ngcontent-%COMP%]{background:#28a745;color:#fff;border:none;padding:12px 24px;border-radius:6px;font-size:var(--text-medium);font-weight:500;cursor:pointer;transition:background-color .3s ease,transform .1s ease}.form-renderer__submit-btn[_ngcontent-%COMP%]:hover:not(:disabled){background:#218838;transform:translateY(-1px)}.form-renderer__submit-btn[_ngcontent-%COMP%]:disabled{background:var(--grey-700);cursor:not-allowed;transform:none}.form-renderer__reset-btn[_ngcontent-%COMP%]{background:var(--grey-700);color:#fff;border:none;padding:12px 24px;border-radius:6px;font-size:var(--text-medium);font-weight:500;cursor:pointer;transition:background-color .3s ease,transform .1s ease}.form-renderer__reset-btn[_ngcontent-%COMP%]:hover{background:#5a6268;transform:translateY(-1px)}@media(max-width:768px){.form-renderer[_ngcontent-%COMP%]{padding:16px}.form-renderer__title[_ngcontent-%COMP%]{font-size:var(--text-large);margin-bottom:20px}.form-renderer__field[_ngcontent-%COMP%]{gap:6px}.form-renderer__field--horizontal[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;gap:6px}.form-renderer__field--horizontal[_ngcontent-%COMP%] .form-renderer__label[_ngcontent-%COMP%]{margin-bottom:4px}.form-renderer__checkbox-group--horizontal[_ngcontent-%COMP%], .form-renderer__radio-group--horizontal[_ngcontent-%COMP%]{flex-direction:column;gap:12px}.form-renderer__actions[_ngcontent-%COMP%]{flex-direction:column}.form-renderer__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}}.form-renderer__field[_ngcontent-%COMP%]:focus-within .form-renderer__label[_ngcontent-%COMP%]{color:#007bff}.form-renderer__field--invalid[_ngcontent-%COMP%] .form-renderer__label[_ngcontent-%COMP%]{color:#e74
709c3c}.form-renderer__field--valid[_ngcontent-%COMP%] .form-renderer__input[_ngcontent-%COMP%], .form-renderer__field--valid[_ngcontent-%COMP%] .form-renderer__select[_ngcontent-%COMP%]{border-color:#28a745}@media(prefers-color-scheme:dark){.form-renderer[_ngcontent-%COMP%]{background:#2d3748;color:#e2e8f0}.form-renderer__title[_ngcontent-%COMP%], .form-renderer__label[_ngcontent-%COMP%]{color:#e2e8f0}.form-renderer__input[_ngcontent-%COMP%], .form-renderer__select[_ngcontent-%COMP%]{background:#4a5568;border-color:#2d3748;color:#e2e8f0}.form-renderer__input[_ngcontent-%COMP%]:focus, .form-renderer__select[_ngcontent-%COMP%]:focus{border-color:#4299e1;box-shadow:0 0 0 3px #4299e11a}.form-renderer__checkbox-group[_ngcontent-%COMP%], .form-renderer__radio-group[_ngcontent-%COMP%]{background:#4a5568;border-color:#2d3748}.form-renderer__option[_ngcontent-%COMP%]:hover{background:#4299e11a}.form-renderer__toggle-switch[_ngcontent-%COMP%]{background:#2d3748}.form-renderer__toggle-switch--checked[_ngcontent-%COMP%]{background:#4299e1}}.step-progress[_ngcontent-%COMP%]{margin-bottom:2rem}.step-progress[_ngcontent-%COMP%] .step-indicators[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;gap:2rem;margin-bottom:1.5rem}.step-progress[_ngcontent-%COMP%] .step-indicators[_ngcontent-%COMP%] .step-indicator[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;text-align:center;position:relative}.step-progress[_ngcontent-%COMP%] .step-indicators[_ngcontent-%COMP%] .step-indicator[_ngcontent-%COMP%]:not(:last-child):after{content:"";position:absolute;top:15px;left:100%;width:2rem;height:2px;background:#dee2e6;z-index:1}.step-progress[_ngcontent-%COMP%] .step-indicators[_ngcontent-%COMP%] .step-indicator.completed[_ngcontent-%COMP%]:after{background:#28a745}.step-progress[_ngcontent-%COMP%] .step-indicators[_ngcontent-%COMP%] .step-indicator[_ngcontent-%COMP%] .step-number[_ngcontent-%COMP%]{width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#dee2e6;color:var(--grey-700);font-weight:600;font-size:var(--text-medium);margin-bottom:.5rem;position:relative;z-index:2}.step-progress[_ngcontent-%COMP%] .step-indicators[_ngcontent-%COMP%] .step-indicator.active[_ngcontent-%COMP%] .step-number[_ngcontent-%COMP%]{background:#007bff;color:#fff}.step-progress[_ngcontent-%COMP%] .step-indicators[_ngcontent-%COMP%] .step-indicator.completed[_ngcontent-%COMP%] .step-number[_ngcontent-%COMP%]{background:#28a745;color:#fff}.step-progress[_ngcontent-%COMP%] .step-indicators[_ngcontent-%COMP%] .step-indicator[_ngcontent-%COMP%] .step-title[_ngcontent-%COMP%]{font-size:var(--text-small);font-weight:500;color:var(--grey-700);max-width:80px}.step-progress[_ngcontent-%COMP%] .step-indicators[_ngcontent-%COMP%] .step-indicator.active[_ngcontent-%COMP%] .step-title[_ngcontent-%COMP%]{color:#007bff}.step-progress[_ngcontent-%COMP%] .step-indicators[_ngcontent-%COMP%] .step-indicator.completed[_ngcontent-%COMP%] .step-title[_ngcontent-%COMP%]{color:#28a745}.current-step-header[_ngcontent-%COMP%]{margin-bottom:1.5rem}.current-step-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 .5rem;color:var(--grey-900);font-size:var(--text-large);font-weight:600}.current-step-header[_ngcontent-%COMP%] .step-description[_ngcontent-%COMP%]{margin:0;color:var(--grey-700);font-size:var(--text-medium)}.form-fields.two-column[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-fields.two-column[_ngcontent-%COMP%] .form-field.full-width[_ngcontent-%COMP%]{grid-column:1/-1}.form-fields.single-column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.step-navigation[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-top:2rem;padding-top:1rem;border-top:1px solid #dee2e6}.step-navigation[_ngcontent-%COMP%] .step-info[_ngcontent-%COMP%]{font-size:var(--text-medium);color:var(--grey-700);font-weight:500}.step-navigation[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{min-width:100px}']});let n=d;return n})();function Di(n,d){if(n&1&&(e(0,` 710 `),i(1,"span",9),e(2),o(),e(3,` 711 `)),n&2){let t=s(2);a(2),g(t.configuration.title)}}function Li(n,d){if(n&1&&(e(0,` 712 `),i(1,"div",4),e(2,` 713 `),i(3,"div",5),e(4,` 714 `),f(5,"i",6),e(6,` 715 `),i(7,"span"),e(8,"Form Preview"),o(),e(9,` 716 `),c(10,Di,4,1),o(),e(11,` 717 `),i(12,"div",7),e(13,` 718 `),i(14,"app-form-renderer",8),e(15,` 719 `),o(),e(16,` 720 `),o(),e(17,` 721 `),o(),e(18,` 722 `)),n&2){let t=s();a(10),m(t.configuration.title?10:-1),a(4),_("configuration",t.configuration)("preview",!0)}}function Ni(n,d){if(n&1){let t=M();e(0,` 723 `),i(1,"div",10),e(2,` 724 `),i(3,"app-field-properties-editor",11),h("fieldChange",function(l){v(t);let p=s();return b(p.onFieldPropertiesChange(l))}),e(4,` 725 `),o(),e(5,` 726 `),o(),e(6,` 727 `)}if(n&2){let t=s();a(3),_("field",t.selectedField)}}var at=(()=>{let d=class d{constructor(){this.configuration={steps:[],multiStep:!0},this.readonly=!1,this.showPreview=!0,this.showProperties=!0,this.configurationChange=new V,this.selectedField=null}onConfigurationChange(r){this.configuration=r,this.configurationChange.emit(r)}onFieldSelected(r){this.selectedField=r}onFieldPropertiesChange(r){for(let l of this.configuration.steps){let p=l.fields.findIndex(x=>x.id===r.id);if(p>-1){l.fields[p]=r,this.configurationChange.emit(w({},this.configuration));return}}if(this.configuration.fields){let l=this.configuration.fields.findIndex(p=>p.id===r.id);l>-1&&(this.configuration.fields[l]=r,this.configurationChange.emit(w({},this.configuration)))}}exportConfiguration(){return JSON.stringify(this.configuration,null,2)}importConfiguration(r){try{let l=JSON.parse(r);this.configuration=l,this.selectedField=null,this.configurationChange.emit(this.configuration)}catch(l){console.error("Invalid JSON configuration:",l)}}hasAnyFields(){return this.configuration.steps&&this.configuration.steps.length>0?this.configuration.steps.some(r=>r.fields&&r.fields.length>0):this.configuration.fields?this.configuration.fields.length>0:!1}};d.\u0275fac=function(l){return new(l||d)}
727,d.\u0275cmp=k({type:d,selectors:[["app-form-builder-container"]],inputs:{configuration:"configuration",readonly:"readonly",showPreview:"showPreview",showProperties:"showProperties"},outputs:{configurationChange:"configurationChange"},standalone:!1,decls:18,vars:4,consts:[[1,"form-builder-container"],[1,"builder-layout"],[1,"builder-main"],[3,"configurationChange","fieldSelected","configuration","readonly"],[1,"form-live-preview"],[1,"preview-header"],[1,"fa-regular","fa-eye"],[1,"preview-content"],[3,"configuration","preview"],[1,"preview-subtitle"],[1,"builder-properties"],[3,"fieldChange","field"]],template:function(l,p){l&1&&(i(0,"div",0),e(1,` 728 `),e(2,` 729 `),c(3,Li,19,3),i(4,"div",1),e(5,` 730 `),e(6,` 731 732 `),e(7,` 733 `),i(8,"div",2),e(9,` 734 `),i(10,"app-form-builder",3),h("configurationChange",function(C){return p.onConfigurationChange(C)})("fieldSelected",function(C){return p.onFieldSelected(C)}),e(11,` 735 `),o(),e(12,` 736 `),o(),e(13,` 737 738 `),e(14,` 739 `),c(15,Ni,7,1),o(),e(16,` 740`),o(),e(17,` 741`)),l&2&&(a(3),m(p.showPreview&&p.hasAnyFields()?3:-1),a(7),_("configuration",p.configuration)("readonly",p.readonly),a(5),m(p.showProperties?15:-1))},dependencies:[ot,rt,lt],styles:[`.form-builder-container .builder-layout{display:flex;height:600px;border:1px solid #e0e0e0;border-radius:4px;overflow:hidden}.form-builder-container .builder-layout .builder-main{flex:1;min-width:0}.form-builder-container .builder-layout .builder-properties{width:350px;border-left:1px solid #e0e0e0;background:#fff;overflow-y:auto}.form-builder-container .builder-preview{margin-top:1rem;border:1px solid #e0e0e0;border-radius:4px;background:#fff}.form-builder-container .builder-preview .preview-header{padding:1rem;border-bottom:1px solid #e0e0e0;background:#f8f9fa}.form-builder-container .builder-preview .preview-header h4{margin:0;font-size:var(--text-default);font-weight:600;color:#495057;display:flex;align-items:center;gap:.5rem}.form-builder-container .builder-preview .preview-content{padding:1rem;max-height:400px;overflow-y:auto}@media(max-width:768px){.form-builder-container .builder-layout{flex-direction:column;height:auto}.form-builder-container .builder-layout .builder-properties{width:100%;border-left:none;border-top:1px solid #e0e0e0;max-height:400px}} 742`],encapsulation:2});let n=d;return n})();var dt=(()=>{let d=class d{};d.\u0275fac=function(l){return new(l||d)},d.\u0275mod=J({type:d}),d.\u0275inj=X({imports:[oe,ce,se,je,Ye]});let n=d;return n})();var pt=()=>({width:"80vw",maxWidth:"800px"});function Ri(n,d){if(n&1){let t=M();e(0,` 743 `),i(1,"button",8),h("click",function(){let l=v(t).$implicit,p=s();return b(p.loadSampleConfiguration(l))}),e(2,` 744 `),f(3,"i",24),e(4),o(),e(5,` 745 `)}if(n&2){let t=d.$implicit;a(4),S("",t.name,` 746 `)}}function Bi(n,d){if(n&1&&(e(0,` 747 `),i(1,"div",25),e(2,` 748 `),i(3,"h2"),e(4,` 749 `),f(5,"i",26),e(6,` 750 Form Builder 751 `),o(),e(7," "),i(8,"span",27),e(9),o(),e(10,` 752 `),o(),e(11,` 753 `)),n&2){let t=s();a(9),S(` 754 Fields: `,t.getTotalFieldCount(),` 755 `)}}function Ai(n,d){if(n&1){let t=M();e(0,` 756 `),i(1,"app-dialog-footer"),e(2,` 757 `),$(3,28),e(4,` 758 `),i(5,"button",29),h("click",function(){v(t);let l=s();return b(l.showExportDialog=!1)}),e(6,"Close"),o(),e(7,` 759 `),q(),e(8,` 760 `),$(9,30),e(10,` 761 `),q(),e(11,` 762 `),o(),e(12,` 763 `)}}function zi(n,d){if(n&1){let t=M();e(0,` 764 `),i(1,"app-dialog-footer"),e(2,` 765 `),$(3,28),e(4,` 766 `),i(5,"button",31),h("click",function(){v(t);let l=s();return b(l.showImportDialog=!1)}),e(6,"Cancel"),o(),e(7,` 767 `),q(),e(8,` 768 `),$(9,30),e(10,` 769 `),i(11,"button",32),h("click",function(){v(t);let l=s();return b(l.importConfiguration())}),e(12,"Import"),o(),e(13,` 770 `),q(),e(14,` 771 `),o(),e(15,` 772 `)}if(n&2){let t=s();a(11),_("disabled",!t.importJson.trim())}}var st=(()=>{let d=class d{constructor(r,l){this.siteDataService=r,this.messageService=l,this.currentConfiguration={title:"Demo Form",description:"This is a demo form created with the form builder",steps:[],multiStep:!0},this.exportedJson="",this.importJson="",this.showImportDialog=!1,this.showExportDialog=!1,this.sampleConfigurations=[{name:"Contact Form",config:{title:"Contact Us",description:"Please fill out this form to get in touch with us",steps:[{id:"step1",title:"Contact Information",description:"Please provide your contact details",layout:E.SINGLE_COLUMN,order:0,required:!0,fields:[{id:"name",type:u.TEXT_FIELD,order:0,properties:{label:"Full Name",placeholder:"Enter your full name",validation:{required:!0,minLength:2},columnSpan:1}},{id:"email",type:u.TEXT_FIELD,order:1,properties:{label:"Email Address",placeholder:"Enter your email",validation:{required:!0,email:!0},columnSpan:1}},{id:"message",type:u.TEXT_AREA,order:2,properties:{label:"Message",placeholder:"Enter your message here...",rows:5,validation:{required:!0,minLength:10},columnSpan:1}}]}],multiStep:!0}},{name:"Registration Form",config:{title:"User Registration",description:"Create your account by filling out the form below",steps:[{id:"step1",title:"Personal Information",description:"Basic information about yourself",layout:E.TWO_COLUMN,order:0,required:!0,fields:[{id:"username",type:u.TEXT_FIELD,order:0,properties:{label:"Username",placeholder:"Choose a username",validation:{required:!0,minLength:3,maxLength:20},columnSpan:1}},{id:"birthdate",type:u.DATE,order:1,properties:{label:"Date of Birth",validation:{required:!0},columnSpan:1}},{id:"interests",type:u.CHECKBOX_GROUP,order:2,properties:{label:"Interests",options:[{label:"Sports",value:"sports"},{label:"Technology",value:"tech"},{label:"Music",value:"music"},{label:"Travel",value:"travel"}],validation:{required:!0},columnSpan:2}},{id:"newsletter",type:u.CHECKBOX,order:3,properties:{label:"Subscribe to newsletter",defaultValue:!1,validation:{},columnSpan:2}}]}],multiStep:!0}},{name:"Survey Form",config:{title:"Customer Satisfaction Survey",description:"Help us improve our services",steps:[{id:"step1",title:"Satisfaction Survey",description:"Rate your experience with our service",layout:E.SINGLE_COLUMN,order:0,required:!0,fields:[{id:"satisfaction",type:u.RADIO_GROUP,order:0,properties:{label:"How satisfied are you with our service?",options:[{label:"Very Satisfied",value:5},{label:"Satisfied",value:4},{label:"Neutral",value:3},{label:"Dissatisfied",value:2},{label:"Very Dissatisfied",value:1}],validation:{required:!0},columnSpan:1}},{id:"recommendation",type:u.SELECT,order:1,properties:{label:"Would you recommend us to others?",options:[{label:"Definitely",value:"definitely"},{label:"Probably",value:"probably"},{label:"Not sure",value:"not_sure"},{label:"Probably not",value:"probably_not"},{label:"Definitely not",value:"definitely_not"}],validation:{required:!0},columnSpan:1}},{id:"feedback",type:u.TEXT_AREA,order:2,properties:{label:"Additional Feedback",placeholder:"Please share any additional thoughts...",rows:4,validation:{},columnSpan:1}}]}],multiStep:!0}}]}
772ngOnInit(){this.siteDataService.hideSiteLoader(),this.currentConfiguration={title:"New Form",description:"Start building your form by dragging fields from the toolbar",steps:[],multiStep:!0}}onConfigurationChange(r){this.currentConfiguration=r}loadSampleConfiguration(r){this.currentConfiguration=w({},r.config),this.messageService.add({severity:"success",summary:"Sample Loaded",detail:`${r.name} has been loaded successfully`})}clearForm(){this.currentConfiguration={title:"New Form",description:"Start building your form by dragging fields from the toolbar",steps:[],multiStep:!0},this.messageService.add({severity:"info",summary:"Form Cleared",detail:"The form has been cleared"})}exportConfiguration(){this.exportedJson=JSON.stringify(this.currentConfiguration,null,2),this.showExportDialog=!0}openImportDialog(){this.importJson="",this.showImportDialog=!0}importConfiguration(){try{let r=JSON.parse(this.importJson);this.currentConfiguration=r,this.showImportDialog=!1,this.messageService.add({severity:"success",summary:"Import Successful",detail:"Configuration imported successfully"})}catch(r){this.messageService.add({severity:"error",summary:"Import Failed",detail:"Invalid JSON format. Please check your configuration."})}}copyToClipboard(){navigator.clipboard.writeText(this.exportedJson).then(()=>{this.messageService.add({severity:"success",summary:"Copied",detail:"Configuration copied to clipboard"})})}downloadConfiguration(){let r=new Blob([this.exportedJson],{type:"application/json"}),l=window.URL.createObjectURL(r),p=document.createElement("a");p.href=l,p.download=`form-configuration-${new Date().toISOString().split("T")[0]}.json`,p.click(),window.URL.revokeObjectURL(l),this.messageService.add({severity:"success",summary:"Downloaded",detail:"Configuration downloaded successfully"})}getTotalFieldCount(){return this.currentConfiguration.steps&&this.currentConfiguration.steps.length>0?this.currentConfiguration.steps.reduce((r,l)=>r+(l.fields?l.fields.length:0),0):this.currentConfiguration.fields?.length||0}};d.\u0275fac=function(l){return new(l||d)(j(De),j(me))},d.\u0275cmp=k({type:d,selectors:[["app-form-builder-demo"]],standalone:!1,features:[Me([me])],decls:111,vars:22,consts:[[1,"form-builder-demo"],[1,"demo-header"],[1,"fa-regular","fa-hammer"],[1,"demo-description"],[1,"demo-toolbar"],[1,"toolbar-section"],[1,"sample-buttons"],[1,"action-buttons"],["type","button",1,"btn","btn-naked","btn-sm",3,"click"],[1,"fa-regular","fa-trash","mr-1"],[1,"fa-regular","fa-upload","mr-1"],[1,"fa-regular","fa-download","mr-1"],[1,"demo-content"],["pTemplate","header"],[3,"configurationChange","configuration","readonly","showPreview","showProperties"],["header","Export Form Configuration",3,"visibleChange","visible","modal","draggable","resizable"],[1,"export-content"],[1,"export-actions"],[1,"fa-regular","fa-copy","mr-1"],["pInputTextarea","","readonly","",1,"export-textarea",3,"value","rows"],["pTemplate","footer"],["header","Import Form Configuration",3,"visibleChange","visible","modal","draggable","resizable"],[1,"import-content"],["pInputTextarea","","placeholder","Paste your JSON configuration here...",1,"import-textarea",3,"ngModelChange","ngModel","rows"],[1,"fa-regular","fa-file","mr-1"],[1,"card-header"],[1,"fa-regular","fa-gear"],[1,"field-count"],["slot","secondary"],["type","button",1,"btn",3,"click"],["slot","primary"],["type","button",1,"btn","btn-naked",3,"click"],["type","button",1,"btn","btn-primary",3,"click","disabled"]],template:function(l,p){l&1&&(i(0,"div",0),e(1,` 773 `),f(2,"p-toast"),e(3,` 774 775 `),e(4,` 776 `),i(5,"div",1),e(6,` 777 `),i(7,"h1"),e(8,` 778 `),f(9,"i",2),e(10,` 779 Form Builder Demo 780 `),o(),e(11,` 781 `),i(12,"p",3),e(13,` 782 Test and explore the form builder functionality. Create forms by dragging and dropping fields, 783 configure properties, and see live previews. 784 `),o(),e(14,` 785 `),o(),e(15,` 786 787 `),e(16,` 788 `),i(17,"div",4),e(18,` 789 `),i(19,"div",5),e(20,` 790 `),i(21,"h3"),e(22,"Quick Start"),o(),e(23,` 791 `),i(24,"div",6),e(25,` 792 `),O(26,Ri,6,1,null,null,y),o(),e(28,` 793 `),o(),e(29,` 794 795 `),i(30,"div",5),e(31,` 796 `),i(32,"h3"),e(33,"Actions"),o(),e(34,` 797 `),i(35,"div",7),e(36,` 798 `),i(37,"button",8),h("click",function(){return p.clearForm()}),e(38,` 799 `),f(39,"i",9),e(40,`Clear Form 800 `),o(),e(41,` 801 802 `),i(42,"button",8),h("click",function(){return p.openImportDialog()}),e(43,` 803 `),f(44,"i",10),e(45,`Import 804 `),o(),e(46,` 805 806 `),i(47,"button",8),h("click",function(){return p.exportConfiguration()}),e(48,` 807 `),f(49,"i",11),e(50,`Export 808 `),o(),e(51,` 809 `),o(),e(52,` 810 `),o(),e(53,` 811 `),o(),e(54,` 812 813 `),e(55,` 814 `),i(56,"div",12),e(57,` 815 `),i(58,"p-card"),e(59,` 816 `),K(60,Bi,12,1,"ng-template",13),e(61,` 817
818 `),i(62,"app-form-builder-container",14),h("configurationChange",function(C){return p.onConfigurationChange(C)}),e(63,` 819 `),o(),e(64,` 820 821 `),o(),e(65,` 822`),o(),e(66,` 823 824`),e(67,` 825`),i(68,"p-dialog",15),N("visibleChange",function(C){return L(p.showExportDialog,C)||(p.showExportDialog=C),C}),e(69,` 826 827 `),i(70,"div",16),e(71,` 828 `),i(72,"p"),e(73,"Copy the JSON configuration below or download it as a file:"),o(),e(74,` 829 830 `),i(75,"div",17),e(76,` 831 `),i(77,"button",8),h("click",function(){return p.copyToClipboard()}),e(78,` 832 `),f(79,"i",18),e(80,`Copy to Clipboard 833 `),o(),e(81,` 834 835 `),i(82,"button",8),h("click",function(){return p.downloadConfiguration()}),e(83,` 836 `),f(84,"i",11),e(85,`Download File 837 `),o(),e(86,` 838 `),o(),e(87,` 839 840 `),i(88,"textarea",19),e(89," "),o(),e(90,` 841 `),o(),e(91,` 842 843 `),K(92,Ai,13,0,"ng-template",20),e(93,` 844`),o(),e(94,` 845 846`),e(95,` 847`),i(96,"p-dialog",21),N("visibleChange",function(C){return L(p.showImportDialog,C)||(p.showImportDialog=C),C}),e(97,` 848 849 `),i(98,"div",22),e(99,` 850 `),i(100,"p"),e(101,"Paste your JSON configuration below:"),o(),e(102,` 851 852 `),i(103,"textarea",23),N("ngModelChange",function(C){return L(p.importJson,C)||(p.importJson=C),C}),e(104," "),o(),e(105,` 853 `),o(),e(106,` 854 855 `),K(107,zi,16,1,"ng-template",20),e(108,` 856`),o(),e(109,` 857 858`),o(),e(110,` 859`)),l&2&&(a(26),P(p.sampleConfigurations),a(36),_("configuration",p.currentConfiguration)("readonly",!1)("showPreview",!0)("showProperties",!0),a(6),ge(Ce(20,pt)),D("visible",p.showExportDialog),_("modal",!0)("draggable",!1)("resizable",!0),a(20),_("value",p.exportedJson)("rows",20),a(8),ge(Ce(21,pt)),D("visible",p.showImportDialog),_("modal",!0)("draggable",!1)("resizable",!0),a(7),D("ngModel",p.importJson),_("rows",15))},dependencies:[G,R,Q,fe,xe,Qe,We,Le,_e,at],styles:[".form-builder-demo[_ngcontent-%COMP%]{padding:1rem}.form-builder-demo[_ngcontent-%COMP%] .demo-header[_ngcontent-%COMP%]{margin-bottom:2rem;text-align:center}.form-builder-demo[_ngcontent-%COMP%] .demo-header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{color:var(--primary-color);margin-bottom:.5rem}.form-builder-demo[_ngcontent-%COMP%] .demo-header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-right:.5rem}.form-builder-demo[_ngcontent-%COMP%] .demo-header[_ngcontent-%COMP%] .demo-description[_ngcontent-%COMP%]{color:var(--text-color-secondary);font-size:var(--text-medium-large);line-height:1.5;max-width:800px;margin:0 auto}.form-builder-demo[_ngcontent-%COMP%] .demo-toolbar[_ngcontent-%COMP%]{background:var(--surface-card);border:1px solid var(--surface-border);border-radius:var(--border-radius);padding:1.5rem;margin-bottom:2rem;display:grid;grid-template-columns:1fr 1fr;gap:2rem}@media(max-width:768px){.form-builder-demo[_ngcontent-%COMP%] .demo-toolbar[_ngcontent-%COMP%]{grid-template-columns:1fr;gap:1.5rem}}.form-builder-demo[_ngcontent-%COMP%] .demo-toolbar[_ngcontent-%COMP%] .toolbar-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 1rem;color:var(--text-color);font-size:var(--text-medium-large);font-weight:600}.form-builder-demo[_ngcontent-%COMP%] .demo-toolbar[_ngcontent-%COMP%] .toolbar-section[_ngcontent-%COMP%] .sample-buttons[_ngcontent-%COMP%], .form-builder-demo[_ngcontent-%COMP%] .demo-toolbar[_ngcontent-%COMP%] .toolbar-section[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.5rem}.form-builder-demo[_ngcontent-%COMP%] .demo-toolbar[_ngcontent-%COMP%] .toolbar-section[_ngcontent-%COMP%] .sample-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .form-builder-demo[_ngcontent-%COMP%] .demo-toolbar[_ngcontent-%COMP%] .toolbar-section[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex:0 0 auto}.form-builder-demo[_ngcontent-%COMP%] .demo-content[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:1rem 1.5rem}.form-builder-demo[_ngcontent-%COMP%] .demo-content[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;color:var(--text-color)}
859.form-builder-demo[_ngcontent-%COMP%] .demo-content[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-right:.5rem;color:var(--primary-color)}.form-builder-demo[_ngcontent-%COMP%] .demo-content[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%] .field-count[_ngcontent-%COMP%]{background:var(--primary-color);color:#fff;padding:.25rem .75rem;border-radius:var(--border-radius);font-size:var(--text-medium);font-weight:500}.form-builder-demo[_ngcontent-%COMP%] .export-content[_ngcontent-%COMP%] .export-actions[_ngcontent-%COMP%], .form-builder-demo[_ngcontent-%COMP%] .import-content[_ngcontent-%COMP%] .export-actions[_ngcontent-%COMP%]{margin-bottom:1rem;display:flex;gap:.5rem;flex-wrap:wrap}.form-builder-demo[_ngcontent-%COMP%] .export-content[_ngcontent-%COMP%] .export-textarea[_ngcontent-%COMP%], .form-builder-demo[_ngcontent-%COMP%] .export-content[_ngcontent-%COMP%] .import-textarea[_ngcontent-%COMP%], .form-builder-demo[_ngcontent-%COMP%] .import-content[_ngcontent-%COMP%] .export-textarea[_ngcontent-%COMP%], .form-builder-demo[_ngcontent-%COMP%] .import-content[_ngcontent-%COMP%] .import-textarea[_ngcontent-%COMP%]{width:100%;font-family:Courier New,monospace;font-size:var(--text-medium);resize:vertical}.form-builder-demo[_ngcontent-%COMP%] .export-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .form-builder-demo[_ngcontent-%COMP%] .import-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:1rem;color:var(--text-color-secondary)}@media(max-width:1200px){.form-builder-demo[_ngcontent-%COMP%] .demo-toolbar[_ngcontent-%COMP%] .toolbar-section[_ngcontent-%COMP%] .sample-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .form-builder-demo[_ngcontent-%COMP%] .demo-toolbar[_ngcontent-%COMP%] .toolbar-section[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:var(--text-medium);padding:.5rem .75rem}}@media(max-width:768px){.form-builder-demo[_ngcontent-%COMP%]{padding:.5rem}.form-builder-demo[_ngcontent-%COMP%] .demo-header[_ngcontent-%COMP%]{margin-bottom:1.5rem}.form-builder-demo[_ngcontent-%COMP%] .demo-header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:1.75rem}.form-builder-demo[_ngcontent-%COMP%] .demo-header[_ngcontent-%COMP%] .demo-description[_ngcontent-%COMP%]{font-size:var(--text-default)}.form-builder-demo[_ngcontent-%COMP%] .demo-toolbar[_ngcontent-%COMP%]{padding:1rem}.form-builder-demo[_ngcontent-%COMP%] .demo-toolbar[_ngcontent-%COMP%] .toolbar-section[_ngcontent-%COMP%] .sample-buttons[_ngcontent-%COMP%], .form-builder-demo[_ngcontent-%COMP%] .demo-toolbar[_ngcontent-%COMP%] .toolbar-section[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%]{flex-direction:column}.form-builder-demo[_ngcontent-%COMP%] .demo-toolbar[_ngcontent-%COMP%] .toolbar-section[_ngcontent-%COMP%] .sample-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .form-builder-demo[_ngcontent-%COMP%] .demo-toolbar[_ngcontent-%COMP%] .toolbar-section[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.form-builder-demo[_ngcontent-%COMP%] .demo-content[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start;gap:.5rem}}[_nghost-%COMP%] .form-builder-container{min-height:600px}[_nghost-%COMP%] .builder-layout{gap:1rem}[_nghost-%COMP%] .builder-preview{margin-top:1rem;border-top:1px solid var(--surface-border);padding-top:1rem}"]});let n=d;return n})();var $i=[{path:"",component:st,data:{title:"Form Builder Demo"}}],ct=(()=>{let d=class d{};d.\u0275fac=function(l){return new(l||d)},d.\u0275mod=J({type:d}),d.\u0275inj=X({imports:[ve.forChild($i),ve]});let n=d;return n})();var Mr=(()=>{let d=class d{};d.\u0275fac=function(l){return new(l||d)},d.\u0275mod=J({type:d}),d.\u0275inj=X({imports:[oe,se,ce,He,Be,Ze,Re,Xe,Ke,ze,Ne,Ae,Je,dt,ct]});let n=d;return n})();export{Mr as FormBuilderDemoModule};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.