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AiB,GAEnB,MAAlB,GACA,EAAO,aAAa,cAAe,0BAElB,MAAjB,GACA,EAAO,aAAa,sBAAuB,GAG/C,KAAK,cAAc,QAAQ,YAAY,EAC3C,EACA,EAAa,UAAU,OAAS,WAC5B,IAAI,EACJ,OAAO,MAAM,cAAc,MAAO,CAAE,UAAW,iBAAiB,OAAkD,QAA1C,EAAK,KAAK,MAAM,4BAAyC,IAAP,EAAgB,EAAK,IAAK,IAAK,KAAK,eAClK,EACO,CACX,CA7CiC,CA6C/B,QAAQ,WACV,QAAQ,aAAe","file":"/npm/react-telegram-auth@1.0.4/lib/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/react-telegram-auth@1.0.4/lib/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    var desc = Object.getOwnPropertyDescriptor(m, k);\n    if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n      desc = { enumerable: true, get: function() { return m[k]; } };\n    }\n    Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n    Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n    o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n    if (mod && mod.__esModule) return mod;\n    var result = {};\n    if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n    __setModuleDefault(result, mod);\n    return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TLoginButton = exports.TLoginButtonSize = void 0;\nvar React = __importStar(require(\"react\"));\nvar react_1 = require(\"react\");\nvar TLoginButtonSize;\n(function (TLoginButtonSize) {\n    TLoginButtonSize[\"Large\"] = \"large\";\n    TLoginButtonSize[\"Medium\"] = \"medium\";\n    TLoginButtonSize[\"Small\"] = \"small\";\n})(TLoginButtonSize = exports.TLoginButtonSize || (exports.TLoginButtonSize = {}));\nvar TLoginButton = /** @class */ (function (_super) {\n    __extends(TLoginButton, _super);\n    function TLoginButton() {\n        var _this = _super !== null && _super.apply(this, arguments) || this;\n        _this._containerRef = (0, react_1.createRef)();\n        return _this;\n    }\n    TLoginButton.prototype.componentDidMount = function () {\n        var _a = this.props, botName = _a.botName, buttonSize = _a.buttonSize, cornerRadius = _a.cornerRadius, requestAccess = _a.requestAccess, usePic = _a.usePic, onAuthCallback = _a.onAuthCallback, redirectUrl = _a.redirectUrl, lang = _a.lang;\n        if (onAuthCallback != null) {\n            window.TelegramOnAuthCb = function (user) { return onAuthCallback(user); };\n        }\n        var script = document.createElement('script');\n        script.src = 'https://telegram.org/js/telegram-widget.js?21';\n        script.async = true;\n        script.setAttribute('data-telegram-login', botName);\n        if (buttonSize != null) {\n            script.setAttribute('data-size', buttonSize);\n        }\n        if (buttonSize != null) {\n            script.setAttribute('data-radius', \"\".concat(cornerRadius));\n        }\n        if (usePic != null) {\n            script.setAttribute('data-userpic', \"\".concat(usePic));\n        }\n        if (lang != null) {\n            script.setAttribute('data-lang', lang);\n        }\n        if (redirectUrl != null) {\n            script.setAttribute('data-auth-url', redirectUrl);\n        }\n        if (onAuthCallback != null) {\n            script.setAttribute('data-onauth', 'TelegramOnAuthCb(user)');\n        }\n        if (requestAccess != null) {\n            script.setAttribute('data-request-access', requestAccess);\n        }\n        // componentDidMount will only be called once after the first render.\n        this._containerRef.current.appendChild(script);\n    };\n    TLoginButton.prototype.render = function () {\n        var _a;\n        return React.createElement(\"div\", { className: \"tlogin-button \".concat((_a = this.props.additionalClassNames) !== null && _a !== void 0 ? _a : ''), ref: this._containerRef });\n    };\n    return TLoginButton;\n}(react_1.Component));\nexports.TLoginButton = TLoginButton;\n"]}