{"version":3,"file":"js/form-validation.min.js","mappings":"qBAAAA,EAAAC,QAAA,+yF,UCIAD,EAAAC,QAAA,SAAAC,GACA,SAAAC,EAAAC,GACA,oBAAAC,UACAA,QAAAD,OAAAC,QAAAF,KAAA,kBAAAC,EACA,CAOA,IACA,oBAAAE,YAJA,oBAAAC,aAAA,oBAAAC,iBAKAF,WAAAJ,GACI,oBAAAO,KACJA,KAAAC,KAAA,KAAAR,GAEAC,EAAA,wCAEA,CAAG,MAAAC,GACHD,EAAAC,EACA,CACA,C,GCzBA,MAAAO,EAAA,GAGA,SAAAC,EAAAC,GAEA,MAAAC,EAAAH,EAAAE,GACA,QAAAE,IAAAD,EACA,OAAAA,EAAAb,QAGA,MAAAD,EAAAW,EAAAE,GAAA,CAGAZ,QAAA,IAOA,OAHAe,EAAAH,GAAAb,EAAAA,EAAAC,QAAAW,GAGAZ,EAAAC,OACA,CCtBAgB,EAAQ,KAARA,CAA8EA,EAAQ,M","sources":["webpack://design-prototype/./src/js/form/form-validation.global.js?ce5e","webpack://design-prototype/./node_modules/script-loader/addScript.js","webpack://design-prototype/webpack/bootstrap","webpack://design-prototype/./src/js/form/form-validation.global.js"],"sourcesContent":["module.exports = \"/* global form_i18n Page_ClientValidate, ScrollToFirstError */\\n\\nfunction checkDropzoneStatus(source, args) {\\n const statusFieldId = source.getAttribute('data-status-field-id');\\n const statusField = statusFieldId ? document.getElementById(statusFieldId) : null;\\n const status = statusField ? statusField.value : '0';\\n const labelId = source.getAttribute('data-error-label-id');\\n const label = labelId ? document.getElementById(labelId) : null;\\n const errorMsg = label ? label.innerText.trim() : '';\\n const required = source.parentElement.getAttribute('data-required') === 'true';\\n if (errorMsg) {\\n source.innerText = '';\\n args.IsValid = false;\\n } else if (status === '1') {\\n args.IsValid = true;\\n } else {\\n source.innerText = '';\\n if (required && errorMsg === '') {\\n label.innerText = form_i18n?.errors?.uploadField?.empty;\\n }\\n args.IsValid = !required;\\n }\\n}\\n\\nfunction showLoading(element) {\\n let btnId, btn, spinner, text, validationGroup;\\n\\n if (element) {\\n btn = element;\\n spinner = btn.querySelector('.btnSpinner');\\n text = btn.querySelector('.btnText');\\n validationGroup = btn.getAttribute('data-validationgroup');\\n } else {\\n btnId = document.querySelector('[data-clientid]')?.getAttribute('data-clientid');\\n btn = document.getElementById(btnId);\\n spinner = document.getElementById('btnSpinner');\\n text = document.getElementById('btnText');\\n validationGroup = '';\\n }\\n\\n // check if page is valid\\n if (typeof Page_ClientValidate === 'function' && !Page_ClientValidate(validationGroup)) {\\n ScrollToFirstError(false);\\n return false; // do not submit form\\n }\\n\\n // No validation error � show spinner\\n if (btn && spinner && text) {\\n spinner.classList.remove('hidden'); // show spinner\\n text.style.visibility = 'hidden'; // hide text\\n btn.style.pointerEvents = 'none'; // prevent further clicks\\n }\\n\\n return true; // submit form\\n}\\n\\n// hide spinner on window.load\\n$(window).on('pageshow', function () {\\n let spinner = document.getElementById('btnSpinner');\\n let text = document.getElementById('btnText');\\n let btnId = document.querySelector('[data-clientid]')?.getAttribute('data-clientid');\\n let btn = document.getElementById(btnId);\\n\\n if (spinner) spinner.classList.add('hidden'); // hide spinner\\n if (text) text.style.visibility = 'visible';\\n if (btn) btn.style.pointerEvents = 'auto'; // activate button\\n});\\n\\n// validate checkbox\\nfunction ValidateCheckbox(source, args) {\\n let chkList, sourceID;\\n sourceID = source.getAttribute('controltovalidateclientid');\\n\\n if (typeof sourceID !== 'undefined') {\\n chkList = document.getElementById(sourceID);\\n }\\n\\n if (typeof chkList !== 'undefined' && chkList.checked) {\\n args.IsValid = true;\\n return;\\n }\\n\\n args.IsValid = false;\\n}\\n\"","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\nmodule.exports = function(src) {\n\tfunction log(error) {\n\t\t(typeof console !== \"undefined\")\n\t\t&& (console.error || console.log)(\"[Script Loader]\", error);\n\t}\n\n\t// Check for IE =< 8\n\tfunction isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}\n\n\ttry {\n\t\tif (typeof execScript !== \"undefined\" && isIE()) {\n\t\t\texecScript(src);\n\t\t} else if (typeof eval !== \"undefined\") {\n\t\t\teval.call(null, src);\n\t\t} else {\n\t\t\tlog(\"EvalError: No eval function available\");\n\t\t}\n\t} catch (error) {\n\t\tlog(error);\n\t}\n}\n","// The module cache\nconst __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tconst cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tconst module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","require(\"!!/home/vsts/work/1/s/html/node_modules/script-loader/addScript.js\")(require(\"!!/home/vsts/work/1/s/html/node_modules/raw-loader/index.js!/home/vsts/work/1/s/html/src/js/form/form-validation.global.js\"))"],"names":["module","exports","src","log","error","console","execScript","attachEvent","addEventListener","eval","call","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","require"],"sourceRoot":""}