UNPKG

coreui-form

Version:
1 lines 219 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):((t="undefined"!=typeof globalThis?globalThis:t||self).CoreUI=t.CoreUI||{},t.CoreUI.form=e())}(this,function(){"use strict";function q(e,t){var n,i=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)),i}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q(Object(n),!0).forEach(function(t){c(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function y(t){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function D(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,U(i.key),i)}}function t(t,e,n){return e&&D(t.prototype,e),n&&D(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(t,e,n){(e=U(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}function e(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&F(t,e)}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function F(t,e){return(F=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function h(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");e=t;if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function n(){return(n="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}(t,e);if(i)return(i=Object.getOwnPropertyDescriptor(i,e)).get?i.get.call(arguments.length<3?t:n):i.value}).apply(this,arguments)}function v(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,o,r,s,l=[],a=!0,u=!1;try{if(r=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;a=!1}else for(;!(a=(i=r.call(n)).done)&&(l.push(i.value),l.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{if(!a&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw o}}return l}}(t,e)||N(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N(t,e){var n;if(t)return"string"==typeof t?z(t,e):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?z(t,e):void 0}function z(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function W(t,e){var n,i,o,r,s="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(s)return i=!(n=!0),{s:function(){s=s.call(t)},n:function(){var t=s.next();return n=t.done,t},e:function(t){i=!0,o=t},f:function(){try{n||null==s.return||s.return()}finally{if(i)throw o}}};if(Array.isArray(t)||(s=N(t))||e&&t&&"number"==typeof t.length)return s&&(t=s),r=0,{s:e=function(){},n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:e};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function U(t){t=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);if("object"!=typeof(n=n.call(t,e||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==typeof t?t:String(t)}var d=Object.create(null);d["form-control.html"]=' <div id="coreui-form-<%= form.id %>-control-<%= control.index %>" class="coreui-form__control_container" <% if ( ! control.show) { %>style="display:none"<% } %>> <%- control.content %> </div>',d["form-error.html"]='<div class="coreui-form__error alert alert-danger alert-dismissible fade show mb-3 <%= options.class %>"> <%- message %> <% if (options.dismiss) { %> <button type="button" class="btn-close" data-bs-dismiss="alert"></button> <% } %> </div>',d["form-field-attach.html"]='<div class="<%= directionClass %> content-<%= contentId %>"></div>',d["form-field-group.html"]='<div id="coreui-form-<%= id %>" class="coreui-form__group_container mb-3"> <div class="coreui-form__group_label pe-2"> <h6 class="coreui-form__field_label_text col-form-label"> <%- group.label %> <% if (group.showCollapsible) { %> <button type="button" class="btn btn-link btn-collapsible text-dark"> <% if ( ! group.show) { %> <i class="bi bi-chevron-right"></i> <% } else { %> <i class="bi bi-chevron-down"></i> <% } %> </button> <% } %> </h6> </div> <div class="coreui-form__group_content"<% if ( ! group.show) { %> style="display:none"<% } %>></div> </div>',d["form-field-label.html"]='<div id="coreui-form-<%= id %>" class="coreui-form__field_container d-flex flex-column flex-md-row mb-3<% if ( ! field.show) { %> d-none<% } %>"> <% if (field.labelWidth !== 0 && field.labelWidth !== \'0px\') { %> <div class="coreui-form__field_label text-md-end text-sm-start pe-2"<% if (field.labelWidth) { %> style="min-width:<%= field.labelWidth %>;width:<%= field.labelWidth %>"<% } %>> <div class="coreui-form__field_label_content col-form-label"> <% if (field.required) { %> <span class="coreui-form__field_label_req text-danger">*</span> <% } %> <% if (field.help) { %> <span class="coreui-form__field_label_help text-body-secondary" title="<%- field.help %>" data-bs-toggle="tooltip" data-bs-placement="bottom"> <i class="bi bi-question-circle"></i> </span> <% } %> <span class="coreui-form__field_label_text fw-medium"><%- field.label %></span> <% if (field.descriptionLabel) { %> <div class="coreui-form__field_label_description text-muted"> <small><%- field.descriptionLabel %></small> </div> <% } %> </div> </div> <% } %> <div class="coreui-form__field_content flex-fill"> <% if (field.prefix) { %> <span class="coreui-form__field-prefix d-inline-block align-top ps-1"> <%- field.prefix %> </span> <% } %> <div class="d-inline-block content-<%= contentId %>"></div> <% if (field.suffix) { %> <span class="coreui-form__field-suffix d-inline-block align-top ps-1"> <%- field.suffix %> </span> <% } %> <% if (issetAttachFields) { %> <div class="coreui-form__attach-fields <%= directionClass %>"></div> <% } %> <% if (field.description) { %> <div class="coreui-form__field_description text-muted"> <small><%- field.description %></small> </div> <% } %> </div> </div>',d["form.html"]='<div id="coreui-form-<%= form.id %>" class="coreui-form mb-2" <% if (widthSizes) { %>style="<%= widthSizes.join(\';\') %>"<% } %>> <% if (form.title) { %> <h5 class="mb-4"><%- form.title %></h5> <% } %> <form action="<%= form.send.url %>" method="<%= form.send.method %>"<%- formAttr %>> <div class="coreui-form__fields d-flex justify-content-start flex-column flex-wrap"></div> <% if (controls) { %> <div class="coreui-form__controls d-flex justify-content-start flex-sm-wrap flex-md-nowrap"> <% if (form.controlsOffset !== 0 && form.controlsOffset !== \'0px\') { %> <div class="d-none d-md-block" style="width:<%= form.controlsOffset %>;min-width:<%= form.controlsOffset %>"></div> <% } %> <div class="d-flex justify-content-start flex-wrap gap-2"> <% $.each(controls, function(key, control) { %> <% if (control.content !== null) { %> <div id="coreui-form-<%= form.id %>-control-<%= control.index %>" class="coreui-form__control_container" <% if ( ! control.show) { %>style="display:none"<% } %>> </div> <% } %> <% }); %> </div> </div> <% } %> </form> </div>',d["controls/button.html"]="<button <%- attr %>><%- content %></button>",d["controls/link.html"]='<a href="<%- url %>"<%- attr %>><%- content %></a>',d["fields/checkbox-btn.html"]='<% if (readonly) { %> <div class="coreui-form__field-readonly col-form-label"><%- selectedItems.join(\', \') %></div> <% } else { %> <div class="pt-2"> <div class="btn-group" role="group" aria-label="Basic checkbox toggle button group"> <% $.each(options, function(key, option) { %> <input <%- option.attr %>> <label class="<%= field.optionsClass %>" for="<%= option.id %>"><%= option.text %></label> <% }); %> </div> </div> <% } %>',d["fields/checkbox.html"]='<% if (readonly) { %> <div class="coreui-form__field-readonly col-form-label"><%- selectedItems.join(\', \') %></div> <% } else { %> <div class="pt-2"> <% $.each(options, function(key, option) { %> <div class="form-check<% if (field.inline) { %> form-check-inline<% } %>"> <input <%- option.attr %>/> <label class="form-check-label" for="<%= option.id %>"><%= option.text %></label> </div> <% }); %> </div> <% } %>',d["fields/color.html"]='<% if (readonly) { %> <div class="coreui-form__field-readonly col-form-label rounded-1" style="width: 14px;height: 14px;background-color: <%= value %>"></div> <% } else { %> <input <%- attr %>/> <% if (datalist.length > 0) { %> <datalist id="<%= datalistId %>"> <% $.each(datalist, function(key, item) { %> <option <%- item.attr %>/> <% }); %> </datalist> <% } %> <% } %>',d["fields/dataset-row-readonly.html"]='<tr class="coreui-form__field-dataset-item"> <% $.each(options, function(key, option) { %> <td class="pe-2 pb-1"> <%- option.value %> </td> <% }); %> </tr>',d["fields/dataset-row.html"]='<tr class="coreui-form__field-dataset-item" id="dataset-item-<%= hashItem %>"> <% $.each(options, function(key, option) { %> <td class="pe-1 pb-1"> <% if (option.type === \'select\') { %> <select <%- option.attr %>> <% $.each(option.items, function(key, item) { %> <option <%- item.attr %>><%- item.text %></option> <% }); %> </select> <% } else if (option.type === \'switch\') { %> <div class="form-check form-switch"> <input <%- option.attr %>/> </div> <% } else { %> <input <%- option.attr %>> <% } %> </td> <% }); %> <td class="pb-1"> <button type="button" class="btn btn-link btn-dataset-remove" data-item-id="dataset-item-<%= hashItem %>"> <i class="bi bi-x text-muted"></i> </button> </td> </tr>',d["fields/dataset.html"]='<% if (readonly) { %> <table class="coreui-form__field-dataset-container" <% if (rows.length == 0) { %> style="display:none"<% } %>> <thead> <tr> <% $.each(headers, function(key, item) { %> <td class="text-muted pe-2"><small><%= item.title %></small></td> <% }); %> </tr> </thead> <tbody class="coreui-form__field-dataset-list"> <% $.each(rows, function(key, row) { %> <%- row %> <% }); %> </tbody> </table> <% } else { %> <table class="coreui-form__field-dataset-container" <% if (rows.length == 0) { %> style="display:none"<% } %>> <thead> <tr> <% $.each(headers, function(key, item) { %> <td class="text-muted"><small><%= item.title %></small></td> <% }); %> <td></td> </tr> </thead> <tbody class="coreui-form__field-dataset-list"> <% $.each(rows, function(key, row) { %> <%- row %> <% }); %> </tbody> </table> <button type="button" class="btn btn-link btn-dataset-add"><%= lang.dataset_add %></button> <% } %>',d["fields/file-upload.html"]=' <% if (showButton) { %> <button type="button" class="btn btn-outline-secondary fileup-btn"> <%= lang.file_upload_select %> <input type="file" id="fileup-<%= id %>"<% if (isMultiple) { %> multiple<% } %><% if (accept) { %> accept="<%= accept %>"<% } %>> </button> <% } else { %> <input type="file" id="fileup-<%= id %>"<% if (isMultiple) { %> multiple<% } %><% if (accept) { %> accept="<%= accept %>"<% } %> style="display:none"> <% } %> <% if (showDropzone) { %> <div id="fileup-<%= id %>-dropzone" class="fileup-dropzone p-4 d-inline-block text-primary-emphasis fs-5 rounded-4 text-center <% if (showButton) { %>mt-2<% } %>>"> <i class="bi bi-folder2-open"></i> <%= lang.file_upload_dropzone %> </div> <% } %> <div id="fileup-<%= id %>-queue"></div>',d["fields/hidden.html"]="<% if ( ! readonly) { %> <input <%- attr %>/> <% } %>",d["fields/input.html"]='<% if (readonly) { %> <div class="coreui-form__field-readonly col-form-label"><%- value %></div> <% } else { %> <input <%- attr %>/> <% if (datalist.length > 0) { %> <datalist id="<%= datalistId %>"> <% $.each(datalist, function(key, item) { %> <option <%- item.attr %>/> <% }); %> </datalist> <% } %> <% } %>',d["fields/modal-loading.html"]='<div class="py-4 d-flex justify-content-center align-items-center gap-2"> <div class="spinner-border mr-2"></div> <%= lang.modal_loading %> </div> ',d["fields/modal.html"]='<% if (readonly) { %> <div class="coreui-form__field-readonly col-form-label"><%= text %></div> <% } else { %> <div class="input-group"<% if (width) { %> style="width:<%= width %>"<% } %>> <input <%- attr %>/> <input type="hidden" name="<%= name %>" value="<%= value %>" class="coreui-form-modal-value"/> <% if ( ! required) { %> <button class="btn btn-outline-secondary btn-modal-clear border-secondary-subtle" type="button"> <i class="bi bi-x"></i> </button> <% } %> <button class="btn btn-outline-secondary btn-modal-select border-secondary-subtle" type="button"><%= lang.modal_select %></button> </div> <% } %>',d["fields/passwordRepeat.html"]='<% if (readonly) { %> <div class="coreui-form__field-readonly col-form-label"><%- value %></div> <% } else { %> <div class="d-flex gap-1 align-items-center"> <input <%- attr %>/> <% if (showBtn) { %> <div class="input-group flex-nowrap"> <input <%- attr2 %>/> <button class="btn btn-outline-secondary border-secondary-subtle btn-password-change" type="button" data-change="<%- lang.change %>" data-cancel="<%- lang.cancel %>"><%= btn_text %></button> </div> <% } else { %> <input <%- attr2 %>/> <% } %> </div> <% } %>',d["fields/radio-btn.html"]='<% if (readonly) { %> <div class="coreui-form__field-readonly col-form-label"><%- selectedItem %></div> <% } else { %> <div class="pt-2"> <div class="btn-group" role="group"> <% $.each(options, function(key, option) { %> <input <%- option.attr %>> <label class="<%= optionsClass %>" for="<%= option.id %>"><%= option.text %></label> <% }); %> </div> </div> <% } %>',d["fields/radio.html"]='<% if (readonly) { %> <div class="coreui-form__field-readonly col-form-label"><%- selectedItem %></div> <% } else { %> <div class="pt-2"> <% $.each(options, function(key, option) { %> <div class="form-check<% if (inline) { %> form-check-inline<% } %>"> <input <%- option.attr %>/> <label class="form-check-label" for="<%= option.id %>"><%= option.text %></label> </div> <% }); %> </div> <% } %>',d["fields/select.html"]="<% if (readonly) { %> <div class=\"coreui-form__field-readonly col-form-label\"><%= readonlyOptions.join(', ') %></div> <% } else { %> <select <%- attr %>> <% $.each(options, function(key, option) { %> <% if (option.type === 'group') { %> <optgroup<%- option.attr %>/> <% $.each(option.options, function(key, groupOption) { %> <option <%- groupOption.attr %>/><%= groupOption.text %></option> <% }); %> </optgroup> <% } else { %> <option <%- option.attr %>/><%= option.text %></option> <% } %> <% }); %> </select> <% } %>",d["fields/switch.html"]='<% if (readonly) { %> <div class="coreui-form__field-readonly col-form-label"><%= valueY == value ? lang.switch_yes : lang.switch_no %></div> <% } else { %> <div class="form-check form-switch pt-2"> <input <%- attr %>/> </div> <% } %>',d["fields/textarea.html"]='<% if (readonly) { %> <div class="coreui-form__field-readonly col-form-label"><%- value %></div> <% } else { %> <textarea <%- attr %>><%- value %></textarea> <% } %>',d["fields/wysiwyg.html"]='<% if (readonly) { %> <div class="coreui-form__field-readonly col-form-label"><%- value %></div> <% } else { %> <textarea name="<%= name %>" id="editor-<%= editorHash %>"><%- value %></textarea> <% } %>',function(t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).ejs=t()}(function(){return function i(o,r,s){function l(e,t){if(!r[e]){if(!o[e]){var n="function"==typeof require&&require;if(!t&&n)return n(e,!0);if(a)return a(e,!0);throw(t=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",t}n=r[e]={exports:{}},o[e][0].call(n.exports,function(t){return l(o[e][1][t]||t)},n,n.exports,i,o,r,s)}return r[e].exports}for(var a="function"==typeof require&&require,t=0;t<s.length;t++)l(s[t]);return l}({1:[function(t,e,a){var r=t("fs"),c=t("path"),f=t("./utils"),n=!1,t=t("../package.json").version,i=["delimiter","scope","context","debug","compileDebug","client","_with","rmWhitespace","strict","filename","async"],u=i.concat("cache"),s=/^\uFEFF/,h=/^[a-zA-Z_$][0-9a-zA-Z_$]*$/;function l(e,t){var n;if(t.some(function(t){return n=a.resolveInclude(e,t,!0),r.existsSync(n)}))return n}function d(t,e){var n,i=t.filename,o=1<arguments.length;if(t.cache){if(!i)throw new Error("cache option requires a filename");if(n=a.cache.get(i))return n;o||(e=p(i).toString().replace(s,""))}else if(!o){if(!i)throw new Error("Internal EJS error: no file name or template provided");e=p(i).toString().replace(s,"")}return n=a.compile(e,t),t.cache&&a.cache.set(i,n),n}function p(t){return a.fileLoader(t)}function _(t,e){var n=f.shallowCopy(f.createNullProtoObjWherePossible(),e);if(n.filename=function(t,e){var n,i=e.views,o=/^[A-Za-z]+:\\|^\//.exec(t);if(o&&o.length)t=t.replace(/^\/*/,""),n=Array.isArray(e.root)?l(t,e.root):a.resolveInclude(t,e.root||"/",!0);else if(!(n=!(n=e.filename&&(o=a.resolveInclude(t,e.filename),r.existsSync(o))?o:n)&&Array.isArray(i)?l(t,i):n)&&"function"!=typeof e.includer)throw new Error('Could not find the include file "'+e.escapeFunction(t)+'"');return n}(t,n),"function"==typeof e.includer){e=e.includer(t,n.filename);if(e&&(e.filename&&(n.filename=e.filename),e.template))return d(n,e.template)}return d(n)}function y(t,e,n,i,o){var e=e.split("\n"),r=Math.max(i-3,0),s=Math.min(e.length,i+3),o=o(n),n=e.slice(r,s).map(function(t,e){e=e+r+1;return(e==i?" >> ":" ")+e+"| "+t}).join("\n");throw t.path=o,t.message=(o||"ejs")+":"+i+"\n"+n+"\n\n"+t.message,t}function v(t){return t.replace(/;(\s*$)/,"$1")}function m(t,e){var e=f.hasOwnOnlyObject(e),n=f.createNullProtoObjWherePossible();this.templateText=t,this.mode=null,this.truncate=!1,this.currentLine=1,this.source="",n.client=e.client||!1,n.escapeFunction=e.escape||e.escapeFunction||f.escapeXML,n.compileDebug=!1!==e.compileDebug,n.debug=!!e.debug,n.filename=e.filename,n.openDelimiter=e.openDelimiter||a.openDelimiter||"<",n.closeDelimiter=e.closeDelimiter||a.closeDelimiter||">",n.delimiter=e.delimiter||a.delimiter||"%",n.strict=e.strict||!1,n.context=e.context,n.cache=e.cache||!1,n.rmWhitespace=e.rmWhitespace,n.root=e.root,n.includer=e.includer,n.outputFunctionName=e.outputFunctionName,n.localsName=e.localsName||a.localsName||"locals",n.views=e.views,n.async=e.async,n.destructuredLocals=e.destructuredLocals,n.legacyInclude=void 0===e.legacyInclude||!!e.legacyInclude,n.strict?n._with=!1:n._with=void 0===e._with||e._with,this.opts=n,this.regex=this.createRegex()}a.cache=f.cache,a.fileLoader=r.readFileSync,a.localsName="locals",a.promiseImpl=new Function("return this;")().Promise,a.resolveInclude=function(t,e,n){var i=c.dirname,o=c.extname,n=(0,c.resolve)(n?e:i(e),t);return o(t)||(n+=".ejs"),n},a.compile=function(t,e){return e&&e.scope&&(n||(console.warn("`scope` option is deprecated and will be removed in EJS 3"),n=!0),e.context||(e.context=e.scope),delete e.scope),new m(t,e).compile()},a.render=function(t,e,n){e=e||f.createNullProtoObjWherePossible(),n=n||f.createNullProtoObjWherePossible();return 2==arguments.length&&f.shallowCopyFromList(n,e,i),d(n,t)(e)},a.renderFile=function(){var t,e,n,i=Array.prototype.slice.call(arguments),o=i.shift(),r={filename:o},s=("function"==typeof arguments[arguments.length-1]&&(t=i.pop()),i.length?(e=i.shift(),i.length?f.shallowCopy(r,i.pop()):(e.settings&&(e.settings.views&&(r.views=e.settings.views),e.settings["view cache"]&&(r.cache=!0),i=e.settings["view options"])&&f.shallowCopy(r,i),f.shallowCopyFromList(r,e,u)),r.filename=o):e=f.createNullProtoObjWherePossible(),r),l=e,i=t;if(!i){if("function"==typeof a.promiseImpl)return new a.promiseImpl(function(t,e){try{t(n=d(s)(l))}catch(t){e(t)}});throw new Error("Please provide a callback function")}try{n=d(s)(l)}catch(t){return i(t)}i(null,n)},a.Template=m,a.clearCache=function(){a.cache.reset()},m.modes={EVAL:"eval",ESCAPED:"escaped",RAW:"raw",COMMENT:"comment",LITERAL:"literal"},m.prototype={createRegex:function(){var t="(<%%|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)",e=f.escapeRegExpChars(this.opts.delimiter),n=f.escapeRegExpChars(this.opts.openDelimiter),i=f.escapeRegExpChars(this.opts.closeDelimiter),t=t.replace(/%/g,e).replace(/</g,n).replace(/>/g,i);return new RegExp(t)},compile:function(){var t,o=this.opts,e="",n="",r=o.escapeFunction,i=o.filename?JSON.stringify(o.filename):"undefined";if(!this.source){if(this.generateSource(),e+=' var __output = "";\n function __append(s) { if (s !== undefined && s !== null) __output += s }\n',o.outputFunctionName){if(!h.test(o.outputFunctionName))throw new Error("outputFunctionName is not a valid JS identifier.");e+=" var "+o.outputFunctionName+" = __append;\n"}if(o.localsName&&!h.test(o.localsName))throw new Error("localsName is not a valid JS identifier.");if(o.destructuredLocals&&o.destructuredLocals.length){for(var s=" var __locals = ("+o.localsName+" || {}),\n",l=0;l<o.destructuredLocals.length;l++){var a=o.destructuredLocals[l];if(!h.test(a))throw new Error("destructuredLocals["+l+"] is not a valid JS identifier.");0<l&&(s+=",\n "),s+=a+" = __locals."+a}e+=s+";\n"}!1!==o._with&&(e+=" with ("+o.localsName+" || {}) {\n",n+=" }\n"),this.source=e+this.source+(n+=" return __output;\n")}e=o.compileDebug?"var __line = 1\n , __lines = "+JSON.stringify(this.templateText)+"\n , __filename = "+i+";\ntry {\n"+this.source+"} catch (e) {\n rethrow(e, __lines, __filename, __line, escapeFn);\n}\n":this.source,o.client&&(e="escapeFn = escapeFn || "+r.toString()+";\n"+e,o.compileDebug)&&(e="rethrow = rethrow || "+y.toString()+";\n"+e),o.strict&&(e='"use strict";\n'+e),o.debug&&console.log(e),o.compileDebug&&o.filename&&(e=e+"\n//# sourceURL="+i+"\n");try{if(o.async)try{u=new Function("return (async function(){}).constructor;")()}catch(t){throw t instanceof SyntaxError?new Error("This environment does not support async/await"):t}else u=Function;t=new u(o.localsName+", escapeFn, include, rethrow",e)}catch(t){throw t instanceof SyntaxError&&(o.filename&&(t.message+=" in "+o.filename),t.message+=" while compiling ejs\n\n",t.message+="If the above error is not helpful, you may want to try EJS-Lint:\n",t.message+="https://github.com/RyanZim/EJS-Lint",o.async||(t.message+="\n",t.message+="Or, if you meant to create an async function, pass `async: true` as an option.")),t}n=o.client?t:function(i){return t.apply(o.context,[i||f.createNullProtoObjWherePossible(),r,function(t,e){var n=f.shallowCopy(f.createNullProtoObjWherePossible(),i);return e&&(n=f.shallowCopy(n,e)),_(t,o)(n)},y])};if(o.filename&&"function"==typeof Object.defineProperty){var i=o.filename,u=c.basename(i,c.extname(i));try{Object.defineProperty(n,"name",{value:u,writable:!1,enumerable:!1,configurable:!0})}catch(t){}}return n},generateSource:function(){this.opts.rmWhitespace&&(this.templateText=this.templateText.replace(/[\r\n]+/g,"\n").replace(/^\s+|\s+$/gm,"")),this.templateText=this.templateText.replace(/[ \t]*<%_/gm,"<%_").replace(/_%>[ \t]*/gm,"_%>");var n=this,i=this.parseTemplateText(),o=this.opts.delimiter,r=this.opts.openDelimiter,s=this.opts.closeDelimiter;i&&i.length&&i.forEach(function(t,e){if(0===t.indexOf(r+o)&&0!==t.indexOf(r+o+o)&&(e=i[e+2])!=o+s&&e!="-"+o+s&&e!="_"+o+s)throw new Error('Could not find matching close tag for "'+t+'".');n.scanLine(t)})},parseTemplateText:function(){for(var t,e=this.templateText,n=this.regex,i=n.exec(e),o=[];i;)0!==(t=i.index)&&(o.push(e.substring(0,t)),e=e.slice(t)),o.push(i[0]),e=e.slice(i[0].length),i=n.exec(e);return e&&o.push(e),o},_addOutput:function(t){if(this.truncate&&(t=t.replace(/^(?:\r\n|\r|\n)/,""),this.truncate=!1),!t)return t;t=(t=(t=(t=t.replace(/\\/g,"\\\\")).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/"/g,'\\"'),this.source+=' ; __append("'+t+'")\n'},scanLine:function(t){var e=this.opts.delimiter,n=this.opts.openDelimiter,i=this.opts.closeDelimiter,o=t.split("\n").length-1;switch(t){case n+e:case n+e+"_":this.mode=m.modes.EVAL;break;case n+e+"=":this.mode=m.modes.ESCAPED;break;case n+e+"-":this.mode=m.modes.RAW;break;case n+e+"#":this.mode=m.modes.COMMENT;break;case n+e+e:this.mode=m.modes.LITERAL,this.source+=' ; __append("'+t.replace(n+e+e,n+e)+'")\n';break;case e+e+i:this.mode=m.modes.LITERAL,this.source+=' ; __append("'+t.replace(e+e+i,e+i)+'")\n';break;case e+i:case"-"+e+i:case"_"+e+i:this.mode==m.modes.LITERAL&&this._addOutput(t),this.mode=null,this.truncate=0===t.indexOf("-")||0===t.indexOf("_");break;default:if(this.mode){switch(this.mode){case m.modes.EVAL:case m.modes.ESCAPED:case m.modes.RAW:t.lastIndexOf("//")>t.lastIndexOf("\n")&&(t+="\n")}switch(this.mode){case m.modes.EVAL:this.source+=" ; "+t+"\n";break;case m.modes.ESCAPED:this.source+=" ; __append(escapeFn("+v(t)+"))\n";break;case m.modes.RAW:this.source+=" ; __append("+v(t)+")\n";break;case m.modes.COMMENT:break;case m.modes.LITERAL:this._addOutput(t)}}else this._addOutput(t)}this.opts.compileDebug&&o&&(this.currentLine+=o,this.source+=" ; __line = "+this.currentLine+"\n")}},a.escapeXML=f.escapeXML,a.__express=a.renderFile,a.VERSION=t,a.name="ejs","undefined"!=typeof window&&(window.ejs=a)},{"../package.json":6,"./utils":2,fs:3,path:4}],2:[function(t,e,i){function r(t,e){return o.apply(t,[e])}var n=/[|\\{}()[\]^$+*?.]/g,o=Object.prototype.hasOwnProperty,s=(i.escapeRegExpChars=function(t){return t?String(t).replace(n,"\\$&"):""},{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&#34;","'":"&#39;"}),l=/[&<>'"]/g;function a(t){return s[t]||t}function u(){return Function.prototype.toString.call(this)+';\nvar _ENCODE_HTML_RULES = {\n "&": "&amp;"\n , "<": "&lt;"\n , ">": "&gt;"\n , \'"\': "&#34;"\n , "\'": "&#39;"\n }\n , _MATCH_HTML = /[&<>\'"]/g;\nfunction encode_char(c) {\n return _ENCODE_HTML_RULES[c] || c;\n};\n'}i.escapeXML=function(t){return null==t?"":String(t).replace(l,a)};try{"function"==typeof Object.defineProperty?Object.defineProperty(i.escapeXML,"toString",{value:u}):i.escapeXML.toString=u}catch(t){console.warn("Unable to set escapeXML.toString (is the Function prototype frozen?)")}i.shallowCopy=function(t,e){if(e=e||{},null!=t)for(var n in e)r(e,n)&&"__proto__"!==n&&"constructor"!==n&&(t[n]=e[n]);return t},i.shallowCopyFromList=function(t,e,n){if(n=n||[],e=e||{},null!=t)for(var i=0;i<n.length;i++){var o=n[i];void 0!==e[o]&&r(e,o)&&"__proto__"!==o&&"constructor"!==o&&(t[o]=e[o])}return t},i.cache={_data:{},set:function(t,e){this._data[t]=e},get:function(t){return this._data[t]},remove:function(t){delete this._data[t]},reset:function(){this._data={}}},i.hyphenToCamel=function(t){return t.replace(/-[a-z]/g,function(t){return t[1].toUpperCase()})},i.createNullProtoObjWherePossible="function"==typeof Object.create?function(){return Object.create(null)}:{__proto__:null}instanceof Object?function(){return{}}:function(){return{__proto__:null}},i.hasOwnOnlyObject=function(t){var e,n=i.createNullProtoObjWherePossible();for(e in t)r(t,e)&&(n[e]=t[e]);return n}},{}],3:[function(t,e,n){},{}],4:[function(t,e,u){!function(o){function r(t,e){for(var n=0,i=t.length-1;0<=i;i--){var o=t[i];"."===o?t.splice(i,1):".."===o?(t.splice(i,1),n++):n&&(t.splice(i,1),n--)}if(e)for(;n--;)t.unshift("..");return t}function s(t,e){if(t.filter)return t.filter(e);for(var n=[],i=0;i<t.length;i++)e(t[i],i,t)&&n.push(t[i]);return n}u.resolve=function(){for(var t="",e=!1,n=arguments.length-1;-1<=n&&!e;n--){var i=0<=n?arguments[n]:o.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");i&&(t=i+"/"+t,e="/"===i.charAt(0))}return(e?"/":"")+(t=r(s(t.split("/"),function(t){return!!t}),!e).join("/"))||"."},u.normalize=function(t){var e=u.isAbsolute(t),n="/"===i(t,-1);return(t=(t=r(s(t.split("/"),function(t){return!!t}),!e).join("/"))||e?t:".")&&n&&(t+="/"),(e?"/":"")+t},u.isAbsolute=function(t){return"/"===t.charAt(0)},u.join=function(){var t=Array.prototype.slice.call(arguments,0);return u.normalize(s(t,function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},u.relative=function(t,e){function n(t){for(var e=0;e<t.length&&""===t[e];e++);for(var n=t.length-1;0<=n&&""===t[n];n--);return n<e?[]:t.slice(e,n-e+1)}t=u.resolve(t).substr(1),e=u.resolve(e).substr(1);for(var i=n(t.split("/")),o=n(e.split("/")),r=Math.min(i.length,o.length),s=r,l=0;l<r;l++)if(i[l]!==o[l]){s=l;break}for(var a=[],l=s;l<i.length;l++)a.push("..");return(a=a.concat(o.slice(s))).join("/")},u.sep="/",u.delimiter=":",u.dirname=function(t){if("string"!=typeof t&&(t+=""),0===t.length)return".";for(var e=47===t.charCodeAt(0),n=-1,i=!0,o=t.length-1;1<=o;--o)if(47===t.charCodeAt(o)){if(!i){n=o;break}}else i=!1;return-1===n?e?"/":".":e&&1===n?"/":t.slice(0,n)},u.basename=function(t,e){t=function(t){"string"!=typeof t&&(t+="");for(var e=0,n=-1,i=!0,o=t.length-1;0<=o;--o)if(47===t.charCodeAt(o)){if(!i){e=o+1;break}}else-1===n&&(i=!1,n=o+1);return-1===n?"":t.slice(e,n)}(t);return t=e&&t.substr(-1*e.length)===e?t.substr(0,t.length-e.length):t},u.extname=function(t){"string"!=typeof t&&(t+="");for(var e=-1,n=0,i=-1,o=!0,r=0,s=t.length-1;0<=s;--s){var l=t.charCodeAt(s);if(47===l){if(o)continue;n=s+1;break}-1===i&&(o=!1,i=s+1),46===l?-1===e?e=s:1!==r&&(r=1):-1!==e&&(r=-1)}return-1===e||-1===i||0===r||1===r&&e===i-1&&e===n+1?"":t.slice(e,i)};var i="b"==="ab".substr(-1)?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)}}.call(this,t("_process"))},{_process:5}],5:[function(t,e,n){var i,o,e=e.exports={};function r(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}try{i="function"==typeof setTimeout?setTimeout:r}catch(t){i=r}try{o="function"==typeof clearTimeout?clearTimeout:s}catch(t){o=s}function l(e){if(i===setTimeout)return setTimeout(e,0);if((i===r||!i)&&setTimeout)return(i=setTimeout)(e,0);try{return i(e,0)}catch(t){try{return i.call(null,e,0)}catch(t){return i.call(this,e,0)}}}var a,u=[],c=!1,f=-1;function h(){c&&a&&(c=!1,a.length?u=a.concat(u):f=-1,u.length)&&d()}function d(){if(!c){for(var t=l(h),e=(c=!0,u.length);e;){for(a=u,u=[];++f<e;)a&&a[f].run();f=-1,e=u.length}a=null,c=!1,!function(e){if(o===clearTimeout)return clearTimeout(e);if((o===s||!o)&&clearTimeout)return(o=clearTimeout)(e);try{o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this,e)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function _(){}e.nextTick=function(t){var e=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new p(t,e)),1!==u.length||c||l(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},e.title="browser",e.browser=!0,e.env={},e.argv=[],e.version="",e.versions={},e.on=_,e.addListener=_,e.once=_,e.off=_,e.removeListener=_,e.removeAllListeners=_,e.emit=_,e.prependListener=_,e.prependOnceListener=_,e.listeners=function(t){return[]},e.binding=function(t){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(t){throw new Error("process.chdir is not supported")},e.umask=function(){return 0}},{}],6:[function(t,e,n){e.exports={name:"ejs",description:"Embedded JavaScript templates",keywords:["template","engine","ejs"],version:"3.1.9",author:"Matthew Eernisse <mde@fleegix.org> (http://fleegix.org)",license:"Apache-2.0",bin:{ejs:"./bin/cli.js"},main:"./lib/ejs.js",jsdelivr:"ejs.min.js",unpkg:"ejs.min.js",repository:{type:"git",url:"git://github.com/mde/ejs.git"},bugs:"https://github.com/mde/ejs/issues",homepage:"https://github.com/mde/ejs",dependencies:{jake:"^10.8.5"},devDependencies:{browserify:"^16.5.1",eslint:"^6.8.0","git-directory-deploy":"^1.5.1",jsdoc:"^4.0.2","lru-cache":"^4.0.1",mocha:"^10.2.0","uglify-js":"^3.3.16"},engines:{node:">=0.10.0"},scripts:{test:"npx jake test"}}},{}]},{},[1])(1)});var m=function(t,e,n,i){n=n||[];var o=[];if(t._events[e]instanceof Object&&0<t._events[e].length)for(var r=0;r<t._events[e].length;r++){var s=t._events[e][r].callback,l=t._events[e][r].context||i||t;o.push(s.apply(l,n)),t._events[e][r].singleExec&&(t._events[e].splice(r,1),r--)}return o},V=function(t,e){if("object"!==y(e))return null;var n=e.hasOwnProperty("type")&&"string"==typeof e.type?e.type:"input";if("group"===n)return null;t._controller.fields.hasOwnProperty(n)||(n="input"),t._readonly&&(e.readonly=!0);var i=t._fieldsIndex++,o=e.hasOwnProperty("name")&&"string"==typeof e.name&&e.name?e.name:null,r=e.hasOwnProperty("id")&&"string"==typeof e.id&&e.id?e.id:null,s=(e.hasOwnProperty("width")&&e.width?(s="number"==typeof e.width?"px":"",e.width=e.width+s):t._options.fieldWidth&&"color"!==e.type&&(s="number"==typeof t._options.fieldWidth?"px":"",e.width=t._options.fieldWidth+s),e.value=g.getFieldValue(t,o),e.contentId=g.hashCode(),e.id=t.getId()+"-"+(r||o||i),new t._controller.fields[n](t,e));return t._fields.push(s),s},H=function(t,e){var n,i;return"object"!==y(e)||"group"!==(e.hasOwnProperty("type")&&"string"==typeof e.type?e.type:"")?null:(n=t._groupsIndex++,i=e.hasOwnProperty("id")&&"string"==typeof e.id&&e.id?e.id:null,e.id=t.getId()+"-"+(i||n),i=new t._controller.fields.group(t,e),t._groups.push(i),i)},Y=function(t,e){if("object"!==y(e))return null;var n=e.hasOwnProperty("type")&&"string"==typeof e.type?e.type:null;if(!n||!t._controller.controls.hasOwnProperty(n))return null;"submit"===n&&t._readonly&&(e.show=!1);var i=t._controlsIndex++,o=e.hasOwnProperty("name")&&"string"==typeof e.name&&e.name?e.name:null,r=e.hasOwnProperty("id")&&"string"==typeof e.id&&e.id?e.id:null,r=((e=$.extend(!0,{},e)).id=t.getId()+"-control-"+(r||o||i),new t._controller.controls[n](t,e));return t._controls.push(r),r},J=function(t){var e=$(g.render(d["form-field-group.html"],{id:t.getId(),group:t.getOptions()})),n=e.find(".coreui-form__group_content");return t.renderContent().map(function(t){n.append(t)}),e},X=function(t,e){if(!e||"object"!==y(e))return null;var n,i,o=e.getOptions(),r=e.getContentId(),s=g.getAttacheFields(t,o),l="column"===(o.hasOwnProperty("fieldsDirection")&&"string"==typeof o.fieldsDirection?o.fieldsDirection:"row")?"d-block mt-2":"d-inline-block",t=(o.hasOwnProperty("labelWidth")&&o.labelWidth?(n="number"==typeof o.labelWidth?"px":"",o.labelWidth=o.labelWidth+n):t._options.labelWidth&&(n="number"==typeof t._options.labelWidth?"px":"",o.labelWidth=t._options.labelWidth+n),$(g.render(d["form-field-label.html"],{id:e.getId(),field:o,contentId:r,issetAttachFields:0<s.length,directionClass:l}))),a=$(".content-"+r,t),u=e.renderContent();if(Array.isArray(u))u.map(function(t){a.append(t)});else if(g.isObject(u))for(var c=0;c<=u.length;c++)a.append(u[c]);else u&&a.append(u);return 0<s.length&&(i=$(".coreui-form__attach-fields",t),s.map(function(t){var e=$(g.render(d["form-field-attach.html"],{contentId:t.contentId,directionClass:l}));e.append(t.content),i.append(e)})),t},g={_templates:{},assign:function(t,e){var n=Object.create(e.prototype);Object.assign(t,n);var i,o=W(Object.getOwnPropertyNames(e.prototype));try{for(o.s();!(i=o.n()).done;){var r=i.value;"constructor"!==r&&(t[r]=n[r].bind(t))}}catch(t){o.e(t)}finally{o.f()}},getFieldValue:function(t,e){t=t.getRecord();return t&&"string"==typeof e&&t.hasOwnProperty(e)&&0<=["string","number","object"].indexOf(y(t[e]))?t[e]:""},getFunctionByName:function(t,e){var n=t.split("."),t=n.pop();e=e||window;for(var i=0;i<n.length;i++){if(!e.hasOwnProperty(n[i]))return null;e=e[n[i]]}return"function"==typeof e[t]?e[t]:null},mergeAttr:function(t,e){var n=Object.assign({},t);return"object"===y(e)&&$.each(e,function(t,e){n.hasOwnProperty(t)?"class"===t?n[t]+=" "+e:"style"===t?n[t]+=";"+e:n[t]=e:n[t]=e}),n},getAttacheFields:function(n,t){var i=[];return"object"===y(t)&&"object"===y(t.fields)&&Array.isArray(t.fields)&&$.each(t.fields,function(t,e){e=V(n,e);"object"===y(e)&&i.push({contentId:e.getContentId(),content:e.renderContent()})}),i},formatDate:function(t){var e,n,i;return t&&10===t.length&&(e=(n=new Date(t)).getFullYear(),i=n.getMonth()+1,t=(n=(n=n.getDate())<10?"0"+n:n)+"."+(i=i<10?"0"+i:i)+"."+e),t},formatDateTime:function(t){var e,n,i,o;return t&&10<=t.length&&(n=(e=new Date(t)).getFullYear(),o=e.getMonth()+1,t=(i=(i=e.getDate())<10?"0"+i:i)+"."+(o=o<10?"0"+o:o)+"."+n+" "+("00"+e.getHours()).slice(-2)+":"+("00"+e.getMinutes()).slice(-2)+":"+("00"+e.getSeconds()).slice(-2)),t},formatDateMonth:function(t,e){var n,i;return t&&7===t.length&&(n=(i=new Date(t)).getFullYear(),i=i.getMonth(),t=(e.date_months.hasOwnProperty(i)?e.date_months[i]:"")+" "+n),t},formatDateWeek:function(t,e){var n,i;return t&&7<=t.length&&(n=t.substring(0,4),i=t.substring(6),t=n+" "+e.date_week+" "+i),t},getObjValue:function(t,e){for(var n=0,i=(e=e.split(".")).length;n<i;n++)t=t[e[n]];return t},isJson:function(t){if("string"!=typeof t)return!1;try{var e=JSON.parse(t);return"object"===y(e)||Array.isArray(e)}catch(t){return!1}},isObject:function(t){return"object"===y(t)&&!Array.isArray(t)&&null!==t},isNumeric:function(t){return("number"==typeof t||"string"==typeof t&&""!==t.trim())&&!isNaN(t)},hashCode:function(){return this.crc32(((new Date).getTime()+Math.random()).toString()).toString(16)},crc32:function(t){for(var e=[],n=0;n<256;n++){for(var i=n,o=0;o<8;o++)i=1&i?3988292384^i>>>1:i>>>1;e[n]=i}for(var r=-1,s=0;s<t.length;s++)r=r>>>8^e[255&(r^t.charCodeAt(s))];return(-1^r)>>>0},round:function(t,e){var n;return 0===(e=void 0!==e?parseInt(e):0)?Math.round(t):0<e?(n=Math.pow(10,e),Math.round(t*n)/n):(n=Math.pow(10,e),Math.round(t/n)*n)},render:function(t,e){var n=this.crc32(t);return this._templates.hasOwnProperty(n)||(this._templates[n]=ejs.compile(t)),this._templates[n](e)}},G=function(){return t(function t(e){l(this,t),c(this,"_id",null),this.setId(e)},[{key:"setId",value:function(t){return"string"==typeof t&&t&&(this._id=t),this}},{key:"getId",value:function(){return this._id}}])}();var Z=function(){function o(t){var e,n,i;return l(this,o),e=this,n=f(n=o),c(n=h(e,function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}}}()?Reflect.construct(n,i||[],f(e).constructor):n.apply(e,i)),"_content",null),c(n,"_onclick",null),c(n,"_attr",{}),n.setContent(t),n}return e(o,G),t(o,[{key:"setContent",value:function(t){return this._content=t,this}},{key:"getContent",value:function(){return this._content}},{key:"setOnClick",value:function(t){return this._onclick=t,this}},{key:"getOnClick",value:function(){return this._onclick}},{key:"setAttr",value:function(t){for(var e=0,n=Object.entries(t);e<n.length;e++){var i=v(n[e],2),o=i[0],i=i[1];this._attr[o]=i}return this}},{key:"getAttr",value:function(t){return this._attr[t]||null}},{key:"toObject",value:function(){return{type:"button",id:this.getId(),content:this.getContent(),onClick:this.getOnClick(),attr:this._attr}}}])}();var K=function(){function r(t,e){var n,i,o;return l(this,r),n=this,i=f(i=r),c(i=h(n,function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}}}()?Reflect.construct(i,o||[],f(n).constructor):i.apply(n,o)),"_url",null),c(i,"_content",null),c(i,"_onclick",null),c(i,"_attr",{}),i.setContent(t),i.setUrl(e),i}return e(r,G),t(r,[{key:"setContent",value:function(t){return this._content=t,this}},{key:"getContent",value:function(){return this._content}},{key:"setUrl",value:function(t){return this._url=t,this}},{key:"getUrl",value:function(){return this._url}},{key:"setOnClick",value:function(t){return this._onclick=t,this}},{key:"getOnClick",value:function(){return this._onclick}},{key:"setAttr",value:function(t){for(var e=0,n=Object.entries(t);e<n.length;e++){var i=v(n[e],2),o=i[0],i=i[1];this._attr[o]=i}return this}},{key:"getAttr",value:function(t){return this._attr[t]||null}},{key:"toObject",value:function(){return{type:"link",id:this.getId(),url:this.getUrl(),content:this.getContent(),onClick:this.getOnClick(),attr:this._attr}}}])}();var Q=function(){function o(t){var e,n,i;return l(this,o),e=this,n=f(n=o),c(n=h(e,function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}}}()?Reflect.construct(n,i||[],f(e).constructor):n.apply(e,i)),"_content",null),c(n,"_onclick",null),c(n,"_attr",{}),n.setContent(t),n}return e(o,G),t(o,[{key:"setContent",value:function(t){return this._content=t,this}},{key:"getContent",value:function(){return this._content}},{key:"setOnClick",value:function(t){return this._onclick=t,this}},{key:"getOnClick",value:function(){return this._onclick}},{key:"setAttr",value:function(t){for(var e=0,n=Object.entries(t);e<n.length;e++){var i=v(n[e],2),o=i[0],i=i[1];this._attr[o]=i}return this}},{key:"getAttr",value:function(t){return this._attr[t]||null}},{key:"toObject",value:function(){return{type:"submit",id:this.getId(),content:this.getContent(),onClick:this.getOnClick(),attr:this._attr}}}])}();var tt=function(){function o(t){var e,n,i;return l(this,o),e=this,n=f(n=o),c(n=h(e,function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}}}()?Reflect.construct(n,i||[],f(e).constructor):n.apply(e,i)),"_content",null),n.setContent(t),n}return e(o,G),t(o,[{key:"setContent",value:function(t){return this._content=t,this}},{key:"getContent",value:function(){return this._content}},{key:"toObject",value:function(){return{type:"custom",id:this.getId(),content:this.getContent()}}}])}(),et={_position:null,setPosition:function(){return this._position=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,this},getPosition:function(){return this._position}},i=function(){return t(function t(){l(this,t),c(this,"_id",null),Object.assign(this,et)},[{key:"getId",value:function(){return this._id}},{key:"setId",value:function(t){return"string"==typeof t&&t&&(this._id=t),this}},{key:"toObject",value:function(){var t={id:this._id};return null!==this._position&&(t.position=this._position),t}}])}(),s={_name:null,setName:function(){return this._name=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,this},getName:function(){return this._name}},a={_label:null,setLabel:function(){return this._label=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,this},getLabel:function(){return this._label}},u={_description:null,setDescription:function(){return this._description=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,this},getDescription:function(){return this._description}},p={_descriptionLabel:null,setDescriptionLabel:function(){return this._descriptionLabel=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,this},getDescriptionLabel:function(){return this._descriptionLabel}},_={_help:null,setHelp:function(){return this._help=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,this},getHelp:function(){return this._help}},b={_width:null,setWidth:function(){return this._width=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,this},getWidth:function(){return this._width}},O={_widthLabel:null,setWidthLabel:function(){return this._widthLabel=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,this},getWidthLabel:function(){return this._widthLabel}},w={_attributes:null,setAttr:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;return g.isObject(t)?this._attributes=$.extend(!0,this._attributes,t):null===t&&(this._attributes=null),this},getAttr:function(){return this._attributes}},x={_required:null,setRequired:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;return this._required=null===t?null:!!t,this},getRequired:function(){return this._required}},k={_readonly:null,setReadonly:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;return this._readonly=null===t?null:!!t,this},getReadonly:function(){return this._readonly}},j={_invalidText:null,setInvalidText:function(){return this._invalidText=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,this},getInvalidText:function(){return this._invalidText}},R={_validTextText:null,setValidTextText:function(){return this._validTextText=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,this},getValidTextText:function(){return this._validTextText}},C={_prefix:null,setPrefix:function(){return this._prefix=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,this},getPrefix:function(){return this._prefix}},A={_suffix:null,setSuffix:function(){return this._suffix=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,this},getSuffix:function(){return this._suffix}},P={_show:null,setShow:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;return this._show=null===t?null:!!t,this},getShow:function(){return this._show}},nt={_datalist:null,setDatalist:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;if(null===t)this._datalist=null;else{var e,n=[],i=W(t);try{for(i.s();!(e=i.n()).done;){var o,r=e.value;"string"==typeof r||"number"==typeof r?n.push({value:r}):"object"===y(r)&&null!==r&&"value"in r&&("string"==typeof r.value||"number"==typeof r.value)&&(o={value:r.value},"label"in r&&("string"==typeof r.label||"number"==typeof r.label)&&(o.label=r.label),n.push(o))}}catch(t){i.e(t)}finally{i.f()}this._datalist=0<n.length?n:null}return this},getDatalist:function(){return this._datalist}},L={_fields:null,_fieldsDirection:null,attachFields:function(){var e,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;if(Array.isArray(t))return null===this._fields&&(this._fields=[]),e=this,t.map(function(t){e._fields.push(t)}),this;this._fields=null},getAttachFields:function(){return this._fields},clearAttachFields:function(){return this._fields=null,this},setFieldDirection:function(){return this._fieldsDirection=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,this},getFieldDirection:function(){return this._fieldsDirection}},S={_noSend:null,setNoSend:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;return this._noSend=null===t?null:!!t,this},getNoSend:function(){return this._noSend}},T={_on:null,on:function(t,e){return t&&e&&"string"==typeof t&&"function"==typeof e&&(null===this._on&&(this._on={}),this._on[t]=e),this}};var o=function(){function r(t,e){var n,i,o;return l(this,r),n=this,i=f(i=r),i=h(n,function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}}}()?Reflect.construct(i,o||[],f(n).constructor):i.apply(n,o)),Object.assign(i,s),Object.assign(i,a),Object.assign(i,u),Object.assign(i,p),Object.assign(i,_),Object.assign(i,b),Object.assign(i,O),Object.assign(i,w),Object.assign(i,x),Object.assign(i,k),Object.assign(i,j),Object.assign(i,R),Object.assign(i,C),Object.assign(i,A),Object.assign(i,P),Object.assign(i,nt),Object.assign(i,L),Object.assign(i,S),Object.assign(i,T),i.setName(t),i.setLabel(e),i}return e(r,i),t(r,[{key:"toObject",value:function(){var e,t={type:"text"};return null!==this._name&&(t.name=this._name),null!==this._label&&(t.label=this._label),null!==this._help&&(t.help=this._help),null!==this._description&&(t.description=this._description),null!==this._descriptionLabel&&(t.descriptionLabel=this._descriptionLabel),null!==this._required&&(t.required=this._required),null!==this._readonly&&(t.readonly=this._readonly),null!==this._width&&(t.width=this._width),null!==this._widthLabel&&(t.widthLabel=this._widthLabel),null!==this._invalidText&&(t.invalidText=this._invalidText),null!==this._validText&&(t.validText=this._validText),null!==this._prefix&&(t.prefix=this._prefix),null!==this._suffix&&(t.suffix=this._suffix),null!==this._show&&(t.show=this._show),null!==this._position&&(t.position=this._position),null!==this.datalist&&(t.datalist=this.datalist),null!==this._attr&&(t.attr=this._attr),null!==this._noSend&&(t.noSend=this._noSend),null!==this._on&&(t.on=this._on),Array.isArray(this._fields)&&(e=[],this._fields.map(function(t){g.isObject(t)&&("function"==typeof t.toObject?e.push(t.toObject()):e.push(t))}),t.fields=e),t}}])}();var it=function(){function i(){return l(this,i),t=this,e=i,n=arguments,e=f(e),h(t,function(){if("undefined"!=typeof Re