diff --git a/assets/js/demo.min.js.LICENSE.txt b/assets/js/demo.min.js.LICENSE.txt index bcbdbd029..88ac634dd 100644 --- a/assets/js/demo.min.js.LICENSE.txt +++ b/assets/js/demo.min.js.LICENSE.txt @@ -1,5 +1,5 @@ /*! * jQuery demo: https://formbuilder.online/ - * Version: 3.16.12 + * Version: 3.16.13 * Author: Kevin Chappell */ diff --git a/assets/js/form-builder.min.js b/assets/js/form-builder.min.js index 101a758cb..a6735dd11 100644 --- a/assets/js/form-builder.min.js +++ b/assets/js/form-builder.min.js @@ -1,2 +1,2 @@ /*! For license information please see form-builder.min.js.LICENSE.txt */ -!function(e){"use strict";!function(){var t={424:function(e,t,r){r.r(t);var o=r(933),n=r.n(o),i=r(476),l=r.n(i),a=r(678),s=r.n(a),d=new URL(r(971),r.b),c=new URL(r(525),r.b),f=new URL(r(658),r.b),u=l()(n()),p=s()(d),m=s()(c),b=s()(f);u.push([e.id,'@font-face{font-family:"formbuilder-icons";src:url('+p+') format("woff")}[class^=formbuilder-icon-]:before,[class*=" formbuilder-icon-"]:before{font-family:"formbuilder-icons";font-style:normal;font-weight:normal;speak:never;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em}.formbuilder-icon-autocomplete:before{content:""}.formbuilder-icon-date:before{content:""}.formbuilder-icon-checkbox:before{content:""}.formbuilder-icon-checkbox-group:before{content:""}.formbuilder-icon-radio-group:before{content:""}.formbuilder-icon-rich-text:before{content:""}.formbuilder-icon-select:before{content:""}.formbuilder-icon-textarea:before{content:""}.formbuilder-icon-text:before{content:""}.formbuilder-icon-pencil:before{content:""}.formbuilder-icon-file:before{content:""}.formbuilder-icon-hidden:before{content:""}.formbuilder-icon-cancel:before{content:""}.formbuilder-icon-button:before{content:""}.formbuilder-icon-header:before{content:""}.formbuilder-icon-paragraph:before{content:""}.formbuilder-icon-number:before{content:""}.formbuilder-icon-copy:before{content:""}.formbuilder-icon-grid:before{content:url('+m+")}.formbuilder-icon-plus:before{content:url("+b+')}.formbuilder-icon-sort-lower:before{content:""}.formbuilder-icon-sort-higher:before{content:""}.form-wrap.form-builder{position:relative}.form-wrap.form-builder *{box-sizing:border-box}.form-wrap.form-builder.formbuilder-embedded-bootstrap button,.form-wrap.form-builder.formbuilder-embedded-bootstrap input,.form-wrap.form-builder.formbuilder-embedded-bootstrap select,.form-wrap.form-builder.formbuilder-embedded-bootstrap textarea{font-family:inherit;font-size:inherit;line-height:inherit}.form-wrap.form-builder.formbuilder-embedded-bootstrap input{line-height:normal}.form-wrap.form-builder.formbuilder-embedded-bootstrap textarea{overflow:auto}.form-wrap.form-builder.formbuilder-embedded-bootstrap button,.form-wrap.form-builder.formbuilder-embedded-bootstrap input,.form-wrap.form-builder.formbuilder-embedded-bootstrap select,.form-wrap.form-builder.formbuilder-embedded-bootstrap textarea{font-family:inherit;font-size:inherit;line-height:inherit}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group{position:relative;display:inline-block;vertical-align:middle}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn{position:relative;float:left}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .btn+.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .btn+.btn-group,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .btn-group+.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .btn-group+.btn-group{margin-left:-1px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn:last-child:not(:first-child),.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.dropdown-toggle:not(:first-child),.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group .form-control:last-child,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group-addon:last-child,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group-btn:first-child>.btn:not(:first-child),.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group-btn:last-child>.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group-btn:last-child>.btn-group>.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn.active,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn:active,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn:focus,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn:hover{z-index:2}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-image:none;border-radius:4px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn.active,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn.btn-active,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn:active{background-image:none}.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group .form-control:last-child,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-addon:last-child,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-btn:first-child>.btn:not(:first-child),.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-btn:last-child>.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-btn:last-child>.btn-group>.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group .form-control,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-addon,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-btn{display:table-cell}.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-lg>.form-control,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-lg>.input-group-addon,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333}.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group{position:relative;display:table;border-collapse:separate}.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.form-wrap.form-builder.formbuilder-embedded-bootstrap .form-control,.form-wrap.form-builder.formbuilder-embedded-bootstrap output{font-size:14px;line-height:1.42857143;display:block}.form-wrap.form-builder.formbuilder-embedded-bootstrap textarea.form-control{height:auto}.form-wrap.form-builder.formbuilder-embedded-bootstrap .form-control{height:34px;display:block;width:100%;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .form-control:focus{outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-wrap.form-builder.formbuilder-embedded-bootstrap .form-group{margin-left:0px;margin-bottom:15px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .form-control{background-image:none}.form-wrap.form-builder.formbuilder-embedded-bootstrap .pull-right{float:right}.form-wrap.form-builder.formbuilder-embedded-bootstrap .pull-left{float:left}.form-wrap.form-builder .formbuilder-required,.form-wrap.form-builder .required-asterisk{color:#c10000}.form-wrap.form-builder .formbuilder-checkbox-group input[type=checkbox],.form-wrap.form-builder .formbuilder-checkbox-group input[type=radio],.form-wrap.form-builder .formbuilder-radio-group input[type=checkbox],.form-wrap.form-builder .formbuilder-radio-group input[type=radio]{margin:0 4px 0 0}.form-wrap.form-builder .formbuilder-checkbox-inline,.form-wrap.form-builder .formbuilder-radio-inline{margin-right:8px;display:inline-block;vertical-align:middle;padding-left:0}.form-wrap.form-builder .formbuilder-checkbox-inline label input[type=text],.form-wrap.form-builder .formbuilder-radio-inline label input[type=text]{margin-top:0}.form-wrap.form-builder .formbuilder-checkbox-inline:first-child,.form-wrap.form-builder .formbuilder-radio-inline:first-child{padding-left:0}.form-wrap.form-builder .formbuilder-autocomplete-list{background-color:#fff;display:none;list-style:none;padding:0;border:1px solid #ccc;border-width:0 1px 1px;position:absolute;z-index:20;max-height:200px;overflow-y:auto}.form-wrap.form-builder .formbuilder-autocomplete-list li{display:none;cursor:default;padding:5px;margin:0;transition:background-color 200ms ease-in-out}.form-wrap.form-builder .formbuilder-autocomplete-list li:hover,.form-wrap.form-builder .formbuilder-autocomplete-list li.active-option{background-color:rgba(0,0,0,.075)}@keyframes PLACEHOLDER{0%{height:1px}100%{height:15px}}.form-wrap.form-builder .cb-wrap{width:26%;transition:transform 250ms}.form-wrap.form-builder .cb-wrap.pull-left .form-actions{float:left}.form-wrap.form-builder .cb-wrap h4{margin-top:0;color:#666}@media(max-width: 481px){.form-wrap.form-builder .cb-wrap{width:64px}.form-wrap.form-builder .cb-wrap h4{display:none}}.form-wrap.form-builder .frmb-control{margin:0;padding:0;border-radius:5px}.form-wrap.form-builder .frmb-control li{cursor:move;list-style:none;margin:0 0 -1px 0;padding:10px;text-align:left;background:#fff;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;box-shadow:inset 0 0 0 1px #c5c5c5}.form-wrap.form-builder .frmb-control li .control-icon{width:16px;height:auto;margin-right:10px;margin-left:.2em;display:inline-block}.form-wrap.form-builder .frmb-control li .control-icon img,.form-wrap.form-builder .frmb-control li .control-icon svg{max-width:100%;height:auto}.form-wrap.form-builder .frmb-control li:first-child{border-radius:5px 5px 0 0;margin-top:0}.form-wrap.form-builder .frmb-control li:last-child{border-radius:0 0 5px 5px}.form-wrap.form-builder .frmb-control li::before{margin-right:10px;font-size:16px}.form-wrap.form-builder .frmb-control li:hover{background-color:#f2f2f2}.form-wrap.form-builder .frmb-control li.ui-sortable-helper{border-radius:5px;transition:box-shadow 250ms;box-shadow:2px 2px 6px 0 #666;border:1px solid #fff}.form-wrap.form-builder .frmb-control li.ui-state-highlight{width:0;overflow:hidden;padding:0;margin:0;border:0 none}.form-wrap.form-builder .frmb-control li.moving{opacity:.6}.form-wrap.form-builder .frmb-control li.formbuilder-separator{background-color:rgba(0,0,0,0);box-shadow:none;padding:0;cursor:default}.form-wrap.form-builder .frmb-control li.formbuilder-separator hr{margin:10px 0}@media(max-width: 481px){.form-wrap.form-builder .frmb-control li::before{font-size:30px}.form-wrap.form-builder .frmb-control li{text-overflow:clip}.form-wrap.form-builder .frmb-control li span{visibility:hidden}.form-wrap.form-builder .frmb-control li span span{visibility:visible;font-size:30px;width:auto !important}}.form-wrap.form-builder .frmb-control.sort-enabled li.ui-state-highlight{box-shadow:none;height:0;width:100%;background:radial-gradient(ellipse at center, rgb(84, 84, 84) 0%, rgba(0, 0, 0, 0) 75%);border:0 none;-webkit-clip-path:polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);clip-path:polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);visibility:visible;overflow:hidden;margin:1px 0 3px;animation:PLACEHOLDER 250ms forwards}.formbuilder-mobile.form-wrap.form-builder .form-actions{width:100%}.formbuilder-mobile.form-wrap.form-builder .form-actions button{width:100%;font-size:.85em !important;display:block !important;border-radius:0 !important;margin-top:-1px;margin-left:0 !important}.formbuilder-mobile.form-wrap.form-builder .form-actions button:first-child{border-radius:5px 5px 0 0 !important;margin-top:0 !important;border-bottom:0 none}.formbuilder-mobile.form-wrap.form-builder .form-actions button:last-child{border-radius:0 0 5px 5px !important}.form-wrap.form-builder .form-actions{float:right;margin-top:5px}.form-wrap.form-builder .form-actions button{border:0 none}.form-wrap.form-builder .stage-wrap{display:flex;flex-direction:column;position:relative;padding:0;margin:0;width:calc(74% - 5px)}@media(max-width: 481px){.form-wrap.form-builder .stage-wrap{width:calc(100% - 64px)}}.form-wrap.form-builder .stage-wrap.empty{border:3px dashed #ccc;background-color:rgba(255,255,255,.25)}.form-wrap.form-builder .stage-wrap.empty::after{content:attr(data-content);position:absolute;text-align:center;top:50%;left:0;width:100%;margin-top:-1em}.form-wrap.form-builder .frmb{list-style-type:none;min-height:200px;transition:background-color 500ms ease-in-out}.form-wrap.form-builder .frmb .formbuilder-required{color:#c10000}.form-wrap.form-builder .frmb.removing{overflow:hidden}.form-wrap.form-builder .frmb li.form-field:hover{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.1),0 0 8px rgba(102,175,233,.6)}.form-wrap.form-builder .frmb li.form-field:hover .field-actions{opacity:1}.form-wrap.form-builder .frmb li.form-field:hover li :hover{background:#fefefe}.form-wrap.form-builder .frmb li.form-field{position:relative;padding:6px;clear:both;margin-left:0;margin-bottom:3px;background-color:#fff;transition:background-color 250ms ease-in-out,margin-top 400ms}.form-wrap.form-builder .frmb li.form-field.hidden-field{background-color:rgba(255,255,255,.6)}.form-wrap.form-builder .frmb li.form-field:first-child{border-top-right-radius:5px;border-top-left-radius:5px}.form-wrap.form-builder .frmb li.form-field:first-child .field-actions .btn:last-child{border-radius:0 5px 0 0}.form-wrap.form-builder .frmb li.form-field:last-child{border-bottom-right-radius:5px;border-bottom-left-radius:5px}.form-wrap.form-builder .frmb li.form-field.no-fields label{font-weight:400}@keyframes PLACEHOLDER{0%{height:0}100%{height:15px}}.form-wrap.form-builder .frmb li.form-field.frmb-placeholder,.form-wrap.form-builder .frmb li.form-field.ui-state-highlight{height:0;padding:0;background:radial-gradient(ellipse at center, rgb(84, 84, 84) 0%, rgba(0, 0, 0, 0) 75%);border:0 none;-webkit-clip-path:polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);clip-path:polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);visibility:visible;overflow:hidden;margin-bottom:3px;animation:PLACEHOLDER 250ms forwards}.form-wrap.form-builder .frmb li.form-field.moving,.form-wrap.form-builder .frmb li.form-field.ui-sortable-helper{transition:box-shadow 500ms ease-in-out;box-shadow:2px 2px 6px 0 #666;border:1px solid #fff;border-radius:5px}.form-wrap.form-builder .frmb li.form-field.disabled-field{z-index:1;position:relative;overflow:visible}.form-wrap.form-builder .frmb li.form-field.disabled-field:hover .frmb-tt{display:inline-block}.form-wrap.form-builder .frmb li.form-field.disabled-field [type=checkbox]{float:left;margin-right:10px}.form-wrap.form-builder .frmb li.form-field.disabled-field h2{border-bottom:0 none}.form-wrap.form-builder .frmb li.form-field.disabled-field label{font-size:12px;font-weight:400;color:#666}.form-wrap.form-builder .frmb li.form-field.disabled-field .prev-holder{cursor:default;line-height:28px;padding-left:5px}.form-wrap.form-builder .frmb li.form-field .close-field{position:absolute;color:#666;left:50%;bottom:6px;background:#fff;border-top:1px solid #c5c5c5;border-left:1px solid #c5c5c5;border-right:1px solid #c5c5c5;transform:translateX(-50%);padding:0 5px;border-top-right-radius:3px;border-top-left-radius:3px;cursor:pointer;transition:background-color 250ms ease-in-out}.form-wrap.form-builder .frmb li.form-field .close-field:hover{text-decoration:none}.form-wrap.form-builder .frmb li.form-field.button-field h1,.form-wrap.form-builder .frmb li.form-field.button-field h2,.form-wrap.form-builder .frmb li.form-field.button-field h3,.form-wrap.form-builder .frmb li.form-field.button-field p,.form-wrap.form-builder .frmb li.form-field.button-field canvas,.form-wrap.form-builder .frmb li.form-field.button-field output,.form-wrap.form-builder .frmb li.form-field.button-field address,.form-wrap.form-builder .frmb li.form-field.button-field blockquote,.form-wrap.form-builder .frmb li.form-field.button-field .prev-holder,.form-wrap.form-builder .frmb li.form-field.header-field h1,.form-wrap.form-builder .frmb li.form-field.header-field h2,.form-wrap.form-builder .frmb li.form-field.header-field h3,.form-wrap.form-builder .frmb li.form-field.header-field p,.form-wrap.form-builder .frmb li.form-field.header-field canvas,.form-wrap.form-builder .frmb li.form-field.header-field output,.form-wrap.form-builder .frmb li.form-field.header-field address,.form-wrap.form-builder .frmb li.form-field.header-field blockquote,.form-wrap.form-builder .frmb li.form-field.header-field .prev-holder,.form-wrap.form-builder .frmb li.form-field.paragraph-field h1,.form-wrap.form-builder .frmb li.form-field.paragraph-field h2,.form-wrap.form-builder .frmb li.form-field.paragraph-field h3,.form-wrap.form-builder .frmb li.form-field.paragraph-field p,.form-wrap.form-builder .frmb li.form-field.paragraph-field canvas,.form-wrap.form-builder .frmb li.form-field.paragraph-field output,.form-wrap.form-builder .frmb li.form-field.paragraph-field address,.form-wrap.form-builder .frmb li.form-field.paragraph-field blockquote,.form-wrap.form-builder .frmb li.form-field.paragraph-field .prev-holder{margin:0}.form-wrap.form-builder .frmb li.form-field.button-field .field-label,.form-wrap.form-builder .frmb li.form-field.header-field .field-label,.form-wrap.form-builder .frmb li.form-field.paragraph-field .field-label{display:none}.form-wrap.form-builder .frmb li.form-field.button-field.editing .field-label,.form-wrap.form-builder .frmb li.form-field.header-field.editing .field-label,.form-wrap.form-builder .frmb li.form-field.paragraph-field.editing .field-label{display:block}.form-wrap.form-builder .frmb li.form-field.paragraph-field .fld-label{min-height:150px;overflow-y:auto}.form-wrap.form-builder .frmb li.form-field.checkbox-field .field-label{display:none}.form-wrap.form-builder .frmb li.deleting,.form-wrap.form-builder .frmb li.delete:hover,.form-wrap.form-builder .frmb li:hover li.delete:hover{background-color:#fdd}.form-wrap.form-builder .frmb li.deleting .close-field,.form-wrap.form-builder .frmb li.delete:hover .close-field,.form-wrap.form-builder .frmb li:hover li.delete:hover .close-field{background-color:#fdd}.form-wrap.form-builder .frmb li.deleting{z-index:20;pointer-events:none}.form-wrap.form-builder .frmb.disabled-field{padding:0 5px}.form-wrap.form-builder .frmb.disabled-field :hover{border-color:rgba(0,0,0,0)}.form-wrap.form-builder .frmb.disabled-field .form-element{float:none;margin-bottom:10px;overflow:visible;padding:5px 0;position:relative}.form-wrap.form-builder .frmb .frm-holder{display:none}.form-wrap.form-builder .frmb .tooltip{left:20px}.form-wrap.form-builder .frmb .prev-holder{display:block}.form-wrap.form-builder .frmb .prev-holder .form-group{margin:0}.form-wrap.form-builder .frmb .prev-holder .ql-editor{min-height:125px}.form-wrap.form-builder .frmb .prev-holder .form-group>label:not([class=formbuilder-checkbox-label]){display:none}.form-wrap.form-builder .frmb .prev-holder select,.form-wrap.form-builder .frmb .prev-holder input[type=text],.form-wrap.form-builder .frmb .prev-holder textarea,.form-wrap.form-builder .frmb .prev-holder input[type=number]{background-color:#fff;border:1px solid #ccc;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.form-wrap.form-builder .frmb .prev-holder input[type=color]{width:60px;padding:2px;display:inline-block}.form-wrap.form-builder .frmb .prev-holder input[type=date]{width:auto}.form-wrap.form-builder .frmb .prev-holder select[multiple]{height:auto}.form-wrap.form-builder .frmb .prev-holder label{font-weight:normal}.form-wrap.form-builder .frmb .prev-holder input[type=number]{width:auto;max-width:100%}.form-wrap.form-builder .frmb .prev-holder input[type=color]{width:60px;padding:2px;display:inline-block}.form-wrap.form-builder .frmb .required-asterisk{display:none}.form-wrap.form-builder .frmb .field-label,.form-wrap.form-builder .frmb .legend{color:#666;margin-bottom:5px;line-height:27px;font-size:16px;font-weight:normal}.form-wrap.form-builder .frmb .disabled-field .field-label{display:block}.form-wrap.form-builder .frmb .other-option:checked+label input{display:inline-block}.form-wrap.form-builder .frmb .other-val{margin-left:5px;display:none}.form-wrap.form-builder .frmb .field-actions{position:absolute;top:0;right:0;opacity:0}.form-wrap.form-builder .frmb .field-actions a::before{margin:0}.form-wrap.form-builder .frmb .field-actions a:hover{text-decoration:none;color:#000}.form-wrap.form-builder .frmb .field-actions .btn{display:inline-block;width:32px;height:32px;padding:0 6px;border-radius:0;border-color:#c5c5c5;background-color:#fff;color:#c5c5c5;line-height:32px;font-size:16px;border-width:0 0 1px 1px}.form-wrap.form-builder .frmb .field-actions .btn:first-child{border-bottom-left-radius:5px}.form-wrap.form-builder .frmb .field-actions .toggle-form:hover{border-color:#ccc;background-color:#65aac6;color:#fff}.form-wrap.form-builder .frmb .field-actions .toggle-form::before{margin:0}.form-wrap.form-builder .frmb .field-actions .copy-button:hover{background-color:#6fc665;color:#fff}.form-wrap.form-builder .frmb .field-actions .del-button:hover{background-color:#c66865;color:#fff}.form-wrap.form-builder .frmb .option-actions{text-align:right;margin-top:10px;width:100%;margin-left:2%}.form-wrap.form-builder .frmb .option-actions button,.form-wrap.form-builder .frmb .option-actions a{background:#fff;padding:5px 10px;border:1px solid #c5c5c5;font-size:14px;border-radius:5px;cursor:default}.form-wrap.form-builder .frmb .sortable-options-wrap{width:81.33333333%;display:inline-block}.form-wrap.form-builder .frmb .sortable-options-wrap label{font-weight:normal}@media(max-width: 481px){.form-wrap.form-builder .frmb .sortable-options-wrap{display:block;width:100%}}.form-wrap.form-builder .frmb .radio-group-field .sortable-options li:nth-child(2) .remove{display:none}.form-wrap.form-builder .frmb .sortable-options{display:inline-block;width:100%;margin-left:2%;background:#c5c5c5;margin-bottom:0;border-radius:2px;list-style:none;padding:0}.form-wrap.form-builder .frmb .sortable-options>li{cursor:move;margin:1px;padding:6px;background-color:#fff}.form-wrap.form-builder .frmb .sortable-options>li:nth-child(1) .remove{display:none}.form-wrap.form-builder .frmb .sortable-options>li .remove{position:relative;opacity:1;float:right;right:14px;height:18px;width:18px;top:8px;font-size:12px;padding:0;color:#c10000}.form-wrap.form-builder .frmb .sortable-options>li .remove::before{margin:0}.form-wrap.form-builder .frmb .sortable-options>li .remove:hover{background-color:#c10000 !important;text-decoration:none;color:#fff}.form-wrap.form-builder .frmb .sortable-options .option-selected{margin:0;width:5%}.form-wrap.form-builder .frmb .sortable-options input[type=text]{width:calc(44.5% - 17px);margin:0 3px;float:none}.form-wrap.form-builder .frmb .form-field .form-group{width:100%;clear:left;float:none}.form-wrap.form-builder .frmb .col-md-6 .form-elements,.form-wrap.form-builder .frmb .col-md-8 .form-elements{width:100%}.form-wrap.form-builder .frmb .field-options .add-area .add{clear:both}.form-wrap.form-builder .frmb .style-wrap button.selected{border:1px solid #000;margin-top:0;margin-right:1px;box-shadow:0 0 0 1px #fff inset;padding:1px 5px}.form-wrap.form-builder .frmb .form-elements{padding:10px 5px;background:#f7f7f7;border-radius:3px;margin:0;border:1px solid #c5c5c5}.form-wrap.form-builder .frmb .form-elements .input-wrap{width:81.33333333%;margin-left:2%;float:left}.form-wrap.form-builder .frmb .form-elements .input-wrap>input[type=checkbox]{margin-top:8px}.form-wrap.form-builder .frmb .form-elements .btn-group{margin-left:2%}.form-wrap.form-builder .frmb .form-elements .add{clear:both}.form-wrap.form-builder .frmb .form-elements [contenteditable],.form-wrap.form-builder .frmb .form-elements select[multiple]{height:auto}.form-wrap.form-builder .frmb .form-elements [contenteditable].form-control{display:inline-block}.form-wrap.form-builder .frmb .form-elements [contenteditable].form-control,.form-wrap.form-builder .frmb .form-elements input[type=text],.form-wrap.form-builder .frmb .form-elements input[type=number],.form-wrap.form-builder .frmb .form-elements input[type=date],.form-wrap.form-builder .frmb .form-elements input[type=color],.form-wrap.form-builder .frmb .form-elements textarea,.form-wrap.form-builder .frmb .form-elements select{transition:background 250ms ease-in-out;padding:6px 12px;border:1px solid #c5c5c5;background-color:#fff}@media(max-width: 481px){.form-wrap.form-builder .frmb .form-elements .input-wrap{width:100%;margin-left:0;float:none}}.form-wrap.form-builder .frmb .form-elements input[type=number]{width:auto}.form-wrap.form-builder .frmb .form-elements .btn-group{margin-left:2%}.col-md-6 .form-wrap.form-builder .frmb .form-elements .false-label,.col-md-8 .form-wrap.form-builder .frmb .form-elements .false-label,.col-md-6 .form-wrap.form-builder .frmb .form-elements label,.col-md-8 .form-wrap.form-builder .frmb .form-elements label{display:block}.form-wrap.form-builder .frmb .form-elements .false-label:first-child,.form-wrap.form-builder .frmb .form-elements label:first-child{width:16.66666667%;padding-top:7px;margin-bottom:0;text-align:right;font-weight:700;float:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-transform:capitalize}@media(max-width: 481px){.form-wrap.form-builder .frmb .form-elements .false-label:first-child,.form-wrap.form-builder .frmb .form-elements label:first-child{display:block;width:auto;float:none;text-align:left}.form-wrap.form-builder .frmb .form-elements .false-label:first-child.empty-label,.form-wrap.form-builder .frmb .form-elements label:first-child.empty-label{display:none}}.form-wrap.form-builder .frmb .form-elements .false-label.multiple,.form-wrap.form-builder .frmb .form-elements .false-label.required-label,.form-wrap.form-builder .frmb .form-elements .false-label.toggle-label,.form-wrap.form-builder .frmb .form-elements .false-label.roles-label,.form-wrap.form-builder .frmb .form-elements .false-label.other-label,.form-wrap.form-builder .frmb .form-elements label.multiple,.form-wrap.form-builder .frmb .form-elements label.required-label,.form-wrap.form-builder .frmb .form-elements label.toggle-label,.form-wrap.form-builder .frmb .form-elements label.roles-label,.form-wrap.form-builder .frmb .form-elements label.other-label{text-align:left;float:none;margin-bottom:-3px;font-weight:400;width:calc(81.3333% - 23px)}.form-wrap.form-builder .frmb .form-elements input.error{border:1px solid #c10000}.form-wrap.form-builder .frmb .form-elements input.fld-maxlength{width:75px}.form-wrap.form-builder .frmb .form-elements input.field-error{background:#fefefe;border:1px solid #c5c5c5}.form-wrap.form-builder .frmb .form-elements label em{display:block;font-weight:400;font-size:.75em}.form-wrap.form-builder .frmb .form-elements label.maxlength-label{line-height:1em}.form-wrap.form-builder .frmb .form-elements .available-roles{display:none;padding:10px;margin:10px 0;background:#e6e6e6;box-shadow:inset 0 0 2px 0 #b3b3b3}@media(max-width: 481px){.form-wrap.form-builder .frmb .form-elements .available-roles{margin-left:0}}.form-wrap.form-builder .frmb .form-elements .available-roles label{font-weight:400;width:auto;float:none;display:inline}.form-wrap.form-builder .frmb .form-elements .available-roles input{display:inline;top:auto}.form-wrap.form-builder .autocomplete-field .sortable-options .option-selected{display:none}.formbuilder-mobile.form-wrap.form-builder .field-actions{opacity:1}.form-wrap.form-builder .snackbar{visibility:hidden;min-width:250px;margin-left:-125px;background-color:#333;color:#fff;text-align:center;border-radius:2px;padding:16px;position:fixed;z-index:1;left:50%;bottom:30px}.form-wrap.form-builder .snackbar.show{visibility:visible;animation:fadein .5s,fadeout .5s 2.5s}@keyframes fadein{from{bottom:0;opacity:0}to{bottom:30px;opacity:1}}@keyframes fadeout{from{bottom:30px;opacity:1}to{bottom:0;opacity:0}}.form-wrap.form-builder .ui-state-highlight{border-radius:3px;border:1px dashed #0d99f2;background-color:#e5f5f8;width:12px}.form-wrap.form-builder .moveHighlight{border:1px dashed #0d99f2 !important;background-color:#e5f5f8 !important}.form-wrap.form-builder .currentGridModeFieldHighlight{background-color:#e5f5f8 !important}.form-wrap.form-builder .grid-mode-help{background-color:#fff;border-top-left-radius:5px;border-top-right-radius:5px}.form-wrap.form-builder .grid-mode-help-row1{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:1px}.form-wrap.form-builder .grid-mode-help-row2{white-space:nowrap}.form-wrap.form-builder .colWithInsertButtons{padding-left:0 !important;padding-right:0 !important;flex:95 1 0% !important}.form-wrap.form-builder .rowWrapper{margin-left:0 !important;margin-right:0 !important}.form-wrap.form-builder .rowWrapper:last-child{flex-grow:1}.form-wrap.form-builder .rowWrapper:not(.tempRowWrapper){padding-top:1em;padding-bottom:1em}.form-wrap.form-builder .btnAddControl{border:0;background-color:unset}.form-wrap.form-builder .hoverColumnDropStyle{border:1px dashed #0d99f2;border-radius:3px;background-color:#e5f5f8;width:20px;position:fixed;margin-left:40px}.form-wrap.form-builder .hoverDropStyleInverse{background-color:#0d99f2;border:1px dashed #e5f5f8;min-height:20px}.form-wrap.form-builder .hoverDropStyleInverse .colWrapper{max-width:calc(100% - 40px)}.form-wrap.form-builder .stage-wrap>.hoverDropStyleInverse{width:100%}.form-wrap.form-builder .rowWrapper>.hoverDropStyleInverse{min-width:40px;flex-grow:1}.form-wrap.form-builder .hoverDropStyleInverse:last-child{flex-grow:1}.form-wrap.form-builder .invisibleRowPlaceholder{width:0 !important;position:fixed !important;left:-100px !important}.form-wrap.form-builder *[tooltip]{position:relative}.form-wrap.form-builder *[tooltip]:hover::after{background:rgba(0,0,0,.9);border-radius:5px 5px 5px 0;bottom:23px;color:#fff;content:attr(tooltip);padding:10px 5px;position:absolute;z-index:98;left:2px;width:230px;text-shadow:none;font-size:12px;line-height:1.5em;cursor:default}.form-wrap.form-builder *[tooltip]:hover::before{border:solid;border-color:#222 rgba(0,0,0,0);border-width:6px 6px 0;bottom:17px;content:"";left:2px;position:absolute;z-index:99;cursor:default}.form-wrap.form-builder .tooltip-element{visibility:visible;color:#fff;background:#000;width:16px;height:16px;border-radius:8px;display:inline-block;text-align:center;line-height:16px;margin:0 5px;font-size:12px;cursor:default}.form-wrap.form-builder .kc-toggle{padding-left:0 !important}.form-wrap.form-builder .kc-toggle span{position:relative;width:48px;height:24px;background:#e6e6e6;display:inline-block;border-radius:4px;border:1px solid #ccc;padding:2px;overflow:hidden;float:left;margin-right:5px;will-change:transform}.form-wrap.form-builder .kc-toggle span::after,.form-wrap.form-builder .kc-toggle span::before{position:absolute;display:inline-block;top:0}.form-wrap.form-builder .kc-toggle span::after{position:relative;content:"";width:50%;height:100%;left:0;border-radius:3px;background:linear-gradient(to bottom, white 0%, #ccc 100%);border:1px solid #999;transition:transform 100ms;transform:translateX(0)}.form-wrap.form-builder .kc-toggle span::before{border-radius:4px;top:2px;left:2px;content:"";width:calc(100% - 4px);height:18px;box-shadow:0 0 1px 1px #b3b3b3 inset;background-color:rgba(0,0,0,0)}.form-wrap.form-builder .kc-toggle input{height:0;overflow:hidden;width:0;opacity:0;pointer-events:none;margin:0}.form-wrap.form-builder .kc-toggle input:checked+span::after{transform:translateX(100%)}.form-wrap.form-builder .kc-toggle input:checked+span::before{background-color:#6fc665}.form-wrap.form-builder::after{content:"";display:table;clear:both}.form-wrap.form-builder .cb-wrap,.form-wrap.form-builder .stage-wrap{vertical-align:top}.form-wrap.form-builder .cb-wrap.pull-right,.form-wrap.form-builder .stage-wrap.pull-right{float:right}.form-wrap.form-builder .cb-wrap.pull-left,.form-wrap.form-builder .stage-wrap.pull-left{float:left}.form-wrap.form-builder .form-elements,.form-wrap.form-builder .form-group,.form-wrap.form-builder .multi-row span,.form-wrap.form-builder textarea{display:block}.form-wrap.form-builder .form-elements::after,.form-wrap.form-builder .form-group::after{content:".";display:block;height:0;clear:both;visibility:hidden}.form-wrap.form-builder .form-elements .field-options div:hover,.form-wrap.form-builder .frmb .legend,.form-wrap.form-builder .frmb .prev-holder{cursor:move}.form-wrap.form-builder .frmb-tt{display:none;position:absolute;top:0;left:0;border:1px solid #262626;background-color:#666;border-radius:5px;padding:5px;color:#fff;z-index:20;text-align:left;font-size:12px;pointer-events:none}.form-wrap.form-builder .frmb-tt::before{border-color:#262626 rgba(0,0,0,0);bottom:-11px}.form-wrap.form-builder .frmb-tt::before,.form-wrap.form-builder .frmb-tt::after{content:"";position:absolute;border-style:solid;border-width:10px 10px 0;border-color:#666 rgba(0,0,0,0);display:block;width:0;z-index:1;margin-left:-10px;bottom:-10px;left:20px}.form-wrap.form-builder .frmb-tt a{text-decoration:underline;color:#fff}.form-builder-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.5);display:none;z-index:10}.form-builder-overlay.visible{display:block}.form-builder-dialog{position:absolute;border-radius:5px;background:#fff;z-index:20;transform:translate(-50%, -50%);top:0;left:0;padding:10px;box-shadow:0 3px 10px #000;min-width:166px;max-height:80%;overflow-y:scroll}.form-builder-dialog h3{margin-top:0}.form-builder-dialog.data-dialog{width:65%;background-color:#23241f}.form-builder-dialog.data-dialog pre{background:none;border:0 none;box-shadow:none;margin:0;color:#f2f2f2}.form-builder-dialog.positioned{transform:translate(-50%, -100%)}.form-builder-dialog.positioned .button-wrap::before{content:"";width:0;height:0;border-left:15px solid rgba(0,0,0,0);border-right:15px solid rgba(0,0,0,0);border-top:10px solid #fff;position:absolute;left:50%;top:100%;transform:translate(-50%, 10px)}.form-builder-dialog .button-wrap{position:relative;margin-top:10px;text-align:right;clear:both}.form-builder-dialog .button-wrap .btn{margin-left:10px}',""]),t.default=u},476:function(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",o=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),o&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),o&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,o,n,i){"string"==typeof e&&(e=[[null,e,void 0]]);var l={};if(o)for(var a=0;a0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=i),r&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=r):c[2]=r),n&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=n):c[4]="".concat(n)),t.push(c))}},t}},678:function(e){e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},933:function(e){e.exports=function(e){return e[1]}},539:function(e,t,r){var o=r(400).Symbol;e.exports=o},736:function(e,t,r){var o=r(539),n=r(840),i=r(258),l=o?o.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":l&&l in Object(e)?n(e):i(e)}},833:function(e,t,r){var o=r(127),n=/^\s+/;e.exports=function(e){return e?e.slice(0,o(e)+1).replace(n,""):e}},120:function(e){var t="object"==typeof global&&global&&global.Object===Object&&global;e.exports=t},840:function(e,t,r){var o=r(539),n=Object.prototype,i=n.hasOwnProperty,l=n.toString,a=o?o.toStringTag:void 0;e.exports=function(e){var t=i.call(e,a),r=e[a];try{e[a]=void 0;var o=!0}catch(e){}var n=l.call(e);return o&&(t?e[a]=r:delete e[a]),n}},258:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},400:function(e,t,r){var o=r(120),n="object"==typeof self&&self&&self.Object===Object&&self,i=o||n||Function("return this")();e.exports=i},127:function(e){var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},726:function(e,t,r){var o=r(611),n=r(846),i=r(936),l=Math.max,a=Math.min;e.exports=function(e,t,r){var s,d,c,f,u,p,m=0,b=!1,h=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var r=s,o=d;return s=d=void 0,m=t,f=e.apply(o,r)}function w(e){var r=e-p;return void 0===p||r>=t||r<0||h&&e-m>=c}function y(){var e=n();if(w(e))return x(e);u=setTimeout(y,function(e){var r=t-(e-p);return h?a(r,c-(e-m)):r}(e))}function x(e){return u=void 0,g&&s?v(e):(s=d=void 0,f)}function A(){var e=n(),r=w(e);if(s=arguments,d=this,p=e,r){if(void 0===u)return function(e){return m=e,u=setTimeout(y,t),b?v(e):f}(p);if(h)return clearTimeout(u),u=setTimeout(y,t),v(p)}return void 0===u&&(u=setTimeout(y,t)),f}return t=i(t)||0,o(r)&&(b=!!r.leading,c=(h="maxWait"in r)?l(i(r.maxWait)||0,t):c,g="trailing"in r?!!r.trailing:g),A.cancel=function(){void 0!==u&&clearTimeout(u),m=0,s=p=d=u=void 0},A.flush=function(){return void 0===u?f:x(n())},A}},611:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},360:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},193:function(e,t,r){var o=r(736),n=r(360);e.exports=function(e){return"symbol"==typeof e||n(e)&&"[object Symbol]"==o(e)}},846:function(e,t,r){var o=r(400);e.exports=function(){return o.Date.now()}},783:function(e,t,r){var o=r(726),n=r(611);e.exports=function(e,t,r){var i=!0,l=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return n(r)&&(i="leading"in r?!!r.leading:i,l="trailing"in r?!!r.trailing:l),o(e,t,{leading:i,maxWait:t,trailing:l})}},936:function(e,t,r){var o=r(833),n=r(611),i=r(193),l=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,d=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(n(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=n(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=o(e);var r=a.test(e);return r||s.test(e)?d(e.slice(2),r?2:8):l.test(e)?NaN:+e}},747:function(e){e.exports=function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=7)}([function(e,t,r){var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n=r(2),i=r(10),l=Object.prototype.toString;function a(e){return"[object Array]"===l.call(e)}function s(e){return null!==e&&"object"===(void 0===e?"undefined":o(e))}function d(e){return"[object Function]"===l.call(e)}function c(e,t){if(null!=e)if("object"!==(void 0===e?"undefined":o(e))&&(e=[e]),a(e))for(var r=0,n=e.length;r=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};o.forEach(["delete","get","head"],(function(e){a.headers[e]={}})),o.forEach(["post","put","patch"],(function(e){a.headers[e]=o.merge(i)})),e.exports=a}).call(this,r(12))},function(e,t,r){e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),o=0;o0&&void 0!==arguments[0]?arguments[0]:l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.langs=Object.create(null),this.loaded=[],this.processConfig(t)}return e.prototype.processConfig=function(e){var t=this,r=Object.assign({},l,e),o=r.location,n=function(e,t){var r={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r}(r,["location"]),i=o.replace(/\/?$/,"/");this.config=Object.assign({},{location:i},n);var a=this.config,s=a.override,d=a.preloaded,c=void 0===d?{}:d,f=Object.entries(this.langs).concat(Object.entries(s||c));this.langs=f.reduce((function(e,r){var o=r[0],n=r[1];return e[o]=t.applyLanguage.call(t,o,n),e}),{}),this.locale=this.config.locale||this.config.langs[0]},e.prototype.init=function(e){return this.processConfig.call(this,Object.assign({},this.config,e)),this.setCurrent(this.locale)},e.prototype.addLanguage=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t="string"==typeof t?this.processFile.call(this,t):t,this.applyLanguage.call(this,e,t),this.config.langs.push("locale")},e.prototype.getValue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.locale;return this.langs[t]&&this.langs[t][e]||this.getFallbackValue(e)},e.prototype.getFallbackValue=function(e){var t=Object.values(this.langs).find((function(t){return t[e]}));return t&&t[e]},e.prototype.makeSafe=function(e){var t={"{":"\\{","}":"\\}","|":"\\|"};return e=e.replace(/\{|\}|\|/g,(function(e){return t[e]})),new RegExp(e,"g")},e.prototype.put=function(e,t){return this.current[e]=t},e.prototype.get=function(e,t){var r=this.getValue(e);if(r){var n=r.match(/\{[^}]+?\}/g),i=void 0;if(t&&n)if("object"===(void 0===t?"undefined":o(t)))for(var l=0;l1&&void 0!==arguments[1])||arguments[1],r=this;return new Promise((function(o,n){if(-1!==r.loaded.indexOf(e)&&t)return r.applyLanguage.call(r,r.langs[e]),o(r.langs[e]);var l=[r.config.location,e,r.config.extension].join("");return(0,i.get)(l).then((function(t){var n=t.data,i=r.processFile(n);return r.applyLanguage.call(r,e,i),r.loaded.push(e),o(r.langs[e])})).catch((function(){var t=r.applyLanguage.call(r,e);o(t)}))}))},e.prototype.applyLanguage=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.config.override[e]||{},o=this.langs[e]||{};return this.langs[e]=Object.assign({},o,t,r),this.langs[e]},e.prototype.setCurrent=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US";return this.loadLang(t).then((function(){return e.locale=t,e.current=e.langs[t],e.current}))},n(e,[{key:"getLangs",get:function(){return this.config.langs}}]),e}();t.default=new a},function(e,t,r){e.exports=r(9)},function(e,t,r){var o=r(0),n=r(2),i=r(11),l=r(1);function a(e){var t=new i(e),r=n(i.prototype.request,t);return o.extend(r,i.prototype,t),o.extend(r,t),r}var s=a(l);s.Axios=i,s.create=function(e){return a(o.merge(l,e))},s.Cancel=r(6),s.CancelToken=r(26),s.isCancel=r(5),s.all=function(e){return Promise.all(e)},s.spread=r(27),e.exports=s,e.exports.default=s},function(e,t,r){function o(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(o(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&o(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t,r){var o=r(1),n=r(0),i=r(21),l=r(22);function a(e){this.defaults=e,this.interceptors={request:new i,response:new i}}a.prototype.request=function(e){"string"==typeof e&&(e=n.merge({url:arguments[0]},arguments[1])),(e=n.merge(o,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[l,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)r=r.then(t.shift(),t.shift());return r},n.forEach(["delete","get","head","options"],(function(e){a.prototype[e]=function(t,r){return this.request(n.merge(r||{},{method:e,url:t}))}})),n.forEach(["post","put","patch"],(function(e){a.prototype[e]=function(t,r,o){return this.request(n.merge(o||{},{method:e,url:t,data:r}))}})),e.exports=a},function(e,t,r){var o,n,i=e.exports={};function l(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(o===setTimeout)return setTimeout(e,0);if((o===l||!o)&&setTimeout)return o=setTimeout,setTimeout(e,0);try{return o(e,0)}catch(t){try{return o.call(null,e,0)}catch(t){return o.call(this,e,0)}}}!function(){try{o="function"==typeof setTimeout?setTimeout:l}catch(e){o=l}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var d,c=[],f=!1,u=-1;function p(){f&&d&&(f=!1,d.length?c=d.concat(c):u=-1,c.length&&m())}function m(){if(!f){var e=s(p);f=!0;for(var t=c.length;t;){for(d=c,c=[];++u1)for(var r=1;r=0)return;l[t]="set-cookie"===t?(l[t]?l[t]:[]).concat([r]):l[t]?l[t]+", "+r:r}})),l):l}},function(e,t,r){var o=r(0);e.exports=o.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(e){var o=e;return t&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=n(window.location.href),function(t){var r=o.isString(t)?n(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){function o(){this.message="String contains an invalid character"}o.prototype=new Error,o.prototype.code=5,o.prototype.name="InvalidCharacterError",e.exports=function(e){for(var t,r,n=String(e),i="",l=0,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.charAt(0|l)||(a="=",l%1);i+=a.charAt(63&t>>8-l%1*8)){if((r=n.charCodeAt(l+=.75))>255)throw new o;t=t<<8|r}return i}},function(e,t,r){var o=r(0);e.exports=o.isStandardBrowserEnv()?{write:function(e,t,r,n,i,l){var a=[];a.push(e+"="+encodeURIComponent(t)),o.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),o.isString(n)&&a.push("path="+n),o.isString(i)&&a.push("domain="+i),!0===l&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,r){var o=r(0);function n(){this.handlers=[]}n.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},n.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},n.prototype.forEach=function(e){o.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=n},function(e,t,r){var o=r(0),n=r(23),i=r(5),l=r(1),a=r(24),s=r(25);function d(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return d(e),e.baseURL&&!a(e.url)&&(e.url=s(e.baseURL,e.url)),e.headers=e.headers||{},e.data=n(e.data,e.headers,e.transformRequest),e.headers=o.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),o.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||l.adapter)(e).then((function(t){return d(e),t.data=n(t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(d(e),t&&t.response&&(t.response.data=n(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,r){var o=r(0);e.exports=function(e,t,r){return o.forEach(r,(function(r){e=r(e,t)})),e}},function(e,t,r){e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,r){e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,r){var o=r(6);function n(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new o(e),t(r.reason))}))}n.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},n.source=function(){var e;return{token:new n((function(t){e=t})),cancel:e}},e.exports=n},function(e,t,r){e.exports=function(e){return function(t){return e.apply(null,t)}}}])},54:function(e){e.exports=function(e){try{var t=window[e],r="__storage_test__";return t.setItem(r,r),t.removeItem(r),!0}catch(e){return!1}}},978:function(e,t,r){var o=r(892),n=r(424);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[e.id,n,""]]);o(n,{attributes:{class:"formBuilder-injected-style"},insert:"head",singleton:!1}),e.exports=n.locals||{}},892:function(e,t,r){var o,n=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),i=[];function l(e){for(var t=-1,r=0;r"},658:function(e){e.exports="data:image/svg+xml; utf8,"}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var i=r[e]={id:e,exports:{}};return t[e](i,i.exports,o),i.exports}o.m=t,o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.b=document.baseURI||self.location.href,o.nc=void 0,function(){o(978);var t=o(783),r=o.n(t);function n(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const i={},l={text:["text","password","email","color","tel"],header:["h1","h2","h3"],button:["button","submit","reset"],paragraph:["p","address","blockquote","canvas","output"],textarea:["textarea","quill"]},a=e=>{e.parentNode&&e.parentNode.removeChild(e)},s=e=>{for(;e.firstChild;)e.removeChild(e.firstChild);return e},d=function(e,t,r){void 0===r&&(r=!0);const o=[];let n=["none","block"];r&&(n=n.reverse());for(let r=e.length-1;r>=0;r--)-1!==e[r].textContent.toLowerCase().indexOf(t.toLowerCase())?(e[r].style.display=n[0],o.push(e[r])):e[r].style.display=n[1];return o},c=["select","checkbox-group","checkbox","radio-group","autocomplete"],f=new RegExp(`(${c.join("|")})`);class u{constructor(e){return n(this,"stage",void 0),n(this,"controls",void 0),n(this,"formActions",void 0),n(this,"editorWrap",void 0),this.optionFields=c,this.optionFieldsRegEx=f,this.subtypes=l,this.empty=s,this.filter=d,i[e]=this,i[e]}onRender(e,t){e.parentElement?t(e):window.requestAnimationFrame((()=>this.onRender(e,t)))}}const p={};class m{constructor(e){this.formData={},this.formID=e,this.layout="",p[e]=this}}var b=o(747),h=o.n(b);function g(e){let t;return"function"==typeof Event?t=new Event(e):(t=document.createEvent("Event"),t.initEvent(e,!0,!0)),t}var v={loaded:g("loaded"),viewData:g("viewData"),userDeclined:g("userDeclined"),modalClosed:g("modalClosed"),modalOpened:g("modalOpened"),formSaved:g("formSaved"),fieldAdded:g("fieldAdded"),fieldRemoved:g("fieldRemoved"),fieldRendered:g("fieldRendered"),fieldEditOpened:g("fieldEditOpened"),fieldEditClosed:g("fieldEditClosed"),stageEmptied:g("stageEmptied")};const w={clobberingProtection:{document:!0,form:!0,namespaceAttributes:!1},backendOrder:["dompurify","sanitizer","fallback"],backends:{sanitizer:"function"==typeof window.Sanitizer&&new window.Sanitizer,dompurify:!!window.DOMPurify&&(y=window.DOMPurify,y.setConfig({SANITIZE_DOM:!1,ADD_ATTR:["contenteditable"]}),y),fallback:e=>e}};var y;const x=(e,t)=>{if(0===w.backendOrder.length)return!1;const r=e.toLowerCase();return t=t?t+"":"",r.startsWith("on")||["form","formaction"].includes(r)||t.trim().toLowerCase().startsWith("javascript:")};w.backends.fallback=function(t){const r=document.implementation.createHTMLDocument(""),o=r.createElement("base");o.href=document.location.href,r.head.appendChild(o);const n=["applet","comment","embed","iframe","link","listing","meta","noscript","object","plaintext","script","style","xmp"],i=e.parseHTML(t,r,!1);e(i).find("*").addBack().each(((t,r)=>{"#text"!==r.nodeName&&(r.tagName&&n.includes(r.tagName.toLowerCase())?r.parentElement?r.parentElement.removeChild(r):i.includes(r)&&i.splice(i.indexOf(r),1):r.attributes&&Array.from(r.attributes).forEach((t=>{x(t.name,t.value)&&e(r).removeAttr(t.name)})))}));const l=r.createElement("div");return e(l).html(i),l.innerHTML};const A=e=>{const t=!!w.clobberingProtection.document&&document,r=!!w.clobberingProtection.form&&document.createElement("form");return t&&e in t||r&&e in r?w.clobberingProtection.namespaceAttributes?"user-content-"+e:void 0:e},C={fallback:(e,t)=>{const r=w.backends.fallback,o="function"==typeof r;return o&&(t=r(t)),e.innerHTML=t,o},dompurify:(e,t)=>{const r=w.backends.dompurify;return!(!1===r||!r.isSupported||(e.innerHTML=r.sanitize(t),0))},sanitizer:(e,t)=>{const r=w.backends.sanitizer;return!!r&&(e.setHTML(t,{sanitizer:r}),!0)}},O=function(t,r,o){if(void 0===o&&(o=!1),!o){const o=document.createElement(t.tagName);return void 0!==w.backendOrder.find((e=>C[e](o,r)))?((t=>{e(t).find("*").each(((e,t)=>{["embed","form","iframe","image","img","object"].includes(t.tagName.toLowerCase())&&t.removeAttribute("name"),["id","name"].forEach((e=>{if(t.hasAttribute(e)){const r=A(t.getAttribute(e));void 0===r?t.removeAttribute(e):t.setAttribute(e,r)}}))}))})(o),t.innerHTML=o.innerHTML,t):(t.innerHTML=r,t)}t.textContent=r},k=["events"],j=["tag","content"];function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function S(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}window.fbLoaded={js:[],css:[]},window.fbEditors={quill:{},tinymce:{}};const T=function(e,t){if(void 0===t&&(t=!1),null==e||"object"!=typeof e)return e;const r="function"==typeof window.structuredClone?window.structuredClone(e):Object.assign({},e),o=[null,void 0,""];t&&o.push(!1);for(const e in r)o.includes(r[e])?delete r[e]:Array.isArray(r[e])&&(r[e].length||delete r[e]);return r},D=function(e){return!["values","enableOther","other","label","subtype"].includes(e)},L=e=>Object.entries(e).map((e=>{let[t,r]=e;return D(t)&&Object.values(R(t,r)).join("")})).filter(Boolean).join(" "),R=(e,t)=>{let r;return e=M(e),t&&(Array.isArray(t)?r=G(t.join(" ")):("boolean"==typeof t&&(t=t.toString()),r=G(t.trim()))),{name:e,value:t=t?`="${r}"`:""}},I=e=>e.reduce(((e,t)=>e.concat(Array.isArray(t)?I(t):t)),[]),M=e=>({className:"class"}[e]||P(e)),P=e=>(e=(e=e.replace(/[^\w\s\-]/gi,"")).replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()}))).replace(/\s/g,"-").replace(/^-+/g,""),B=e=>e.replace(/-([a-z])/g,((e,t)=>t.toUpperCase())),F=function(){let e,t=0;return function(r){const o=Date.now();return o===e?++t:(t=0,e=o),(r.type||P(r.label))+"-"+o+"-"+t}}(),H=e=>void 0===e?e:[["array",e=>Array.isArray(e)],["node",e=>e instanceof window.Node||e instanceof window.HTMLElement],["component",()=>e&&e.dom],[typeof e,()=>!0]].find((t=>t[1](e)))[0],q=function(e,t,r){void 0===t&&(t=""),void 0===r&&(r={});let o=H(t);const{events:n}=r,i=N(r,k),l=document.createElement(e),a={string:e=>{O(l,l.innerHTML+e)},object:e=>{const{tag:t,content:r}=e,o=N(e,j);return l.appendChild(q(t,r,o))},node:e=>l.appendChild(e),array:e=>{for(let t=0;t{e=e(),o=H(e),a[o](e)},undefined:()=>{}};for(const e in i)if(i.hasOwnProperty(e)){const t=M(e);let r=Array.isArray(i[e])?Q(i[e].join(" ").split(" ")).join(" "):i[e];if(x(t,r))continue;if("boolean"==typeof r){if(!0===r){const e="contenteditable"===t||t;l.setAttribute(t,e)}}else"id"!==t&&"name"!==t||(r=A(r)),void 0!==r&&l.setAttribute(t,r)}return t&&a[o](t),((e,t)=>{if(t)for(const r in t)t.hasOwnProperty(r)&&e.addEventListener(r,(e=>t[r](e)))})(l,n),l},z=e=>{const t=e.attributes,r={};return X(t,(e=>{let o=t[e].value||"";o.match(/false|true/g)?o="true"===o:o.match(/undefined/g)&&(o=void 0),o&&(r[B(t[e].name)]=o)})),r},U=e=>{const t=[];for(let r=0;r{const t=[];if(e.length){const r=e[0].getElementsByTagName("value");for(let e=0;e{const t=(new window.DOMParser).parseFromString(e,"text/xml"),r=[];if(t){const e=t.getElementsByTagName("field");for(let t=0;t{const t=document.createElement("textarea");return t.innerHTML=e,t.textContent},J=e=>{const t=document.createElement("textarea");return t.textContent=e,t.innerHTML},G=e=>{const t={'"':""","&":"&","<":"<",">":">"};return"string"==typeof e?e.replace(/["&<>]/g,(e=>t[e]||e)):e},X=function(e,t,r){for(let o=0;oe.filter(((e,t,r)=>r.indexOf(e)===t)),Z=(e,t)=>{const r=t.indexOf(e);r>-1&&t.splice(r,1)},Y=function(e,t){void 0===t&&(t="");const r=jQuery;let o=[];return Array.isArray(e)||(e=[e]),K(e)||(o=jQuery.map(e,(e=>{const r={dataType:"script",cache:!0,url:(t||"")+e};return jQuery.ajax(r).done((()=>window.fbLoaded.js.push(e)))}))),o.push(jQuery.Deferred((e=>r(e.resolve)))),jQuery.when(...o)},K=function(e,t){void 0===t&&(t="js");const r=window.fbLoaded[t];return Array.isArray(e)?e.every((e=>r.includes(e))):r.includes(e)},_=function(t,r){void 0===r&&(r=""),Array.isArray(t)||(t=[t]),t.forEach((t=>{let o="href",n=t,i="";if("object"==typeof t&&(o=t.type||(t.style?"inline":"href"),i=t.id,n=i||t.href||t.style,t="inline"===o?t.style:t.href),!K(n,"css")){if("href"===o){const e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=(r||"")+t,document.head.appendChild(e)}else e(``).attr("id",i).appendTo(e(document.head));window.fbLoaded.css.push(n)}}))},ee=e=>e.replace(/\b\w/g,(function(e){return e.toUpperCase()})),te=(e,t)=>{const r=Object.assign({},e,t);for(const o in t)r.hasOwnProperty(o)&&(Array.isArray(t[o])?r[o]=Array.isArray(e[o])?Q(e[o].concat(t[o])):t[o]:"object"==typeof t[o]?r[o]=te(e[o],t[o]):r[o]=t[o]);return r},re=(e,t,r)=>t.split(" ").forEach((t=>e.addEventListener(t,r,!1))),oe=(e,t)=>{const r=t.replace(".","");for(;(e=e.parentElement)&&!e.classList.contains(r););return e},ne=()=>{let e="";var t;return t=navigator.userAgent||navigator.vendor||window.opera,/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)&&(e="formbuilder-mobile"),e},ie=e=>e.replace(/\s/g,"-").replace(/[^a-zA-Z0-9[\]_-]/g,""),le=e=>e.replace(/[^0-9]/g,""),ae=(e,t)=>t.filter((function(e){return!~this.indexOf(e)}),e),se=/^col-(xs|sm|md|lg)-([^\s]+)/,de=e=>"string"==typeof e?e.split(" ").filter((e=>se.test(e)||e.startsWith("row-"))):[],ce={addEventListeners:re,attrString:L,camelCase:B,capitalize:ee,closest:oe,getContentType:H,escapeAttr:G,escapeAttrs:e=>{for(const t in e)e.hasOwnProperty(t)&&(e[t]=G(e[t]));return e},escapeHtml:J,forceNumber:le,forEach:X,getScripts:Y,getStyles:_,hyphenCase:P,isCached:K,markup:q,merge:te,mobileClass:ne,nameAttr:F,parsedHtml:V,parseXML:$,removeFromArray:Z,safeAttr:R,safeAttrName:M,safename:ie,subtract:ae,trimObj:T,unique:Q,validAttr:D,titleCase:function(e){const t=["a","an","and","as","at","but","by","for","for","from","in","into","near","nor","of","on","onto","or","the","to","with"].map((e=>`\\s${e}\\s`)),r=new RegExp(`(?!${t.join("|")})\\w\\S*`,"g");return`${e}`.replace(r,(e=>e.charAt(0).toUpperCase()+e.slice(1).replace(/[A-Z]/g,(e=>` ${e}`))))},splitObject:(e,t)=>{const r=e=>(t,r)=>(t[r]=e[r],t);return[Object.keys(e).filter((e=>t.includes(e))).reduce(r(e),{}),Object.keys(e).filter((e=>!t.includes(e))).reduce(r(e),{})]}};e.fn.swapWith=function(t){const r=this,o=e(t),n=e("
");return r.before(n),o.before(r),n.before(o).remove(),r};var fe=ce;const ue=["label","type"];class pe{constructor(e,t){this.rawConfig=jQuery.extend({},e),e=jQuery.extend({},e),this.preview=t,delete e.isPreview,this.preview&&delete e.required;const r=["label","description","subtype","required","disabled"];for(const t of r)this[t]=e[t],delete e[t];e.id||(e.name?e.id=e.name:e.id="control-"+Math.floor(1e7*Math.random()+1)),this.id=e.id,this.type=e.type,this.description&&(e.title=this.description),pe.controlConfig||(pe.controlConfig={});const o=this.subtype?this.type+"."+this.subtype:this.type;this.classConfig=jQuery.extend({},pe.controlConfig[o]||{}),this.subtype&&(e.type=this.subtype),this.required&&(e.required="required",e["aria-required"]="true"),this.disabled&&(e.disabled="disabled"),this.config=e,this.configure()}static get definition(){return{}}static register(e,t,r){const o=r?r+".":"";pe.classRegister||(pe.classRegister={}),Array.isArray(e)||(e=[e]);for(const r of e)-1===r.indexOf(".")?pe.classRegister[o+r]=t:pe.error(`Ignoring type ${r}. Cannot use the character '.' in a type name.`)}static getRegistered(e){void 0===e&&(e=!1);const t=Object.keys(pe.classRegister);return t.length?t.filter((t=>e?t.indexOf(e+".")>-1:-1===t.indexOf("."))):t}static getRegisteredSubtypes(){const e={};for(const t in pe.classRegister)if(pe.classRegister.hasOwnProperty(t)){const[r,o]=t.split(".");if(!o)continue;e[r]||(e[r]=[]),e[r].push(o)}return e}static getClass(e,t){const r=t?e+"."+t:e;return pe.classRegister[r]||pe.classRegister[e]||pe.error("Invalid control type. (Type: "+e+", Subtype: "+t+"). Please ensure you have registered it, and imported it correctly.")}static loadCustom(e){let t=[];if(e&&(t=t.concat(e)),window.fbControls&&(t=t.concat(window.fbControls)),!this.fbControlsLoaded){for(const e of t)e(pe,pe.classRegister);this.fbControlsLoaded=!0}}static mi18n(e,t){const r=this.definition;let o=r.i18n||{};o=o[h().locale]||o.default||o;const n=this.camelCase(e),i="object"==typeof o?o[n]||o[e]:o;if(i)return i;let l=r.mi18n;return"object"==typeof l&&(l=l[n]||l[e]),l||(l=n),h().get(l,t)}static active(e){return!Array.isArray(this.definition.inactive)||-1===this.definition.inactive.indexOf(e)}static label(e){return this.mi18n(e)}static icon(e){const t=this.definition;return t&&"object"==typeof t.icon?t.icon[e]:t.icon}configure(){}build(){const e=this.config,{label:t,type:r}=e,o=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,ue);return this.markup(r,V(t),o)}on(e){const t={prerender:e=>e,render:e=>{const t=()=>{this.onRender&&this.onRender(e)};this.css&&_(this.css),this.js&&!K(this.js)?Y(this.js).done(t):t()}};return e?t[e]:t}static error(e){throw new Error(e)}markup(e,t,r){return void 0===t&&(t=""),void 0===r&&(r={}),this.element=q(e,t,r),this.element}parsedHtml(e){return V(e)}static camelCase(e){return B(e)}}const me=(e,t)=>{let r=e.id?`formbuilder-${e.type} form-group field-${e.id}`:"";if(e.className){const o=de(e.className);o&&o.length>0&&(r+=` ${o.join(" ")}`,Array.isArray(t)||(t=[t]),t.forEach((e=>{e.classList&&e.classList.remove(...o),e.querySelectorAll("[class*=row-],[class*=col-]").forEach((e=>{e.classList&&e.classList.remove(...o)}))})))}return r};class be{constructor(e,t,r,o){var n,i,l;void 0===t&&(t=!1),void 0===r&&(r=!1),void 0===o&&(o={}),this.preview=null!==(n=t)&&void 0!==n&&n,this.disableHTMLLabels=null!==(i=r)&&void 0!==i&&i,this.controlConfig=null!==(l=o)&&void 0!==l?l:{},this.templates={label:null,help:null,default:(e,t,r,o)=>(r&&t.appendChild(r),this.markup("div",[t,e],{className:me(o,e)})),noLabel:(e,t,r,o)=>this.markup("div",e,{className:me(o,e)}),hidden:e=>e},e&&(this.templates=jQuery.extend(this.templates,e)),this.configure()}configure(){}build(e,t,r){this.preview&&(t.name?t.name=t.name+"-preview":t.name=fe.nameAttr(t)+"-preview"),t.id=t.name,this.data=jQuery.extend({},t),pe.controlConfig=this.controlConfig;const o=new e(t,this.preview);let n=o.build();if("object"==typeof n&&n.field||(n={field:n}),"string"==typeof n.field){const e=this.markup("div",n.field,{});1===e.childElementCount?n.field=e.children.item(0):n.field=Array.from(e.children)}const i=this.label(),l=this.help();let a;a=r&&this.isTemplate(r)?r:this.isTemplate(n.layout)?n.layout:"default";const s=this.processTemplate(a,n.field,i,l);return o.on("prerender")(s),s.addEventListener("fieldRendered",o.on("render")),s}label(){const e=this.data.label||"",t=[this.disableHTMLLabels?document.createTextNode(e):fe.parsedHtml(e)];return this.data.required&&t.push(this.markup("span","*",{className:"formbuilder-required"})),this.isTemplate("label")?this.processTemplate("label",t):this.markup("label",t,{for:this.data.id,className:`formbuilder-${this.data.type}-label`})}help(){return this.data.description?this.isTemplate("help")?this.processTemplate("help",this.data.description):this.markup("span","?",{className:"tooltip-element",tooltip:this.data.description}):null}isTemplate(e){return"function"==typeof this.templates[e]}processTemplate(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;onull;h().addLanguage("en-US",{NATIVE_NAME:"English (US)",ENGLISH_NAME:"English",addOption:"Add Option +",allFieldsRemoved:"All fields were removed.",allowMultipleFiles:"Allow users to upload multiple files",autocomplete:"Autocomplete",button:"Button",cannotBeEmpty:"This field cannot be empty",checkboxGroup:"Checkbox Group",checkbox:"Checkbox",checkboxes:"Checkboxes",className:"Class",clearAllMessage:"Are you sure you want to clear all fields?",clear:"Clear",close:"Close",content:"Content",copy:"Copy To Clipboard",copyButton:"+",copyButtonTooltip:"Copy",dateField:"Date Field",description:"Help Text",descriptionField:"Description",devMode:"Developer Mode",editNames:"Edit Names",editorTitle:"Form Elements",editXML:"Edit XML",enableOther:"Enable "Other"",enableOtherMsg:"Let users enter an unlisted option",fieldDeleteWarning:"false",fieldVars:"Field Variables",fieldNonEditable:"This field cannot be edited.",fieldRemoveWarning:"Are you sure you want to remove this field?",fileUpload:"File Upload",formUpdated:"Form Updated",getStarted:"Drag a field from the right to this area",header:"Header",hide:"Edit",hidden:"Hidden Input",inline:"Inline",inlineDesc:"Display {type} inline",label:"Label",labelEmpty:"Field Label cannot be empty",limitRole:"Limit access to one or more of the following roles:",mandatory:"Mandatory",maxlength:"Max Length",minOptionMessage:"This field requires a minimum of 2 options",minSelectionRequired:"Minimum {min} selections required",multipleFiles:"Multiple Files",name:"Name",no:"No",noFieldsToClear:"There are no fields to clear",number:"Number",off:"Off",on:"On",option:"Option",optionCount:"Option {count}",options:"Options",optional:"optional",optionLabelPlaceholder:"Label",optionValuePlaceholder:"Value",optionEmpty:"Option value required",other:"Other",paragraph:"Paragraph",placeholder:"Placeholder","placeholders.value":"Value","placeholders.label":"Label","placeholders.email":"Enter your email","placeholders.className":"space separated classes","placeholders.password":"Enter your password",preview:"Preview",radioGroup:"Radio Group",radio:"Radio",removeMessage:"Remove Element",removeOption:"Remove Option",remove:"×",required:"Required",requireValidOption:"Only accept a pre-defined Option",richText:"Rich Text Editor",roles:"Access",rows:"Rows",save:"Save",selectOptions:"Options",select:"Select",selectColor:"Select Color",selectionsMessage:"Allow Multiple Selections",size:"Size","size.xs":"Extra Small","size.sm":"Small","size.m":"Default","size.lg":"Large",style:"Style","styles.btn.default":"Default","styles.btn.danger":"Danger","styles.btn.info":"Info","styles.btn.primary":"Primary","styles.btn.success":"Success","styles.btn.warning":"Warning",subtype:"Type",text:"Text Field",textArea:"Text Area",toggle:"Toggle",warning:"Warning!",value:"Value",viewJSON:"[{…}]",viewXML:"</>",yes:"Yes"});const ge={actionButtons:[],allowStageSort:!0,append:!1,controlOrder:["autocomplete","button","checkbox-group","checkbox","date","file","header","hidden","number","paragraph","radio-group","select","text","textarea"],controlPosition:"right",dataType:"json",defaultFields:[],disabledActionButtons:[],disabledAttrs:[],disabledFieldButtons:{},disabledSubtypes:{},disableFields:[],disableHTMLLabels:!1,disableInjectedStyle:!1,editOnAdd:!1,fields:[],fieldRemoveWarn:!1,fieldEditContainer:null,inputSets:[],notify:{error:e=>{console.log(e)},success:e=>{console.log(e)},warning:e=>{console.warn(e)}},onAddField:(e,t)=>t,onAddFieldAfter:(e,t)=>t,onAddOption:e=>e,onClearAll:he,onCloseFieldEdit:he,onOpenFieldEdit:he,onSave:he,persistDefaultFields:!1,prepend:!1,replaceFields:[],roles:{1:"Administrator"},sanitizerOptions:{clobberingProtection:{document:!1,form:!1},backendOrder:[]},scrollToFieldOnAdd:!0,showActionButtons:!0,sortableControls:!1,stickyControls:{enable:!0,offset:{top:5,bottom:"auto",right:"auto"}},subtypes:{},templates:{},typeUserAttrs:{},typeUserDisabledAttrs:{},typeUserEvents:{},defaultGridColumnClass:"col-md-12",cancelGridModeDistance:100,enableColumnInsertMenu:!1,enableEnhancedBootstrapGrid:!1},ve={btn:["default","danger","info","primary","success","warning"]},we={location:"assets/lang/"},ye={},xe={rowWrapperClass:"rowWrapper",colWrapperClass:"colWrapper",tmpRowPlaceholderClass:"tempRowWrapper",invisibleRowPlaceholderClass:"invisibleRowPlaceholder"};var Ae=o(54),Ce=o.n(Ae);const Oe=["values"],ke=["label","events"],je=["actionButtons","replaceFields"];function Ee(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}class Se{constructor(e,t,r){this.data=p[e],this.d=i[e],this.doCancel=!1,this.layout=t,this.handleKeyDown=this.handleKeyDown.bind(this),this.formBuilder=r,this.toastTimer=null}startMoving(e,t){t.item.show().addClass("moving"),this.doCancel=!0,this.from=t.item.parent()}stopMoving(t,r){const o=this;r.item.removeClass("moving"),o.doCancel&&(r.sender&&e(r.sender).sortable("cancel"),this.from.sortable("cancel")),o.save(),o.doCancel=!1}beforeStop(e,t){const r=this,o=ye.opts,n=r.d.stage.childNodes.length-1,i=[];r.stopIndex=t.placeholder.closest("ul.stage-wrap > *").index()-1,!o.sortableControls&&t.item.parent().hasClass("frmb-control")&&i.push(!0),o.prepend&&i.push(0===r.stopIndex),o.append&&i.push(r.stopIndex+1===n),r.doCancel=i.some((e=>!0===e))}getTypes(t){const r={type:t.attr("type")},o=e(".fld-subtype",t).val();return o!==r.type&&(r.subtype=o),r}fieldOptionData(t){const r=[],o=e(".sortable-options li",t);return o.each((e=>{const t=o[e],n=t.querySelectorAll("input[type=text], input[type=number], select"),i=t.querySelectorAll("input[type=checkbox], input[type=radio]"),l={};X(n,(e=>{const t=n[e],r=t.dataset.attr;l[r]=t.value})),X(i,(e=>{const t=i[e],r=t.getAttribute("data-attr");l[r]=t.checked})),r.push(l)})),r}xmlSave(e){const t=this.prepData(e),r=new XMLSerializer,o=[""];t.forEach((e=>{const{values:t}=e;let r=[`{let[t,r]=e;return`${P(t)}="${r}"`})).join(" ")}>`];var n;if(c.includes(e.type)){const e=t.map((e=>q("option",e.label,e).outerHTML));r=r.concat(e)}r.push(""),o.push(r)})),o.push("");const n=q("form-template",I(o).join(""));return r.serializeToString(n)}prepData(t){const r=[],o=this.d,n=this;if(0!==t.childNodes.length){const i=[];X(t.childNodes,(function(t,r){e(r).find("li.form-field").each((function(e,t){i.push(t)}))})),X(t.childNodes,(function(t,r){const o=e(r);o.is("li")&&o.hasClass("form-field")&&i.push(r)})),i.length&&i.forEach((t=>{const i=e(t);if(!i.hasClass("disabled-field")){let l=n.getTypes(i);const a=e(".roles-field:checked",t),s=a.map((e=>a[e].value)).get();if(l=Object.assign({},l,n.getAttrVals(t)),l.subtype)if("quill"===l.subtype){const e=`${l.name}-preview`;if(window.fbEditors.quill[e]){const t=window.fbEditors.quill[e].instance.getContents();l.value=window.JSON.stringify(t.ops)}}else if("tinymce"===l.subtype&&window.tinymce){const e=`${l.name}-preview`,t=window.tinymce.get(e);t&&(l.value=t.getContent())}if(s.length&&(l.role=s.join(",")),l.className=l.className||l.class,l.className&&"true"==i.attr("addeddefaultcolumnclass")&&1==i.closest(this.formBuilder.rowWrapperClassSelector).children().length&&l.className.includes(ye.opts.defaultGridColumnClass)){const e=de(l.className);e&&e.length>0&&e.forEach((e=>{l.className=l.className.replace(e,"").trim()}))}if(l.className){const e=new RegExp("(?:^|\\s)btn-("+ve.btn.join("|")+")(?:\\s|$)","g").exec(l.className);e&&(l.style=e[1])}l=T(l),l.type&&l.type.match(o.optionFieldsRegEx)&&(l.values=n.fieldOptionData(i)),r.push(l)}}))}return r}getData(e){const t=this.data;if(e||(e=ye.opts.formData),!e)return!1;const r={xml:e=>Array.isArray(e)?e:$(e),json:e=>"string"==typeof e?window.JSON.parse(e):e};return t.formData=r[ye.opts.dataType](e)||[],t.formData}save(e){void 0===e&&(e=!1);const t=this,r=this.data,o=this.d.stage,n={xml:()=>t.xmlSave(o),json:e=>window.JSON.stringify(t.prepData(o),null,e&&" ")};return r.formData=n[ye.opts.dataType](e),document.dispatchEvent(v.formSaved),r.formData}incrementId(e){const t=e.lastIndexOf("-"),r=parseInt(e.substring(t+1))+1;return`${e.substring(0,t)}-${r}`}getAttrVals(t){const r=Object.create(null),o=t.querySelectorAll('[class*="fld-"]');return X(o,(t=>{const n=o[t],i=B(n.getAttribute("name"));r[i]=[[n.attributes.contenteditable,()=>"xml"===ye.opts.dataType?J(n.innerHTML):n.innerHTML],["checkbox"===n.type,()=>n.checked],["number"===n.type&&""!==n.value,()=>Number(n.value)],[n.attributes.multiple,()=>e(n).val()],[!0,()=>n.value]].find((e=>{let[t]=e;return!!t}))[1]()})),r}updatePreview(t){const r=this,o=this.d,n=t.attr("class"),i=t[0];if(n.includes("input-control"))return;const l=t.attr("type"),a=e(".prev-holder",i);let d=Object.assign({},r.getAttrVals(i),{type:l});l.match(o.optionFieldsRegEx)&&(d.values=[],d.multiple=e('[name="multiple"]',i).is(":checked"),e(".sortable-options li",i).each((function(t,r){const o={selected:e(".option-selected",r).is(":checked"),value:e(".option-value",r).val(),label:e(".option-label",r).val()};d.values.push(o)}))),d=T(d,!0),d.className=r.classNames(i,d),t.data("fieldData",d);const c=r.formBuilder.controls.custom.lookup(d.type),f=r.formBuilder.controls.custom.getClass(d.type),u=c?c.class:f||pe.getClass(d.type,d.subtype),p=this.layout.build(u,d);s(a[0]),a[0].appendChild(p),p.dispatchEvent(v.fieldRendered)}disabledTT(e){const t=e.querySelectorAll(".disabled-field");X(t,(e=>{const r=t[e],o=h().get("fieldNonEditable");if(o){const e=q("p",o,{className:"frmb-tt"});r.appendChild(e),r.addEventListener("mousemove",(t=>((e,t)=>{const r=t.field.getBoundingClientRect(),o=e.clientX-r.left-21,n=e.clientY-r.top-t.tt.offsetHeight-12;t.tt.style.transform=`translate(${o}px, ${n}px)`})(t,{tt:e,field:r})))}}))}classNames(t,r){const o=t.querySelector(".fld-className"),n=t.querySelector(".btn-style"),i=n&&n.value;if(!o)return;const{type:l}=r,a=o.multiple?e(o).val():o.value.trim().split(" "),s={button:"btn",submit:"btn"}[l];if(s&&i){for(let e=0;e{let{target:t}=e;return this.closeConfirm(t)}),!1),document.addEventListener("keydown",this.handleKeyDown,!1),e}confirm(e,t,r,o){void 0===r&&(r=!1),void 0===o&&(o="");const n=this,i=h().current,l=n.showOverlay(),a=q("button",i.yes,{className:"yes btn btn-success btn-sm"}),s=q("button",i.no,{className:"no btn btn-danger btn-sm"});s.onclick=function(){n.closeConfirm(l)},a.onclick=function(){t(),n.closeConfirm(l)};const d=q("div",[s,a],{className:"button-wrap"}),c=q("div",[e,d],{className:o="form-builder-dialog "+o});if(r)c.classList.add("positioned");else{const e=document.documentElement;r={pageX:Math.max(e.clientWidth,window.innerWidth||0)/2,pageY:Math.max(e.clientHeight,window.innerHeight||0)/2},c.style.position="fixed"}return c.style.left=r.pageX+"px",c.style.top=r.pageY+"px",document.body.appendChild(c),a.focus(),c}dialog(e,t,r){void 0===t&&(t=!1),void 0===r&&(r="");const o=document.documentElement.clientWidth,n=document.documentElement.clientHeight;this.showOverlay();const i=q("div",e,{className:r="form-builder-dialog "+r});return t?i.classList.add("positioned"):(t={pageX:Math.max(o,window.innerWidth||0)/2,pageY:Math.max(n,window.innerHeight||0)/2},i.style.position="fixed"),i.style.left=t.pageX+"px",i.style.top=t.pageY+"px",document.body.appendChild(i),document.dispatchEvent(v.modalOpened),-1!==r.indexOf("data-dialog")&&document.dispatchEvent(v.viewData),i}confirmRemoveAll(t){const r=this,o=t.target.id.match(/frmb-\d{13}/)[0],n=document.getElementById(o),i=h().current,l=e("li.form-field",n),a=t.target.getBoundingClientRect(),s=document.body.getBoundingClientRect(),d={pageX:a.left+a.width/2,pageY:a.top-s.top-12};l.length?r.confirm(i.clearAllMessage,(()=>{r.removeAllFields.call(r,n),ye.opts.persistDefaultFields&&ye.opts.defaultFields?this.addDefaultFields():ye.opts.notify.success(i.allFieldsRemoved),ye.opts.onClearAll()}),d):r.dialog(i.noFieldsToClear,d)}addDefaultFields(){ye.opts.defaultFields.forEach((e=>this.formBuilder.prepFieldVars(e))),this.d.stage.classList.remove("empty")}removeAllFields(e){const t=h().current,r=ye.opts,o=[];e.querySelectorAll(this.formBuilder.fieldSelector).length&&(r.prepend&&o.push(!0),r.append&&o.push(!0),o.some(Boolean)||(e.classList.add("empty"),e.dataset.content=t.getStarted),this.emptyStage(e))}emptyStage(e){s(e).classList.remove("removing"),e.dispatchEvent(v.stageEmptied),this.save()}stageIsEmpty(){return 0===e(this.d.stage).find("li").length}setFieldOrder(t){if(!ye.opts.sortableControls)return!1;const r=window.JSON,o=[];return t.children().each(((t,r)=>{const n=e(r).data("type");n&&o.push(n)})),Ce()("sessionStorage")&&window.sessionStorage.setItem("fieldOrder",r.stringify(o)),o}closeAllEdit(){e(this.d.stage).find("li.form-field").each(((e,t)=>{this.closeField(t.id,!1)}))}toggleEdit(t,r){void 0===r&&(r=!0);const o=document.getElementById(t);if(o)return e(o).hasClass("editing")?this.closeField(t,r):this.openField(t,r)}closeField(t,r){void 0===r&&(r=!0);const o=this,n=document.getElementById(t);if(!n)return n;const i=e(".frm-holder",n),l=e(".prev-holder",n);let a=!1;if(e(n).hasClass("editing")&&(a=!0),!a)return n;n.classList.toggle("editing"),e(".toggle-form",n).toggleClass("open"),r?(l.slideToggle(250),i.slideToggle(250)):(l.toggle(),i.toggle()),this.updatePreview(e(n));const s=e(`#${t}`),d=e(`#${t}-cont`);d.append(s),this.removeContainerProtection(d.attr("id")),ye.opts.onCloseFieldEdit(i[0]),document.dispatchEvent(v.fieldEditClosed);const c=s.find(".prev-holder"),f=setTimeout((()=>{clearTimeout(f),o.tmpCleanPrevHolder(c).forEach((e=>{if(e.columnInfo.columnSize){const t=o.getBootstrapColumnClass(d.attr("class"));t!==e.columnInfo.columnSize&&(d.removeClass(t).addClass(e.columnInfo.columnSize),o.tmpCleanPrevHolder(c))}}))}),300);return n}openField(t,r){void 0===r&&(r=!0);const o=document.getElementById(t);if(!o)return o;const n=e(".frm-holder",o),i=e(".prev-holder",o);let l=!1;if(e(o).hasClass("editing")&&(l=!0),l)return o;o.classList.toggle("editing"),e(".toggle-form",o).toggleClass("open"),r?(i.slideToggle(250),n.slideToggle(250)):(i.toggle(),n.toggle()),this.updatePreview(e(o));const a=e(`#${t}`),s=e(`#${t}-cont`),d=s.closest(this.formBuilder.rowWrapperClassSelector);return this.formBuilder.preserveTempContainers.push(s.attr("id")),a.insertAfter(d),this.formBuilder.currentEditPanel=n[0],ye.opts.onOpenFieldEdit(n[0]),document.dispatchEvent(v.fieldEditOpened),e(document).trigger("fieldOpened",[{rowWrapperID:d.attr("id")}]),o}getStyle(e,t){let r;return void 0===t&&(t=!1),window.getComputedStyle?r=window.getComputedStyle(e,null):e.currentStyle&&(r=e.currentStyle),t?r[t]:r}stickyControls(){const{controls:t,stage:r}=this.d,o=e(t).parent(),n=t.getBoundingClientRect(),{top:i}=r.getBoundingClientRect();e(window).scroll((function(l){const a=e(l.target).scrollTop(),s={top:5,bottom:"auto",right:"auto",left:n.left},d=Object.assign({},s,ye.opts.stickyControls.offset);if(a>i){const e={position:"sticky"},n=Object.assign(e,d),i=t.getBoundingClientRect(),l=r.getBoundingClientRect(),s=i.top+i.height,c=l.top+l.height,f=s===c&&i.top>a;s>c&&i.top!==l.top&&o.css({position:"absolute",top:"auto",bottom:0,right:0,left:"auto"}),(se.id));ye.opts.notify.warning("fieldID required to remove specific fields."),ye.opts.notify.warning("Removing last field since no ID was supplied."),ye.opts.notify.warning("Available IDs: "+e.join(", ")),t=i.lastChild.id}const a=document.getElementById(t);if(!a)return ye.opts.notify.warning("Field not found"),!1;const s=e(a),d=s.closest(this.formBuilder.rowWrapperClassSelector);s.slideUp(r,(function(){s.removeClass("deleting"),s.remove(),o=!0,n.save(),i.childNodes.length||(i.classList.add("empty"),i.dataset.content=h().current.getStarted)}));const c=Object.assign({},ye.opts.typeUserEvents["*"],ye.opts.typeUserEvents[a.type]);if(c&&c.onremove&&c.onremove(a),document.dispatchEvent(v.fieldRemoved),d.length){this.removeContainerProtection(`${t}-cont`);const r=setTimeout((()=>{clearTimeout(r),e(document).trigger("checkRowCleanup",[{rowWrapperID:d.attr("id")}])}),333)}return o}processActionButtons(e){const{label:t,events:r}=e,o=Ee(e,ke);let n=t;const i=this.data;n=n?h().current[n]||n:o.id?h().current[o.id]||ee(o.id):"",o.id?o.id=`${i.formID}-${o.id}-action`:o.id=`${i.formID}-action-${Math.round(1e3*Math.random())}`;const l=q("button",n,o);if(r)for(const e in r)r.hasOwnProperty(e)&&l.addEventListener(e,(t=>r[e](t)));return l}processSubtypes(e){const t=ye.opts.disabledSubtypes;for(const t in e)e.hasOwnProperty(t)&&pe.register(e[t],pe.getClass(t),t);const r=pe.getRegisteredSubtypes(),o=Object.entries(r).reduce(((e,r)=>{let[o,n]=r;return e[o]=t[o]&&ae(t[o],n)||n,e}),{}),n={};for(const e in o)if(o.hasOwnProperty(e)){const t=[];for(const r of o[e]){const o=pe.getClass(e,r),n=o.mi18n(`subtype.${r}`)||o.mi18n(r)||r;t.push({label:n,value:r})}n[e]=t}return n}editorUI(e){const t=this.d,r=this.data,o=e||r.formID;t.editorWrap=q("div",null,{id:`${r.formID}-form-wrap`,className:`form-wrap form-builder formbuilder-embedded-bootstrap ${ne()}`}),t.stage=q("ul",null,{id:o,className:`frmb stage-wrap ${r.layout.stage}`}),t.controls=q("ul",null,{id:`${o}-control-box`,className:"frmb-control"});const n=this.formActionButtons();t.formActions=q("div",n,{className:"form-actions btn-group"})}formActionButtons(){const e=ye.opts;return e.actionButtons.map((t=>{if(t.id&&-1===e.disabledActionButtons.indexOf(t.id))return this.processActionButtons(t)})).filter(Boolean)}processOptions(e){const t=this,{actionButtons:r,replaceFields:o}=e,n=Ee(e,je);let i=n.fieldEditContainer;"string"==typeof n.fieldEditContainer&&(i=document.querySelector(n.fieldEditContainer));const l=[{type:"button",id:"clear",className:"clear-all btn btn-danger",events:{click:t.confirmRemoveAll.bind(t)}},{type:"button",label:"viewJSON",id:"data",className:"btn btn-default get-data",events:{click:t.showData.bind(t)}},{type:"button",id:"save",className:"btn btn-primary save-template",events:{click:e=>{t.save(),ye.opts.onSave(e,t.data.formData)}}}].concat(r);return n.fields=n.fields.concat(o),n.disableFields=n.disableFields.concat(o.map((e=>{let{type:t}=e;return t&&t}))),"xml"===n.dataType&&(n.disableHTMLLabels=!0),ye.opts=Object.assign({},{actionButtons:l},{fieldEditContainer:i},n),ye.opts}input(e){return void 0===e&&(e={}),q("input",null,e)}getFormData(e,t){void 0===e&&(e="js"),void 0===t&&(t=!1);const r=this,o={js:()=>r.prepData(r.d.stage),xml:()=>r.xmlSave(r.d.stage),json:e=>window.JSON.stringify(r.prepData(r.d.stage),null,e&&" ")};return o[e](t)}tmpCleanPrevHolder(t){const r=this,o=[],n=t.find(".form-group");function i(e){const t=e.attr("class");if(void 0!==t&&!1!==t){const t=r.tryParseColumnInfo(e[0]);e.attr("class",e.attr("class").replace("__fb-tmp-col-","col-")),e.attr("class",e.attr("class").replace("__fb-tmp-row-","row-")),e.attr("class",e.attr("class").replace("col-","__fb-tmp-col-")),e.attr("class",e.attr("class").replace("row-","__fb-tmp-row-"));const n={};n.field=e,n.columnInfo=t,o.push(n)}}return i(n),n.find("*").each((function(t,r){i(e(r))})),o}tryParseColumnInfo(e){const t={};if(e.className){const r=de(e.className);r&&r.length>0&&r.forEach((e=>{e.startsWith("row-")?t.rowUniqueId=e.replace("row-","").trim():t.columnSize=e}))}return t}removeContainerProtection(e){const t=this.formBuilder.preserveTempContainers.indexOf(e);-1!==t&&this.formBuilder.preserveTempContainers.splice(t,1)}toggleHighlight(e,t){void 0===t&&(t=600),e.addClass("moveHighlight"),setTimeout((function(){e.removeClass("moveHighlight")}),t)}showToast(t,r){void 0===r&&(r=3e3),null!=this.toastTimer&&(window.clearTimeout(this.toastTimer),this.toastTimer=null),this.toastTimer=setTimeout((function(){e(".snackbar").removeClass("show")}),r),e(".snackbar").addClass("show").html(t)}getDistanceBetweenPoints(e,t,r,o){const n=r-e,i=o-t;return Math.floor(Math.sqrt(i*i+n*n))}getRowClass(e){if(e){const t=e.split(" ").filter((e=>e.startsWith("row-")));if(t&&t.length>0)return t[0]}return""}getRowValue(e){if(e){const t=this.getRowClass(e);if(t)return t.split("-")[1]}return"0"}changeRowClass(e,t){const r=this.getRowClass(e);return e.replace(r,`row-${t}`)}getBootstrapColumnValue(e){if(e){const t=this.getBootstrapColumnClass(e);if(t)return parseInt(t.split("-")[2])}return 0}getBootstrapColumnPrefix(e){if(e){const t=this.getBootstrapColumnClass(e);if(t)return`${t.split("-")[0]}-${t.split("-")[1]}`}return""}getBootstrapColumnClass(e){if(e){const t=e.split(" ").filter((e=>se.test(e)));if(t&&t.length>0)return t[0]}return""}changeBootstrapClass(e,t){const r=this.getBootstrapColumnClass(e);return e.replace(r,`${this.getBootstrapColumnPrefix(e)}-${t}`)}syncBootstrapColumnWrapperAndClassProperty(t,r){const o=e(`#${t}-cont`);o.attr("class",this.changeBootstrapClass(o.attr("class"),r));const n=e(`#className-${t}`);n.val()&&n.val(this.changeBootstrapClass(n.val(),r))}}const Ne=["values","type"];pe.register("autocomplete",class extends pe{static get definition(){return{mi18n:{requireValidOption:"requireValidOption"}}}build(){const e=this.config,{values:t,type:r}=e,o=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,Ne),n=e=>{const t=e.target.nextSibling.nextSibling,r=e.target.nextSibling,o=this.getActiveOption(t);let n=new Map([[38,()=>{const e=this.getPreviousOption(o);e&&this.selectOption(t,e)}],[40,()=>{const e=this.getNextOption(o);e&&this.selectOption(t,e)}],[13,()=>{o?(e.target.value=o.innerHTML,r.value=o.getAttribute("value"),"none"===t.style.display?this.showList(t,o):this.hideList(t)):this.config.requireValidOption&&(this.isOptionValid(t,e.target.value)||(e.target.value="",e.target.nextSibling.value="")),e.preventDefault()}],[27,()=>{this.hideList(t)}]]).get(e.keyCode);return n||(n=()=>!1),n()},i={focus:e=>{const t=e.target.nextSibling.nextSibling,r=d(t.querySelectorAll("li"),e.target.value);if(e.target.addEventListener("keydown",n),e.target.value.length>0){const e=r.length>0?r[r.length-1]:null;this.showList(t,e)}},blur:e=>{e.target.removeEventListener("keydown",n);const t=setTimeout((()=>{e.target.nextSibling.nextSibling.style.display="none",clearTimeout(t)}),200);if(this.config.requireValidOption){const t=e.target.nextSibling.nextSibling;this.isOptionValid(t,e.target.value)||(e.target.value="",e.target.nextSibling.value="")}},input:e=>{const t=e.target.nextSibling.nextSibling;e.target.nextSibling.value=e.target.value;const r=d(t.querySelectorAll("li"),e.target.value);if(0==r.length)this.hideList(t);else{let e=this.getActiveOption(t);e||(e=r[r.length-1]),this.showList(t,e)}}},l=Object.assign({},o,{id:`${o.id}-input`,autocomplete:"off",events:i}),a=Object.assign({},o,{type:"hidden"});delete l.name;const s=[this.markup("input",null,l),this.markup("input",null,a)],c=t.map((e=>{const t=e.label,r={events:{click:t=>{const r=t.target.parentElement,o=r.previousSibling.previousSibling;o.value=e.label,o.nextSibling.value=e.value,this.hideList(r)}},value:e.value};return this.markup("li",t,r)}));return s.push(this.markup("ul",c,{id:`${o.id}-list`,className:`formbuilder-${r}-list`})),s}hideList(e){this.selectOption(e,null),e.style.display="none"}showList(e,t){this.selectOption(e,t),e.style.display="block",e.style.width=e.parentElement.offsetWidth+"px"}getActiveOption(e){const t=e.getElementsByClassName("active-option")[0];return t&&"none"!==t.style.display?t:null}getPreviousOption(e){let t=e;do{t=t?t.previousSibling:null}while(null!=t&&"none"===t.style.display);return t}getNextOption(e){let t=e;do{t=t?t.nextSibling:null}while(null!=t&&"none"===t.style.display);return t}selectOption(e,t){const r=e.querySelectorAll("li");for(let e=0;e=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,Le);let o=t;const n={paragraph:"p",header:this.subtype};return n[t]&&(o=n[t]),{field:this.markup(o,fe.parsedHtml(this.label),r),layout:"noLabel"}}}pe.register(["paragraph","header"],Re),pe.register(["p","address","blockquote","canvas","output"],Re,"paragraph"),pe.register(["h1","h2","h3","h4","h5","h6"],Re,"header");const Ie=["values","value","placeholder","type","inline","other","toggle"],Me=["label"];function Pe(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}pe.register(["select","checkbox-group","radio-group","checkbox"],class extends pe{static get definition(){return{inactive:["checkbox"],mi18n:{minSelectionRequired:"minSelectionRequired"}}}build(){const e=[],t=this.config,{values:r,value:o,placeholder:n,type:i,inline:l,other:a,toggle:s}=t,d=Pe(t,Ie),c=i.replace("-group",""),f="select"===i;if((d.multiple||"checkbox-group"===i)&&(d.name=d.name+"[]"),"checkbox-group"===i&&d.required){const e=this,t=this.onRender.bind(this);this.onRender=function(){t(),e.groupRequired()}}if(delete d.title,r){n&&f&&e.push(this.markup("option",n,{disabled:!0,selected:!0,value:""}));for(let t=0;t{const t=e.target;t.parentElement.previousElementSibling.value=t.value}},id:`${t.id}-value`,className:"other-val"},i=this.markup("input",null,o),a=[document.createTextNode(pe.mi18n("other")),this.markup("input",null,n)],s=this.markup("label",a,{for:o.id}),f=this.markup("div",[i,s],{className:r});e.push(f)}}return this.dom="select"==i?this.markup(c,e,T(d,!0)):this.markup("div",e,{className:i}),this.dom}groupRequired(){const e=this.element.getElementsByTagName("input"),t=()=>{const t=[].some.call(e,(e=>e.checked));((e,t)=>{[].forEach.call(e,(e=>{t?e.removeAttribute("required"):e.setAttribute("required","required"),((e,t)=>{const r=pe.mi18n("minSelectionRequired",1);t?e.setCustomValidity(""):e.setCustomValidity(r)})(e,t)}))})(e,t)};for(let r=e.length-1;r>=0;r--)e[r].addEventListener("change",t);t()}onRender(){if(this.config.userData){const t=this.config.userData.slice();"select"===this.config.type?e(this.dom).val(t).prop("selected",!0):this.config.type.endsWith("-group")&&("checkbox-group"===this.config.type&&this.dom.querySelectorAll("input[type=checkbox]").forEach((e=>{e.removeAttribute("checked")})),this.dom.querySelectorAll("input").forEach((e=>{if(!e.classList.contains("other-val")){for(let r=0;r0){const r=this.dom.querySelector(`#${e.id}-value`);e.setAttribute("checked","checked"),r.value=e.value=t[0],r.style.display="inline-block"}}})))}}});class Be extends pe{static get definition(){return{mi18n:{date:"dateField",file:"fileUpload"}}}build(){let{name:e}=this.config;e=this.config.multiple?`${e}[]`:e;const t=Object.assign({},this.config,{name:e});return this.dom=this.markup("input",null,t),this.dom}onRender(){this.config.userData&&e(this.dom).val(this.config.userData[0])}}pe.register(["text","file","date","number"],Be),pe.register(["text","password","email","color","tel"],Be,"text"),pe.register(["date","time","datetime-local"],Be,"date"),pe.register(["number","range"],Be,"number");const Fe=["value"];class He extends pe{static get definition(){return{mi18n:{textarea:"textArea"}}}build(){const e=this.config,{value:t=""}=e,r=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,Fe);return delete r.type,this.field=this.markup("textarea",this.parsedHtml(t),r),this.field}onRender(){this.config.userData&&e(this.field).val(this.config.userData[0])}on(t){return"prerender"==t&&this.preview?t=>{this.field&&(t=this.field),e(t).on("mousedown",(e=>{e.stopPropagation()}))}:super.on(t)}}pe.register("textarea",He),pe.register("textarea",He,"textarea");const qe=["value"];He.register("tinymce",class extends He{configure(){if(this.js=[],window.tinymce||this.js.push("https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.9.11/tinymce.min.js"),this.classConfig.js){let e=this.classConfig.js;Array.isArray(e)||(e=new Array(e)),this.js=this.js.concat(e),delete this.classConfig.js}this.classConfig.css&&(this.css=this.classConfig.css),this.editorOptions={height:250,paste_data_images:!0,plugins:["advlist","autolink","lists","link","image","charmap","print","preview","anchor","searchreplace","visualblocks","code","fullscreen","insertdatetime","media","table","contextmenu","paste","code"],toolbar:"undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | table"}}build(){const e=this.config,{value:t=""}=e,r=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,qe);return delete r.type,this.field=this.markup("textarea",this.parsedHtml(t),r),r.disabled&&(this.editorOptions.readonly=!0),this.field}onRender(){const e=window.tinymce.get(this.id);e&&window.tinymce.remove(e);const t=jQuery.extend(this.editorOptions,this.classConfig);t.target=this.field;const r=[];Number(window.tinymce.majorVersion)>=5&&r.push("contextmenu"),Number(window.tinymce.majorVersion)>=6&&r.push("paste","print"),t.plugins=t.plugins.filter((e=>-1===r.indexOf(e)));const o=this.config.userData?this.parsedHtml(this.config.userData[0]):void 0,n=window.lastFormBuilderCopiedTinyMCE?this.parsedHtml(window.lastFormBuilderCopiedTinyMCE):void 0;window.lastFormBuilderCopiedTinyMCE=null;const i=function(e){n?e.setContent(n):o&&e.setContent(o)};setTimeout((()=>{window.tinymce.init(t).then(i)}),0)}},"textarea");const ze=["value"];function Ue(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function We(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,ze);return delete r.type,this.field=this.markup("div",null,r),this.field.classList.contains("form-control")&&this.field.classList.remove("form-control"),this.field}onRender(e){const t=this.config.value||"",r=window.Quill.import("delta");window.fbEditors.quill[this.id]={};const o=window.fbEditors.quill[this.id];return o.instance=new window.Quill(this.field,this.editorConfig),o.data=new r,t&&o.instance.setContents(window.JSON.parse(this.parsedHtml(t))),o.instance.on("text-change",(function(e){o.data=o.data.compose(e)})),e}},"textarea");class $e{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t=[]),this.customRegister={},this.templateControlRegister={},this.def={icon:{},i18n:{}},this.register(e,t)}register(e,t){void 0===e&&(e={}),void 0===t&&(t=[]);const r=h().locale;this.def.i18n[r]||(this.def.i18n[r]={});const o=this;Object.keys(e).forEach((t=>{const r=function(r,o){this.customControl=new De(r,o,e[t]),this.build=function(){return this.customControl.build()},this.on=function(e){return this.customControl.on(e)}};r.definition={},r.label=e=>o.label(e),r.icon=e=>o.icon(e),this.templateControlRegister[t]=r}));for(const o of t){let t=o.type;if(o.attrs=o.attrs||{},!t){if(!o.attrs.type){pe.error("Ignoring invalid custom field definition. Please specify a type property.");continue}t=o.attrs.type}let n=o.subtype||t;if(e[t]){const e=this.templateControlRegister[t];e.definition=o,this.customRegister[n]=jQuery.extend(o,{type:t,class:e})}else{const e=pe.getClass(t,o.subtype);if(!e){super.error("Error while registering custom field: "+t+(o.subtype?":"+o.subtype:"")+". Unable to find any existing defined control or template for rendering.");continue}n=o.datatype?o.datatype:`${t}-${Math.floor(9e3*Math.random()+1e3)}`,this.customRegister[n]=jQuery.extend(o,{type:t,class:e})}this.def.i18n[r][n]=o.label,this.def.icon[n]=o.icon}}label(e){const t=this.definition;let r=t.i18n||{};r=r[h().locale]||r.default||r;const o=pe.camelCase(e),n="object"==typeof r?r[o]||r[e]:r;if(n)return n;let i=t.mi18n;return"object"==typeof i&&(i=i[o]||i[e]),i||(i=o),h().get(i)}get definition(){return{}}icon(e){const t=this.definition;return t&&"object"==typeof t.icon?t.icon[e]:t.icon}getRegistered(e){var t;return void 0===e&&(e=!1),e?null!==(t=this.templateControlRegister[e])&&void 0!==t?t:void 0:Object.keys(this.customRegister)}getClass(e){var t;return null!==(t=this.templateControlRegister[e])&&void 0!==t?t:void 0}lookup(e){return this.customRegister[e]}}var Ve=JSON.parse('{"Rp":"formbuilder-icon-"}');const Je=Ve.Rp;class Ge{constructor(e,t){this.opts=e,this.dom=t.controls,this.getRegistered=pe.getRegistered,this.init()}init(){this.setupControls(),this.appendControls()}setupControls(){const e=this.opts;pe.loadCustom(e.controls),this.custom=new $e(e.templates,e.fields);const t=pe.getRegistered(),r=this.custom.getRegistered();r&&jQuery.merge(t,r),this.registeredSubtypes=pe.getRegisteredSubtypes(),e.sortableControls&&this.dom.classList.add("sort-enabled"),this.controlList=[],this.allControls={};for(let e=0;e${i}${l}`);const s=q("li",q("span",l),{className:`${a} input-control input-control-${e}`});s.dataset.type=r,this.controlList.push(r),this.allControls[r]=s}e.inputSets.length&&e.inputSets.forEach(((e,t)=>{let{name:r,label:o}=e;r=r||P(o),e.icon&&(o=`${e.icon}${o}`);const n=q("li",q("span",o),{className:`input-set-control input-set-${t}`});n.dataset.type=r,this.controlList.push(r),this.allControls[r]=n}))}orderFields(e){const t=this.opts,r=t.controlOrder.concat(e);let o;return Ce()("sessionStorage")&&(t.sortableControls?o=window.sessionStorage.getItem("fieldOrder"):window.sessionStorage.removeItem("fieldOrder")),o?(o=window.JSON.parse(o),o=Q(o.concat(e)),o=Object.keys(o).map((e=>o[e]))):o=Q(r),o.forEach((e=>{const t=new RegExp("-[\\d]{4}$");if(e.match(t)){const r=o.indexOf(e.replace(t,""));-1!==r&&(o.splice(o.indexOf(e),1),o.splice(r+1,o.indexOf(e),e))}})),t.disableFields.length&&(o=o.filter((e=>!t.disableFields.includes(e)))),o.filter(Boolean)}appendControls(){const e=document.createDocumentFragment();s(this.dom),this.orderFields(this.controlList).forEach((t=>{const r=this.allControls[t];r&&e.appendChild(r)})),this.dom.appendChild(e)}getClass(e,t){return this.custom.getClass(e)||pe.getClass(e,t)}}const Xe=["class","className"],Qe=["multiple","options","label","value","class","className"],Ze=["class","className"],Ye=["tag","content"],Ke=["i18n"];function _e(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function et(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function tt(e){for(var t=1;t{let[r,o]=t;return S(S({},e),{},{[`${r}Selector`]:`.${o}`})}),{}));var ft;function ut(e,t,o){const n=this,i=h().current,l=`frmb-${Date.now()}`,s=new m(l),d=new u(l);let c=[];n.preserveTempContainers=[],n.rowWrapperClassSelector=at,n.colWrapperClassSelector=st,n.colWrapperClass=nt,n.fieldSelector=e.enableEnhancedBootstrapGrid?at:"li.form-field",(e=>{if("object"!=typeof e)throw"Invalid value given to setSanitizerConfig, expected config object";if(e.hasOwnProperty("clobberingProtection")&&["document","form","namespaceAttributes"].forEach((t=>{e.clobberingProtection.hasOwnProperty(t)&&"boolean"==typeof e.clobberingProtection[t]&&(w.clobberingProtection[t]=e.clobberingProtection[t])})),e.hasOwnProperty("backends")){if("object"!=typeof e.backends)throw"backends config expected to be an Object";Object.keys(e.backends).forEach((t=>w.backends[t]=e.backends[t]))}if(e.hasOwnProperty("backendOrder")){if(w.backendOrder=[],!Array.isArray(e.backendOrder))throw"backendOrder config expected to be an Array of backend keys as strings";e.backendOrder.forEach((e=>{if(!w.backends.hasOwnProperty(e))throw"unknown sanitizer backend "+e;w.backendOrder.push(e)}))}})(e.sanitizerOptions),o(t).closest("form").length&&e.notify.warning("WARNING: FormBuilder does not support being contained with a
Element"),e.layout||(e.layout=be);const f=new e.layout(e.layoutTemplates,!0,e.disableHTMLLabels,e.controlConfig),p=new Se(l,f,n),b=q;e=p.processOptions(e),s.layout=p.editorLayout(e.controlPosition),p.editorUI(l),s.formID=l,s.lastID=`${s.formID}-fld-0`;const g=new Ge(e,d);n.controls=g;const y=ye.subtypes=p.processSubtypes(e.subtypes),x=o(d.stage),A=o(d.controls);let C,k,j=!1,E=!1,S=!1;function N(){return!!e.enableEnhancedBootstrapGrid}x.sortable({cursor:"move",opacity:.9,revert:150,beforeStop:(e,t)=>p.beforeStop.call(p,e,t),start:(e,t)=>p.startMoving.call(p,e,t),stop:(e,t)=>p.stopMoving.call(p,e,t),change:function(t,r){e.prepend&&r.placeholder.index()<1?o("li.form-prepend").after(r.placeholder):e.append&&r.placeholder.index()>=x.children("li").length-1&&o("li.form-append").before(r.placeholder)},cancel:["input","select","textarea",".disabled-field",".form-elements",".btn","button",".is-locked"].join(", "),placeholder:"frmb-placeholder hoverDropStyleInverse"}),e.allowStageSort||x.sortable("disable"),A.sortable({helper:"clone",opacity:.9,connectWith:`#${l}, ${at}`,cancel:".formbuilder-separator",cursor:"move",scroll:!1,placeholder:"hoverDropStyleInverse ui-state-highlight",start:(e,t)=>p.startMoving.call(p,e,t),stop:(e,t)=>{p.stopMoving.call(p,e,t)},revert:150,beforeStop:(e,t)=>p.beforeStop.call(p,e,t),distance:3,change:function(t,r){e.prepend&&r.placeholder.index()<1?o("li.form-prepend").after(r.placeholder):e.append&&r.placeholder.index()>=x.children("li").length-1&&o("li.form-append").before(r.placeholder)},update:function(t,r){if(p.doCancel)return!1;o(r.item).closest(".stage-wrap")&&0===o(r.item).closest(at).length?(p.doCancel=!0,D(r.item)):(N()&&ue(),p.setFieldOrder(A),p.doCancel=!e.sortableControls)}}),A.on("mouseenter",(function(){p.stageIsEmpty()||x.children(dt+":not(:last-child)").addClass(lt)}));const D=t=>{if(t[0].classList.contains("input-set-control")){const r=[],o=e.inputSets.find((e=>P(e.name||e.label)===t[0].dataset.type));if(o&&o.showHeader){const e={type:"header",subtype:"h2",id:o.name,label:o.label};r.push(e)}r.push(...o.fields),r.forEach((e=>{B(e,!0),(p.stopIndex||0===p.stopIndex)&&p.stopIndex++}))}else B(t,!0)},R=o(d.editorWrap);o('
').appendTo(R);const I=b("div",d.controls,{id:`${s.formID}-cb-wrap`,className:`cb-wrap ${s.layout.controls}`});e.showActionButtons&&I.appendChild(d.formActions);const M=b("div","",{id:`${s.formID}-gridModeHelp`,className:"grid-mode-help"});I.appendChild(M),R.append(d.stage,I),"textarea"!==t.type?o(t).append(R):o(t).replaceWith(R),o(d.controls).on("click","li",(t=>{let{target:r}=t;p.stageIsEmpty()&&x.find(dt).eq(0).remove();const n=o(r).closest("li");p.stopIndex=e.append?x.children().length-1:void 0,D(n),p.save.call(p)}));const B=function(t,r){void 0===r&&(r=!1);let n={};if(t instanceof jQuery)if(n.type=t[0].dataset.type,n.type){const e=g.custom.lookup(n.type);if(e)n=Object.assign({},e);else{const e=g.getClass(n.type);n.label=e.label(n.type)}}else{const e=t[0].attributes;r||(n.values=t.children().map(((e,t)=>({label:o(t).text(),value:o(t).attr("value"),selected:Boolean(o(t).attr("selected"))}))));for(let t=e.length-1;t>=0;t--)n[e[t].name]=e[t].value}else n=Object.assign({},t);n.name||(n.name=F(n)),r&&["text","number","file","date","select","textarea","autocomplete"].includes(n.type)&&(n.className=n.className||"form-control");const i=/(?:^|\s)btn-(.*?)(?:\s|$)/g.exec(n.className);if(i&&(n.style=i[1]),r){const e=setTimeout((()=>{document.dispatchEvent(v.fieldAdded),clearTimeout(e)}),10)}e.onAddField(s.lastID,n),ce(n,r),e.onAddFieldAfter(s.lastID,n),d.stage.classList.remove("empty")};n.prepFieldVars=B;const z=function(t){(t=p.getData(t))&&t.length?(t.forEach((e=>U(e))),t.forEach((e=>B(T(e)))),d.stage.classList.remove("empty")):e.defaultFields&&e.defaultFields.length?(ye.opts.defaultFields.forEach((e=>U(e))),p.addDefaultFields()):e.prepend||e.append||(d.stage.classList.add("empty"),d.stage.dataset.content=h().get("getStarted")),(()=>{const t=[],r=t=>b("li",e[t],{className:`disabled-field form-${t}`});return e.prepend&&!o(".disabled-field.form-prepend",d.stage).length&&(t.push(!0),x.prepend(r("prepend"))),e.append&&!o(".disabled-field.form-append",d.stage).length&&(t.push(!0),x.append(r("append"))),p.disabledTT(d.stage),t.some((e=>!0===e))})()&&d.stage.classList.remove("empty"),p.save()};function U(e){const t=p.getRowValue(e.className);t&&!c.includes(t)&&c.push(t)}const W=t=>{const{type:r}=t,o=[],n=g.getClass(r),i=(e=>{const t=["required","label","description","placeholder","className","name","access","value"],r=!["header","paragraph","file","autocomplete"].concat(d.optionFields).includes(e),o={autocomplete:t.concat(["options","requireValidOption"]),button:["label","subtype","style","className","name","value","access"],checkbox:["required","label","description","toggle","inline","className","name","access","other","options"],text:t.concat(["subtype","maxlength"]),date:t.concat(["subtype","min","max","step"]),file:t.concat(["multiple"]),header:["label","subtype","className","access"],hidden:["name","value","access"],paragraph:["label","subtype","className","access"],number:t.concat(["subtype","min","max","step"]),select:t.concat(["multiple","options"]),textarea:t.concat(["subtype","maxlength","rows"])};e in g.registeredSubtypes&&!(e in o)&&(o[e]=t.concat(["subtype"])),o["checkbox-group"]=o.checkbox,o["radio-group"]=o.checkbox;const n=o[e];return"radio-group"===e&&Z("toggle",n),["header","paragraph","button"].includes(e)&&Z("description",n),r||Z("value",n),n||t})(r),l={required:()=>de(t),toggle:()=>K("toggle",t,{first:h().get("toggle")}),inline:()=>{const e={first:h().get("inline"),second:h().get("inlineDesc",r.replace("-group",""))};return K("inline",t,e)},label:()=>se("label",t),description:()=>se("description",t),subtype:()=>ne("subtype",t,y[r]),style:()=>_(t.style),placeholder:()=>se("placeholder",t),rows:()=>te("rows",t),className:e=>se("className",t,e),name:e=>se("name",t,e),value:()=>se("value",t),maxlength:()=>te("maxlength",t),access:()=>{const r=[`
`];for(a in e.roles)if(e.roles.hasOwnProperty(a)){const t=`fld-${s.lastID}-roles-${a}`,o={type:"checkbox",name:"roles[]",value:a,id:t,className:"roles-field"};c.includes(a)&&(o.checked="checked"),r.push(``)}r.push("
");const o={first:h().get("roles"),second:h().get("limitRole"),content:r.join("")};return K("access",t,o)},other:()=>K("other",t,{first:h().get("enableOther"),second:h().get("enableOtherMsg")}),options:()=>function(e){const{type:t,values:r}=e;let o;const n=[b("a",h().get("addOption"),{className:"add add-opt"})],i=[b("label",h().get("selectOptions"),{className:"false-label"})],l=e.multiple||"checkbox-group"===t,a=e=>{const t=h().get("optionCount",e);return{selected:!1,label:t,value:P(t)}};if(r&&r.length)o=r.map((e=>Object.assign({},{selected:!1},e)));else{let e=[1,2,3];["checkbox-group","checkbox"].includes(t)&&(e=[1]),o=e.map(a);const r=o[0];r.hasOwnProperty("selected")&&"radio-group"!==t&&(r.selected=!0)}const s=b("div",n,{className:"option-actions"}),d=b("ol",o.map((function(r,o,n,i){void 0===i&&(i=e.name);const a=ye.opts.onAddOption(r,{type:t,index:o,isMultiple:l});return ke(i+"-options",a,l)})),{className:"sortable-options"}),c=b("div",[d,s],{className:"sortable-options-wrap"});return i.push(c),b("div",i,{className:"form-group field-options"}).outerHTML}(t),requireValidOption:()=>K("requireValidOption",t,{first:" ",second:h().get("requireValidOption")}),multiple:()=>{const e={default:{first:"Multiple",second:"set multiple attribute"},file:{first:h().get("multipleFiles"),second:h().get("allowMultipleFiles")},select:{first:" ",second:h().get("selectionsMessage")}};return K("multiple",t,e[r]||e.default)}};let a;const c=void 0!==t.role?t.role.split(","):[];["min","max","step"].forEach((e=>{l[e]="number"===r?()=>te(e,t):()=>se(e,t)}));const f=["name","className","subtype"],u=Object.assign({},e.typeUserAttrs["*"],e.typeUserAttrs[r]);if(Object.keys(i).forEach((t=>{const a=i[t],s=[!0],d=e.disabledAttrs.includes(a);if(e.typeUserDisabledAttrs[r]){const t=e.typeUserDisabledAttrs[r];s.push(!t.includes(a))}if(n.definition.hasOwnProperty("defaultAttrs")){const e=Object.keys(n.definition.defaultAttrs);s.push(!e.includes(a))}if(u){const e=Object.keys(u);s.push(!e.includes(a))}d&&!f.includes(a)&&s.push(!1),s.every(Boolean)&&o.push(l[a](d))})),n.definition.hasOwnProperty("defaultAttrs")){const e=G(n.definition.defaultAttrs,t);o.push(e)}if(u){const e=G(u,t);o.push(e)}return o.join("")};function $(e){return[["array",e=>{let{options:t}=e;return!!t}],["boolean",e=>{let{type:t}=e;return"checkbox"===t}],[typeof e.value,()=>!0]].find((t=>t[1](e)))[0]}function J(e,t){return e.subtype&&e.subtype===t}function G(t,r){const o=[],n={array:Y,string:Q,number:te,boolean:(e,t)=>{let o=!1;return"checkbox"===e.type?o=Boolean(!!t.hasOwnProperty("value")&&t.value):r.hasOwnProperty(e)?o=r[e]:(t.hasOwnProperty("value")||t.hasOwnProperty("checked"))&&(o=t.value||t.checked||!1),K(e,tt(tt({},t),{},{[e]:o}),{first:i[e]})}};for(const l in t)if(t.hasOwnProperty(l)){const a=$(t[l]);if("undefined"!==a){const e=h().get(l),s=t[l],d="boolean"===a?s.value:s.value||"";s.value=r[l]||d,s.label&&(i[l]=Array.isArray(s.label)?h().get(...s.label)||s.label[0]:s.label),n[a]&&o.push(n[a](l,s)),i[l]=e,s.value=d}else if("undefined"===a&&J(r,l))o.push(G(t[l],r));else{const r={};r[l]=t[l],e.notify.warning("Warning: unable to process typeUserAttr definition : "+JSON.stringify(r))}}return o.join("")}function Q(e,t){const{class:r,className:o}=t,n=_e(t,Xe);let l={id:e+"-"+s.lastID,title:n.description||n.label||e.toUpperCase(),name:e,type:n.type||"text",className:[`fld-${e}`,(r||o||"").trim()],value:n.value||""};const a=``;return["checkbox","checkbox-group","radio-group"].includes(l.type)||l.className.push("form-control"),l=Object.assign({},n,l),`
${a}
${(()=>{if("textarea"===l.type){const e=l.value;return delete l.value,``}return``})()}
`}function Y(e,t){const{multiple:r,options:o,label:n,value:l,class:a,className:d}=t,c=_e(t,Qe),f=Object.keys(o).map((e=>{const t={value:e},r=o[e],n=Array.isArray(r)?h().get(...r)||r[0]:r;return(Array.isArray(l)?l.includes(e):e===l)&&(t.selected=null),b("option",n,t)})),u={id:`${e}-${s.lastID}`,title:c.description||n||e.toUpperCase(),name:e,className:`fld-${e} form-control ${a||d||""}`.trim()};r&&(u.multiple=!0);const p=``;return Object.keys(c).forEach((function(e){u[e]=c[e]})),`
${p}
${b("select",f,u).outerHTML}
`}const K=function(e,t,r){void 0===r&&(r={});const o=t=>b("label",t,{for:`${e}-${s.lastID}`}).outerHTML,n={type:"checkbox",className:`fld-${e}`,name:e,id:`${e}-${s.lastID}`};t[e]&&(n.checked=!0);const i=[];let l=[b("input",null,n).outerHTML];return r.first&&i.push(o(r.first)),r.second&&l.push(" ",o(r.second)),r.content&&l.push(r.content),l=b("div",l,{className:"input-wrap"}).outerHTML,b("div",i.concat(l),{className:`form-group ${e}-wrap`}).outerHTML},_=e=>{let t="";"undefined"===e&&(e="default");const r=``;return t+=p.input({value:e||"default",type:"hidden",className:"btn-style"}).outerHTML,t+='
',ve.btn.forEach((r=>{const o=["btn-xs","btn",`btn-${r}`];e===r&&o.push("selected");const n=b("button",h().get(`styles.btn.${r}`),{value:r,type:"button",className:o.join(" ")}).outerHTML;t+=n})),t+="
",t=b("div",[r,t],{className:"form-group style-wrap"}),t.outerHTML},te=(e,t)=>{const{class:r,className:o}=t,n=_e(t,Ze),i=isNaN(n[e])?void 0:n[e],l=h().get(e)||e,a={type:"number",value:i,name:e,placeholder:h().get(`placeholder.${e}`),className:`fld-${e} form-control ${r||o||""}`.trim(),id:`${e}-${s.lastID}`},d=p.input(T(a)).outerHTML;return b("div",[``,`
${d}
`],{className:`form-group ${e}-wrap`}).outerHTML},ne=(e,t,r)=>{const o=r.map(((r,o)=>{let n=Object.assign({label:`${i.option} ${o}`,value:void 0},r);return r.value===t[e]&&(n.selected=!0),n=T(n),b("option",n.label,n)})),n={id:e+"-"+s.lastID,name:e,className:`fld-${e} form-control`},l=h().get(e)||ee(e)||"",a=b("label",l,{for:n.id}),d=b("select",o,n),c=b("div",d,{className:"input-wrap"});return b("div",[a,c],{className:`form-group ${n.name}-wrap`}).outerHTML},se=function(t,r,o){void 0===o&&(o=!1);let n=r[t]||"",i=h().get(t)||t;"label"===t&&(["paragraph"].includes(r.type)?i=h().get("content"):n=V(n));const l=h().get(`placeholders.${t}`)||"";let a="";if(![].some((e=>!0===e))){const d={name:t,placeholder:l,className:`fld-${t} form-control`,id:`${t}-${s.lastID}`},c=b("label",i,{for:d.id}).outerHTML;"label"!==t||e.disableHTMLLabels?(d.value=n,d.type="text",a+=``):(d.contenteditable=!0,a+=b("div",n,d).outerHTML);const f=`
${a}
`;let u=o?"none":"block";"value"===t&&(u=r.subtype&&"quill"===r.subtype&&"none"),a=b("div",[c,f],{className:`form-group ${t}-wrap`,style:`display: ${u}`})}return a.outerHTML},de=e=>{const{type:t}=e,r=[];let o="";return["header","paragraph","button"].includes(t)&&r.push(!0),r.some((e=>!0===e))||(o=K("required",e,{first:h().get("required")})),o},ce=function(t,r){void 0===r&&(r=!0);const l=Oe(t);s.lastID=p.incrementId(s.lastID);const a=t.type||"text";let c=t.label||(r?i[a]||h().get("label"):"");"hidden"===a&&(c=`${h().get(a)}: ${t.name}`);const f=e.disabledFieldButtons[a]||t.disabledFieldButtons;let u=[b("a",null,{type:"remove",id:"del_"+s.lastID,className:`del-button btn ${rt}cancel delete-confirm`,title:h().get("removeMessage")}),b("a",null,{type:"edit",id:s.lastID+"-edit",className:`toggle-form btn ${rt}pencil`,title:h().get("hide")}),b("a",null,{type:"copy",id:s.lastID+"-copy",className:`copy-button btn ${rt}copy`,title:h().get("copyButtonTooltip")})];N()?u.push(b("a",null,{type:"grid",id:s.lastID+"-grid",className:`grid-button btn ${rt}grid`,title:"Grid Mode"})):u.push(b("a",null,{type:"sort",id:s.lastID+"-sort-higher",className:`sort-button sort-button-higher btn ${rt}sort-higher`,title:"Move Higher"}),b("a",null,{type:"sort",id:s.lastID+"-sort-lower",className:`sort-button sort-button-lower btn ${rt}sort-lower`,title:"Move Lower"})),f&&Array.isArray(f)&&(u=u.filter((e=>!f.includes(e.type))));const m=[b("div",u,{className:"field-actions"})],g=e.disableHTMLLabels?document.createTextNode(c):V(c);m.push(b("label",g,{className:"field-label"})),m.push(b("span"," *",{className:"required-asterisk",style:t.required?"display:inline":""}));const v={className:"tooltip-element",tooltip:t.description,style:t.description?"display:inline-block":"display:none"};m.push(b("span","?",v));const w=b("div","",{className:"prev-holder",dataFieldId:s.lastID});m.push(w);const y=b("div",[W(t),b("a",h().get("close"),{className:"close-field"})],{className:"form-elements"}),A=b("div",y,{id:`${s.lastID}-holder`,className:"frm-holder",dataFieldId:s.lastID});n.currentEditPanel=A,m.push(A);const O=b("li",m,{class:`${a}-field form-field`,type:a,id:s.lastID}),k=o(O);let T;if(fe(k),k.data("fieldData",{attrs:t}),void 0!==p.stopIndex?o(d.stage).children().eq(p.stopIndex).before(k):x.append(k),o(".sortable-options",k).sortable({update:()=>p.updatePreview(k)}),p.updatePreview(k),N()){const e=`div.row-${l.rowUniqueId}`;T=x.children(e).length?x.children(e):b("div",null,{id:`${O.id}-row`,className:`row row-${l.rowUniqueId} ${ot}`}),j&&E&&(C.attr("id",T.id),C.attr("class",T.className),C.attr("style",""),T=C);const t=b("div",null,{id:`${O.id}-cont`,className:`${l.columnSize} ${nt}`});j&&S&&("true"==C.attr("prepend")?o(t).prependTo(T):o(t).insertAfter(`#${C.attr("appendAfter")}`)),S||o(t).appendTo(T),j||k.after(T),k.appendTo(t),he(T),pe(T),l.addedDefaultColumnClass&&k.attr("addedDefaultColumnClass",!0),p.tmpCleanPrevHolder(o(w))}e.typeUserEvents[a]&&e.typeUserEvents[a].onadd?e.typeUserEvents[a].onadd(O):e.typeUserEvents["*"]&&e.typeUserEvents["*"].onadd&&e.typeUserEvents["*"].onadd(O),r&&(e.editOnAdd&&(p.closeAllEdit(),p.toggleEdit(s.lastID,!1)),O.scrollIntoView&&e.scrollToFieldOnAdd&&O.scrollIntoView({behavior:"smooth"})),N()&&j&&S&&Re(T,!0),j=!1,E=!1,S=!1};function fe(e){N()&&e.mouseenter((function(e){De||(Ee=o(this),Ne=e.pageX,Te=e.pageY)}))}function ue(){x.find(dt+":not(:last-child)").css("height","1px").addClass(lt)}function pe(e){const t=o(e).clone();if(t.addClass(lt).addClass(it).html(""),t.css("height","1px"),t.attr("class",t.attr("class").replace("row-","")),t.removeAttr("id"),0===o(e).index()){const e=o(t).clone();x.prepend(e),he(e)}t.insertAfter(o(e)),he(t),x.find(at+":last-child").removeClass(lt)}function me(){x.children(dt).remove(),x.children(at).each(((e,t)=>{pe(o(t))})),x.find(at+":last-child").removeClass(lt)}function he(t){N()&&(o(t).sortable({connectWith:[at],cursor:"move",opacity:.9,revert:150,tolerance:"pointer",helper:function(e,t){const r=t.clone();return r.find(".field-actions").remove(),r.css({width:"20%",height:"100px",minHeight:"60px",overflow:"hidden"}),r},over:function(e){const t=o(e.target),r=t.hasClass(it);r||Ae(t),t.addClass("hoverDropStyleInverse"),r||(ue(),t.prev(dt).removeClass(lt).css("height","40px"),t.next(dt).removeClass(lt).css("height","40px"))},out:function(e){x.children(dt).removeClass("hoverDropStyleInverse"),o(e.target).removeClass("hoverDropStyleInverse")},placeholder:"hoverDropStyleInverse",receive:function(e,t){const r=o(t.sender).attr("id")===A.attr("id"),n=o(t.item).parent().hasClass(it),i=o(t.item).parent().hasClass(it),l=o(t.item).parent().hasClass(ot)&&!o(t.item).parent().hasClass(it);if(n&&!r){const e=o(t.item),r=Oe({}),n=b("div",null,{id:`${e.find("li").attr("id")}-row`,className:`row row-${r.rowUniqueId} ${ot}`});o(t.item).parent().replaceWith(n),fe(o(t.item)),e.appendTo(n),he(n),Ie(e.attr("id")),Me()}if(i&&r&&(E=!0,j=!0,C=o(t.item).parent()),l&&r){C=o(t.item).prev().hasClass("btnAddControl")?o(t.item).prev():o(t.item).next().hasClass("btnAddControl")?o(t.item).next():o(t.item).attr("prepend","true");const e=p.getRowClass(o(t.item).parent().attr("class"));C.addClass(e),S=!0,j=!0,p.stopIndex=void 0}j&&(p.doCancel=!0,D(t.item),p.save.call(p)),me();const a=o(t.item).find("li");a.length&&(ge(a),we(a),p.tmpCleanPrevHolder(o(t.item).find(".prev-holder")))},start:(e,t)=>{x.addClass("__preventColButtons"),Ae(t.item.closest(at))},stop:(e,t)=>{x.removeClass("__preventColButtons"),x.children(dt).removeClass("hoverDropStyleInverse"),Re(t.item.closest(at),!0)},update:(e,t)=>{Ie(t.item.attr("id"))}}),xe(t,!0),e.enableColumnInsertMenu&&(o(t).off("mouseenter"),o(t).on("mouseenter",(function(e){xe(o(e.currentTarget))})),o(t).off("mouseleave"),o(t).on("mouseleave",(function(e){Ce(o(e.currentTarget))}))))}function ge(e){const t=e.find('textarea[type="tinymce"]');t.length&&(window.lastFormBuilderCopiedTinyMCE=window.tinymce.get(t.attr("id")).save())}function we(e){p.updatePreview(e),p.save.call(p)}function xe(t,r){if(void 0===r&&(r=!1),!e.enableColumnInsertMenu||x.hasClass("__preventColButtons"))return;o(t).children("button.btnAddControl").remove();const n=o(t).children(st);n.each(((e,t)=>{const i=o(t);i.addClass("colWithInsertButtons"),0===n.index(i)&&o(``).insertBefore(i),o(``).insertAfter(i)}))}function Ae(e){e.find("button.btnAddControl").remove(),e.find(st).removeClass("colWithInsertButtons")}function Ce(e){e.find("button.btnAddControl").css("visibility","hidden")}function Oe(t){if(!N())return{};const r=p.tryParseColumnInfo(t);if(!r.rowUniqueId){if(j&&S)r.rowUniqueId=p.getRowValue(C.attr("class"));else{let e;if(0===c.length)e=1;else{const t=c.filter((e=>!isNaN(e)&&!isNaN(parseInt(e)))).map((e=>parseInt(e)));e=Math.max(...t,0)+1}r.rowUniqueId=e.toString()}r.columnSize=e.defaultGridColumnClass,t.className||(t.className=""),t.className+=` row-${r.rowUniqueId} ${r.columnSize}`,r.addedDefaultColumnClass=!0}return c.includes(r.rowUniqueId)||c.push(r.rowUniqueId),r}const ke=function(e,t,r){const o={selected:r?"checkbox":"radio"},n={boolean:(t,r)=>{const n={value:t,type:o[r]||"checkbox"};return t&&(n.checked=!!t),n.name=e,["input",null,n]},number:e=>["input",null,{value:e,type:"number"}],string:(e,t)=>["input",null,{value:e,type:"text",placeholder:h().get(`placeholder.${t}`)||""}],array:e=>["select",e.map((e=>{let{label:t,value:r}=e;return b("option",t,{value:r})}))],object:e=>{let{tag:t,content:r}=e;return[t,r,_e(e,Ye)]}};t=tt(tt({},{selected:!1,label:"",value:""}),t);const i=Object.entries(t).map((e=>{let[t,r]=e;const o=H(r),[i,l,a]=n[o](r,t),s=`option-${t} option-attr`;return a["data-attr"]=t,a.className=a.className?`${a.className} ${s}`:s,b(i,l,a)})),l={className:`remove btn ${rt}cancel`,title:h().get("removeMessage")};return i.push(b("a",null,l)),b("li",i).outerHTML},je=[".form-elements input",".form-elements select",".form-elements textarea"].join(", ");x.on("change blur keyup click",je,r()((e=>{if(e){if([e=>{let{type:t,target:r}=e;return"keyup"===t&&"className"===r.name}].some((t=>t(e))))return!1;we(o(e.target).closest(".form-field"))}}),333,{leading:!1})),x.on("click touchstart",".remove",(t=>{const r=o(t.target).parents(".form-field:eq(0)"),n=r[0],i=n.getAttribute("type"),l=o(t.target.parentElement);t.preventDefault(),n.querySelector(".sortable-options").childNodes.length<=2&&!i.includes("checkbox")?e.notify.error("Error: "+h().get("minOptionMessage")):l.slideUp("250",(()=>{l.remove(),we(r)}))})),x.on("touchstart","input",(e=>{const t=o(e.target);if(!0===e.handled)return!1;if("checkbox"===t.attr("type"))t.trigger("click");else{t.focus();const e=t.val();t.val(e)}})),x.on("click touchstart",".toggle-form, .close-field",(function(e){if(e.stopPropagation(),e.preventDefault(),!0===e.handled)return!1;{const t=o(e.target).parents(".form-field:eq(0)").attr("id");p.toggleEdit(t),e.handled=!0}})),x.on("dblclick","li.form-field",(e=>{if(!["select","input","label","textarea"].includes(e.target.tagName.toLowerCase())&&!0!==e.target.isContentEditable&&(e.stopPropagation(),e.preventDefault(),!0!==e.handled)){const t=o(e.target).closest("li.form-field").attr("id");p.toggleEdit(t),e.handled=!0}})),x.on("change",'[name="subtype"]',(e=>{const t=o(e.target).closest("li.form-field");o(".value-wrap",t).toggle("quill"!==e.target.value)})),x.on("change",'[name="name"]',(t=>{const r=t.target.value;(e=>{const t=document,r=document.createElement("form");return e in t||e in r})(r)&&e.notify.error("Potential for Dom Clobbering with field name "+r)})),x.on("change",[".prev-holder input",".prev-holder select",".prev-holder textarea"].join(", "),(e=>{let t;if(e.target.classList.contains("other-option"))return;const r=oe(e.target,".form-field");if(["select","checkbox-group","radio-group"].includes(r.type)){const o=r.getElementsByClassName("option-value");"select"===r.type?X(o,(t=>{o[t].parentElement.childNodes[0].checked=e.target.value===o[t].value})):(t=document.getElementsByName(e.target.name),X(t,(e=>{t[e].classList.contains("other-option")||(o[e].parentElement.childNodes[0].checked=t[e].checked)})))}else{const t=document.getElementById("value-"+r.id);t&&(t.value=e.target.value)}p.save.call(p)})),re(d.stage,"keyup change",(e=>{let{target:t}=e;if(!t.classList.contains("fld-label"))return;const r=t.value||t.innerHTML,o=oe(t,".form-field").querySelector(".field-label");O(o,V(r),ye.opts.disableHTMLLabels)})),x.on("keyup","input.error",(e=>{let{target:t}=e;return o(t).removeClass("error")})),x.on("keyup",'input[name="description"]',(function(e){const t=o(e.target).parents(".form-field:eq(0)"),r=o(".tooltip-element",t),n=o(e.target).val();if(""!==n)if(r.length)r.attr("tooltip",n).css("display","inline-block");else{const e=`?`;o(".field-label",t).after(e)}else r.length&&r.css("display","none")})),x.on("change",".fld-multiple",(e=>{const t=e.target.checked?"checkbox":"radio",r=o(".option-selected",o(e.target).closest(".form-elements"));return r.each((e=>r[e].type=t)),t})),x.on("blur","input.fld-name",(function(e){e.target.value=ie(e.target.value),""===e.target.value?o(e.target).addClass("field-error").attr("placeholder",h().get("cannotBeEmpty")):o(e.target).removeClass("field-error")})),x.on("blur","input.fld-maxlength",(e=>{e.target.value=le(e.target.value)})),x.on("click touchstart",".btnAddControl",(function(e){const t=o(e.currentTarget);k=A.clone(),k.hover((function(){}),(function(){k.remove()})),k.on("click","li",(e=>{let{target:r}=e;S=!0,j=!0,C=t;const n=o(r).closest("li");p.stopIndex=void 0,D(n),p.save.call(p),k.remove()})),x.append(k),0==t.index()?k.css({position:"fixed",left:t.offset().left,top:t.offset().top-o(window).scrollTop()}):k.css({position:"fixed",left:t.offset().left-80,top:t.offset().top-o(window).scrollTop()});const r=k.offset().top+k.outerHeight(),n=o(window).scrollTop()+o(window).innerHeight();r>n&&k.css({top:parseInt(k.css("top"))-(r-n)})})),x.on("click",`.${rt}copy`,(function(t){t.preventDefault();const r=o(t.target).parent().parent("li"),n=function(t){s.lastID=p.incrementId(s.lastID),ge(t);const r=t.attr("id"),n=t.attr("type"),i=n+"-"+(new Date).getTime(),l=t.clone();return o(".fld-name",l).val(i),l.find("[id]").each(((e,t)=>{t.id=t.id.replace(r,s.lastID)})),l.find("[for]").each(((e,t)=>{const o=t.getAttribute("for").replace(r,s.lastID);t.setAttribute("for",o)})),t.find("select").each((function(e){l.find("select").eq(e).val(o(this).val())})),l.attr("id",s.lastID),l.attr("name",i),l.addClass("cloned"),o(".sortable-options",l).sortable(),e.typeUserEvents[n]&&e.typeUserEvents[n].onclone?e.typeUserEvents[n].onclone(l[0]):e.typeUserEvents["*"]&&e.typeUserEvents["*"].onclone&&e.typeUserEvents["*"].onclone(l[0]),l}(r);N()?function(e,t){const r=o(`#className-${t.attr("id")}`),n=Oe({}),i=b("div",null,{id:`${e.attr("id")}-row`,className:`row row-${n.rowUniqueId} ${ot}`}),l=b("div",null,{id:`${e.attr("id")}-cont`,className:`${p.getBootstrapColumnClass(r.val())} ${nt}`});let a;o(l).appendTo(i),t.parent().is("div")?a=t.closest(at):t.parent().is("ul")&&(a=t),o(i).insertAfter(a),e.appendTo(l),he(i),me(),Ie(e.attr("id"))}(n,r):n.insertAfter(r),we(n),p.tmpCleanPrevHolder(n.find(".prev-holder")),e.editOnAdd&&p.closeField(s.lastID,!1)})),N()&&x.on("stageEmptied",(()=>{c=[],Pe()})),x.on("click",".delete-confirm",(t=>{t.preventDefault();const r=t.target.getBoundingClientRect(),n=document.body.getBoundingClientRect(),i={pageX:r.left+r.width/2,pageY:r.top-n.top-12},l=o(t.target).parents(".form-field:eq(0)").attr("id"),a=o(document.getElementById(l));if(document.addEventListener("modalClosed",(function(){a.removeClass("deleting")}),!1),e.fieldRemoveWarn){const e=b("h3",h().get("warning")),t=b("p",h().get("fieldRemoveWarning"));p.confirm([e,t],(()=>p.removeField(l)),i),a.addClass("deleting")}else p.removeField(l)}));let Ee,Ne,Te,De=!1,Le=0;function Re(e,t){void 0===t&&(t=!1);const r=e.children(`div${st}`).length,n=Math.floor(12/r);e.children(`div${st}`).each(((e,r)=>{const i=o(`#${r.id}`);t||"true"!=i.find("li").attr("manuallyChangedDefaultColumnClass")?p.syncBootstrapColumnWrapperAndClassProperty(r.id.replace("-cont",""),n):p.showToast(`Preserving column size of field ${e+1} because you had personally adjusted it`,4e3)}))}function Ie(e){if(e){const t=o(`#className-${e.replace("-cont","")}`);if(t.val()){const e=p.getRowClass(t.val()),r=p.getRowClass(t.closest(at).attr("class"));t.val(t.val().replace(e,r)),Me()}}}function Me(){x.find(st).each(((e,t)=>{const r=o(t);r.is(":empty")&&!n.preserveTempContainers.includes(r.attr("id"))&&r.remove()})),x.children(at).not(dt).each(((e,t)=>{if(0===o(t).children(st).length){const e=p.getRowValue(o(t).attr("class"));c=c.filter((t=>t!==e)),o(t).remove()}else xe(o(t),!0)}))}function Pe(){if(!N()||!p.stageIsEmpty())return;const e=Oe({}),t=b("div",null,{id:`${p.incrementId(s.lastID)}-row`,className:`row row-${e.rowUniqueId} ${ot}`});x.append(t),he(t),me(),x.find(dt).eq(0).removeClass(lt).css({backgroundColor:"transparent"})}function Be(e){if(void 0===e&&(e=!0),e)De=!0,p.showToast("Starting Grid Mode - Use the mousewheel to resize.",1500),A.css("display","none"),o(d.formActions).css("display","none"),o(M).html("\n
\n

Grid Mode

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
ActionResult
MOUSEWHEELAdjust the field column size
W or ↑Move entire row up
S or ↓Move entire row down
A or ←Move field left within the row
D or →Move field right within the row
RResize all fields within the row to be maximally equal
\n\n
Current Row Fields
\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n
FieldSize
\n \n
\n "),Fe(),p.closeAllEdit(),p.toggleHighlight(Ee),ue();else{p.showToast("Grid Mode Finished",1500);const e=Ee.closest(at);let t=0;e.children(`div${st}`).each(((e,r)=>{const n=o(`#${r.id}`).find("li").attr("id");t+=p.getBootstrapColumnValue(o(`#${n}-cont`).attr("class"))})),t>12&&Re(e,!0),De=!1,Ee=null,o(M).empty(),A.css("display","unset"),o(d.formActions).css("display","unset")}}function Fe(){o(M).find(".gridHelpCurrentRow tbody").empty(),Ee.closest(at).children(`div${st}`).each(((e,t)=>{const r=o(`#${t.id}`).find("li").attr("id"),n=o(`#${r}`),i=n.attr("type");let l=o(`#label-${r}`).html();"hidden"!==i&&"paragraph"!==i||(l=o(`#name-${r}`).val()),l||(l=n.attr("id"));let a="";Ee.attr("id")===r&&(a="currentGridModeFieldHighlight"),o(M).find(".gridHelpCurrentRow tbody").append(`\n \n ${l}\n \n ${p.getBootstrapColumnValue(o(`#${r}-cont`).attr("class"))}\n \n \n `)}))}if(x.on("click touchstart",".grid-button",(e=>{e.preventDefault();const t=o(e.target).parents(".form-field:eq(0)").attr("id");Ee=o(document.getElementById(t)),Ne=e.pageX,Te=e.pageY,Le=0,Be()})),x.on("wheel",(function(e){if(0!==e.originalEvent.deltaY&&De){e.preventDefault(),Le+=e.originalEvent.deltaY;const t=120;if(Le>0&&Le-t)return;const r=Ee.closest("div"),n=p.getBootstrapColumnValue(r.attr("class")),i=Math.round(Le/t);Le%=t;const l=n+i;if(l>12)return void p.showToast('Column Size cannot exceed 12');if(l<1)return void p.showToast('Column Size cannot be less than 1');const a=Ee.closest(at);let s=l;if(a.children(`div${st}`).each(((e,t)=>{const r=o(`#${t.id}`).find("li").attr("id");r!=Ee.attr("id")&&(s+=p.getBootstrapColumnValue(o(`#${r}-cont`).attr("class")))})),s>12)return void p.showToast('There is a maximum of 12 columns per row');p.syncBootstrapColumnWrapperAndClassProperty(Ee.attr("id"),l),Ee.attr("manuallyChangedDefaultColumnClass",!0),Fe(),p.toggleHighlight(Ee)}})),o(document).keydown((e=>{if(De){e.preventDefault();const t=Ee.closest(at);switch(event.code){case"KeyW":case"ArrowUp":Ae(t),function(e){const t=e.prevAll().not(dt).not(".form-prepend").first();t.length&&(o(Ee.parent().parent()).swapWith(t),p.toggleHighlight(Ee))}(t);break;case"KeyS":case"ArrowDown":Ae(t),function(e){const t=e.nextAll().not(ct).not(".form-append").first();t.length&&(o(Ee.parent().parent()).swapWith(t),p.toggleHighlight(Ee))}(t);break;case"KeyA":case"ArrowLeft":Ae(t),function(){const e=Ee.parent().prev();e.length&&Ee.parent().after(e),p.toggleHighlight(Ee)}();break;case"KeyD":case"ArrowRight":Ae(t),function(){const e=Ee.parent().next();e.length&&Ee.parent().before(e),p.toggleHighlight(Ee)}();break;case"KeyR":Ae(t),Re(t,!0),xe(t,!0)}Fe(),Ce(t)}})),o(document).mousemove((e=>{De&&p.getDistanceBetweenPoints(Ne,Te,e.pageX,e.pageY)>ye.opts.cancelGridModeDistance&&Be(!1)})),o(document).on("checkRowCleanup",((e,t)=>{Me();const r=o(`#${t.rowWrapperID}`);r.length&&Re(r,!0),Pe()})),o(document).on("fieldOpened",((e,t)=>{const r=o(`#${t.rowWrapperID}`);r.length&&Ce(r)})),x.on("click",".field-actions .sort-button",(function(e){e.preventDefault();const t=o(e.target).parent().parent("li");let r;o(e.target).hasClass("sort-button-higher")?(r=t.prev("li"),r.length&&!r.hasClass("form-prepend")&&t.insertBefore(r)):(r=t.next("li"),r.length&&!r.hasClass("form-append")&&t.insertAfter(r)),p.toggleHighlight(t)})),x.on("click",".style-wrap button",(e=>{const t=o(e.target),r=t.closest(".form-elements"),n=t.val(),i=o(".btn-style",r);i.val(n),t.siblings(".btn").removeClass("selected"),t.addClass("selected"),we(i.closest(".form-field"))})),x.on("click",".fld-required",(e=>{o(e.target).closest(".form-field").find(".required-asterisk").toggle()})),x.on("click","input.fld-access",(function(e){const t=o(e.target).closest(".form-field").find(".available-roles"),r=o(e.target);t.slideToggle(250,(function(){r.is(":checked")||o("input[type=checkbox]",t).removeAttr("checked")}))})),x.on("click",".add-opt",(function(e){e.preventDefault();const t=o(e.target).closest(".form-field").attr("type"),r=o(e.target).closest(".field-options"),n=o('[name="multiple"]',r),i=o(".option-selected:eq(0)",r),l=n.length?n.prop("checked"):"checkbox"===i.attr("type"),a=o(".sortable-options",r),s=ye.opts.onAddOption({selected:!1,label:"",value:""},{type:t,index:a.children().length,isMultiple:l});a.append(ke(i.attr("name"),s,l))})),x.on("mouseover mouseout",".remove, .del-button",(e=>o(e.target).closest("li").toggleClass("delete"))),z(),!0===e.disableInjectedStyle){const e=document.getElementsByClassName("formBuilder-injected-style");X(e,(t=>a(e[t])))}else"bootstrap"===e.disableInjectedStyle&&d.editorWrap.classList.remove("formbuilder-embedded-bootstrap");return document.dispatchEvent(v.loaded),n.actions={getFieldTypes:t=>t?ae(g.getRegistered(),e.disableFields):g.getRegistered(),clearFields:()=>p.removeAllFields(d.stage),showData:p.showData.bind(p),save:e=>{const t=p.save(e),r=window.JSON.parse(t);return ye.opts.onSave(r),r},addField:(e,t)=>{p.stopIndex=s.formData.length?t:void 0,B(e)},removeField:p.removeField.bind(p),getData:p.getFormData.bind(p),setData:e=>{p.stopIndex=void 0,p.removeAllFields(d.stage),z(e)},setLang:e=>h().setCurrent.call(h(),e).then((()=>{d.stage.dataset.content=h().get("getStarted"),g.init(),d.empty(d.formActions),p.formActionButtons().forEach((e=>d.formActions.appendChild(e)))})),showDialog:p.dialog.bind(p),toggleFieldEdit:e=>{(Array.isArray(e)?e:[e]).forEach((e=>{["number","string"].includes(typeof e)&&("number"==typeof e?e=d.stage.children[e].id:/^frmb-/.test(e)||(e=d.stage.querySelector(e).id),p.toggleEdit(e))}))},toggleAllFieldEdit:()=>{X(d.stage.children,(e=>{p.toggleEdit(d.stage.children[e].id)}))},closeAllFieldEdit:p.closeAllEdit.bind(p),getCurrentFieldId:()=>s.lastID},d.onRender(d.controls,(()=>{const t=setTimeout((()=>{d.stage.style.minHeight=`${d.controls.clientHeight}px`,e.stickyControls.enable&&p.stickyControls(x),Pe(),clearTimeout(t)}),0)})),n}const pt=function(e,t){const r=this,o=jQuery.extend({},ge,e,!0),{i18n:n}=o,i=_e(o,Ke);ye.opts=i,this.i18nOpts=jQuery.extend({},we,n,!0);const l=()=>{console.error("formBuilder is still initialising"),console.info("See https://formbuilder.online/docs/formBuilder/actions/getData/#wont-work and https://formbuilder.online/docs/formBuilder/promise/ for more information on formBuilder asynchronous loading")};this.instance={actions:["getFieldTypes","addField","clearFields","closeAllFieldEdit","getData","removeField","save","setData","setLang","showData","showDialog","toggleAllFieldEdit","toggleFieldEdit","getCurrentFieldId"].reduce(((e,t)=>(e[t]=l,e)),{}),markup:q,get formData(){return r.instance.actions.getData!==l&&r.instance.actions.getData("json")},promise:new Promise((function(e,o){h().init(r.i18nOpts).then((()=>{const o=new ut(i,t[0],jQuery);jQuery(t[0]).data("formBuilder",o),Object.assign(r.instance,o.actions),r.instance.actions=o.actions,delete r.instance.promise,e(r.instance)})).catch((e=>{o(e),i.notify.error(e)}))}))}};jQuery.fn.formBuilder=function(e){if(void 0===e&&(e={}),"string"!=typeof e){const t=new pt(e,this);return this.data("fbInstance",t.instance),t.instance}{const n=this.data("fbInstance");if(n[e]){if("function"==typeof n[e]){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o.btn{position:relative;float:left}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .btn+.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .btn+.btn-group,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .btn-group+.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .btn-group+.btn-group{margin-left:-1px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn:last-child:not(:first-child),.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.dropdown-toggle:not(:first-child),.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group .form-control:last-child,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group-addon:last-child,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group-btn:first-child>.btn:not(:first-child),.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group-btn:last-child>.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group-btn:last-child>.btn-group>.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn.active,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn:active,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn:focus,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn:hover{z-index:2}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-image:none;border-radius:4px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn.active,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn.btn-active,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn:active{background-image:none}.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group .form-control:last-child,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-addon:last-child,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-btn:first-child>.btn:not(:first-child),.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-btn:last-child>.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-btn:last-child>.btn-group>.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group .form-control,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-addon,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-btn{display:table-cell}.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-lg>.form-control,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-lg>.input-group-addon,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333}.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group{position:relative;display:table;border-collapse:separate}.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.form-wrap.form-builder.formbuilder-embedded-bootstrap .form-control,.form-wrap.form-builder.formbuilder-embedded-bootstrap output{font-size:14px;line-height:1.42857143;display:block}.form-wrap.form-builder.formbuilder-embedded-bootstrap textarea.form-control{height:auto}.form-wrap.form-builder.formbuilder-embedded-bootstrap .form-control{height:34px;display:block;width:100%;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .form-control:focus{outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-wrap.form-builder.formbuilder-embedded-bootstrap .form-group{margin-left:0px;margin-bottom:15px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .form-control{background-image:none}.form-wrap.form-builder.formbuilder-embedded-bootstrap .pull-right{float:right}.form-wrap.form-builder.formbuilder-embedded-bootstrap .pull-left{float:left}.form-wrap.form-builder .formbuilder-required,.form-wrap.form-builder .required-asterisk{color:#c10000}.form-wrap.form-builder .formbuilder-checkbox-group input[type=checkbox],.form-wrap.form-builder .formbuilder-checkbox-group input[type=radio],.form-wrap.form-builder .formbuilder-radio-group input[type=checkbox],.form-wrap.form-builder .formbuilder-radio-group input[type=radio]{margin:0 4px 0 0}.form-wrap.form-builder .formbuilder-checkbox-inline,.form-wrap.form-builder .formbuilder-radio-inline{margin-right:8px;display:inline-block;vertical-align:middle;padding-left:0}.form-wrap.form-builder .formbuilder-checkbox-inline label input[type=text],.form-wrap.form-builder .formbuilder-radio-inline label input[type=text]{margin-top:0}.form-wrap.form-builder .formbuilder-checkbox-inline:first-child,.form-wrap.form-builder .formbuilder-radio-inline:first-child{padding-left:0}.form-wrap.form-builder .formbuilder-autocomplete-list{background-color:#fff;display:none;list-style:none;padding:0;border:1px solid #ccc;border-width:0 1px 1px;position:absolute;z-index:20;max-height:200px;overflow-y:auto}.form-wrap.form-builder .formbuilder-autocomplete-list li{display:none;cursor:default;padding:5px;margin:0;transition:background-color 200ms ease-in-out}.form-wrap.form-builder .formbuilder-autocomplete-list li:hover,.form-wrap.form-builder .formbuilder-autocomplete-list li.active-option{background-color:rgba(0,0,0,.075)}@keyframes PLACEHOLDER{0%{height:1px}100%{height:15px}}.form-wrap.form-builder .cb-wrap{width:26%;transition:transform 250ms}.form-wrap.form-builder .cb-wrap.pull-left .form-actions{float:left}.form-wrap.form-builder .cb-wrap h4{margin-top:0;color:#666}@media(max-width: 481px){.form-wrap.form-builder .cb-wrap{width:64px}.form-wrap.form-builder .cb-wrap h4{display:none}}.form-wrap.form-builder .frmb-control{margin:0;padding:0;border-radius:5px}.form-wrap.form-builder .frmb-control li{cursor:move;list-style:none;margin:0 0 -1px 0;padding:10px;text-align:left;background:#fff;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;box-shadow:inset 0 0 0 1px #c5c5c5}.form-wrap.form-builder .frmb-control li .control-icon{width:16px;height:auto;margin-right:10px;margin-left:.2em;display:inline-block}.form-wrap.form-builder .frmb-control li .control-icon img,.form-wrap.form-builder .frmb-control li .control-icon svg{max-width:100%;height:auto}.form-wrap.form-builder .frmb-control li:first-child{border-radius:5px 5px 0 0;margin-top:0}.form-wrap.form-builder .frmb-control li:last-child{border-radius:0 0 5px 5px}.form-wrap.form-builder .frmb-control li::before{margin-right:10px;font-size:16px}.form-wrap.form-builder .frmb-control li:hover{background-color:#f2f2f2}.form-wrap.form-builder .frmb-control li.ui-sortable-helper{border-radius:5px;transition:box-shadow 250ms;box-shadow:2px 2px 6px 0 #666;border:1px solid #fff}.form-wrap.form-builder .frmb-control li.ui-state-highlight{width:0;overflow:hidden;padding:0;margin:0;border:0 none}.form-wrap.form-builder .frmb-control li.moving{opacity:.6}.form-wrap.form-builder .frmb-control li.formbuilder-separator{background-color:rgba(0,0,0,0);box-shadow:none;padding:0;cursor:default}.form-wrap.form-builder .frmb-control li.formbuilder-separator hr{margin:10px 0}@media(max-width: 481px){.form-wrap.form-builder .frmb-control li::before{font-size:30px}.form-wrap.form-builder .frmb-control li{text-overflow:clip}.form-wrap.form-builder .frmb-control li span{visibility:hidden}.form-wrap.form-builder .frmb-control li span span{visibility:visible;font-size:30px;width:auto !important}}.form-wrap.form-builder .frmb-control.sort-enabled li.ui-state-highlight{box-shadow:none;height:0;width:100%;background:radial-gradient(ellipse at center, rgb(84, 84, 84) 0%, rgba(0, 0, 0, 0) 75%);border:0 none;-webkit-clip-path:polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);clip-path:polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);visibility:visible;overflow:hidden;margin:1px 0 3px;animation:PLACEHOLDER 250ms forwards}.formbuilder-mobile.form-wrap.form-builder .form-actions{width:100%}.formbuilder-mobile.form-wrap.form-builder .form-actions button{width:100%;font-size:.85em !important;display:block !important;border-radius:0 !important;margin-top:-1px;margin-left:0 !important}.formbuilder-mobile.form-wrap.form-builder .form-actions button:first-child{border-radius:5px 5px 0 0 !important;margin-top:0 !important;border-bottom:0 none}.formbuilder-mobile.form-wrap.form-builder .form-actions button:last-child{border-radius:0 0 5px 5px !important}.form-wrap.form-builder .form-actions{float:right;margin-top:5px}.form-wrap.form-builder .form-actions button{border:0 none}.form-wrap.form-builder .stage-wrap{display:flex;flex-direction:column;position:relative;padding:0;margin:0;width:calc(74% - 5px)}@media(max-width: 481px){.form-wrap.form-builder .stage-wrap{width:calc(100% - 64px)}}.form-wrap.form-builder .stage-wrap.empty{border:3px dashed #ccc;background-color:rgba(255,255,255,.25)}.form-wrap.form-builder .stage-wrap.empty::after{content:attr(data-content);position:absolute;text-align:center;top:50%;left:0;width:100%;margin-top:-1em}.form-wrap.form-builder .frmb{list-style-type:none;min-height:200px;transition:background-color 500ms ease-in-out}.form-wrap.form-builder .frmb .formbuilder-required{color:#c10000}.form-wrap.form-builder .frmb.removing{overflow:hidden}.form-wrap.form-builder .frmb li.form-field:hover{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.1),0 0 8px rgba(102,175,233,.6)}.form-wrap.form-builder .frmb li.form-field:hover .field-actions{opacity:1}.form-wrap.form-builder .frmb li.form-field:hover li :hover{background:#fefefe}.form-wrap.form-builder .frmb li.form-field{position:relative;padding:6px;clear:both;margin-left:0;margin-bottom:3px;background-color:#fff;transition:background-color 250ms ease-in-out,margin-top 400ms}.form-wrap.form-builder .frmb li.form-field.hidden-field{background-color:rgba(255,255,255,.6)}.form-wrap.form-builder .frmb li.form-field:first-child{border-top-right-radius:5px;border-top-left-radius:5px}.form-wrap.form-builder .frmb li.form-field:first-child .field-actions .btn:last-child{border-radius:0 5px 0 0}.form-wrap.form-builder .frmb li.form-field:last-child{border-bottom-right-radius:5px;border-bottom-left-radius:5px}.form-wrap.form-builder .frmb li.form-field.no-fields label{font-weight:400}@keyframes PLACEHOLDER{0%{height:0}100%{height:15px}}.form-wrap.form-builder .frmb li.form-field.frmb-placeholder,.form-wrap.form-builder .frmb li.form-field.ui-state-highlight{height:0;padding:0;background:radial-gradient(ellipse at center, rgb(84, 84, 84) 0%, rgba(0, 0, 0, 0) 75%);border:0 none;-webkit-clip-path:polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);clip-path:polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);visibility:visible;overflow:hidden;margin-bottom:3px;animation:PLACEHOLDER 250ms forwards}.form-wrap.form-builder .frmb li.form-field.moving,.form-wrap.form-builder .frmb li.form-field.ui-sortable-helper{transition:box-shadow 500ms ease-in-out;box-shadow:2px 2px 6px 0 #666;border:1px solid #fff;border-radius:5px}.form-wrap.form-builder .frmb li.form-field.disabled-field{z-index:1;position:relative;overflow:visible}.form-wrap.form-builder .frmb li.form-field.disabled-field:hover .frmb-tt{display:inline-block}.form-wrap.form-builder .frmb li.form-field.disabled-field [type=checkbox]{float:left;margin-right:10px}.form-wrap.form-builder .frmb li.form-field.disabled-field h2{border-bottom:0 none}.form-wrap.form-builder .frmb li.form-field.disabled-field label{font-size:12px;font-weight:400;color:#666}.form-wrap.form-builder .frmb li.form-field.disabled-field .prev-holder{cursor:default;line-height:28px;padding-left:5px}.form-wrap.form-builder .frmb li.form-field .close-field{position:absolute;color:#666;left:50%;bottom:6px;background:#fff;border-top:1px solid #c5c5c5;border-left:1px solid #c5c5c5;border-right:1px solid #c5c5c5;transform:translateX(-50%);padding:0 5px;border-top-right-radius:3px;border-top-left-radius:3px;cursor:pointer;transition:background-color 250ms ease-in-out}.form-wrap.form-builder .frmb li.form-field .close-field:hover{text-decoration:none}.form-wrap.form-builder .frmb li.form-field.button-field h1,.form-wrap.form-builder .frmb li.form-field.button-field h2,.form-wrap.form-builder .frmb li.form-field.button-field h3,.form-wrap.form-builder .frmb li.form-field.button-field p,.form-wrap.form-builder .frmb li.form-field.button-field canvas,.form-wrap.form-builder .frmb li.form-field.button-field output,.form-wrap.form-builder .frmb li.form-field.button-field address,.form-wrap.form-builder .frmb li.form-field.button-field blockquote,.form-wrap.form-builder .frmb li.form-field.button-field .prev-holder,.form-wrap.form-builder .frmb li.form-field.header-field h1,.form-wrap.form-builder .frmb li.form-field.header-field h2,.form-wrap.form-builder .frmb li.form-field.header-field h3,.form-wrap.form-builder .frmb li.form-field.header-field p,.form-wrap.form-builder .frmb li.form-field.header-field canvas,.form-wrap.form-builder .frmb li.form-field.header-field output,.form-wrap.form-builder .frmb li.form-field.header-field address,.form-wrap.form-builder .frmb li.form-field.header-field blockquote,.form-wrap.form-builder .frmb li.form-field.header-field .prev-holder,.form-wrap.form-builder .frmb li.form-field.paragraph-field h1,.form-wrap.form-builder .frmb li.form-field.paragraph-field h2,.form-wrap.form-builder .frmb li.form-field.paragraph-field h3,.form-wrap.form-builder .frmb li.form-field.paragraph-field p,.form-wrap.form-builder .frmb li.form-field.paragraph-field canvas,.form-wrap.form-builder .frmb li.form-field.paragraph-field output,.form-wrap.form-builder .frmb li.form-field.paragraph-field address,.form-wrap.form-builder .frmb li.form-field.paragraph-field blockquote,.form-wrap.form-builder .frmb li.form-field.paragraph-field .prev-holder{margin:0}.form-wrap.form-builder .frmb li.form-field.button-field .field-label,.form-wrap.form-builder .frmb li.form-field.header-field .field-label,.form-wrap.form-builder .frmb li.form-field.paragraph-field .field-label{display:none}.form-wrap.form-builder .frmb li.form-field.button-field.editing .field-label,.form-wrap.form-builder .frmb li.form-field.header-field.editing .field-label,.form-wrap.form-builder .frmb li.form-field.paragraph-field.editing .field-label{display:block}.form-wrap.form-builder .frmb li.form-field.paragraph-field .fld-label{min-height:150px;overflow-y:auto}.form-wrap.form-builder .frmb li.form-field.checkbox-field .field-label{display:none}.form-wrap.form-builder .frmb li.deleting,.form-wrap.form-builder .frmb li.delete:hover,.form-wrap.form-builder .frmb li:hover li.delete:hover{background-color:#fdd}.form-wrap.form-builder .frmb li.deleting .close-field,.form-wrap.form-builder .frmb li.delete:hover .close-field,.form-wrap.form-builder .frmb li:hover li.delete:hover .close-field{background-color:#fdd}.form-wrap.form-builder .frmb li.deleting{z-index:20;pointer-events:none}.form-wrap.form-builder .frmb.disabled-field{padding:0 5px}.form-wrap.form-builder .frmb.disabled-field :hover{border-color:rgba(0,0,0,0)}.form-wrap.form-builder .frmb.disabled-field .form-element{float:none;margin-bottom:10px;overflow:visible;padding:5px 0;position:relative}.form-wrap.form-builder .frmb .frm-holder{display:none}.form-wrap.form-builder .frmb .tooltip{left:20px}.form-wrap.form-builder .frmb .prev-holder{display:block}.form-wrap.form-builder .frmb .prev-holder .form-group{margin:0}.form-wrap.form-builder .frmb .prev-holder .ql-editor{min-height:125px}.form-wrap.form-builder .frmb .prev-holder .form-group>label:not([class=formbuilder-checkbox-label]){display:none}.form-wrap.form-builder .frmb .prev-holder select,.form-wrap.form-builder .frmb .prev-holder input[type=text],.form-wrap.form-builder .frmb .prev-holder textarea,.form-wrap.form-builder .frmb .prev-holder input[type=number]{background-color:#fff;border:1px solid #ccc;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.form-wrap.form-builder .frmb .prev-holder input[type=color]{width:60px;padding:2px;display:inline-block}.form-wrap.form-builder .frmb .prev-holder input[type=date]{width:auto}.form-wrap.form-builder .frmb .prev-holder select[multiple]{height:auto}.form-wrap.form-builder .frmb .prev-holder label{font-weight:normal}.form-wrap.form-builder .frmb .prev-holder input[type=number]{width:auto;max-width:100%}.form-wrap.form-builder .frmb .prev-holder input[type=color]{width:60px;padding:2px;display:inline-block}.form-wrap.form-builder .frmb .required-asterisk{display:none}.form-wrap.form-builder .frmb .field-label,.form-wrap.form-builder .frmb .legend{color:#666;margin-bottom:5px;line-height:27px;font-size:16px;font-weight:normal}.form-wrap.form-builder .frmb .disabled-field .field-label{display:block}.form-wrap.form-builder .frmb .other-option:checked+label input{display:inline-block}.form-wrap.form-builder .frmb .other-val{margin-left:5px;display:none}.form-wrap.form-builder .frmb .field-actions{position:absolute;top:0;right:0;opacity:0}.form-wrap.form-builder .frmb .field-actions a::before{margin:0}.form-wrap.form-builder .frmb .field-actions a:hover{text-decoration:none;color:#000}.form-wrap.form-builder .frmb .field-actions .btn{display:inline-block;width:32px;height:32px;padding:0 6px;border-radius:0;border-color:#c5c5c5;background-color:#fff;color:#c5c5c5;line-height:32px;font-size:16px;border-width:0 0 1px 1px}.form-wrap.form-builder .frmb .field-actions .btn:first-child{border-bottom-left-radius:5px}.form-wrap.form-builder .frmb .field-actions .toggle-form:hover{border-color:#ccc;background-color:#65aac6;color:#fff}.form-wrap.form-builder .frmb .field-actions .toggle-form::before{margin:0}.form-wrap.form-builder .frmb .field-actions .copy-button:hover{background-color:#6fc665;color:#fff}.form-wrap.form-builder .frmb .field-actions .del-button:hover{background-color:#c66865;color:#fff}.form-wrap.form-builder .frmb .option-actions{text-align:right;margin-top:10px;width:100%;margin-left:2%}.form-wrap.form-builder .frmb .option-actions button,.form-wrap.form-builder .frmb .option-actions a{background:#fff;padding:5px 10px;border:1px solid #c5c5c5;font-size:14px;border-radius:5px;cursor:default}.form-wrap.form-builder .frmb .sortable-options-wrap{width:81.33333333%;display:inline-block}.form-wrap.form-builder .frmb .sortable-options-wrap label{font-weight:normal}@media(max-width: 481px){.form-wrap.form-builder .frmb .sortable-options-wrap{display:block;width:100%}}.form-wrap.form-builder .frmb .radio-group-field .sortable-options li:nth-child(2) .remove{display:none}.form-wrap.form-builder .frmb .sortable-options{display:inline-block;width:100%;margin-left:2%;background:#c5c5c5;margin-bottom:0;border-radius:2px;list-style:none;padding:0}.form-wrap.form-builder .frmb .sortable-options>li{cursor:move;margin:1px;padding:6px;background-color:#fff}.form-wrap.form-builder .frmb .sortable-options>li:nth-child(1) .remove{display:none}.form-wrap.form-builder .frmb .sortable-options>li .remove{position:relative;opacity:1;float:right;right:14px;height:18px;width:18px;top:8px;font-size:12px;padding:0;color:#c10000}.form-wrap.form-builder .frmb .sortable-options>li .remove::before{margin:0}.form-wrap.form-builder .frmb .sortable-options>li .remove:hover{background-color:#c10000 !important;text-decoration:none;color:#fff}.form-wrap.form-builder .frmb .sortable-options .option-selected{margin:0;width:5%}.form-wrap.form-builder .frmb .sortable-options input[type=text]{width:calc(44.5% - 17px);margin:0 3px;float:none}.form-wrap.form-builder .frmb .form-field .form-group{width:100%;clear:left;float:none}.form-wrap.form-builder .frmb .col-md-6 .form-elements,.form-wrap.form-builder .frmb .col-md-8 .form-elements{width:100%}.form-wrap.form-builder .frmb .field-options .add-area .add{clear:both}.form-wrap.form-builder .frmb .style-wrap button.selected{border:1px solid #000;margin-top:0;margin-right:1px;box-shadow:0 0 0 1px #fff inset;padding:1px 5px}.form-wrap.form-builder .frmb .form-elements{padding:10px 5px;background:#f7f7f7;border-radius:3px;margin:0;border:1px solid #c5c5c5}.form-wrap.form-builder .frmb .form-elements .input-wrap{width:81.33333333%;margin-left:2%;float:left}.form-wrap.form-builder .frmb .form-elements .input-wrap>input[type=checkbox]{margin-top:8px}.form-wrap.form-builder .frmb .form-elements .btn-group{margin-left:2%}.form-wrap.form-builder .frmb .form-elements .add{clear:both}.form-wrap.form-builder .frmb .form-elements [contenteditable],.form-wrap.form-builder .frmb .form-elements select[multiple]{height:auto}.form-wrap.form-builder .frmb .form-elements [contenteditable].form-control{display:inline-block}.form-wrap.form-builder .frmb .form-elements [contenteditable].form-control,.form-wrap.form-builder .frmb .form-elements input[type=text],.form-wrap.form-builder .frmb .form-elements input[type=number],.form-wrap.form-builder .frmb .form-elements input[type=date],.form-wrap.form-builder .frmb .form-elements input[type=color],.form-wrap.form-builder .frmb .form-elements textarea,.form-wrap.form-builder .frmb .form-elements select{transition:background 250ms ease-in-out;padding:6px 12px;border:1px solid #c5c5c5;background-color:#fff}@media(max-width: 481px){.form-wrap.form-builder .frmb .form-elements .input-wrap{width:100%;margin-left:0;float:none}}.form-wrap.form-builder .frmb .form-elements input[type=number]{width:auto}.form-wrap.form-builder .frmb .form-elements .btn-group{margin-left:2%}.col-md-6 .form-wrap.form-builder .frmb .form-elements .false-label,.col-md-8 .form-wrap.form-builder .frmb .form-elements .false-label,.col-md-6 .form-wrap.form-builder .frmb .form-elements label,.col-md-8 .form-wrap.form-builder .frmb .form-elements label{display:block}.form-wrap.form-builder .frmb .form-elements .false-label:first-child,.form-wrap.form-builder .frmb .form-elements label:first-child{width:16.66666667%;padding-top:7px;margin-bottom:0;text-align:right;font-weight:700;float:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-transform:capitalize}@media(max-width: 481px){.form-wrap.form-builder .frmb .form-elements .false-label:first-child,.form-wrap.form-builder .frmb .form-elements label:first-child{display:block;width:auto;float:none;text-align:left}.form-wrap.form-builder .frmb .form-elements .false-label:first-child.empty-label,.form-wrap.form-builder .frmb .form-elements label:first-child.empty-label{display:none}}.form-wrap.form-builder .frmb .form-elements .false-label.multiple,.form-wrap.form-builder .frmb .form-elements .false-label.required-label,.form-wrap.form-builder .frmb .form-elements .false-label.toggle-label,.form-wrap.form-builder .frmb .form-elements .false-label.roles-label,.form-wrap.form-builder .frmb .form-elements .false-label.other-label,.form-wrap.form-builder .frmb .form-elements label.multiple,.form-wrap.form-builder .frmb .form-elements label.required-label,.form-wrap.form-builder .frmb .form-elements label.toggle-label,.form-wrap.form-builder .frmb .form-elements label.roles-label,.form-wrap.form-builder .frmb .form-elements label.other-label{text-align:left;float:none;margin-bottom:-3px;font-weight:400;width:calc(81.3333% - 23px)}.form-wrap.form-builder .frmb .form-elements input.error{border:1px solid #c10000}.form-wrap.form-builder .frmb .form-elements input.fld-maxlength{width:75px}.form-wrap.form-builder .frmb .form-elements input.field-error{background:#fefefe;border:1px solid #c5c5c5}.form-wrap.form-builder .frmb .form-elements label em{display:block;font-weight:400;font-size:.75em}.form-wrap.form-builder .frmb .form-elements label.maxlength-label{line-height:1em}.form-wrap.form-builder .frmb .form-elements .available-roles{display:none;padding:10px;margin:10px 0;background:#e6e6e6;box-shadow:inset 0 0 2px 0 #b3b3b3}@media(max-width: 481px){.form-wrap.form-builder .frmb .form-elements .available-roles{margin-left:0}}.form-wrap.form-builder .frmb .form-elements .available-roles label{font-weight:400;width:auto;float:none;display:inline}.form-wrap.form-builder .frmb .form-elements .available-roles input{display:inline;top:auto}.form-wrap.form-builder .autocomplete-field .sortable-options .option-selected{display:none}.formbuilder-mobile.form-wrap.form-builder .field-actions{opacity:1}.form-wrap.form-builder .snackbar{visibility:hidden;min-width:250px;margin-left:-125px;background-color:#333;color:#fff;text-align:center;border-radius:2px;padding:16px;position:fixed;z-index:1;left:50%;bottom:30px}.form-wrap.form-builder .snackbar.show{visibility:visible;animation:fadein .5s,fadeout .5s 2.5s}@keyframes fadein{from{bottom:0;opacity:0}to{bottom:30px;opacity:1}}@keyframes fadeout{from{bottom:30px;opacity:1}to{bottom:0;opacity:0}}.form-wrap.form-builder .ui-state-highlight{border-radius:3px;border:1px dashed #0d99f2;background-color:#e5f5f8;width:12px}.form-wrap.form-builder .moveHighlight{border:1px dashed #0d99f2 !important;background-color:#e5f5f8 !important}.form-wrap.form-builder .currentGridModeFieldHighlight{background-color:#e5f5f8 !important}.form-wrap.form-builder .grid-mode-help{background-color:#fff;border-top-left-radius:5px;border-top-right-radius:5px}.form-wrap.form-builder .grid-mode-help-row1{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:1px}.form-wrap.form-builder .grid-mode-help-row2{white-space:nowrap}.form-wrap.form-builder .colWithInsertButtons{padding-left:0 !important;padding-right:0 !important;flex:95 1 0% !important}.form-wrap.form-builder .rowWrapper{margin-left:0 !important;margin-right:0 !important}.form-wrap.form-builder .rowWrapper:last-child{flex-grow:1}.form-wrap.form-builder .rowWrapper:not(.tempRowWrapper){padding-top:1em;padding-bottom:1em}.form-wrap.form-builder .btnAddControl{border:0;background-color:unset}.form-wrap.form-builder .hoverColumnDropStyle{border:1px dashed #0d99f2;border-radius:3px;background-color:#e5f5f8;width:20px;position:fixed;margin-left:40px}.form-wrap.form-builder .hoverDropStyleInverse{background-color:#0d99f2;border:1px dashed #e5f5f8;min-height:20px}.form-wrap.form-builder .hoverDropStyleInverse .colWrapper{max-width:calc(100% - 40px)}.form-wrap.form-builder .stage-wrap>.hoverDropStyleInverse{width:100%}.form-wrap.form-builder .rowWrapper>.hoverDropStyleInverse{min-width:40px;flex-grow:1}.form-wrap.form-builder .hoverDropStyleInverse:last-child{flex-grow:1}.form-wrap.form-builder .invisibleRowPlaceholder{width:0 !important;position:fixed !important;left:-100px !important}.form-wrap.form-builder *[tooltip]{position:relative}.form-wrap.form-builder *[tooltip]:hover::after{background:rgba(0,0,0,.9);border-radius:5px 5px 5px 0;bottom:23px;color:#fff;content:attr(tooltip);padding:10px 5px;position:absolute;z-index:98;left:2px;width:230px;text-shadow:none;font-size:12px;line-height:1.5em;cursor:default}.form-wrap.form-builder *[tooltip]:hover::before{border:solid;border-color:#222 rgba(0,0,0,0);border-width:6px 6px 0;bottom:17px;content:"";left:2px;position:absolute;z-index:99;cursor:default}.form-wrap.form-builder .tooltip-element{visibility:visible;color:#fff;background:#000;width:16px;height:16px;border-radius:8px;display:inline-block;text-align:center;line-height:16px;margin:0 5px;font-size:12px;cursor:default}.form-wrap.form-builder .kc-toggle{padding-left:0 !important}.form-wrap.form-builder .kc-toggle span{position:relative;width:48px;height:24px;background:#e6e6e6;display:inline-block;border-radius:4px;border:1px solid #ccc;padding:2px;overflow:hidden;float:left;margin-right:5px;will-change:transform}.form-wrap.form-builder .kc-toggle span::after,.form-wrap.form-builder .kc-toggle span::before{position:absolute;display:inline-block;top:0}.form-wrap.form-builder .kc-toggle span::after{position:relative;content:"";width:50%;height:100%;left:0;border-radius:3px;background:linear-gradient(to bottom, white 0%, #ccc 100%);border:1px solid #999;transition:transform 100ms;transform:translateX(0)}.form-wrap.form-builder .kc-toggle span::before{border-radius:4px;top:2px;left:2px;content:"";width:calc(100% - 4px);height:18px;box-shadow:0 0 1px 1px #b3b3b3 inset;background-color:rgba(0,0,0,0)}.form-wrap.form-builder .kc-toggle input{height:0;overflow:hidden;width:0;opacity:0;pointer-events:none;margin:0}.form-wrap.form-builder .kc-toggle input:checked+span::after{transform:translateX(100%)}.form-wrap.form-builder .kc-toggle input:checked+span::before{background-color:#6fc665}.form-wrap.form-builder::after{content:"";display:table;clear:both}.form-wrap.form-builder .cb-wrap,.form-wrap.form-builder .stage-wrap{vertical-align:top}.form-wrap.form-builder .cb-wrap.pull-right,.form-wrap.form-builder .stage-wrap.pull-right{float:right}.form-wrap.form-builder .cb-wrap.pull-left,.form-wrap.form-builder .stage-wrap.pull-left{float:left}.form-wrap.form-builder .form-elements,.form-wrap.form-builder .form-group,.form-wrap.form-builder .multi-row span,.form-wrap.form-builder textarea{display:block}.form-wrap.form-builder .form-elements::after,.form-wrap.form-builder .form-group::after{content:".";display:block;height:0;clear:both;visibility:hidden}.form-wrap.form-builder .form-elements .field-options div:hover,.form-wrap.form-builder .frmb .legend,.form-wrap.form-builder .frmb .prev-holder{cursor:move}.form-wrap.form-builder .frmb-tt{display:none;position:absolute;top:0;left:0;border:1px solid #262626;background-color:#666;border-radius:5px;padding:5px;color:#fff;z-index:20;text-align:left;font-size:12px;pointer-events:none}.form-wrap.form-builder .frmb-tt::before{border-color:#262626 rgba(0,0,0,0);bottom:-11px}.form-wrap.form-builder .frmb-tt::before,.form-wrap.form-builder .frmb-tt::after{content:"";position:absolute;border-style:solid;border-width:10px 10px 0;border-color:#666 rgba(0,0,0,0);display:block;width:0;z-index:1;margin-left:-10px;bottom:-10px;left:20px}.form-wrap.form-builder .frmb-tt a{text-decoration:underline;color:#fff}.form-builder-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.5);display:none;z-index:10}.form-builder-overlay.visible{display:block}.form-builder-dialog{position:absolute;border-radius:5px;background:#fff;z-index:20;transform:translate(-50%, -50%);top:0;left:0;padding:10px;box-shadow:0 3px 10px #000;min-width:166px;max-height:80%;overflow-y:scroll}.form-builder-dialog h3{margin-top:0}.form-builder-dialog.data-dialog{width:65%;background-color:#23241f}.form-builder-dialog.data-dialog pre{background:none;border:0 none;box-shadow:none;margin:0;color:#f2f2f2}.form-builder-dialog.positioned{transform:translate(-50%, -100%)}.form-builder-dialog.positioned .button-wrap::before{content:"";width:0;height:0;border-left:15px solid rgba(0,0,0,0);border-right:15px solid rgba(0,0,0,0);border-top:10px solid #fff;position:absolute;left:50%;top:100%;transform:translate(-50%, 10px)}.form-builder-dialog .button-wrap{position:relative;margin-top:10px;text-align:right;clear:both}.form-builder-dialog .button-wrap .btn{margin-left:10px}',""]),t.default=u},476:function(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",o=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),o&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),o&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,o,n,i){"string"==typeof e&&(e=[[null,e,void 0]]);var l={};if(o)for(var a=0;a0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=i),r&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=r):c[2]=r),n&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=n):c[4]="".concat(n)),t.push(c))}},t}},678:function(e){e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},933:function(e){e.exports=function(e){return e[1]}},539:function(e,t,r){var o=r(400).Symbol;e.exports=o},736:function(e,t,r){var o=r(539),n=r(840),i=r(258),l=o?o.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":l&&l in Object(e)?n(e):i(e)}},833:function(e,t,r){var o=r(127),n=/^\s+/;e.exports=function(e){return e?e.slice(0,o(e)+1).replace(n,""):e}},120:function(e){var t="object"==typeof global&&global&&global.Object===Object&&global;e.exports=t},840:function(e,t,r){var o=r(539),n=Object.prototype,i=n.hasOwnProperty,l=n.toString,a=o?o.toStringTag:void 0;e.exports=function(e){var t=i.call(e,a),r=e[a];try{e[a]=void 0;var o=!0}catch(e){}var n=l.call(e);return o&&(t?e[a]=r:delete e[a]),n}},258:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},400:function(e,t,r){var o=r(120),n="object"==typeof self&&self&&self.Object===Object&&self,i=o||n||Function("return this")();e.exports=i},127:function(e){var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},726:function(e,t,r){var o=r(611),n=r(846),i=r(936),l=Math.max,a=Math.min;e.exports=function(e,t,r){var s,d,c,f,u,p,m=0,b=!1,h=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var r=s,o=d;return s=d=void 0,m=t,f=e.apply(o,r)}function w(e){var r=e-p;return void 0===p||r>=t||r<0||h&&e-m>=c}function y(){var e=n();if(w(e))return x(e);u=setTimeout(y,function(e){var r=t-(e-p);return h?a(r,c-(e-m)):r}(e))}function x(e){return u=void 0,g&&s?v(e):(s=d=void 0,f)}function A(){var e=n(),r=w(e);if(s=arguments,d=this,p=e,r){if(void 0===u)return function(e){return m=e,u=setTimeout(y,t),b?v(e):f}(p);if(h)return clearTimeout(u),u=setTimeout(y,t),v(p)}return void 0===u&&(u=setTimeout(y,t)),f}return t=i(t)||0,o(r)&&(b=!!r.leading,c=(h="maxWait"in r)?l(i(r.maxWait)||0,t):c,g="trailing"in r?!!r.trailing:g),A.cancel=function(){void 0!==u&&clearTimeout(u),m=0,s=p=d=u=void 0},A.flush=function(){return void 0===u?f:x(n())},A}},611:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},360:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},193:function(e,t,r){var o=r(736),n=r(360);e.exports=function(e){return"symbol"==typeof e||n(e)&&"[object Symbol]"==o(e)}},846:function(e,t,r){var o=r(400);e.exports=function(){return o.Date.now()}},783:function(e,t,r){var o=r(726),n=r(611);e.exports=function(e,t,r){var i=!0,l=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return n(r)&&(i="leading"in r?!!r.leading:i,l="trailing"in r?!!r.trailing:l),o(e,t,{leading:i,maxWait:t,trailing:l})}},936:function(e,t,r){var o=r(833),n=r(611),i=r(193),l=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,d=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(n(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=n(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=o(e);var r=a.test(e);return r||s.test(e)?d(e.slice(2),r?2:8):l.test(e)?NaN:+e}},747:function(e){e.exports=function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=7)}([function(e,t,r){var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n=r(2),i=r(10),l=Object.prototype.toString;function a(e){return"[object Array]"===l.call(e)}function s(e){return null!==e&&"object"===(void 0===e?"undefined":o(e))}function d(e){return"[object Function]"===l.call(e)}function c(e,t){if(null!=e)if("object"!==(void 0===e?"undefined":o(e))&&(e=[e]),a(e))for(var r=0,n=e.length;r=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};o.forEach(["delete","get","head"],(function(e){a.headers[e]={}})),o.forEach(["post","put","patch"],(function(e){a.headers[e]=o.merge(i)})),e.exports=a}).call(this,r(12))},function(e,t,r){e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),o=0;o0&&void 0!==arguments[0]?arguments[0]:l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.langs=Object.create(null),this.loaded=[],this.processConfig(t)}return e.prototype.processConfig=function(e){var t=this,r=Object.assign({},l,e),o=r.location,n=function(e,t){var r={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r}(r,["location"]),i=o.replace(/\/?$/,"/");this.config=Object.assign({},{location:i},n);var a=this.config,s=a.override,d=a.preloaded,c=void 0===d?{}:d,f=Object.entries(this.langs).concat(Object.entries(s||c));this.langs=f.reduce((function(e,r){var o=r[0],n=r[1];return e[o]=t.applyLanguage.call(t,o,n),e}),{}),this.locale=this.config.locale||this.config.langs[0]},e.prototype.init=function(e){return this.processConfig.call(this,Object.assign({},this.config,e)),this.setCurrent(this.locale)},e.prototype.addLanguage=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t="string"==typeof t?this.processFile.call(this,t):t,this.applyLanguage.call(this,e,t),this.config.langs.push("locale")},e.prototype.getValue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.locale;return this.langs[t]&&this.langs[t][e]||this.getFallbackValue(e)},e.prototype.getFallbackValue=function(e){var t=Object.values(this.langs).find((function(t){return t[e]}));return t&&t[e]},e.prototype.makeSafe=function(e){var t={"{":"\\{","}":"\\}","|":"\\|"};return e=e.replace(/\{|\}|\|/g,(function(e){return t[e]})),new RegExp(e,"g")},e.prototype.put=function(e,t){return this.current[e]=t},e.prototype.get=function(e,t){var r=this.getValue(e);if(r){var n=r.match(/\{[^}]+?\}/g),i=void 0;if(t&&n)if("object"===(void 0===t?"undefined":o(t)))for(var l=0;l1&&void 0!==arguments[1])||arguments[1],r=this;return new Promise((function(o,n){if(-1!==r.loaded.indexOf(e)&&t)return r.applyLanguage.call(r,r.langs[e]),o(r.langs[e]);var l=[r.config.location,e,r.config.extension].join("");return(0,i.get)(l).then((function(t){var n=t.data,i=r.processFile(n);return r.applyLanguage.call(r,e,i),r.loaded.push(e),o(r.langs[e])})).catch((function(){var t=r.applyLanguage.call(r,e);o(t)}))}))},e.prototype.applyLanguage=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.config.override[e]||{},o=this.langs[e]||{};return this.langs[e]=Object.assign({},o,t,r),this.langs[e]},e.prototype.setCurrent=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US";return this.loadLang(t).then((function(){return e.locale=t,e.current=e.langs[t],e.current}))},n(e,[{key:"getLangs",get:function(){return this.config.langs}}]),e}();t.default=new a},function(e,t,r){e.exports=r(9)},function(e,t,r){var o=r(0),n=r(2),i=r(11),l=r(1);function a(e){var t=new i(e),r=n(i.prototype.request,t);return o.extend(r,i.prototype,t),o.extend(r,t),r}var s=a(l);s.Axios=i,s.create=function(e){return a(o.merge(l,e))},s.Cancel=r(6),s.CancelToken=r(26),s.isCancel=r(5),s.all=function(e){return Promise.all(e)},s.spread=r(27),e.exports=s,e.exports.default=s},function(e,t,r){function o(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(o(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&o(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t,r){var o=r(1),n=r(0),i=r(21),l=r(22);function a(e){this.defaults=e,this.interceptors={request:new i,response:new i}}a.prototype.request=function(e){"string"==typeof e&&(e=n.merge({url:arguments[0]},arguments[1])),(e=n.merge(o,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[l,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)r=r.then(t.shift(),t.shift());return r},n.forEach(["delete","get","head","options"],(function(e){a.prototype[e]=function(t,r){return this.request(n.merge(r||{},{method:e,url:t}))}})),n.forEach(["post","put","patch"],(function(e){a.prototype[e]=function(t,r,o){return this.request(n.merge(o||{},{method:e,url:t,data:r}))}})),e.exports=a},function(e,t,r){var o,n,i=e.exports={};function l(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(o===setTimeout)return setTimeout(e,0);if((o===l||!o)&&setTimeout)return o=setTimeout,setTimeout(e,0);try{return o(e,0)}catch(t){try{return o.call(null,e,0)}catch(t){return o.call(this,e,0)}}}!function(){try{o="function"==typeof setTimeout?setTimeout:l}catch(e){o=l}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var d,c=[],f=!1,u=-1;function p(){f&&d&&(f=!1,d.length?c=d.concat(c):u=-1,c.length&&m())}function m(){if(!f){var e=s(p);f=!0;for(var t=c.length;t;){for(d=c,c=[];++u1)for(var r=1;r=0)return;l[t]="set-cookie"===t?(l[t]?l[t]:[]).concat([r]):l[t]?l[t]+", "+r:r}})),l):l}},function(e,t,r){var o=r(0);e.exports=o.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(e){var o=e;return t&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=n(window.location.href),function(t){var r=o.isString(t)?n(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){function o(){this.message="String contains an invalid character"}o.prototype=new Error,o.prototype.code=5,o.prototype.name="InvalidCharacterError",e.exports=function(e){for(var t,r,n=String(e),i="",l=0,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.charAt(0|l)||(a="=",l%1);i+=a.charAt(63&t>>8-l%1*8)){if((r=n.charCodeAt(l+=.75))>255)throw new o;t=t<<8|r}return i}},function(e,t,r){var o=r(0);e.exports=o.isStandardBrowserEnv()?{write:function(e,t,r,n,i,l){var a=[];a.push(e+"="+encodeURIComponent(t)),o.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),o.isString(n)&&a.push("path="+n),o.isString(i)&&a.push("domain="+i),!0===l&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,r){var o=r(0);function n(){this.handlers=[]}n.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},n.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},n.prototype.forEach=function(e){o.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=n},function(e,t,r){var o=r(0),n=r(23),i=r(5),l=r(1),a=r(24),s=r(25);function d(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return d(e),e.baseURL&&!a(e.url)&&(e.url=s(e.baseURL,e.url)),e.headers=e.headers||{},e.data=n(e.data,e.headers,e.transformRequest),e.headers=o.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),o.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||l.adapter)(e).then((function(t){return d(e),t.data=n(t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(d(e),t&&t.response&&(t.response.data=n(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,r){var o=r(0);e.exports=function(e,t,r){return o.forEach(r,(function(r){e=r(e,t)})),e}},function(e,t,r){e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,r){e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,r){var o=r(6);function n(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new o(e),t(r.reason))}))}n.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},n.source=function(){var e;return{token:new n((function(t){e=t})),cancel:e}},e.exports=n},function(e,t,r){e.exports=function(e){return function(t){return e.apply(null,t)}}}])},54:function(e){e.exports=function(e){try{var t=window[e],r="__storage_test__";return t.setItem(r,r),t.removeItem(r),!0}catch(e){return!1}}},978:function(e,t,r){var o=r(892),n=r(424);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[e.id,n,""]]);o(n,{attributes:{class:"formBuilder-injected-style"},insert:"head",singleton:!1}),e.exports=n.locals||{}},892:function(e,t,r){var o,n=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),i=[];function l(e){for(var t=-1,r=0;r"},658:function(e){e.exports="data:image/svg+xml; utf8,"}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var i=r[e]={id:e,exports:{}};return t[e](i,i.exports,o),i.exports}o.m=t,o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.b=document.baseURI||self.location.href,o.nc=void 0,function(){o(978);var t=o(783),r=o.n(t);function n(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const i={},l={text:["text","password","email","color","tel"],header:["h1","h2","h3"],button:["button","submit","reset"],paragraph:["p","address","blockquote","canvas","output"],textarea:["textarea","quill"]},a=e=>{e.parentNode&&e.parentNode.removeChild(e)},s=e=>{for(;e.firstChild;)e.removeChild(e.firstChild);return e},d=function(e,t,r){void 0===r&&(r=!0);const o=[];let n=["none","block"];r&&(n=n.reverse());for(let r=e.length-1;r>=0;r--)-1!==e[r].textContent.toLowerCase().indexOf(t.toLowerCase())?(e[r].style.display=n[0],o.push(e[r])):e[r].style.display=n[1];return o},c=["select","checkbox-group","checkbox","radio-group","autocomplete"],f=new RegExp(`(${c.join("|")})`);class u{constructor(e){return n(this,"stage",void 0),n(this,"controls",void 0),n(this,"formActions",void 0),n(this,"editorWrap",void 0),this.optionFields=c,this.optionFieldsRegEx=f,this.subtypes=l,this.empty=s,this.filter=d,i[e]=this,i[e]}onRender(e,t){e.parentElement?t(e):window.requestAnimationFrame((()=>this.onRender(e,t)))}}const p={};class m{constructor(e){this.formData={},this.formID=e,this.layout="",p[e]=this}}var b=o(747),h=o.n(b);function g(e){let t;return"function"==typeof Event?t=new Event(e):(t=document.createEvent("Event"),t.initEvent(e,!0,!0)),t}var v={loaded:g("loaded"),viewData:g("viewData"),userDeclined:g("userDeclined"),modalClosed:g("modalClosed"),modalOpened:g("modalOpened"),formSaved:g("formSaved"),fieldAdded:g("fieldAdded"),fieldRemoved:g("fieldRemoved"),fieldRendered:g("fieldRendered"),fieldEditOpened:g("fieldEditOpened"),fieldEditClosed:g("fieldEditClosed"),stageEmptied:g("stageEmptied")};const w={clobberingProtection:{document:!0,form:!0,namespaceAttributes:!1},backendOrder:["dompurify","sanitizer","fallback"],backends:{sanitizer:"function"==typeof window.Sanitizer&&new window.Sanitizer,dompurify:!!window.DOMPurify&&(y=window.DOMPurify,y.setConfig({SANITIZE_DOM:!1,ADD_ATTR:["contenteditable"]}),y),fallback:e=>e}};var y;const x=(e,t)=>{if(0===w.backendOrder.length)return!1;const r=e.toLowerCase();return t=t?t+"":"",r.startsWith("on")||["form","formaction"].includes(r)||t.trim().toLowerCase().startsWith("javascript:")};w.backends.fallback=function(t){const r=document.implementation.createHTMLDocument(""),o=r.createElement("base");o.href=document.location.href,r.head.appendChild(o);const n=["applet","comment","embed","iframe","link","listing","meta","noscript","object","plaintext","script","style","xmp"],i=e.parseHTML(t,r,!1);e(i).find("*").addBack().each(((t,r)=>{"#text"!==r.nodeName&&(r.tagName&&n.includes(r.tagName.toLowerCase())?r.parentElement?r.parentElement.removeChild(r):i.includes(r)&&i.splice(i.indexOf(r),1):r.attributes&&Array.from(r.attributes).forEach((t=>{x(t.name,t.value)&&e(r).removeAttr(t.name)})))}));const l=r.createElement("div");return e(l).html(i),l.innerHTML};const A=e=>{const t=!!w.clobberingProtection.document&&document,r=!!w.clobberingProtection.form&&document.createElement("form");return t&&e in t||r&&e in r?w.clobberingProtection.namespaceAttributes?"user-content-"+e:void 0:e},C={fallback:(e,t)=>{const r=w.backends.fallback,o="function"==typeof r;return o&&(t=r(t)),e.innerHTML=t,o},dompurify:(e,t)=>{const r=w.backends.dompurify;return!(!1===r||!r.isSupported||(e.innerHTML=r.sanitize(t),0))},sanitizer:(e,t)=>{const r=w.backends.sanitizer;return!!r&&(e.setHTML(t,{sanitizer:r}),!0)}},O=function(t,r,o){if(void 0===o&&(o=!1),!o){const o=document.createElement(t.tagName);return void 0!==w.backendOrder.find((e=>C[e](o,r)))?((t=>{e(t).find("*").each(((e,t)=>{["embed","form","iframe","image","img","object"].includes(t.tagName.toLowerCase())&&t.removeAttribute("name"),["id","name"].forEach((e=>{if(t.hasAttribute(e)){const r=A(t.getAttribute(e));void 0===r?t.removeAttribute(e):t.setAttribute(e,r)}}))}))})(o),t.innerHTML=o.innerHTML,t):(t.innerHTML=r,t)}t.textContent=r},k=["events"],j=["tag","content"];function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function S(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}window.fbLoaded={js:[],css:[]},window.fbEditors={quill:{},tinymce:{}};const T=function(e,t){if(void 0===t&&(t=!1),null==e||"object"!=typeof e)return e;const r="function"==typeof window.structuredClone?window.structuredClone(e):Object.assign({},e),o=[null,void 0,""];t&&o.push(!1);for(const e in r)o.includes(r[e])?delete r[e]:Array.isArray(r[e])&&(r[e].length||delete r[e]);return r},D=function(e){return!["values","enableOther","other","label","subtype"].includes(e)},L=e=>Object.entries(e).map((e=>{let[t,r]=e;return D(t)&&Object.values(R(t,r)).join("")})).filter(Boolean).join(" "),R=(e,t)=>{let r;return e=M(e),t&&(Array.isArray(t)?r=G(t.join(" ")):("boolean"==typeof t&&(t=t.toString()),r=G(t.trim()))),{name:e,value:t=t?`="${r}"`:""}},I=e=>e.reduce(((e,t)=>e.concat(Array.isArray(t)?I(t):t)),[]),M=e=>({className:"class"}[e]||P(e)),P=e=>(e=(e=e.replace(/[^\w\s\-]/gi,"")).replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()}))).replace(/\s/g,"-").replace(/^-+/g,""),B=e=>e.replace(/-([a-z])/g,((e,t)=>t.toUpperCase())),F=function(){let e,t=0;return function(r){const o=Date.now();return o===e?++t:(t=0,e=o),(r.type||P(r.label))+"-"+o+"-"+t}}(),H=e=>void 0===e?e:[["array",e=>Array.isArray(e)],["node",e=>e instanceof window.Node||e instanceof window.HTMLElement],["component",()=>e&&e.dom],[typeof e,()=>!0]].find((t=>t[1](e)))[0],q=function(e,t,r){void 0===t&&(t=""),void 0===r&&(r={});let o=H(t);const{events:n}=r,i=N(r,k),l=document.createElement(e),a={string:e=>{O(l,l.innerHTML+e)},object:e=>{const{tag:t,content:r}=e,o=N(e,j);return l.appendChild(q(t,r,o))},node:e=>l.appendChild(e),array:e=>{for(let t=0;t{e=e(),o=H(e),a[o](e)},undefined:()=>{}};for(const e in i)if(i.hasOwnProperty(e)){const t=M(e);let r=Array.isArray(i[e])?Q(i[e].join(" ").split(" ")).join(" "):i[e];if(x(t,r))continue;if("boolean"==typeof r){if(!0===r){const e="contenteditable"===t||t;l.setAttribute(t,e)}}else"id"!==t&&"name"!==t||(r=A(r)),void 0!==r&&l.setAttribute(t,r)}return t&&a[o](t),((e,t)=>{if(t)for(const r in t)t.hasOwnProperty(r)&&e.addEventListener(r,(e=>t[r](e)))})(l,n),l},z=e=>{const t=e.attributes,r={};return X(t,(e=>{let o=t[e].value||"";o.match(/false|true/g)?o="true"===o:o.match(/undefined/g)&&(o=void 0),o&&(r[B(t[e].name)]=o)})),r},U=e=>{const t=[];for(let r=0;r{const t=[];if(e.length){const r=e[0].getElementsByTagName("value");for(let e=0;e{const t=(new window.DOMParser).parseFromString(e,"text/xml"),r=[];if(t){const e=t.getElementsByTagName("field");for(let t=0;t{const t=document.createElement("textarea");return t.innerHTML=e,t.textContent},J=e=>{const t=document.createElement("textarea");return t.textContent=e,t.innerHTML},G=e=>{const t={'"':""","&":"&","<":"<",">":">"};return"string"==typeof e?e.replace(/["&<>]/g,(e=>t[e]||e)):e},X=function(e,t,r){for(let o=0;oe.filter(((e,t,r)=>r.indexOf(e)===t)),Z=(e,t)=>{const r=t.indexOf(e);r>-1&&t.splice(r,1)},Y=function(e,t){void 0===t&&(t="");const r=jQuery;let o=[];return Array.isArray(e)||(e=[e]),K(e)||(o=jQuery.map(e,(e=>{const r={dataType:"script",cache:!0,url:(t||"")+e};return jQuery.ajax(r).done((()=>window.fbLoaded.js.push(e)))}))),o.push(jQuery.Deferred((e=>r(e.resolve)))),jQuery.when(...o)},K=function(e,t){void 0===t&&(t="js");const r=window.fbLoaded[t];return Array.isArray(e)?e.every((e=>r.includes(e))):r.includes(e)},_=function(t,r){void 0===r&&(r=""),Array.isArray(t)||(t=[t]),t.forEach((t=>{let o="href",n=t,i="";if("object"==typeof t&&(o=t.type||(t.style?"inline":"href"),i=t.id,n=i||t.href||t.style,t="inline"===o?t.style:t.href),!K(n,"css")){if("href"===o){const e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=(r||"")+t,document.head.appendChild(e)}else e(``).attr("id",i).appendTo(e(document.head));window.fbLoaded.css.push(n)}}))},ee=e=>e.replace(/\b\w/g,(function(e){return e.toUpperCase()})),te=(e,t)=>{const r=Object.assign({},e,t);for(const o in t)r.hasOwnProperty(o)&&(Array.isArray(t[o])?r[o]=Array.isArray(e[o])?Q(e[o].concat(t[o])):t[o]:"object"==typeof t[o]?r[o]=te(e[o],t[o]):r[o]=t[o]);return r},re=(e,t,r)=>t.split(" ").forEach((t=>e.addEventListener(t,r,!1))),oe=(e,t)=>{const r=t.replace(".","");for(;(e=e.parentElement)&&!e.classList.contains(r););return e},ne=()=>{let e="";var t;return t=navigator.userAgent||navigator.vendor||window.opera,/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)&&(e="formbuilder-mobile"),e},ie=e=>e.replace(/\s/g,"-").replace(/[^a-zA-Z0-9[\]_-]/g,""),le=e=>e.replace(/[^0-9]/g,""),ae=(e,t)=>t.filter((function(e){return!~this.indexOf(e)}),e),se=/^col-(xs|sm|md|lg)-([^\s]+)/,de=e=>"string"==typeof e?e.split(" ").filter((e=>se.test(e)||e.startsWith("row-"))):[],ce={addEventListeners:re,attrString:L,camelCase:B,capitalize:ee,closest:oe,getContentType:H,escapeAttr:G,escapeAttrs:e=>{for(const t in e)e.hasOwnProperty(t)&&(e[t]=G(e[t]));return e},escapeHtml:J,forceNumber:le,forEach:X,getScripts:Y,getStyles:_,hyphenCase:P,isCached:K,markup:q,merge:te,mobileClass:ne,nameAttr:F,parsedHtml:V,parseXML:$,removeFromArray:Z,safeAttr:R,safeAttrName:M,safename:ie,subtract:ae,trimObj:T,unique:Q,validAttr:D,titleCase:function(e){const t=["a","an","and","as","at","but","by","for","for","from","in","into","near","nor","of","on","onto","or","the","to","with"].map((e=>`\\s${e}\\s`)),r=new RegExp(`(?!${t.join("|")})\\w\\S*`,"g");return`${e}`.replace(r,(e=>e.charAt(0).toUpperCase()+e.slice(1).replace(/[A-Z]/g,(e=>` ${e}`))))},splitObject:(e,t)=>{const r=e=>(t,r)=>(t[r]=e[r],t);return[Object.keys(e).filter((e=>t.includes(e))).reduce(r(e),{}),Object.keys(e).filter((e=>!t.includes(e))).reduce(r(e),{})]}};e.fn.swapWith=function(t){const r=this,o=e(t),n=e("
");return r.before(n),o.before(r),n.before(o).remove(),r};var fe=ce;const ue=["label","type"];class pe{constructor(e,t){this.rawConfig=jQuery.extend({},e),e=jQuery.extend({},e),this.preview=t,delete e.isPreview,this.preview&&delete e.required;const r=["label","description","subtype","required","disabled"];for(const t of r)this[t]=e[t],delete e[t];e.id||(e.name?e.id=e.name:e.id="control-"+Math.floor(1e7*Math.random()+1)),this.id=e.id,this.type=e.type,this.description&&(e.title=this.description),pe.controlConfig||(pe.controlConfig={});const o=this.subtype?this.type+"."+this.subtype:this.type;this.classConfig=jQuery.extend({},pe.controlConfig[o]||{}),this.subtype&&(e.type=this.subtype),this.required&&(e.required="required",e["aria-required"]="true"),this.disabled&&(e.disabled="disabled"),this.config=e,this.configure()}static get definition(){return{}}static register(e,t,r){const o=r?r+".":"";pe.classRegister||(pe.classRegister={}),Array.isArray(e)||(e=[e]);for(const r of e)-1===r.indexOf(".")?pe.classRegister[o+r]=t:pe.error(`Ignoring type ${r}. Cannot use the character '.' in a type name.`)}static getRegistered(e){void 0===e&&(e=!1);const t=Object.keys(pe.classRegister);return t.length?t.filter((t=>e?t.indexOf(e+".")>-1:-1===t.indexOf("."))):t}static getRegisteredSubtypes(){const e={};for(const t in pe.classRegister)if(pe.classRegister.hasOwnProperty(t)){const[r,o]=t.split(".");if(!o)continue;e[r]||(e[r]=[]),e[r].push(o)}return e}static getClass(e,t){const r=t?e+"."+t:e;return pe.classRegister[r]||pe.classRegister[e]||pe.error("Invalid control type. (Type: "+e+", Subtype: "+t+"). Please ensure you have registered it, and imported it correctly.")}static loadCustom(e){let t=[];if(e&&(t=t.concat(e)),window.fbControls&&(t=t.concat(window.fbControls)),!this.fbControlsLoaded){for(const e of t)e(pe,pe.classRegister);this.fbControlsLoaded=!0}}static mi18n(e,t){const r=this.definition;let o=r.i18n||{};o=o[h().locale]||o.default||o;const n=this.camelCase(e),i="object"==typeof o?o[n]||o[e]:o;if(i)return i;let l=r.mi18n;return"object"==typeof l&&(l=l[n]||l[e]),l||(l=n),h().get(l,t)}static active(e){return!Array.isArray(this.definition.inactive)||-1===this.definition.inactive.indexOf(e)}static label(e){return this.mi18n(e)}static icon(e){const t=this.definition;return t&&"object"==typeof t.icon?t.icon[e]:t.icon}configure(){}build(){const e=this.config,{label:t,type:r}=e,o=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,ue);return this.markup(r,V(t),o)}on(e){const t={prerender:e=>e,render:e=>{const t=()=>{this.onRender&&this.onRender(e)};this.css&&_(this.css),this.js&&!K(this.js)?Y(this.js).done(t):t()}};return e?t[e]:t}static error(e){throw new Error(e)}markup(e,t,r){return void 0===t&&(t=""),void 0===r&&(r={}),this.element=q(e,t,r),this.element}parsedHtml(e){return V(e)}static camelCase(e){return B(e)}}const me=(e,t)=>{let r=e.id?`formbuilder-${e.type} form-group field-${e.id}`:"";if(e.className){const o=de(e.className);o&&o.length>0&&(r+=` ${o.join(" ")}`,Array.isArray(t)||(t=[t]),t.forEach((e=>{e.classList&&e.classList.remove(...o),e.querySelectorAll("[class*=row-],[class*=col-]").forEach((e=>{e.classList&&e.classList.remove(...o)}))})))}return r};class be{constructor(e,t,r,o){var n,i,l;void 0===t&&(t=!1),void 0===r&&(r=!1),void 0===o&&(o={}),this.preview=null!==(n=t)&&void 0!==n&&n,this.disableHTMLLabels=null!==(i=r)&&void 0!==i&&i,this.controlConfig=null!==(l=o)&&void 0!==l?l:{},this.templates={label:null,help:null,default:(e,t,r,o)=>(r&&t.appendChild(r),this.markup("div",[t,e],{className:me(o,e)})),noLabel:(e,t,r,o)=>this.markup("div",e,{className:me(o,e)}),hidden:e=>e},e&&(this.templates=jQuery.extend(this.templates,e)),this.configure()}configure(){}build(e,t,r){this.preview&&(t.name?t.name=t.name+"-preview":t.name=fe.nameAttr(t)+"-preview"),t.id=t.name,this.data=jQuery.extend({},t),pe.controlConfig=this.controlConfig;const o=new e(t,this.preview);let n=o.build();if("object"==typeof n&&n.field||(n={field:n}),"string"==typeof n.field){const e=this.markup("div",n.field,{});1===e.childElementCount?n.field=e.children.item(0):n.field=Array.from(e.children)}const i=this.label(),l=this.help();let a;a=r&&this.isTemplate(r)?r:this.isTemplate(n.layout)?n.layout:"default";const s=this.processTemplate(a,n.field,i,l);return o.on("prerender")(s),s.addEventListener("fieldRendered",o.on("render")),s}label(){const e=this.data.label||"",t=[this.disableHTMLLabels?document.createTextNode(e):fe.parsedHtml(e)];return this.data.required&&t.push(this.markup("span","*",{className:"formbuilder-required"})),this.isTemplate("label")?this.processTemplate("label",t):this.markup("label",t,{for:this.data.id,className:`formbuilder-${this.data.type}-label`})}help(){return this.data.description?this.isTemplate("help")?this.processTemplate("help",this.data.description):this.markup("span","?",{className:"tooltip-element",tooltip:this.data.description}):null}isTemplate(e){return"function"==typeof this.templates[e]}processTemplate(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;onull;h().addLanguage("en-US",{NATIVE_NAME:"English (US)",ENGLISH_NAME:"English",addOption:"Add Option +",allFieldsRemoved:"All fields were removed.",allowMultipleFiles:"Allow users to upload multiple files",autocomplete:"Autocomplete",button:"Button",cannotBeEmpty:"This field cannot be empty",checkboxGroup:"Checkbox Group",checkbox:"Checkbox",checkboxes:"Checkboxes",className:"Class",clearAllMessage:"Are you sure you want to clear all fields?",clear:"Clear",close:"Close",content:"Content",copy:"Copy To Clipboard",copyButton:"+",copyButtonTooltip:"Copy",dateField:"Date Field",description:"Help Text",descriptionField:"Description",devMode:"Developer Mode",editNames:"Edit Names",editorTitle:"Form Elements",editXML:"Edit XML",enableOther:"Enable "Other"",enableOtherMsg:"Let users enter an unlisted option",fieldDeleteWarning:"false",fieldVars:"Field Variables",fieldNonEditable:"This field cannot be edited.",fieldRemoveWarning:"Are you sure you want to remove this field?",fileUpload:"File Upload",formUpdated:"Form Updated",getStarted:"Drag a field from the right to this area",header:"Header",hide:"Edit",hidden:"Hidden Input",inline:"Inline",inlineDesc:"Display {type} inline",label:"Label",labelEmpty:"Field Label cannot be empty",limitRole:"Limit access to one or more of the following roles:",mandatory:"Mandatory",maxlength:"Max Length",minOptionMessage:"This field requires a minimum of 2 options",minSelectionRequired:"Minimum {min} selections required",multipleFiles:"Multiple Files",name:"Name",no:"No",noFieldsToClear:"There are no fields to clear",number:"Number",off:"Off",on:"On",option:"Option",optionCount:"Option {count}",options:"Options",optional:"optional",optionLabelPlaceholder:"Label",optionValuePlaceholder:"Value",optionEmpty:"Option value required",other:"Other",paragraph:"Paragraph",placeholder:"Placeholder","placeholders.value":"Value","placeholders.label":"Label","placeholders.email":"Enter your email","placeholders.className":"space separated classes","placeholders.password":"Enter your password",preview:"Preview",radioGroup:"Radio Group",radio:"Radio",removeMessage:"Remove Element",removeOption:"Remove Option",remove:"×",required:"Required",requireValidOption:"Only accept a pre-defined Option",richText:"Rich Text Editor",roles:"Access",rows:"Rows",save:"Save",selectOptions:"Options",select:"Select",selectColor:"Select Color",selectionsMessage:"Allow Multiple Selections",size:"Size","size.xs":"Extra Small","size.sm":"Small","size.m":"Default","size.lg":"Large",style:"Style","styles.btn.default":"Default","styles.btn.danger":"Danger","styles.btn.info":"Info","styles.btn.primary":"Primary","styles.btn.success":"Success","styles.btn.warning":"Warning",subtype:"Type",text:"Text Field",textArea:"Text Area",toggle:"Toggle",warning:"Warning!",value:"Value",viewJSON:"[{…}]",viewXML:"</>",yes:"Yes"});const ge={actionButtons:[],allowStageSort:!0,append:!1,controlOrder:["autocomplete","button","checkbox-group","checkbox","date","file","header","hidden","number","paragraph","radio-group","select","text","textarea"],controlPosition:"right",dataType:"json",defaultFields:[],disabledActionButtons:[],disabledAttrs:[],disabledFieldButtons:{},disabledSubtypes:{},disableFields:[],disableHTMLLabels:!1,disableInjectedStyle:!1,editOnAdd:!1,fields:[],fieldRemoveWarn:!1,fieldEditContainer:null,inputSets:[],notify:{error:e=>{console.log(e)},success:e=>{console.log(e)},warning:e=>{console.warn(e)}},onAddField:(e,t)=>t,onAddFieldAfter:(e,t)=>t,onAddOption:e=>e,onClearAll:he,onCloseFieldEdit:he,onOpenFieldEdit:he,onSave:he,persistDefaultFields:!1,prepend:!1,replaceFields:[],roles:{1:"Administrator"},sanitizerOptions:{clobberingProtection:{document:!1,form:!1},backendOrder:[]},scrollToFieldOnAdd:!0,showActionButtons:!0,sortableControls:!1,stickyControls:{enable:!0,offset:{top:5,bottom:"auto",right:"auto"}},subtypes:{},templates:{},typeUserAttrs:{},typeUserDisabledAttrs:{},typeUserEvents:{},defaultGridColumnClass:"col-md-12",cancelGridModeDistance:100,enableColumnInsertMenu:!1,enableEnhancedBootstrapGrid:!1},ve={btn:["default","danger","info","primary","success","warning"]},we={location:"assets/lang/"},ye={},xe={rowWrapperClass:"rowWrapper",colWrapperClass:"colWrapper",tmpRowPlaceholderClass:"tempRowWrapper",invisibleRowPlaceholderClass:"invisibleRowPlaceholder"};var Ae=o(54),Ce=o.n(Ae);const Oe=["values"],ke=["label","events"],je=["actionButtons","replaceFields"];function Ee(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}class Se{constructor(e,t,r){this.data=p[e],this.d=i[e],this.doCancel=!1,this.layout=t,this.handleKeyDown=this.handleKeyDown.bind(this),this.formBuilder=r,this.toastTimer=null}startMoving(e,t){t.item.show().addClass("moving"),this.doCancel=!0,this.from=t.item.parent()}stopMoving(t,r){const o=this;r.item.removeClass("moving"),o.doCancel&&(r.sender&&e(r.sender).sortable("cancel"),this.from.sortable("cancel")),o.save(),o.doCancel=!1}beforeStop(e,t){const r=this,o=ye.opts,n=r.d.stage.childNodes.length-1,i=[];r.stopIndex=t.placeholder.closest("ul.stage-wrap > *").index()-1,!o.sortableControls&&t.item.parent().hasClass("frmb-control")&&i.push(!0),o.prepend&&i.push(0===r.stopIndex),o.append&&i.push(r.stopIndex+1===n),r.doCancel=i.some((e=>!0===e))}getTypes(t){const r={type:t.attr("type")},o=e(".fld-subtype",t).val();return o!==r.type&&(r.subtype=o),r}fieldOptionData(t){const r=[],o=e(".sortable-options li",t);return o.each((e=>{const t=o[e],n=t.querySelectorAll("input[type=text], input[type=number], select"),i=t.querySelectorAll("input[type=checkbox], input[type=radio]"),l={};X(n,(e=>{const t=n[e],r=t.dataset.attr;l[r]=t.value})),X(i,(e=>{const t=i[e],r=t.getAttribute("data-attr");l[r]=t.checked})),r.push(l)})),r}xmlSave(e){const t=this.prepData(e),r=new XMLSerializer,o=[""];t.forEach((e=>{const{values:t}=e;let r=[`{let[t,r]=e;return`${P(t)}="${r}"`})).join(" ")}>`];var n;if(c.includes(e.type)){const e=t.map((e=>q("option",e.label,e).outerHTML));r=r.concat(e)}r.push(""),o.push(r)})),o.push("");const n=q("form-template",I(o).join(""));return r.serializeToString(n)}prepData(t){const r=[],o=this.d,n=this;if(0!==t.childNodes.length){const i=[];X(t.childNodes,(function(t,r){e(r).find("li.form-field").each((function(e,t){i.push(t)}))})),X(t.childNodes,(function(t,r){const o=e(r);o.is("li")&&o.hasClass("form-field")&&i.push(r)})),i.length&&i.forEach((t=>{const i=e(t);if(!i.hasClass("disabled-field")){let l=n.getTypes(i);const a=e(".roles-field:checked",t),s=a.map((e=>a[e].value)).get();if(l=Object.assign({},l,n.getAttrVals(t)),l.subtype)if("quill"===l.subtype){const e=`${l.name}-preview`;if(window.fbEditors.quill[e]){const t=window.fbEditors.quill[e].instance.getContents();l.value=window.JSON.stringify(t.ops)}}else if("tinymce"===l.subtype&&window.tinymce){const e=`${l.name}-preview`,t=window.tinymce.get(e);t&&(l.value=t.getContent())}if(s.length&&(l.role=s.join(",")),l.className=l.className||l.class,l.className&&"true"==i.attr("addeddefaultcolumnclass")&&1==i.closest(this.formBuilder.rowWrapperClassSelector).children().length&&l.className.includes(ye.opts.defaultGridColumnClass)){const e=de(l.className);e&&e.length>0&&e.forEach((e=>{l.className=l.className.replace(e,"").trim()}))}if(l.className){const e=new RegExp("(?:^|\\s)btn-("+ve.btn.join("|")+")(?:\\s|$)","g").exec(l.className);e&&(l.style=e[1])}l=T(l),l.type&&l.type.match(o.optionFieldsRegEx)&&(l.values=n.fieldOptionData(i)),r.push(l)}}))}return r}getData(e){const t=this.data;if(e||(e=ye.opts.formData),!e)return!1;const r={xml:e=>Array.isArray(e)?e:$(e),json:e=>"string"==typeof e?window.JSON.parse(e):e};return t.formData=r[ye.opts.dataType](e)||[],t.formData}save(e){void 0===e&&(e=!1);const t=this,r=this.data,o=this.d.stage,n={xml:()=>t.xmlSave(o),json:e=>window.JSON.stringify(t.prepData(o),null,e&&" ")};return r.formData=n[ye.opts.dataType](e),document.dispatchEvent(v.formSaved),r.formData}incrementId(e){const t=e.lastIndexOf("-"),r=parseInt(e.substring(t+1))+1;return`${e.substring(0,t)}-${r}`}getAttrVals(t){const r=Object.create(null),o=t.querySelectorAll('[class*="fld-"]');return X(o,(t=>{const n=o[t],i=B(n.getAttribute("name"));r[i]=[[n.attributes.contenteditable,()=>"xml"===ye.opts.dataType?J(n.innerHTML):n.innerHTML],["checkbox"===n.type,()=>n.checked],["number"===n.type&&""!==n.value,()=>Number(n.value)],[n.attributes.multiple,()=>e(n).val()],[!0,()=>n.value]].find((e=>{let[t]=e;return!!t}))[1]()})),r}updatePreview(t){const r=this,o=this.d,n=t.attr("class"),i=t[0];if(n.includes("input-control"))return;const l=t.attr("type"),a=e(".prev-holder",i);let d=Object.assign({},r.getAttrVals(i),{type:l});l.match(o.optionFieldsRegEx)&&(d.values=[],d.multiple=e('[name="multiple"]',i).is(":checked"),e(".sortable-options li",i).each((function(t,r){const o={selected:e(".option-selected",r).is(":checked"),value:e(".option-value",r).val(),label:e(".option-label",r).val()};d.values.push(o)}))),d=T(d,!0),d.className=r.classNames(i,d),t.data("fieldData",d);const c=r.formBuilder.controls.custom.lookup(d.type),f=r.formBuilder.controls.custom.getClass(d.type),u=c?c.class:f||pe.getClass(d.type,d.subtype),p=this.layout.build(u,d);s(a[0]),a[0].appendChild(p),p.dispatchEvent(v.fieldRendered)}disabledTT(e){const t=e.querySelectorAll(".disabled-field");X(t,(e=>{const r=t[e],o=h().get("fieldNonEditable");if(o){const e=q("p",o,{className:"frmb-tt"});r.appendChild(e),r.addEventListener("mousemove",(t=>((e,t)=>{const r=t.field.getBoundingClientRect(),o=e.clientX-r.left-21,n=e.clientY-r.top-t.tt.offsetHeight-12;t.tt.style.transform=`translate(${o}px, ${n}px)`})(t,{tt:e,field:r})))}}))}classNames(t,r){const o=t.querySelector(".fld-className"),n=t.querySelector(".btn-style"),i=n&&n.value;if(!o)return;const{type:l}=r,a=o.multiple?e(o).val():o.value.trim().split(" "),s={button:"btn",submit:"btn"}[l];if(s&&i){for(let e=0;e{let{target:t}=e;return this.closeConfirm(t)}),!1),document.addEventListener("keydown",this.handleKeyDown,!1),e}confirm(e,t,r,o){void 0===r&&(r=!1),void 0===o&&(o="");const n=this,i=h().current,l=n.showOverlay(),a=q("button",i.yes,{className:"yes btn btn-success btn-sm"}),s=q("button",i.no,{className:"no btn btn-danger btn-sm"});s.onclick=function(){n.closeConfirm(l)},a.onclick=function(){t(),n.closeConfirm(l)};const d=q("div",[s,a],{className:"button-wrap"}),c=q("div",[e,d],{className:o="form-builder-dialog "+o});if(r)c.classList.add("positioned");else{const e=document.documentElement;r={pageX:Math.max(e.clientWidth,window.innerWidth||0)/2,pageY:Math.max(e.clientHeight,window.innerHeight||0)/2},c.style.position="fixed"}return c.style.left=r.pageX+"px",c.style.top=r.pageY+"px",document.body.appendChild(c),a.focus(),c}dialog(e,t,r){void 0===t&&(t=!1),void 0===r&&(r="");const o=document.documentElement.clientWidth,n=document.documentElement.clientHeight;this.showOverlay();const i=q("div",e,{className:r="form-builder-dialog "+r});return t?i.classList.add("positioned"):(t={pageX:Math.max(o,window.innerWidth||0)/2,pageY:Math.max(n,window.innerHeight||0)/2},i.style.position="fixed"),i.style.left=t.pageX+"px",i.style.top=t.pageY+"px",document.body.appendChild(i),document.dispatchEvent(v.modalOpened),-1!==r.indexOf("data-dialog")&&document.dispatchEvent(v.viewData),i}confirmRemoveAll(t){const r=this,o=t.target.id.match(/frmb-\d{13}/)[0],n=document.getElementById(o),i=h().current,l=e("li.form-field",n),a=t.target.getBoundingClientRect(),s=document.body.getBoundingClientRect(),d={pageX:a.left+a.width/2,pageY:a.top-s.top-12};l.length?r.confirm(i.clearAllMessage,(()=>{r.removeAllFields.call(r,n),ye.opts.persistDefaultFields&&ye.opts.defaultFields?this.addDefaultFields():ye.opts.notify.success(i.allFieldsRemoved),ye.opts.onClearAll()}),d):r.dialog(i.noFieldsToClear,d)}addDefaultFields(){ye.opts.defaultFields.forEach((e=>this.formBuilder.prepFieldVars(e))),this.d.stage.classList.remove("empty")}removeAllFields(e){const t=h().current,r=ye.opts,o=[];e.querySelectorAll(this.formBuilder.fieldSelector).length&&(r.prepend&&o.push(!0),r.append&&o.push(!0),o.some(Boolean)||(e.classList.add("empty"),e.dataset.content=t.getStarted),this.emptyStage(e))}emptyStage(e){s(e).classList.remove("removing"),e.dispatchEvent(v.stageEmptied),this.save()}stageIsEmpty(){return 0===e(this.d.stage).find("li").length}setFieldOrder(t){if(!ye.opts.sortableControls)return!1;const r=window.JSON,o=[];return t.children().each(((t,r)=>{const n=e(r).data("type");n&&o.push(n)})),Ce()("sessionStorage")&&window.sessionStorage.setItem("fieldOrder",r.stringify(o)),o}closeAllEdit(){e(this.d.stage).find("li.form-field").each(((e,t)=>{this.closeField(t.id,!1)}))}toggleEdit(t,r){void 0===r&&(r=!0);const o=document.getElementById(t);if(o)return e(o).hasClass("editing")?this.closeField(t,r):this.openField(t,r)}closeField(t,r){void 0===r&&(r=!0);const o=this,n=document.getElementById(t);if(!n)return n;const i=e(".frm-holder",n),l=e(".prev-holder",n);let a=!1;if(e(n).hasClass("editing")&&(a=!0),!a)return n;n.classList.toggle("editing"),e(".toggle-form",n).toggleClass("open"),r?(l.slideToggle(250),i.slideToggle(250)):(l.toggle(),i.toggle()),this.updatePreview(e(n));const s=e(`#${t}`),d=e(`#${t}-cont`);d.append(s),this.removeContainerProtection(d.attr("id")),ye.opts.onCloseFieldEdit(i[0]),document.dispatchEvent(v.fieldEditClosed);const c=s.find(".prev-holder"),f=setTimeout((()=>{clearTimeout(f),o.tmpCleanPrevHolder(c).forEach((e=>{if(e.columnInfo.columnSize){const t=o.getBootstrapColumnClass(d.attr("class"));t!==e.columnInfo.columnSize&&(d.removeClass(t).addClass(e.columnInfo.columnSize),o.tmpCleanPrevHolder(c))}}))}),300);return n}openField(t,r){void 0===r&&(r=!0);const o=document.getElementById(t);if(!o)return o;const n=e(".frm-holder",o),i=e(".prev-holder",o);let l=!1;if(e(o).hasClass("editing")&&(l=!0),l)return o;o.classList.toggle("editing"),e(".toggle-form",o).toggleClass("open"),r?(i.slideToggle(250),n.slideToggle(250)):(i.toggle(),n.toggle()),this.updatePreview(e(o));const a=e(`#${t}`),s=e(`#${t}-cont`),d=s.closest(this.formBuilder.rowWrapperClassSelector);return this.formBuilder.preserveTempContainers.push(s.attr("id")),a.insertAfter(d),this.formBuilder.currentEditPanel=n[0],ye.opts.onOpenFieldEdit(n[0]),document.dispatchEvent(v.fieldEditOpened),e(document).trigger("fieldOpened",[{rowWrapperID:d.attr("id")}]),o}getStyle(e,t){let r;return void 0===t&&(t=!1),window.getComputedStyle?r=window.getComputedStyle(e,null):e.currentStyle&&(r=e.currentStyle),t?r[t]:r}stickyControls(){const{controls:t,stage:r}=this.d,o=e(t).parent(),n=t.getBoundingClientRect(),{top:i}=r.getBoundingClientRect();e(window).scroll((function(l){const a=e(l.target).scrollTop(),s={top:5,bottom:"auto",right:"auto",left:n.left},d=Object.assign({},s,ye.opts.stickyControls.offset);if(a>i){const e={position:"sticky"},n=Object.assign(e,d),i=t.getBoundingClientRect(),l=r.getBoundingClientRect(),s=i.top+i.height,c=l.top+l.height,f=s===c&&i.top>a;s>c&&i.top!==l.top&&o.css({position:"absolute",top:"auto",bottom:0,right:0,left:"auto"}),(se.id));ye.opts.notify.warning("fieldID required to remove specific fields."),ye.opts.notify.warning("Removing last field since no ID was supplied."),ye.opts.notify.warning("Available IDs: "+e.join(", ")),t=i.lastChild.id}const a=document.getElementById(t);if(!a)return ye.opts.notify.warning("Field not found"),!1;const s=e(a),d=s.closest(this.formBuilder.rowWrapperClassSelector);s.slideUp(r,(function(){s.removeClass("deleting"),s.remove(),o=!0,n.save(),i.childNodes.length||(i.classList.add("empty"),i.dataset.content=h().current.getStarted)}));const c=Object.assign({},ye.opts.typeUserEvents["*"],ye.opts.typeUserEvents[a.type]);if(c&&c.onremove&&c.onremove(a),document.dispatchEvent(v.fieldRemoved),d.length){this.removeContainerProtection(`${t}-cont`);const r=setTimeout((()=>{clearTimeout(r),e(document).trigger("checkRowCleanup",[{rowWrapperID:d.attr("id")}])}),333)}return o}processActionButtons(e){const{label:t,events:r}=e,o=Ee(e,ke);let n=t;const i=this.data;n=n?h().current[n]||n:o.id?h().current[o.id]||ee(o.id):"",o.id?o.id=`${i.formID}-${o.id}-action`:o.id=`${i.formID}-action-${Math.round(1e3*Math.random())}`;const l=q("button",n,o);if(r)for(const e in r)r.hasOwnProperty(e)&&l.addEventListener(e,(t=>r[e](t)));return l}processSubtypes(e){const t=ye.opts.disabledSubtypes;for(const t in e)e.hasOwnProperty(t)&&pe.register(e[t],pe.getClass(t),t);const r=pe.getRegisteredSubtypes(),o=Object.entries(r).reduce(((e,r)=>{let[o,n]=r;return e[o]=t[o]&&ae(t[o],n)||n,e}),{}),n={};for(const e in o)if(o.hasOwnProperty(e)){const t=[];for(const r of o[e]){const o=pe.getClass(e,r),n=o.mi18n(`subtype.${r}`)||o.mi18n(r)||r;t.push({label:n,value:r})}n[e]=t}return n}editorUI(e){const t=this.d,r=this.data,o=e||r.formID;t.editorWrap=q("div",null,{id:`${r.formID}-form-wrap`,className:`form-wrap form-builder formbuilder-embedded-bootstrap ${ne()}`}),t.stage=q("ul",null,{id:o,className:`frmb stage-wrap ${r.layout.stage}`}),t.controls=q("ul",null,{id:`${o}-control-box`,className:"frmb-control"});const n=this.formActionButtons();t.formActions=q("div",n,{className:"form-actions btn-group"})}formActionButtons(){const e=ye.opts;return e.actionButtons.map((t=>{if(t.id&&-1===e.disabledActionButtons.indexOf(t.id))return this.processActionButtons(t)})).filter(Boolean)}processOptions(e){const t=this,{actionButtons:r,replaceFields:o}=e,n=Ee(e,je);let i=n.fieldEditContainer;"string"==typeof n.fieldEditContainer&&(i=document.querySelector(n.fieldEditContainer));const l=[{type:"button",id:"clear",className:"clear-all btn btn-danger",events:{click:t.confirmRemoveAll.bind(t)}},{type:"button",label:"viewJSON",id:"data",className:"btn btn-default get-data",events:{click:t.showData.bind(t)}},{type:"button",id:"save",className:"btn btn-primary save-template",events:{click:e=>{t.save(),ye.opts.onSave(e,t.data.formData)}}}].concat(r);return n.fields=n.fields.concat(o),n.disableFields=n.disableFields.concat(o.map((e=>{let{type:t}=e;return t&&t}))),"xml"===n.dataType&&(n.disableHTMLLabels=!0),ye.opts=Object.assign({},{actionButtons:l},{fieldEditContainer:i},n),ye.opts}input(e){return void 0===e&&(e={}),q("input",null,e)}getFormData(e,t){void 0===e&&(e="js"),void 0===t&&(t=!1);const r=this,o={js:()=>r.prepData(r.d.stage),xml:()=>r.xmlSave(r.d.stage),json:e=>window.JSON.stringify(r.prepData(r.d.stage),null,e&&" ")};return o[e](t)}tmpCleanPrevHolder(t){const r=this,o=[],n=t.find(".form-group");function i(e){const t=e.attr("class");if(void 0!==t&&!1!==t){const t=r.tryParseColumnInfo(e[0]);e.attr("class",e.attr("class").replace("__fb-tmp-col-","col-")),e.attr("class",e.attr("class").replace("__fb-tmp-row-","row-")),e.attr("class",e.attr("class").replace("col-","__fb-tmp-col-")),e.attr("class",e.attr("class").replace("row-","__fb-tmp-row-"));const n={};n.field=e,n.columnInfo=t,o.push(n)}}return i(n),n.find("*").each((function(t,r){i(e(r))})),o}tryParseColumnInfo(e){const t={};if(e.className){const r=de(e.className);r&&r.length>0&&r.forEach((e=>{e.startsWith("row-")?t.rowUniqueId=e.replace("row-","").trim():t.columnSize=e}))}return t}removeContainerProtection(e){const t=this.formBuilder.preserveTempContainers.indexOf(e);-1!==t&&this.formBuilder.preserveTempContainers.splice(t,1)}toggleHighlight(e,t){void 0===t&&(t=600),e.addClass("moveHighlight"),setTimeout((function(){e.removeClass("moveHighlight")}),t)}showToast(t,r){void 0===r&&(r=3e3),null!=this.toastTimer&&(window.clearTimeout(this.toastTimer),this.toastTimer=null),this.toastTimer=setTimeout((function(){e(".snackbar").removeClass("show")}),r),e(".snackbar").addClass("show").html(t)}getDistanceBetweenPoints(e,t,r,o){const n=r-e,i=o-t;return Math.floor(Math.sqrt(i*i+n*n))}getRowClass(e){if(e){const t=e.split(" ").filter((e=>e.startsWith("row-")));if(t&&t.length>0)return t[0]}return""}getRowValue(e){if(e){const t=this.getRowClass(e);if(t)return t.split("-")[1]}return"0"}changeRowClass(e,t){const r=this.getRowClass(e);return e.replace(r,`row-${t}`)}getBootstrapColumnValue(e){if(e){const t=this.getBootstrapColumnClass(e);if(t)return parseInt(t.split("-")[2])}return 0}getBootstrapColumnPrefix(e){if(e){const t=this.getBootstrapColumnClass(e);if(t)return`${t.split("-")[0]}-${t.split("-")[1]}`}return""}getBootstrapColumnClass(e){if(e){const t=e.split(" ").filter((e=>se.test(e)));if(t&&t.length>0)return t[0]}return""}changeBootstrapClass(e,t){const r=this.getBootstrapColumnClass(e);return e.replace(r,`${this.getBootstrapColumnPrefix(e)}-${t}`)}syncBootstrapColumnWrapperAndClassProperty(t,r){const o=e(`#${t}-cont`);o.attr("class",this.changeBootstrapClass(o.attr("class"),r));const n=e(`#className-${t}`);n.val()&&n.val(this.changeBootstrapClass(n.val(),r))}}const Ne=["values","type"];pe.register("autocomplete",class extends pe{static get definition(){return{mi18n:{requireValidOption:"requireValidOption"}}}build(){const e=this.config,{values:t,type:r}=e,o=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,Ne),n=e=>{const t=e.target.nextSibling.nextSibling,r=e.target.nextSibling,o=this.getActiveOption(t);let n=new Map([[38,()=>{const e=this.getPreviousOption(o);e&&this.selectOption(t,e)}],[40,()=>{const e=this.getNextOption(o);e&&this.selectOption(t,e)}],[13,()=>{o?(e.target.value=o.innerHTML,r.value=o.getAttribute("value"),"none"===t.style.display?this.showList(t,o):this.hideList(t)):this.config.requireValidOption&&(this.isOptionValid(t,e.target.value)||(e.target.value="",e.target.nextSibling.value="")),e.preventDefault()}],[27,()=>{this.hideList(t)}]]).get(e.keyCode);return n||(n=()=>!1),n()},i={focus:e=>{const t=e.target.nextSibling.nextSibling,r=d(t.querySelectorAll("li"),e.target.value);if(e.target.addEventListener("keydown",n),e.target.value.length>0){const e=r.length>0?r[r.length-1]:null;this.showList(t,e)}},blur:e=>{e.target.removeEventListener("keydown",n);const t=setTimeout((()=>{e.target.nextSibling.nextSibling.style.display="none",clearTimeout(t)}),200);if(this.config.requireValidOption){const t=e.target.nextSibling.nextSibling;this.isOptionValid(t,e.target.value)||(e.target.value="",e.target.nextSibling.value="")}},input:e=>{const t=e.target.nextSibling.nextSibling;e.target.nextSibling.value=e.target.value;const r=d(t.querySelectorAll("li"),e.target.value);if(0==r.length)this.hideList(t);else{let e=this.getActiveOption(t);e||(e=r[r.length-1]),this.showList(t,e)}}},l=Object.assign({},o,{id:`${o.id}-input`,autocomplete:"off",events:i}),a=Object.assign({},o,{type:"hidden"});delete l.name;const s=[this.markup("input",null,l),this.markup("input",null,a)],c=t.map((e=>{const t=e.label,r={events:{click:t=>{const r=t.target.parentElement,o=r.previousSibling.previousSibling;o.value=e.label,o.nextSibling.value=e.value,this.hideList(r)}},value:e.value};return this.markup("li",t,r)}));return s.push(this.markup("ul",c,{id:`${o.id}-list`,className:`formbuilder-${r}-list`})),s}hideList(e){this.selectOption(e,null),e.style.display="none"}showList(e,t){this.selectOption(e,t),e.style.display="block",e.style.width=e.parentElement.offsetWidth+"px"}getActiveOption(e){const t=e.getElementsByClassName("active-option")[0];return t&&"none"!==t.style.display?t:null}getPreviousOption(e){let t=e;do{t=t?t.previousSibling:null}while(null!=t&&"none"===t.style.display);return t}getNextOption(e){let t=e;do{t=t?t.nextSibling:null}while(null!=t&&"none"===t.style.display);return t}selectOption(e,t){const r=e.querySelectorAll("li");for(let e=0;e=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,Le);let o=t;const n={paragraph:"p",header:this.subtype};return n[t]&&(o=n[t]),{field:this.markup(o,fe.parsedHtml(this.label),r),layout:"noLabel"}}}pe.register(["paragraph","header"],Re),pe.register(["p","address","blockquote","canvas","output"],Re,"paragraph"),pe.register(["h1","h2","h3","h4","h5","h6"],Re,"header");const Ie=["values","value","placeholder","type","inline","other","toggle"],Me=["label"];function Pe(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}pe.register(["select","checkbox-group","radio-group","checkbox"],class extends pe{static get definition(){return{inactive:["checkbox"],mi18n:{minSelectionRequired:"minSelectionRequired"}}}build(){const e=[],t=this.config,{values:r,value:o,placeholder:n,type:i,inline:l,other:a,toggle:s}=t,d=Pe(t,Ie),c=i.replace("-group",""),f="select"===i;if((d.multiple||"checkbox-group"===i)&&(d.name=d.name+"[]"),"checkbox-group"===i&&d.required){const e=this,t=this.onRender.bind(this);this.onRender=function(){t(),e.groupRequired()}}if(delete d.title,r){n&&f&&e.push(this.markup("option",n,{disabled:!0,selected:!0,value:""}));for(let t=0;t{const t=e.target;t.parentElement.previousElementSibling.value=t.value}},id:`${t.id}-value`,className:"other-val"},i=this.markup("input",null,o),a=[document.createTextNode(pe.mi18n("other")),this.markup("input",null,n)],s=this.markup("label",a,{for:o.id}),f=this.markup("div",[i,s],{className:r});e.push(f)}}return this.dom="select"==i?this.markup(c,e,T(d,!0)):this.markup("div",e,{className:i}),this.dom}groupRequired(){const e=this.element.getElementsByTagName("input"),t=()=>{const t=[].some.call(e,(e=>e.checked));((e,t)=>{[].forEach.call(e,(e=>{t?e.removeAttribute("required"):e.setAttribute("required","required"),((e,t)=>{const r=pe.mi18n("minSelectionRequired",1);t?e.setCustomValidity(""):e.setCustomValidity(r)})(e,t)}))})(e,t)};for(let r=e.length-1;r>=0;r--)e[r].addEventListener("change",t);t()}onRender(){if(this.config.userData){const t=this.config.userData.slice();"select"===this.config.type?e(this.dom).val(t).prop("selected",!0):this.config.type.endsWith("-group")&&("checkbox-group"===this.config.type&&this.dom.querySelectorAll("input[type=checkbox]").forEach((e=>{e.removeAttribute("checked")})),this.dom.querySelectorAll("input").forEach((e=>{if(!e.classList.contains("other-val")){for(let r=0;r0){const r=this.dom.querySelector(`#${e.id}-value`);e.setAttribute("checked","checked"),r.value=e.value=t[0],r.style.display="inline-block"}}})))}}});class Be extends pe{static get definition(){return{mi18n:{date:"dateField",file:"fileUpload"}}}build(){let{name:e}=this.config;e=this.config.multiple?`${e}[]`:e;const t=Object.assign({},this.config,{name:e});return this.dom=this.markup("input",null,t),this.dom}onRender(){this.config.userData&&e(this.dom).val(this.config.userData[0])}}pe.register(["text","file","date","number"],Be),pe.register(["text","password","email","color","tel"],Be,"text"),pe.register(["date","time","datetime-local"],Be,"date"),pe.register(["number","range"],Be,"number");const Fe=["value"];class He extends pe{static get definition(){return{mi18n:{textarea:"textArea"}}}build(){const e=this.config,{value:t=""}=e,r=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,Fe);return delete r.type,this.field=this.markup("textarea",this.parsedHtml(t),r),this.field}onRender(){this.config.userData&&e(this.field).val(this.config.userData[0])}on(t){return"prerender"==t&&this.preview?t=>{this.field&&(t=this.field),e(t).on("mousedown",(e=>{e.stopPropagation()}))}:super.on(t)}}pe.register("textarea",He),pe.register("textarea",He,"textarea");const qe=["value"];He.register("tinymce",class extends He{configure(){if(this.js=[],window.tinymce||this.js.push("https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.9.11/tinymce.min.js"),this.classConfig.js){let e=this.classConfig.js;Array.isArray(e)||(e=new Array(e)),this.js=this.js.concat(e),delete this.classConfig.js}this.classConfig.css&&(this.css=this.classConfig.css),this.editorOptions={height:250,paste_data_images:!0,plugins:["advlist","autolink","lists","link","image","charmap","print","preview","anchor","searchreplace","visualblocks","code","fullscreen","insertdatetime","media","table","contextmenu","paste","code"],toolbar:"undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | table"}}build(){const e=this.config,{value:t=""}=e,r=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,qe);return delete r.type,this.field=this.markup("textarea",this.parsedHtml(t),r),r.disabled&&(this.editorOptions.readonly=!0),this.field}onRender(){const e=window.tinymce.get(this.id);e&&window.tinymce.remove(e);const t=jQuery.extend(this.editorOptions,this.classConfig);t.target=this.field;const r=[];Number(window.tinymce.majorVersion)>=5&&r.push("contextmenu"),Number(window.tinymce.majorVersion)>=6&&r.push("paste","print"),t.plugins=t.plugins.filter((e=>-1===r.indexOf(e)));const o=this.config.userData?this.parsedHtml(this.config.userData[0]):void 0,n=window.lastFormBuilderCopiedTinyMCE?this.parsedHtml(window.lastFormBuilderCopiedTinyMCE):void 0;window.lastFormBuilderCopiedTinyMCE=null;const i=function(e){n?e.setContent(n):o&&e.setContent(o)};setTimeout((()=>{window.tinymce.init(t).then(i)}),0)}},"textarea");const ze=["value"];function Ue(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function We(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,ze);return delete r.type,this.field=this.markup("div",null,r),this.field.classList.contains("form-control")&&this.field.classList.remove("form-control"),this.field}onRender(e){const t=this.config.value||"",r=window.Quill.import("delta");window.fbEditors.quill[this.id]={};const o=window.fbEditors.quill[this.id];return o.instance=new window.Quill(this.field,this.editorConfig),o.data=new r,t&&o.instance.setContents(window.JSON.parse(this.parsedHtml(t))),o.instance.on("text-change",(function(e){o.data=o.data.compose(e)})),e}},"textarea");class $e{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t=[]),this.customRegister={},this.templateControlRegister={},this.def={icon:{},i18n:{}},this.register(e,t)}register(e,t){void 0===e&&(e={}),void 0===t&&(t=[]);const r=h().locale;this.def.i18n[r]||(this.def.i18n[r]={});const o=this;Object.keys(e).forEach((t=>{const r=function(r,o){this.customControl=new De(r,o,e[t]),this.build=function(){return this.customControl.build()},this.on=function(e){return this.customControl.on(e)}};r.definition={},r.label=e=>o.label(e),r.icon=e=>o.icon(e),this.templateControlRegister[t]=r}));for(const o of t){let t=o.type;if(o.attrs=o.attrs||{},!t){if(!o.attrs.type){pe.error("Ignoring invalid custom field definition. Please specify a type property.");continue}t=o.attrs.type}let n=o.subtype||t;if(e[t]){const e=this.templateControlRegister[t];e.definition=o,this.customRegister[n]=jQuery.extend(o,{type:t,class:e})}else{const e=pe.getClass(t,o.subtype);if(!e){super.error("Error while registering custom field: "+t+(o.subtype?":"+o.subtype:"")+". Unable to find any existing defined control or template for rendering.");continue}n=o.datatype?o.datatype:`${t}-${Math.floor(9e3*Math.random()+1e3)}`,this.customRegister[n]=jQuery.extend(o,{type:t,class:e})}this.def.i18n[r][n]=o.label,this.def.icon[n]=o.icon}}label(e){const t=this.definition;let r=t.i18n||{};r=r[h().locale]||r.default||r;const o=pe.camelCase(e),n="object"==typeof r?r[o]||r[e]:r;if(n)return n;let i=t.mi18n;return"object"==typeof i&&(i=i[o]||i[e]),i||(i=o),h().get(i)}get definition(){return{}}icon(e){const t=this.definition;return t&&"object"==typeof t.icon?t.icon[e]:t.icon}getRegistered(e){var t;return void 0===e&&(e=!1),e?null!==(t=this.templateControlRegister[e])&&void 0!==t?t:void 0:Object.keys(this.customRegister)}getClass(e){var t;return null!==(t=this.templateControlRegister[e])&&void 0!==t?t:void 0}lookup(e){return this.customRegister[e]}}var Ve=JSON.parse('{"Rp":"formbuilder-icon-"}');const Je=Ve.Rp;class Ge{constructor(e,t){this.opts=e,this.dom=t.controls,this.getRegistered=pe.getRegistered,this.init()}init(){this.setupControls(),this.appendControls()}setupControls(){const e=this.opts;pe.loadCustom(e.controls),this.custom=new $e(e.templates,e.fields);const t=pe.getRegistered(),r=this.custom.getRegistered();r&&jQuery.merge(t,r),this.registeredSubtypes=pe.getRegisteredSubtypes(),e.sortableControls&&this.dom.classList.add("sort-enabled"),this.controlList=[],this.allControls={};for(let e=0;e${i}${l}`);const s=q("li",q("span",l),{className:`${a} input-control input-control-${e}`});s.dataset.type=r,this.controlList.push(r),this.allControls[r]=s}e.inputSets.length&&e.inputSets.forEach(((e,t)=>{let{name:r,label:o}=e;r=r||P(o),e.icon&&(o=`${e.icon}${o}`);const n=q("li",q("span",o),{className:`input-set-control input-set-${t}`});n.dataset.type=r,this.controlList.push(r),this.allControls[r]=n}))}orderFields(e){const t=this.opts,r=t.controlOrder.concat(e);let o;return Ce()("sessionStorage")&&(t.sortableControls?o=window.sessionStorage.getItem("fieldOrder"):window.sessionStorage.removeItem("fieldOrder")),o?(o=window.JSON.parse(o),o=Q(o.concat(e)),o=Object.keys(o).map((e=>o[e]))):o=Q(r),o.forEach((e=>{const t=new RegExp("-[\\d]{4}$");if(e.match(t)){const r=o.indexOf(e.replace(t,""));-1!==r&&(o.splice(o.indexOf(e),1),o.splice(r+1,o.indexOf(e),e))}})),t.disableFields.length&&(o=o.filter((e=>!t.disableFields.includes(e)))),o.filter(Boolean)}appendControls(){const e=document.createDocumentFragment();s(this.dom),this.orderFields(this.controlList).forEach((t=>{const r=this.allControls[t];r&&e.appendChild(r)})),this.dom.appendChild(e)}getClass(e,t){return this.custom.getClass(e)||pe.getClass(e,t)}}const Xe=["class","className"],Qe=["multiple","options","label","value","class","className"],Ze=["class","className"],Ye=["tag","content"],Ke=["i18n"];function _e(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function et(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function tt(e){for(var t=1;t{let[r,o]=t;return S(S({},e),{},{[`${r}Selector`]:`.${o}`})}),{}));var ft;function ut(e,t,o){const n=this,i=h().current,l=`frmb-${Date.now()}`,s=new m(l),d=new u(l);let c=[];n.preserveTempContainers=[],n.rowWrapperClassSelector=at,n.colWrapperClassSelector=st,n.colWrapperClass=nt,n.fieldSelector=e.enableEnhancedBootstrapGrid?at:"li.form-field",(e=>{if("object"!=typeof e)throw"Invalid value given to setSanitizerConfig, expected config object";if(e.hasOwnProperty("clobberingProtection")&&["document","form","namespaceAttributes"].forEach((t=>{e.clobberingProtection.hasOwnProperty(t)&&"boolean"==typeof e.clobberingProtection[t]&&(w.clobberingProtection[t]=e.clobberingProtection[t])})),e.hasOwnProperty("backends")){if("object"!=typeof e.backends)throw"backends config expected to be an Object";Object.keys(e.backends).forEach((t=>w.backends[t]=e.backends[t]))}if(e.hasOwnProperty("backendOrder")){if(w.backendOrder=[],!Array.isArray(e.backendOrder))throw"backendOrder config expected to be an Array of backend keys as strings";e.backendOrder.forEach((e=>{if(!w.backends.hasOwnProperty(e))throw"unknown sanitizer backend "+e;w.backendOrder.push(e)}))}})(e.sanitizerOptions),o(t).closest("form").length&&e.notify.warning("WARNING: FormBuilder does not support being contained with a Element"),e.layout||(e.layout=be);const f=new e.layout(e.layoutTemplates,!0,e.disableHTMLLabels,e.controlConfig),p=new Se(l,f,n),b=q;e=p.processOptions(e),s.layout=p.editorLayout(e.controlPosition),p.editorUI(l),s.formID=l,s.lastID=`${s.formID}-fld-0`;const g=new Ge(e,d);n.controls=g;const y=ye.subtypes=p.processSubtypes(e.subtypes),x=o(d.stage),A=o(d.controls);let C,k,j=!1,E=!1,S=!1;function N(){return!!e.enableEnhancedBootstrapGrid}x.sortable({cursor:"move",opacity:.9,revert:150,beforeStop:(e,t)=>p.beforeStop.call(p,e,t),start:(e,t)=>p.startMoving.call(p,e,t),stop:(e,t)=>p.stopMoving.call(p,e,t),change:function(t,r){e.prepend&&r.placeholder.index()<1?o("li.form-prepend").after(r.placeholder):e.append&&r.placeholder.index()>=x.children("li").length-1&&o("li.form-append").before(r.placeholder)},cancel:["input","select","textarea",".disabled-field",".form-elements",".btn","button",".is-locked"].join(", "),placeholder:"frmb-placeholder hoverDropStyleInverse"}),e.allowStageSort||x.sortable("disable"),A.sortable({helper:"clone",opacity:.9,connectWith:`#${l}, ${at}`,cancel:".formbuilder-separator",cursor:"move",scroll:!1,placeholder:"hoverDropStyleInverse ui-state-highlight",start:(e,t)=>p.startMoving.call(p,e,t),stop:(e,t)=>{p.stopMoving.call(p,e,t)},revert:150,beforeStop:(e,t)=>p.beforeStop.call(p,e,t),distance:3,change:function(t,r){e.prepend&&r.placeholder.index()<1?o("li.form-prepend").after(r.placeholder):e.append&&r.placeholder.index()>=x.children("li").length-1&&o("li.form-append").before(r.placeholder)},update:function(t,r){if(p.doCancel)return!1;o(r.item).closest(".stage-wrap")&&0===o(r.item).closest(at).length?(p.doCancel=!0,D(r.item)):(N()&&ue(),p.setFieldOrder(A),p.doCancel=!e.sortableControls)}}),A.on("mouseenter",(function(){p.stageIsEmpty()||x.children(dt+":not(:last-child)").addClass(lt)}));const D=t=>{if(t[0].classList.contains("input-set-control")){const r=[],o=e.inputSets.find((e=>P(e.name||e.label)===t[0].dataset.type));if(o&&o.showHeader){const e={type:"header",subtype:"h2",id:o.name,label:o.label};r.push(e)}r.push(...o.fields),r.forEach((e=>{B(e,!0),(p.stopIndex||0===p.stopIndex)&&p.stopIndex++}))}else B(t,!0)},R=o(d.editorWrap);o('
').appendTo(R);const I=b("div",d.controls,{id:`${s.formID}-cb-wrap`,className:`cb-wrap ${s.layout.controls}`});e.showActionButtons&&I.appendChild(d.formActions);const M=b("div","",{id:`${s.formID}-gridModeHelp`,className:"grid-mode-help"});I.appendChild(M),R.append(d.stage,I),"textarea"!==t.type?o(t).append(R):o(t).replaceWith(R),o(d.controls).on("click","li",(t=>{let{target:r}=t;p.stageIsEmpty()&&x.find(dt).eq(0).remove();const n=o(r).closest("li");p.stopIndex=e.append?x.children().length-1:void 0,D(n),p.save.call(p)}));const B=function(t,r){void 0===r&&(r=!1);let n={};if(t instanceof jQuery)if(n.type=t[0].dataset.type,n.type){const e=g.custom.lookup(n.type);if(e)n=Object.assign({},e);else{const e=g.getClass(n.type);n.label=e.label(n.type)}}else{const e=t[0].attributes;r||(n.values=t.children().map(((e,t)=>({label:o(t).text(),value:o(t).attr("value"),selected:Boolean(o(t).attr("selected"))}))));for(let t=e.length-1;t>=0;t--)n[e[t].name]=e[t].value}else n=Object.assign({},t);n.name||(n.name=F(n)),r&&["text","number","file","date","select","textarea","autocomplete"].includes(n.type)&&(n.className=n.className||"form-control");const i=/(?:^|\s)btn-(.*?)(?:\s|$)/g.exec(n.className);if(i&&(n.style=i[1]),r){const e=setTimeout((()=>{document.dispatchEvent(v.fieldAdded),clearTimeout(e)}),10)}e.onAddField(s.lastID,n),ce(n,r),e.onAddFieldAfter(s.lastID,n),d.stage.classList.remove("empty")};n.prepFieldVars=B;const z=function(t){(t=p.getData(t))&&t.length?(t.forEach((e=>U(e))),t.forEach((e=>B(T(e)))),d.stage.classList.remove("empty")):e.defaultFields&&e.defaultFields.length?(ye.opts.defaultFields.forEach((e=>U(e))),p.addDefaultFields()):e.prepend||e.append||(d.stage.classList.add("empty"),d.stage.dataset.content=h().get("getStarted")),(()=>{const t=[],r=t=>b("li",e[t],{className:`disabled-field form-${t}`});return e.prepend&&!o(".disabled-field.form-prepend",d.stage).length&&(t.push(!0),x.prepend(r("prepend"))),e.append&&!o(".disabled-field.form-append",d.stage).length&&(t.push(!0),x.append(r("append"))),p.disabledTT(d.stage),t.some((e=>!0===e))})()&&d.stage.classList.remove("empty"),p.save()};function U(e){const t=p.getRowValue(e.className);t&&!c.includes(t)&&c.push(t)}const W=t=>{const{type:r}=t,o=[],n=g.getClass(r),i=(e=>{const t=["required","label","description","placeholder","className","name","access","value"],r=!["header","paragraph","file","autocomplete"].concat(d.optionFields).includes(e),o={autocomplete:t.concat(["options","requireValidOption"]),button:["label","subtype","style","className","name","value","access"],checkbox:["required","label","description","toggle","inline","className","name","access","other","options"],text:t.concat(["subtype","maxlength"]),date:t.concat(["subtype","min","max","step"]),file:t.concat(["multiple"]),header:["label","subtype","className","access"],hidden:["name","value","access"],paragraph:["label","subtype","className","access"],number:t.concat(["subtype","min","max","step"]),select:t.concat(["multiple","options"]),textarea:t.concat(["subtype","maxlength","rows"])};e in g.registeredSubtypes&&!(e in o)&&(o[e]=t.concat(["subtype"])),o["checkbox-group"]=o.checkbox,o["radio-group"]=o.checkbox;const n=o[e];return"radio-group"===e&&Z("toggle",n),["header","paragraph","button"].includes(e)&&Z("description",n),r||Z("value",n),n||t})(r),l={required:()=>de(t),toggle:()=>K("toggle",t,{first:h().get("toggle")}),inline:()=>{const e={first:h().get("inline"),second:h().get("inlineDesc",r.replace("-group",""))};return K("inline",t,e)},label:()=>se("label",t),description:()=>se("description",t),subtype:()=>ne("subtype",t,y[r]),style:()=>_(t.style),placeholder:()=>se("placeholder",t),rows:()=>te("rows",t),className:e=>se("className",t,e),name:e=>se("name",t,e),value:()=>se("value",t),maxlength:()=>te("maxlength",t),access:()=>{const r=[`
`];for(a in e.roles)if(e.roles.hasOwnProperty(a)){const t=`fld-${s.lastID}-roles-${a}`,o={type:"checkbox",name:"roles[]",value:a,id:t,className:"roles-field"};c.includes(a)&&(o.checked="checked"),r.push(``)}r.push("
");const o={first:h().get("roles"),second:h().get("limitRole"),content:r.join("")};return K("access",t,o)},other:()=>K("other",t,{first:h().get("enableOther"),second:h().get("enableOtherMsg")}),options:()=>function(e){const{type:t,values:r}=e;let o;const n=[b("a",h().get("addOption"),{className:"add add-opt"})],i=[b("label",h().get("selectOptions"),{className:"false-label"})],l=e.multiple||"checkbox-group"===t,a=e=>{const t=h().get("optionCount",e);return{selected:!1,label:t,value:P(t)}};if(r&&r.length)o=r.map((e=>Object.assign({},{selected:!1},e)));else{let e=[1,2,3];["checkbox-group","checkbox"].includes(t)&&(e=[1]),o=e.map(a);const r=o[0];r.hasOwnProperty("selected")&&"radio-group"!==t&&(r.selected=!0)}const s=b("div",n,{className:"option-actions"}),d=b("ol",o.map((function(r,o,n,i){void 0===i&&(i=e.name);const a=ye.opts.onAddOption(r,{type:t,index:o,isMultiple:l});return ke(i+"-options",a,l)})),{className:"sortable-options"}),c=b("div",[d,s],{className:"sortable-options-wrap"});return i.push(c),b("div",i,{className:"form-group field-options"}).outerHTML}(t),requireValidOption:()=>K("requireValidOption",t,{first:" ",second:h().get("requireValidOption")}),multiple:()=>{const e={default:{first:"Multiple",second:"set multiple attribute"},file:{first:h().get("multipleFiles"),second:h().get("allowMultipleFiles")},select:{first:" ",second:h().get("selectionsMessage")}};return K("multiple",t,e[r]||e.default)}};let a;const c=void 0!==t.role?t.role.split(","):[];["min","max","step"].forEach((e=>{l[e]="number"===r?()=>te(e,t):()=>se(e,t)}));const f=["name","className","subtype"],u=Object.assign({},e.typeUserAttrs["*"],e.typeUserAttrs[r]);if(Object.keys(i).forEach((t=>{const a=i[t],s=[!0],d=e.disabledAttrs.includes(a);if(e.typeUserDisabledAttrs[r]){const t=e.typeUserDisabledAttrs[r];s.push(!t.includes(a))}if(n.definition.hasOwnProperty("defaultAttrs")){const e=Object.keys(n.definition.defaultAttrs);s.push(!e.includes(a))}if(u){const e=Object.keys(u);s.push(!e.includes(a))}d&&!f.includes(a)&&s.push(!1),s.every(Boolean)&&o.push(l[a](d))})),n.definition.hasOwnProperty("defaultAttrs")){const e=G(n.definition.defaultAttrs,t);o.push(e)}if(u){const e=G(u,t);o.push(e)}return o.join("")};function $(e){return[["array",e=>{let{options:t}=e;return!!t}],["boolean",e=>{let{type:t}=e;return"checkbox"===t}],[typeof e.value,()=>!0]].find((t=>t[1](e)))[0]}function J(e,t){return e.subtype&&e.subtype===t}function G(t,r){const o=[],n={array:Y,string:Q,number:te,boolean:(e,t)=>{let o=!1;return"checkbox"===e.type?o=Boolean(!!t.hasOwnProperty("value")&&t.value):r.hasOwnProperty(e)?o=r[e]:(t.hasOwnProperty("value")||t.hasOwnProperty("checked"))&&(o=t.value||t.checked||!1),K(e,tt(tt({},t),{},{[e]:o}),{first:i[e]})}};for(const l in t)if(t.hasOwnProperty(l)){const a=$(t[l]);if("undefined"!==a){const e=h().get(l),s=t[l],d="boolean"===a?s.value:s.value||"";s.value=r[l]||d,s.label&&(i[l]=Array.isArray(s.label)?h().get(...s.label)||s.label[0]:s.label),n[a]&&o.push(n[a](l,s)),i[l]=e,s.value=d}else if("undefined"===a&&J(r,l))o.push(G(t[l],r));else{const r={};r[l]=t[l],e.notify.warning("Warning: unable to process typeUserAttr definition : "+JSON.stringify(r))}}return o.join("")}function Q(e,t){const{class:r,className:o}=t,n=_e(t,Xe);let l={id:e+"-"+s.lastID,title:n.description||n.label||e.toUpperCase(),name:e,type:n.type||"text",className:[`fld-${e}`,(r||o||"").trim()],value:n.value||""};const a=``;return["checkbox","checkbox-group","radio-group"].includes(l.type)||l.className.push("form-control"),l=Object.assign({},n,l),`
${a}
${(()=>{if("textarea"===l.type){const e=l.value;return delete l.value,``}return``})()}
`}function Y(e,t){const{multiple:r,options:o,label:n,value:l,class:a,className:d}=t,c=_e(t,Qe),f=Object.keys(o).map((e=>{const t={value:e},r=o[e],n=Array.isArray(r)?h().get(...r)||r[0]:r;return(Array.isArray(l)?l.includes(e):e===l)&&(t.selected=null),b("option",n,t)})),u={id:`${e}-${s.lastID}`,title:c.description||n||e.toUpperCase(),name:e,className:`fld-${e} form-control ${a||d||""}`.trim()};r&&(u.multiple=!0);const p=``;return Object.keys(c).forEach((function(e){u[e]=c[e]})),`
${p}
${b("select",f,u).outerHTML}
`}const K=function(e,t,r){void 0===r&&(r={});const o=t=>b("label",t,{for:`${e}-${s.lastID}`}).outerHTML,n={type:"checkbox",className:`fld-${e}`,name:e,id:`${e}-${s.lastID}`};t[e]&&(n.checked=!0);const i=[];let l=[b("input",null,n).outerHTML];return r.first&&i.push(o(r.first)),r.second&&l.push(" ",o(r.second)),r.content&&l.push(r.content),l=b("div",l,{className:"input-wrap"}).outerHTML,b("div",i.concat(l),{className:`form-group ${e}-wrap`}).outerHTML},_=e=>{let t="";"undefined"===e&&(e="default");const r=``;return t+=p.input({value:e||"default",type:"hidden",className:"btn-style"}).outerHTML,t+='
',ve.btn.forEach((r=>{const o=["btn-xs","btn",`btn-${r}`];e===r&&o.push("selected");const n=b("button",h().get(`styles.btn.${r}`),{value:r,type:"button",className:o.join(" ")}).outerHTML;t+=n})),t+="
",t=b("div",[r,t],{className:"form-group style-wrap"}),t.outerHTML},te=(e,t)=>{const{class:r,className:o}=t,n=_e(t,Ze),i=isNaN(n[e])?void 0:n[e],l=h().get(e)||e,a={type:"number",value:i,name:e,placeholder:h().get(`placeholder.${e}`),className:`fld-${e} form-control ${r||o||""}`.trim(),id:`${e}-${s.lastID}`},d=p.input(T(a)).outerHTML;return b("div",[``,`
${d}
`],{className:`form-group ${e}-wrap`}).outerHTML},ne=(e,t,r)=>{const o=r.map(((r,o)=>{let n=Object.assign({label:`${i.option} ${o}`,value:void 0},r);return r.value===t[e]&&(n.selected=!0),n=T(n),b("option",n.label,n)})),n={id:e+"-"+s.lastID,name:e,className:`fld-${e} form-control`},l=h().get(e)||ee(e)||"",a=b("label",l,{for:n.id}),d=b("select",o,n),c=b("div",d,{className:"input-wrap"});return b("div",[a,c],{className:`form-group ${n.name}-wrap`}).outerHTML},se=function(t,r,o){void 0===o&&(o=!1);let n=r[t]||"",i=h().get(t)||t;"label"===t&&(["paragraph"].includes(r.type)?i=h().get("content"):n=V(n));const l=h().get(`placeholders.${t}`)||"";let a="";if(![].some((e=>!0===e))){const d={name:t,placeholder:l,className:`fld-${t} form-control`,id:`${t}-${s.lastID}`},c=b("label",i,{for:d.id}).outerHTML;"label"!==t||e.disableHTMLLabels?(d.value=n,d.type="text",a+=``):(d.contenteditable=!0,a+=b("div",n,d).outerHTML);const f=`
${a}
`;let u=o?"none":"block";"value"===t&&(u=r.subtype&&"quill"===r.subtype&&"none"),a=b("div",[c,f],{className:`form-group ${t}-wrap`,style:`display: ${u}`})}return a.outerHTML},de=e=>{const{type:t}=e,r=[];let o="";return["header","paragraph","button"].includes(t)&&r.push(!0),r.some((e=>!0===e))||(o=K("required",e,{first:h().get("required")})),o},ce=function(t,r){void 0===r&&(r=!0);const l=Oe(t);s.lastID=p.incrementId(s.lastID);const a=t.type||"text";let c=t.label||(r?i[a]||h().get("label"):"");var f;"hidden"!==a&&""!==c||(c=`${null!==(f=h().get(a))&&void 0!==f?f:a}: ${t.name}`);const u=e.disabledFieldButtons[a]||t.disabledFieldButtons;let m=[b("a",null,{type:"remove",id:"del_"+s.lastID,className:`del-button btn ${rt}cancel delete-confirm`,title:h().get("removeMessage")}),b("a",null,{type:"edit",id:s.lastID+"-edit",className:`toggle-form btn ${rt}pencil`,title:h().get("hide")}),b("a",null,{type:"copy",id:s.lastID+"-copy",className:`copy-button btn ${rt}copy`,title:h().get("copyButtonTooltip")})];N()?m.push(b("a",null,{type:"grid",id:s.lastID+"-grid",className:`grid-button btn ${rt}grid`,title:"Grid Mode"})):m.push(b("a",null,{type:"sort",id:s.lastID+"-sort-higher",className:`sort-button sort-button-higher btn ${rt}sort-higher`,title:"Move Higher"}),b("a",null,{type:"sort",id:s.lastID+"-sort-lower",className:`sort-button sort-button-lower btn ${rt}sort-lower`,title:"Move Lower"})),u&&Array.isArray(u)&&(m=m.filter((e=>!u.includes(e.type))));const g=[b("div",m,{className:"field-actions"})],v=e.disableHTMLLabels?document.createTextNode(c):V(c);g.push(b("label",v,{className:"field-label"})),g.push(b("span"," *",{className:"required-asterisk",style:t.required?"display:inline":""}));const w={className:"tooltip-element",tooltip:t.description,style:t.description?"display:inline-block":"display:none"};g.push(b("span","?",w));const y=b("div","",{className:"prev-holder",dataFieldId:s.lastID});g.push(y);const A=b("div",[W(t),b("a",h().get("close"),{className:"close-field"})],{className:"form-elements"}),O=b("div",A,{id:`${s.lastID}-holder`,className:"frm-holder",dataFieldId:s.lastID});n.currentEditPanel=O,g.push(O);const k=b("li",g,{class:`${a}-field form-field`,type:a,id:s.lastID}),T=o(k);let D;if(fe(T),T.data("fieldData",{attrs:t}),void 0!==p.stopIndex?o(d.stage).children().eq(p.stopIndex).before(T):x.append(T),o(".sortable-options",T).sortable({update:()=>p.updatePreview(T)}),p.updatePreview(T),N()){const e=`div.row-${l.rowUniqueId}`;D=x.children(e).length?x.children(e):b("div",null,{id:`${k.id}-row`,className:`row row-${l.rowUniqueId} ${ot}`}),j&&E&&(C.attr("id",D.id),C.attr("class",D.className),C.attr("style",""),C.attr("data-row-id",l.rowUniqueId),D=C);const t=b("div",null,{id:`${k.id}-cont`,className:`${l.columnSize} ${nt}`});j&&S&&("true"==C.attr("prepend")?o(t).prependTo(D):o(t).insertAfter(`#${C.attr("appendAfter")}`)),S||o(t).appendTo(D),j||T.after(D),T.appendTo(t),he(D),pe(D),l.addedDefaultColumnClass&&T.attr("addedDefaultColumnClass",!0),p.tmpCleanPrevHolder(o(y))}e.typeUserEvents[a]&&e.typeUserEvents[a].onadd?e.typeUserEvents[a].onadd(k):e.typeUserEvents["*"]&&e.typeUserEvents["*"].onadd&&e.typeUserEvents["*"].onadd(k),r&&(e.editOnAdd&&(p.closeAllEdit(),p.toggleEdit(s.lastID,!1)),k.scrollIntoView&&e.scrollToFieldOnAdd&&k.scrollIntoView({behavior:"smooth"})),N()&&j&&S&&Re(D,!0),j=!1,E=!1,S=!1};function fe(e){N()&&e.mouseenter((function(e){De||(Ee=o(this),Ne=e.pageX,Te=e.pageY)}))}function ue(){x.find(dt+":not(:last-child)").css("height","1px").addClass(lt)}function pe(e){const t=o(e).clone();if(t.addClass(lt).addClass(it).html(""),t.css("height","1px"),t.attr("class",t.attr("class").replace("row-","")),t.removeAttr("id"),0===o(e).index()){const e=o(t).clone();x.prepend(e),he(e)}t.insertAfter(o(e)),he(t),x.find(at+":last-child").removeClass(lt)}function me(){x.children(dt).remove(),x.children(at).each(((e,t)=>{pe(o(t))})),x.find(at+":last-child").removeClass(lt)}function he(t){if(!N())return;o(t).sortable({connectWith:[at],cursor:"move",opacity:.9,revert:150,tolerance:"pointer",helper:function(e,t){const r=t.clone();return r.find(".field-actions").remove(),r.css({width:"20%",height:"100px",minHeight:"60px",overflow:"hidden"}),r},over:function(e){const t=o(e.target),r=t.hasClass(it);r||Ae(t),t.addClass("hoverDropStyleInverse"),r||(ue(),t.prev(dt).removeClass(lt).css("height","40px"),t.next(dt).removeClass(lt).css("height","40px"))},out:function(e){x.children(dt).removeClass("hoverDropStyleInverse"),o(e.target).removeClass("hoverDropStyleInverse")},placeholder:"hoverDropStyleInverse",receive:function(e,t){const r=o(t.sender).attr("id")===A.attr("id"),n=o(t.item).parent().hasClass(it),i=!n&&o(t.item).parent().hasClass(ot);if(n)if(r)E=!0,j=!0,C=o(t.item).parent();else{const e=o(t.item),r=Oe({}),n=b("div",null,{id:`${e.find("li").attr("id")}-row`,className:`row row-${r.rowUniqueId} ${ot}`});o(t.item).parent().replaceWith(n),fe(o(t.item)),e.appendTo(n),he(n),Ie(e.attr("id"))}if(i&&r){C=o(t.item).prev().hasClass("btnAddControl")?o(t.item).prev():o(t.item).next().hasClass("btnAddControl")?o(t.item).next():o(t.item).attr("prepend","true");const e=p.getRowClass(o(t.item).parent().attr("class"));C.addClass(e),S=!0,j=!0,p.stopIndex=void 0}j&&(p.doCancel=!0,D(t.item),p.save.call(p)),Me(),me();const l=o(t.item).find("li");l.length&&(ge(l),we(l),p.tmpCleanPrevHolder(o(t.item).find(".prev-holder")))},start:(e,t)=>{x.addClass("__preventColButtons"),Ae(t.item.closest(at))},stop:(e,t)=>{x.removeClass("__preventColButtons"),x.children(dt).removeClass("hoverDropStyleInverse"),Re(t.item.closest(at),!0)},update:(e,t)=>{Ie(t.item.attr("id"))}});const r=p.getRowValue(t.className);"0"!==r&&o(t).attr("data-row-id",r),xe(t,!0),e.enableColumnInsertMenu&&(o(t).off("mouseenter"),o(t).on("mouseenter",(function(e){xe(o(e.currentTarget))})),o(t).off("mouseleave"),o(t).on("mouseleave",(function(e){Ce(o(e.currentTarget))})))}function ge(e){const t=e.find('textarea[type="tinymce"]');t.length&&(window.lastFormBuilderCopiedTinyMCE=window.tinymce.get(t.attr("id")).save())}function we(e){p.updatePreview(e),p.save.call(p)}function xe(t,r){if(void 0===r&&(r=!1),!e.enableColumnInsertMenu||x.hasClass("__preventColButtons"))return;o(t).children("button.btnAddControl").remove();const n=o(t).children(st);n.each(((e,t)=>{const i=o(t);i.addClass("colWithInsertButtons"),0===n.index(i)&&o(``).insertBefore(i),o(``).insertAfter(i)}))}function Ae(e){e.find("button.btnAddControl").remove(),e.find(st).removeClass("colWithInsertButtons")}function Ce(e){e.find("button.btnAddControl").css("visibility","hidden")}function Oe(t){if(!N())return{};const r=p.tryParseColumnInfo(t);if(!r.rowUniqueId){if(j&&S)r.rowUniqueId=p.getRowValue(C.attr("class"));else{let e;if(0===c.length)e=1;else{const t=c.filter((e=>!isNaN(e)&&!isNaN(parseInt(e)))).map((e=>parseInt(e)));e=Math.max(...t,0)+1}r.rowUniqueId=e.toString()}r.columnSize=e.defaultGridColumnClass,t.className||(t.className=""),t.className+=` row-${r.rowUniqueId} ${r.columnSize}`,r.addedDefaultColumnClass=!0}return c.includes(r.rowUniqueId)||c.push(r.rowUniqueId),r}const ke=function(e,t,r){const o={selected:r?"checkbox":"radio"},n={boolean:(t,r)=>{const n={value:t,type:o[r]||"checkbox"};return t&&(n.checked=!!t),n.name=e,["input",null,n]},number:e=>["input",null,{value:e,type:"number"}],string:(e,t)=>["input",null,{value:e,type:"text",placeholder:h().get(`placeholder.${t}`)||""}],array:e=>["select",e.map((e=>{let{label:t,value:r}=e;return b("option",t,{value:r})}))],object:e=>{let{tag:t,content:r}=e;return[t,r,_e(e,Ye)]}};t=tt(tt({},{selected:!1,label:"",value:""}),t);const i=Object.entries(t).map((e=>{let[t,r]=e;const o=H(r),[i,l,a]=n[o](r,t),s=`option-${t} option-attr`;return a["data-attr"]=t,a.className=a.className?`${a.className} ${s}`:s,b(i,l,a)})),l={className:`remove btn ${rt}cancel`,title:h().get("removeMessage")};return i.push(b("a",null,l)),b("li",i).outerHTML},je=[".form-elements input",".form-elements select",".form-elements textarea"].join(", ");x.on("change blur keyup click",je,r()((e=>{if(e){if([e=>{let{type:t,target:r}=e;return"keyup"===t&&"className"===r.name}].some((t=>t(e))))return!1;we(o(e.target).closest(".form-field"))}}),333,{leading:!1})),x.on("click touchstart",".remove",(t=>{const r=o(t.target).parents(".form-field:eq(0)"),n=r[0],i=n.getAttribute("type"),l=o(t.target.parentElement);t.preventDefault(),n.querySelector(".sortable-options").childNodes.length<=2&&!i.includes("checkbox")?e.notify.error("Error: "+h().get("minOptionMessage")):l.slideUp("250",(()=>{l.remove(),we(r)}))})),x.on("touchstart","input",(e=>{const t=o(e.target);if(!0===e.handled)return!1;if("checkbox"===t.attr("type"))t.trigger("click");else{t.focus();const e=t.val();t.val(e)}})),x.on("click touchstart",".toggle-form, .close-field",(function(e){if(e.stopPropagation(),e.preventDefault(),!0===e.handled)return!1;{const t=o(e.target).parents(".form-field:eq(0)").attr("id");p.toggleEdit(t),e.handled=!0}})),x.on("dblclick","li.form-field",(e=>{if(!["select","input","label","textarea"].includes(e.target.tagName.toLowerCase())&&!0!==e.target.isContentEditable&&(e.stopPropagation(),e.preventDefault(),!0!==e.handled)){const t=o(e.target).closest("li.form-field").attr("id");p.toggleEdit(t),e.handled=!0}})),x.on("change",'[name="subtype"]',(e=>{const t=o(e.target).closest("li.form-field");o(".value-wrap",t).toggle("quill"!==e.target.value)})),x.on("change",'[name="name"]',(t=>{const r=t.target.value;(e=>{const t=document,r=document.createElement("form");return e in t||e in r})(r)&&e.notify.error("Potential for Dom Clobbering with field name "+r)})),x.on("change",[".prev-holder input",".prev-holder select",".prev-holder textarea"].join(", "),(e=>{let t;if(e.target.classList.contains("other-option"))return;const r=oe(e.target,".form-field");if(["select","checkbox-group","radio-group"].includes(r.type)){const o=r.getElementsByClassName("option-value");"select"===r.type?X(o,(t=>{o[t].parentElement.childNodes[0].checked=e.target.value===o[t].value})):(t=document.getElementsByName(e.target.name),X(t,(e=>{t[e].classList.contains("other-option")||(o[e].parentElement.childNodes[0].checked=t[e].checked)})))}else{const t=document.getElementById("value-"+r.id);t&&(t.value=e.target.value)}p.save.call(p)})),re(d.stage,"keyup change",(e=>{let{target:t}=e;if(!t.classList.contains("fld-label"))return;const r=t.value||t.innerHTML,o=oe(t,".form-field").querySelector(".field-label");O(o,V(r),ye.opts.disableHTMLLabels)})),x.on("keyup","input.error",(e=>{let{target:t}=e;return o(t).removeClass("error")})),x.on("keyup",'input[name="description"]',(function(e){const t=o(e.target).parents(".form-field:eq(0)"),r=o(".tooltip-element",t),n=o(e.target).val();if(""!==n)if(r.length)r.attr("tooltip",n).css("display","inline-block");else{const e=`?`;o(".field-label",t).after(e)}else r.length&&r.css("display","none")})),x.on("change",".fld-multiple",(e=>{const t=e.target.checked?"checkbox":"radio",r=o(".option-selected",o(e.target).closest(".form-elements"));return r.each((e=>r[e].type=t)),t})),x.on("blur","input.fld-name",(function(e){e.target.value=ie(e.target.value),""===e.target.value?o(e.target).addClass("field-error").attr("placeholder",h().get("cannotBeEmpty")):o(e.target).removeClass("field-error")})),x.on("blur","input.fld-maxlength",(e=>{e.target.value=le(e.target.value)})),x.on("click touchstart",".btnAddControl",(function(e){const t=o(e.currentTarget);k=A.clone(),k.hover((function(){}),(function(){k.remove()})),k.on("click","li",(e=>{let{target:r}=e;S=!0,j=!0,C=t;const n=o(r).closest("li");p.stopIndex=void 0,D(n),p.save.call(p),k.remove()})),x.append(k),0==t.index()?k.css({position:"fixed",left:t.offset().left,top:t.offset().top-o(window).scrollTop()}):k.css({position:"fixed",left:t.offset().left-80,top:t.offset().top-o(window).scrollTop()});const r=k.offset().top+k.outerHeight(),n=o(window).scrollTop()+o(window).innerHeight();r>n&&k.css({top:parseInt(k.css("top"))-(r-n)})})),x.on("click",`.${rt}copy`,(function(t){t.preventDefault();const r=o(t.target).parent().parent("li"),n=function(t){s.lastID=p.incrementId(s.lastID),ge(t);const r=t.attr("id"),n=t.attr("type"),i=n+"-"+(new Date).getTime(),l=t.clone();return o(".fld-name",l).val(i),l.find("[id]").each(((e,t)=>{t.id=t.id.replace(r,s.lastID)})),l.find("[for]").each(((e,t)=>{const o=t.getAttribute("for").replace(r,s.lastID);t.setAttribute("for",o)})),t.find("select").each((function(e){l.find("select").eq(e).val(o(this).val())})),l.attr("id",s.lastID),l.attr("name",i),l.addClass("cloned"),o(".sortable-options",l).sortable(),e.typeUserEvents[n]&&e.typeUserEvents[n].onclone?e.typeUserEvents[n].onclone(l[0]):e.typeUserEvents["*"]&&e.typeUserEvents["*"].onclone&&e.typeUserEvents["*"].onclone(l[0]),l}(r);N()?function(e,t){const r=o(`#className-${t.attr("id")}`),n=Oe({}),i=b("div",null,{id:`${e.attr("id")}-row`,className:`row row-${n.rowUniqueId} ${ot}`}),l=b("div",null,{id:`${e.attr("id")}-cont`,className:`${p.getBootstrapColumnClass(r.val())} ${nt}`});let a;o(l).appendTo(i),t.parent().is("div")?a=t.closest(at):t.parent().is("ul")&&(a=t),o(i).insertAfter(a),e.appendTo(l),he(i),me(),Ie(e.attr("id"))}(n,r):n.insertAfter(r),we(n),p.tmpCleanPrevHolder(n.find(".prev-holder")),e.editOnAdd&&p.closeField(s.lastID,!1)})),N()&&x.on("stageEmptied",(()=>{c=[]})),x.on("click",".delete-confirm",(t=>{t.preventDefault();const r=t.target.getBoundingClientRect(),n=document.body.getBoundingClientRect(),i={pageX:r.left+r.width/2,pageY:r.top-n.top-12},l=o(t.target).parents(".form-field:eq(0)").attr("id"),a=o(document.getElementById(l));if(document.addEventListener("modalClosed",(function(){a.removeClass("deleting")}),!1),e.fieldRemoveWarn){const e=b("h3",h().get("warning")),t=b("p",h().get("fieldRemoveWarning"));p.confirm([e,t],(()=>p.removeField(l)),i),a.addClass("deleting")}else p.removeField(l)}));let Ee,Ne,Te,De=!1,Le=0;function Re(e,t){void 0===t&&(t=!1);const r=e.children(`div${st}`).length,n=Math.floor(12/r);e.children(`div${st}`).each(((e,r)=>{const i=o(`#${r.id}`);t||"true"!=i.find("li").attr("manuallyChangedDefaultColumnClass")?p.syncBootstrapColumnWrapperAndClassProperty(r.id.replace("-cont",""),n):p.showToast(`Preserving column size of field ${e+1} because you had personally adjusted it`,4e3)}))}function Ie(e){if(e){const t=o(`#className-${e.replace("-cont","")}`);if(t.val()){const e=p.getRowClass(t.val()),r=p.getRowClass(t.closest(at).attr("class"));t.val(t.val().replace(e,r)),Me()}}}function Me(){x.find(st).each(((e,t)=>{const r=o(t);r.is(":empty")&&!n.preserveTempContainers.includes(r.attr("id"))&&r.remove()})),x.children(at).not(dt).each(((e,t)=>{if(0===o(t).children(st).length){const e=p.getRowValue(o(t).attr("class"));c=c.filter((t=>t!==e)),o(t).remove()}else xe(o(t),!0)}))}function Pe(e){if(void 0===e&&(e=!0),e)De=!0,p.showToast("Starting Grid Mode - Use the mousewheel to resize.",1500),A.css("display","none"),o(d.formActions).css("display","none"),o(M).html("\n
\n

Grid Mode

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
ActionResult
MOUSEWHEELAdjust the field column size
W or ↑Move entire row up
S or ↓Move entire row down
A or ←Move field left within the row
D or →Move field right within the row
RResize all fields within the row to be maximally equal
\n\n
Current Row Fields
\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n
FieldSize
\n \n
\n "),Be(),p.closeAllEdit(),p.toggleHighlight(Ee),ue();else{p.showToast("Grid Mode Finished",1500);const e=Ee.closest(at);let t=0;e.children(`div${st}`).each(((e,r)=>{const n=o(`#${r.id}`).find("li").attr("id");t+=p.getBootstrapColumnValue(o(`#${n}-cont`).attr("class"))})),t>12&&Re(e,!0),De=!1,Ee=null,o(M).empty(),A.css("display","unset"),o(d.formActions).css("display","unset")}}function Be(){o(M).find(".gridHelpCurrentRow tbody").empty(),Ee.closest(at).children(`div${st}`).each(((e,t)=>{const r=o(`#${t.id}`).find("li").attr("id"),n=o(`#${r}`),i=n.attr("type");let l=o(`#label-${r}`).html();"hidden"!==i&&"paragraph"!==i||(l=o(`#name-${r}`).val()),l||(l=n.attr("id"));let a="";Ee.attr("id")===r&&(a="currentGridModeFieldHighlight"),o(M).find(".gridHelpCurrentRow tbody").append(`\n \n ${l}\n \n ${p.getBootstrapColumnValue(o(`#${r}-cont`).attr("class"))}\n \n \n `)}))}if(x.on("click touchstart",".grid-button",(e=>{e.preventDefault();const t=o(e.target).parents(".form-field:eq(0)").attr("id");Ee=o(document.getElementById(t)),Ne=e.pageX,Te=e.pageY,Le=0,Pe()})),x.on("wheel",(function(e){if(0!==e.originalEvent.deltaY&&De){e.preventDefault(),Le+=e.originalEvent.deltaY;const t=120;if(Le>0&&Le-t)return;const r=Ee.closest("div"),n=p.getBootstrapColumnValue(r.attr("class")),i=Math.round(Le/t);Le%=t;const l=n+i;if(l>12)return void p.showToast('Column Size cannot exceed 12');if(l<1)return void p.showToast('Column Size cannot be less than 1');const a=Ee.closest(at);let s=l;if(a.children(`div${st}`).each(((e,t)=>{const r=o(`#${t.id}`).find("li").attr("id");r!=Ee.attr("id")&&(s+=p.getBootstrapColumnValue(o(`#${r}-cont`).attr("class")))})),s>12)return void p.showToast('There is a maximum of 12 columns per row');p.syncBootstrapColumnWrapperAndClassProperty(Ee.attr("id"),l),Ee.attr("manuallyChangedDefaultColumnClass",!0),Be(),p.toggleHighlight(Ee)}})),o(document).keydown((e=>{if(De){e.preventDefault();const t=Ee.closest(at);switch(event.code){case"KeyW":case"ArrowUp":Ae(t),function(e){const t=e.prevAll().not(dt).not(".form-prepend").first();t.length&&(o(Ee.parent().parent()).swapWith(t),p.toggleHighlight(Ee))}(t);break;case"KeyS":case"ArrowDown":Ae(t),function(e){const t=e.nextAll().not(ct).not(".form-append").first();t.length&&(o(Ee.parent().parent()).swapWith(t),p.toggleHighlight(Ee))}(t);break;case"KeyA":case"ArrowLeft":Ae(t),function(){const e=Ee.parent().prev();e.length&&Ee.parent().after(e),p.toggleHighlight(Ee)}();break;case"KeyD":case"ArrowRight":Ae(t),function(){const e=Ee.parent().next();e.length&&Ee.parent().before(e),p.toggleHighlight(Ee)}();break;case"KeyR":Ae(t),Re(t,!0),xe(t,!0)}Be(),Ce(t)}})),o(document).mousemove((e=>{De&&p.getDistanceBetweenPoints(Ne,Te,e.pageX,e.pageY)>ye.opts.cancelGridModeDistance&&Pe(!1)})),o(document).on("checkRowCleanup",((e,t)=>{Me();const r=o(`#${t.rowWrapperID}`);r.length&&Re(r,!0)})),o(document).on("fieldOpened",((e,t)=>{const r=o(`#${t.rowWrapperID}`);r.length&&Ce(r)})),x.on("click",".field-actions .sort-button",(function(e){e.preventDefault();const t=o(e.target).parent().parent("li");let r;o(e.target).hasClass("sort-button-higher")?(r=t.prev("li"),r.length&&!r.hasClass("form-prepend")&&t.insertBefore(r)):(r=t.next("li"),r.length&&!r.hasClass("form-append")&&t.insertAfter(r)),p.toggleHighlight(t)})),x.on("click",".style-wrap button",(e=>{const t=o(e.target),r=t.closest(".form-elements"),n=t.val(),i=o(".btn-style",r);i.val(n),t.siblings(".btn").removeClass("selected"),t.addClass("selected"),we(i.closest(".form-field"))})),x.on("click",".fld-required",(e=>{o(e.target).closest(".form-field").find(".required-asterisk").toggle()})),x.on("click","input.fld-access",(function(e){const t=o(e.target).closest(".form-field").find(".available-roles"),r=o(e.target);t.slideToggle(250,(function(){r.is(":checked")||o("input[type=checkbox]",t).removeAttr("checked")}))})),x.on("click",".add-opt",(function(e){e.preventDefault();const t=o(e.target).closest(".form-field").attr("type"),r=o(e.target).closest(".field-options"),n=o('[name="multiple"]',r),i=o(".option-selected:eq(0)",r),l=n.length?n.prop("checked"):"checkbox"===i.attr("type"),a=o(".sortable-options",r),s=ye.opts.onAddOption({selected:!1,label:"",value:""},{type:t,index:a.children().length,isMultiple:l});a.append(ke(i.attr("name"),s,l))})),x.on("mouseover mouseout",".remove, .del-button",(e=>o(e.target).closest("li").toggleClass("delete"))),z(),!0===e.disableInjectedStyle){const e=document.getElementsByClassName("formBuilder-injected-style");X(e,(t=>a(e[t])))}else"bootstrap"===e.disableInjectedStyle&&d.editorWrap.classList.remove("formbuilder-embedded-bootstrap");return document.dispatchEvent(v.loaded),n.actions={getFieldTypes:t=>t?ae(g.getRegistered(),e.disableFields):g.getRegistered(),clearFields:()=>p.removeAllFields(d.stage),showData:p.showData.bind(p),save:e=>{const t=p.save(e),r=window.JSON.parse(t);return ye.opts.onSave(r),r},addField:(e,t)=>{p.stopIndex=s.formData.length?t:void 0,B(e)},removeField:p.removeField.bind(p),getData:p.getFormData.bind(p),setData:e=>{p.stopIndex=void 0,p.removeAllFields(d.stage),z(e)},setLang:e=>h().setCurrent.call(h(),e).then((()=>{d.stage.dataset.content=h().get("getStarted"),g.init(),d.empty(d.formActions),p.formActionButtons().forEach((e=>d.formActions.appendChild(e)))})),showDialog:p.dialog.bind(p),toggleFieldEdit:e=>{(Array.isArray(e)?e:[e]).forEach((e=>{["number","string"].includes(typeof e)&&("number"==typeof e?e=d.stage.children[e].id:/^frmb-/.test(e)||(e=d.stage.querySelector(e).id),p.toggleEdit(e))}))},toggleAllFieldEdit:()=>{X(d.stage.children,(e=>{p.toggleEdit(d.stage.children[e].id)}))},closeAllFieldEdit:p.closeAllEdit.bind(p),getCurrentFieldId:()=>s.lastID},d.onRender(d.controls,(()=>{const t=setTimeout((()=>{d.stage.style.minHeight=`${d.controls.clientHeight}px`,e.stickyControls.enable&&p.stickyControls(x),clearTimeout(t)}),0)})),n}const pt=function(e,t){const r=this,o=jQuery.extend({},ge,e,!0),{i18n:n}=o,i=_e(o,Ke);ye.opts=i,this.i18nOpts=jQuery.extend({},we,n,!0);const l=()=>{console.error("formBuilder is still initialising"),console.info("See https://formbuilder.online/docs/formBuilder/actions/getData/#wont-work and https://formbuilder.online/docs/formBuilder/promise/ for more information on formBuilder asynchronous loading")};this.instance={actions:["getFieldTypes","addField","clearFields","closeAllFieldEdit","getData","removeField","save","setData","setLang","showData","showDialog","toggleAllFieldEdit","toggleFieldEdit","getCurrentFieldId"].reduce(((e,t)=>(e[t]=l,e)),{}),markup:q,get formData(){return r.instance.actions.getData!==l&&r.instance.actions.getData("json")},promise:new Promise((function(e,o){h().init(r.i18nOpts).then((()=>{const o=new ut(i,t[0],jQuery);jQuery(t[0]).data("formBuilder",o),Object.assign(r.instance,o.actions),r.instance.actions=o.actions,delete r.instance.promise,e(r.instance)})).catch((e=>{o(e),i.notify.error(e)}))}))}};jQuery.fn.formBuilder=function(e){if(void 0===e&&(e={}),"string"!=typeof e){const t=new pt(e,this);return this.data("fbInstance",t.instance),t.instance}{const n=this.data("fbInstance");if(n[e]){if("function"==typeof n[e]){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o */ diff --git a/assets/js/form-builder.min.js.gz b/assets/js/form-builder.min.js.gz index abe78dbf4..15fa4ec91 100644 Binary files a/assets/js/form-builder.min.js.gz and b/assets/js/form-builder.min.js.gz differ diff --git a/assets/js/form-render.min.js.LICENSE.txt b/assets/js/form-render.min.js.LICENSE.txt index 5f5b10112..dfb0fc845 100644 --- a/assets/js/form-render.min.js.LICENSE.txt +++ b/assets/js/form-render.min.js.LICENSE.txt @@ -7,7 +7,7 @@ /*! * jQuery formRender: https://formbuilder.online/ - * Version: 3.16.12 + * Version: 3.16.13 * Author: Kevin Chappell */