react-grecaptcha-v3
Version:
Google Recaptcha V3 for React.js based application. Keep website performance high while prioritizing security.
1 lines • 5.06 kB
Source Map (JSON)
{"version":3,"sources":["/home/runner/work/react-grecaptcha-v3/react-grecaptcha-v3/dist/subscribeEvent.cjs","../src/subscribeEvent.ts"],"names":["__create","Object","create","__defProp","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__getProtoOf","getPrototypeOf","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key2","call","__toESM","mod","isNodeMode","__esModule","value","__toCommonJS","subscribeEvent_exports","default","subscribeEvent_default","module","exports","import_globalOnLoad","require","import_globals","subscribeEvent","callback","window","grecaptcha","execute","key","globalOnLoad","queueKey","push"],"mappings":"AAAA;;;;;AACA,IAAIA,WAAWC,OAAOC,MAAM;AAC5B,IAAIC,YAAYF,OAAOG,cAAc;AACrC,IAAIC,mBAAmBJ,OAAOK,wBAAwB;AACtD,IAAIC,oBAAoBN,OAAOO,mBAAmB;AAClD,IAAIC,eAAeR,OAAOS,cAAc;AACxC,IAAIC,eAAeV,OAAOW,SAAS,CAACC,cAAc;AAClD,IAAIC,WAAW,SAACC,QAAQC;IACtB,IAAK,IAAIC,QAAQD,IACfb,UAAUY,QAAQE,MAAM;QAAEC,KAAKF,GAAG,CAACC,KAAK;QAAEE,YAAY;IAAK;AAC/D;AACA,IAAIC,cAAc,SAACC,IAAIC,MAAMC,QAAQC;IACnC,IAAIF,QAAQ,CAAA,OAAOA,qCAAP,SAAOA,KAAG,MAAM,YAAY,OAAOA,SAAS,YAAY;YAC7D,kCAAA,2BAAA;;;gBAAA,IAAIG,OAAJ;gBACH,IAAI,CAACd,aAAae,IAAI,CAACL,IAAII,SAASA,SAASF,QAC3CpB,UAAUkB,IAAII,MAAM;oBAAEP,KAAK;+BAAMI,IAAI,CAACG,KAAK;;oBAAEN,YAAY,CAAEK,CAAAA,OAAOnB,iBAAiBiB,MAAM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= Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key2 of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key2) && key2 !== except)\n __defProp(to, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar subscribeEvent_exports = {};\n__export(subscribeEvent_exports, {\n default: () => subscribeEvent_default\n});\nmodule.exports = __toCommonJS(subscribeEvent_exports);\nvar import_globalOnLoad = __toESM(require(\"./global/globalOnLoad\"), 1);\nvar import_globals = require(\"./global/globals\");\nconst subscribeEvent = (callback) => {\n if (window.grecaptcha?.execute !== void 0) {\n callback();\n return;\n }\n window[import_globals.key] = import_globalOnLoad.default;\n if (window[import_globals.queueKey] === void 0) {\n window[import_globals.queueKey] = [callback];\n } else {\n window[import_globals.queueKey].push(callback);\n }\n};\nvar subscribeEvent_default = subscribeEvent;\n","import globalOnLoad from './global/globalOnLoad'\nimport { key, queueKey } from './global/globals'\n\nconst subscribeEvent = (callback: () => void): void => {\n if (window.grecaptcha?.execute !== undefined) {\n callback()\n return\n }\n window[key] = globalOnLoad\n if (window[queueKey] === undefined) {\n window[queueKey] = [callback]\n } else {\n window[queueKey].push(callback)\n }\n}\nexport default subscribeEvent\n"]}