{"version":3,"file":"product.js","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,YCL9D,MAAM,EAA+BC,OAAe,O,aCApD,MAAM,EAA+BA,OAAe,OAAQ,K,6rBCG5DC,GAAAA,UAAe,iBAAiB,SAACC,EAAMD,GACnC,IAAME,EAAYC,IAAE,6BAA6BC,iBAAiBC,QAAO,SAACC,EAAOf,GAC7E,IAAMgB,EAAQhB,EAAIiB,KAAKD,MAAM,2BAC7B,GAAIA,EACA,OAAAE,EAAAA,EAAA,GACOH,GAAK,IACRI,KAAID,EAAAE,EAAA,GACCJ,EAAM,GAAKhB,EAAIO,OACZQ,EAAMI,MAAQ,CAAC,IAInC,GAAG,CAACE,kBAAmBT,IAAE,8BAA8BU,QACvD,OAAAJ,EAAAA,EAAA,GAAWR,GAASC,EACxB,K","sources":["webpack://wcPPCP/webpack/bootstrap","webpack://wcPPCP/webpack/runtime/compat get default export","webpack://wcPPCP/webpack/runtime/define property getters","webpack://wcPPCP/webpack/runtime/hasOwnProperty shorthand","webpack://wcPPCP/webpack/runtime/make namespace object","webpack://wcPPCP/external window \"jQuery\"","webpack://wcPPCP/external window [\"wcPPCP\",\"cart\"]","webpack://wcPPCP/./packages/advanced-product-fields-for-woocommerce/assets/js/product.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"jQuery\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wcPPCP\"][\"cart\"];","import $ from 'jquery';\nimport cart from '@ppcp/cart';\n\ncart.addFilter('addToCartData', (data, cart) => {\n const extraData = $('form.cart [name^=\"wapf[\"]').serializeArray().reduce((carry, obj) => {\n const match = obj.name.match(/^wapf\\[(field_[\\w]+)\\]$/);\n if (match) {\n return {\n ...carry,\n wapf: {\n [match[1]]: obj.value,\n ...(carry.wapf || {})\n }\n };\n }\n }, {wapf_field_groups: $('[name=\"wapf_field_groups\"]').val()});\n return {...data, ...extraData};\n});"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","window","cart","data","extraData","$","serializeArray","reduce","carry","match","name","_objectSpread","wapf","_defineProperty","wapf_field_groups","val"],"sourceRoot":""}