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,SAEZU,QAAQC,IAAIb,EAAKW,EAAQD,GACzB3B,EAAE,0BACAmB,KAAK,wCACLO,QACH,GAEF,IAOA1B,EAAE,kBAAkBC,GAAG,SAAS,WAE/BzD,OAAOwF,SAASC,KAAOtB,cAAcwB,UACtC,GACD,G","sources":["webpack://cool-kids-network-wp/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://cool-kids-network-wp/./node_modules/style-loader/dist/runtime/insertBySelector.js","webpack://cool-kids-network-wp/./node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack://cool-kids-network-wp/./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack://cool-kids-network-wp/./node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack://cool-kids-network-wp/./node_modules/style-loader/dist/runtime/styleTagTransform.js","webpack://cool-kids-network-wp/webpack/bootstrap","webpack://cool-kids-network-wp/webpack/runtime/compat get default export","webpack://cool-kids-network-wp/webpack/runtime/define property getters","webpack://cool-kids-network-wp/webpack/runtime/hasOwnProperty shorthand","webpack://cool-kids-network-wp/webpack/runtime/nonce","webpack://cool-kids-network-wp/./src/assets/sass/style.scss?b710","webpack://cool-kids-network-wp/./src/main.jsx"],"sourcesContent":["\"use strict\";\n\nvar stylesInDOM = [];\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n return result;\n}\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n identifiers.push(identifier);\n }\n return identifiers;\n}\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n return updater;\n}\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n var newLastIdentifiers = modulesToDom(newList, options);\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n var _index = getIndexByIdentifier(_identifier);\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n stylesInDOM.splice(_index, 1);\n }\n }\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\nvar memo = {};\n\n/* istanbul ignore next */\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target);\n\n // Special case to return head of iframe instead of iframe itself\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n memo[target] = styleTarget;\n }\n return memo[target];\n}\n\n/* istanbul ignore next */\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n target.appendChild(style);\n}\nmodule.exports = insertBySelector;","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\nmodule.exports = insertStyleElement;","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n var needLayer = typeof obj.layer !== \"undefined\";\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n css += obj.css;\n if (needLayer) {\n css += \"}\";\n }\n if (obj.media) {\n css += \"}\";\n }\n if (obj.supports) {\n css += \"}\";\n }\n var sourceMap = obj.sourceMap;\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n }\n\n // For old IE\n /* istanbul ignore if */\n options.styleTagTransform(css, styleElement, options.options);\n}\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n styleElement.parentNode.removeChild(styleElement);\n}\n\n/* istanbul ignore next */\nfunction domAPI(options) {\n if (typeof document === \"undefined\") {\n return {\n update: function update() {},\n remove: function remove() {}\n };\n }\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\nmodule.exports = domAPI;","\"use strict\";\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n styleElement.appendChild(document.createTextNode(css));\n }\n}\nmodule.exports = styleTagTransform;","// 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](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\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))","__webpack_require__.nc = undefined;","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ruleSet[1].rules[1].use[1]!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./style.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ruleSet[1].rules[1].use[1]!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./style.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import \"./assets/sass/style.scss\";\n\n/**\n * Main js file\n *\n * @since 1.0.0\n */\n\njQuery(document).ready(function ($) {\n\t/**\n\t * Signup form\n\t *\n\t * @since 1.0.0\n\t */\n\t$(\".wp_ckn_signup-form\").on(\"submit\", function (e) {\n\t\te.preventDefault();\n\t\t//form\n\t\tconst form = $(this);\n\t\t//get button\n\t\tconst button = form.find(\"button\");\n\t\t//email\n\t\tconst email = form.find(\"input[name='email']\").val();\n\n\t\t//send ajax request\n\t\t$.ajax({\n\t\t\turl: wp_ckn_object.ajax_url,\n\t\t\ttype: \"POST\",\n\t\t\tdata: {\n\t\t\t\taction: \"wp_ckn_signup\",\n\t\t\t\temail,\n\t\t\t\tnonce: wp_ckn_object.nonce,\n\t\t\t},\n\t\t\tbeforeSend: function (xhr) {\n\t\t\t\t//clear notice message\n\t\t\t\t$(\".wp_ckn_notice-message\")\n\t\t\t\t\t.fadeOut()\n\t\t\t\t\t.text(\"\")\n\t\t\t\t\t.removeClass(\"success\");\n\t\t\t\t//disable button\n\t\t\t\tbutton.prop(\"disabled\", true);\n\t\t\t\t//change button text\n\t\t\t\tbutton.text(\"Signing up...\");\n\t\t\t},\n\t\t\tsuccess: function (response) {\n\t\t\t\t//enable button\n\t\t\t\tbutton.prop(\"disabled\", false);\n\t\t\t\t//change button text\n\t\t\t\tbutton.text(\"Sign up\");\n\n\t\t\t\t//check if response is success\n\t\t\t\tif (response.success) {\n\t\t\t\t\t$(\".wp_ckn_notice-message\")\n\t\t\t\t\t\t.addClass(\"success\")\n\t\t\t\t\t\t.html(response.data.message)\n\t\t\t\t\t\t.fadeIn();\n\t\t\t\t} else {\n\t\t\t\t\t$(\".wp_ckn_notice-message\")\n\t\t\t\t\t\t.text(response.data.message)\n\t\t\t\t\t\t.fadeIn();\n\t\t\t\t}\n\t\t\t},\n\t\t\terror: function (xhr, status, error) {\n\t\t\t\t//enable button\n\t\t\t\tbutton.prop(\"disabled\", false);\n\t\t\t\t//change button text\n\t\t\t\tbutton.text(\"Sign up\");\n\n\t\t\t\tconsole.log(xhr, status, error);\n\t\t\t\t$(\".wp_ckn_notice-message\")\n\t\t\t\t\t.text(\"An error occurred. Please try again.\")\n\t\t\t\t\t.fadeIn();\n\t\t\t},\n\t\t});\n\t});\n\n\t/**\n\t * Login form\n\t *\n\t * @since 1.0.0\n\t */\n\t$(\".wp_ckn_login-form\").on(\"submit\", function (e) {\n\t\te.preventDefault();\n\t\t//form\n\t\tconst form = $(this);\n\t\t//get button\n\t\tconst button = form.find(\"button\");\n\t\t//email\n\t\tconst email = form.find(\"input[name='email']\").val();\n\n\t\t//send ajax request\n\t\t$.ajax({\n\t\t\turl: wp_ckn_object.ajax_url,\n\t\t\ttype: \"POST\",\n\t\t\tdata: {\n\t\t\t\taction: \"wp_ckn_login\",\n\t\t\t\temail,\n\t\t\t\tnonce: wp_ckn_object.nonce,\n\t\t\t},\n\t\t\tbeforeSend: function (xhr) {\n\t\t\t\t//clear notice message\n\t\t\t\t$(\".wp_ckn_notice-message\")\n\t\t\t\t\t.fadeOut()\n\t\t\t\t\t.text(\"\")\n\t\t\t\t\t.removeClass(\"success\");\n\t\t\t\t//disable button\n\t\t\t\tbutton.prop(\"disabled\", true);\n\t\t\t\t//change button text\n\t\t\t\tbutton.text(\"Logging in...\");\n\t\t\t},\n\t\t\tsuccess: function (response) {\n\t\t\t\t//enable button\n\t\t\t\tbutton.prop(\"disabled\", false);\n\t\t\t\t//change button text\n\t\t\t\tbutton.text(\"Login\");\n\n\t\t\t\tif (response.success) {\n\t\t\t\t\t$(\".wp_ckn_notice-message\")\n\t\t\t\t\t\t.addClass(\"success\")\n\t\t\t\t\t\t.html(response.data.message)\n\t\t\t\t\t\t.fadeIn();\n\t\t\t\t\t//set timeout to redirect\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\twindow.location.href = response.data.redirect_url;\n\t\t\t\t\t}, 2000);\n\t\t\t\t} else {\n\t\t\t\t\t$(\".wp_ckn_notice-message\")\n\t\t\t\t\t\t.text(response.data.message)\n\t\t\t\t\t\t.fadeIn();\n\t\t\t\t}\n\t\t\t},\n\t\t\terror: function (xhr, status, error) {\n\t\t\t\t//enable button\n\t\t\t\tbutton.prop(\"disabled\", false);\n\t\t\t\t//change button text\n\t\t\t\tbutton.text(\"Login\");\n\n\t\t\t\tconsole.log(xhr, status, error);\n\t\t\t\t$(\".wp_ckn_notice-message\")\n\t\t\t\t\t.text(\"An error occurred. Please try again.\")\n\t\t\t\t\t.fadeIn();\n\t\t\t},\n\t\t});\n\t});\n\n\t/**\n\t * Logout button\n\t *\n\t * @since 1.0.0\n\t */\n\t$(\".wp_ckn_button\").on(\"click\", function () {\n\t\t//redirect to logout url\n\t\twindow.location.href = wp_ckn_object.logout_url;\n\t});\n});\n"],"names":["stylesInDOM","getIndexByIdentifier","identifier","result","i","length","modulesToDom","list","options","idCountMap","identifiers","item","id","base","count","concat","indexByIdentifier","obj","css","media","sourceMap","supports","layer","references","updater","addElementStyle","byIndex","splice","push","api","domAPI","update","newObj","remove","module","exports","lastIdentifiers","newList","index","newLastIdentifiers","_i","_index","memo","insert","style","target","styleTarget","document","querySelector","window","HTMLIFrameElement","contentDocument","head","e","getTarget","Error","appendChild","element","createElement","setAttributes","attributes","styleElement","nonce","setAttribute","insertStyleElement","needLayer","btoa","unescape","encodeURIComponent","JSON","stringify","styleTagTransform","apply","parentNode","removeChild","removeStyleElement","styleSheet","cssText","firstChild","createTextNode","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","prop","prototype","hasOwnProperty","call","nc","jQuery","ready","$","on","preventDefault","form","this","button","find","email","val","ajax","url","wp_ckn_object","ajax_url","type","data","action","beforeSend","xhr","fadeOut","text","removeClass","success","response","addClass","html","message","fadeIn","error","status","console","log","setTimeout","location","href","redirect_url","logout_url"],"sourceRoot":""}
|