{"version":3,"file":"form.bundle.js","mappings":"28CAEAA,GAAE,qD,uCACA,IAEE,IADMC,EAAOC,SAASC,cAAc,4BAE5BC,EAAaH,EAAKI,iBAAiB,yBACvBD,EAAWE,OAC3B,I,WAASC,GACP,IAAMC,EAAQJ,EAAWG,GAKnBE,EAAYD,aAAK,EAALA,EAAOE,aAAa,QAClCD,IACDE,eAAuBF,GAAa,GAErCD,EAAMI,iBAAiB,UAAU,SAACC,G,MAC/BF,eAAuBF,GAEvB,QAFqC,EACpCI,aAAK,EAALA,EAAOC,cACR,eAAEC,KACL,I,EAdKR,EAAI,EAAGA,EAAIH,EAAWE,OAAQC,I,EAA9BA,E,CAmBb,MAAOS,GACPC,QAAQD,MAAM,4BAA6BA,E,6BC5B/CE,EAAOC,QAAUC,M,GCCbC,EAA2B,CAAC,GAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaL,QAGrB,IAAID,EAASG,EAAyBE,GAAY,CAGjDJ,QAAS,CAAC,GAOX,OAHAO,EAAoBH,GAAUI,KAAKT,EAAOC,QAASD,EAAQA,EAAOC,QAASG,GAGpEJ,EAAOC,OACf,ECnB0BG,CAAoB,I","sources":["webpack://ryb-connect/./js/src/features/form/index.ts","webpack://ryb-connect/external var \"jQuery\"","webpack://ryb-connect/webpack/bootstrap","webpack://ryb-connect/webpack/startup"],"sourcesContent":["declare const rybConnectForm: {};\n\n$(async () => {\n try {\n const form = document.querySelector(\".ryb-connect-crm-form\");\n if (form) {\n const formFields = form.querySelectorAll(\".wpcf7-form-control\");\n if (formFields && formFields.length) {\n for (let i = 0; i < formFields.length; i++) {\n const field = formFields[i] as\n | HTMLInputElement\n | HTMLSelectElement\n | HTMLTextAreaElement;\n\n const fieldName = field?.getAttribute(\"name\");\n if (fieldName) {\n (rybConnectForm as any)[fieldName] = \"\";\n\n field.addEventListener(\"change\", (event) => {\n (rybConnectForm as any)[fieldName] = (\n event?.target as any\n )?.value;\n });\n }\n }\n }\n }\n } catch (error) {\n console.error(\"Error with form tracker: \", error);\n }\n});\n","module.exports = jQuery;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar 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\tvar 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].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(509);\n"],"names":["$","form","document","querySelector","formFields","querySelectorAll","length","i","field","fieldName","getAttribute","rybConnectForm","addEventListener","event","target","value","error","console","module","exports","jQuery","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","call"],"sourceRoot":""}