{"version":3,"sources":["webpack:///./node_modules/@aws-amplify/ui-components/dist/esm-es5/amplify-federated-buttons_2.entry.js"],"names":["AmplifyFederatedButtons","hostRef","this","authState","SignIn","federated","handleAuthStateChange","prototype","componentWillLoad","console","warn","configure","Error","_a","oauth","oauthConfig","Object","assign","auth0Config","render","values","includes","amazonClientId","facebookAppId","googleClientId","clientId","appId","config","AmplifyStrike","class","style"],"mappings":"2FAAA,8KAOIA,EAAyC,WACzC,SAASA,EAAwBC,GAC7B,YAAiBC,KAAMD,GAEvBC,KAAKC,UAAY,IAAUC,OAE3BF,KAAKG,UAAY,CAAC,EAIlBH,KAAKI,sBAAwB,GACjC,CA4BA,OA3BAN,EAAwBO,UAAUC,kBAAoB,WAElD,GADAC,QAAQC,KAAK,qMACR,KAAkC,mBAAnB,IAAKC,UACrB,MAAM,IAAIC,MAAM,KAEpB,IAAIC,EAAK,IAAKF,YAAYG,MAAOA,OAAe,IAAPD,EAAgB,CAAC,EAAIA,EAE1DC,EAAc,OACdZ,KAAKG,UAAUU,YAAcC,OAAOC,OAAOD,OAAOC,OAAO,CAAC,EAAGf,KAAKG,UAAUU,aAAcD,GAErFA,EAAkB,aACvBZ,KAAKG,UAAUU,YAAcC,OAAOC,OAAOD,OAAOC,OAAO,CAAC,EAAGf,KAAKG,UAAUU,aAAcD,EAAkB,aAE5GA,EAAa,QACbZ,KAAKG,UAAUa,YAAcF,OAAOC,OAAOD,OAAOC,OAAO,CAAC,EAAGf,KAAKG,UAAUa,aAAcJ,EAAa,OAE/G,EACAd,EAAwBO,UAAUY,OAAS,WACvC,IAAKH,OAAOI,OAAO,KAAWC,SAASnB,KAAKC,WACxC,OAAO,KAEX,GAAI,YAAQD,KAAKG,WACb,OAAO,KAEX,IAAIQ,EAAKX,KAAKG,UAAWiB,EAAiBT,EAAGS,eAAgBJ,EAAcL,EAAGK,YAAaK,EAAgBV,EAAGU,cAAeC,EAAiBX,EAAGW,eAAgBT,EAAcF,EAAGE,YAClL,OAAQ,WAAD,CAAG,MAAO,KAAMS,GAAmB,WAAD,CAAG,MAAO,KAAM,YAAE,wBAAyB,CAAEC,SAAUD,EAAgBlB,sBAAuBJ,KAAKI,yBAA4BiB,GAAkB,WAAD,CAAG,MAAO,KAAM,YAAE,0BAA2B,CAAEG,MAAOH,EAAejB,sBAAuBJ,KAAKI,yBAA4BgB,GAAmB,WAAD,CAAG,MAAO,KAAM,YAAE,wBAAyB,CAAEG,SAAUH,EAAgBhB,sBAAuBJ,KAAKI,yBAA4BS,GAAgB,WAAD,CAAG,MAAO,KAAM,YAAE,uBAAwB,CAAEY,OAAQZ,KAAkBG,GAAgB,WAAD,CAAG,MAAO,KAAM,YAAE,uBAAwB,CAAES,OAAQT,EAAaZ,sBAAuBJ,KAAKI,yBAC5oB,EACON,CACX,CAxC4C,GA0CxC4B,EAA+B,WAC/B,SAASA,EAAc3B,GACnB,YAAiBC,KAAMD,EAC3B,CAOA,OANA2B,EAAcrB,UAAUC,kBAAoB,WACxCC,QAAQC,KAAK,mMACjB,EACAkB,EAAcrB,UAAUY,OAAS,WAC7B,OAAQ,WAAD,CAAG,OAAQ,CAAEU,MAAO,kBAAoB,YAAE,OAAQ,MAC7D,EACOD,CACX,CAXkC,GAYlCA,EAAcE,MAbS,uZ","file":"1cfe4f4.js","sourcesContent":["import { r as registerInstance, h } from './index-83f2275b.js';\nimport { isEmpty } from '@aws-amplify/core';\nimport { A as AuthState } from './auth-types-78df304e.js';\nimport { Auth } from '@aws-amplify/auth';\nimport './Translations-108d469f.js';\nimport { N as NO_AUTH_MODULE_FOUND } from './constants-c8ecaa24.js';\nimport { d as dispatchAuthStateChangeEvent } from './helpers-14fcb50c.js';\nvar AmplifyFederatedButtons = /** @class */ (function () {\n function AmplifyFederatedButtons(hostRef) {\n registerInstance(this, hostRef);\n /** The current authentication state. */\n this.authState = AuthState.SignIn;\n /** Federated credentials & configuration. */\n this.federated = {};\n /** Auth state change handler for this component\n * e.g. SignIn -> 'Create Account' link -> SignUp\n */\n this.handleAuthStateChange = dispatchAuthStateChangeEvent;\n }\n AmplifyFederatedButtons.prototype.componentWillLoad = function () {\n console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');\n if (!Auth || typeof Auth.configure !== 'function') {\n throw new Error(NO_AUTH_MODULE_FOUND);\n }\n var _a = Auth.configure().oauth, oauth = _a === void 0 ? {} : _a;\n // backward compatibility\n if (oauth['domain']) {\n this.federated.oauthConfig = Object.assign(Object.assign({}, this.federated.oauthConfig), oauth);\n }\n else if (oauth['awsCognito']) {\n this.federated.oauthConfig = Object.assign(Object.assign({}, this.federated.oauthConfig), oauth['awsCognito']);\n }\n if (oauth['auth0']) {\n this.federated.auth0Config = Object.assign(Object.assign({}, this.federated.auth0Config), oauth['auth0']);\n }\n };\n AmplifyFederatedButtons.prototype.render = function () {\n if (!Object.values(AuthState).includes(this.authState)) {\n return null;\n }\n if (isEmpty(this.federated)) {\n return null;\n }\n var _a = this.federated, amazonClientId = _a.amazonClientId, auth0Config = _a.auth0Config, facebookAppId = _a.facebookAppId, googleClientId = _a.googleClientId, oauthConfig = _a.oauthConfig;\n return (h(\"div\", null, googleClientId && (h(\"div\", null, h(\"amplify-google-button\", { clientId: googleClientId, handleAuthStateChange: this.handleAuthStateChange }))), facebookAppId && (h(\"div\", null, h(\"amplify-facebook-button\", { appId: facebookAppId, handleAuthStateChange: this.handleAuthStateChange }))), amazonClientId && (h(\"div\", null, h(\"amplify-amazon-button\", { clientId: amazonClientId, handleAuthStateChange: this.handleAuthStateChange }))), oauthConfig && (h(\"div\", null, h(\"amplify-oauth-button\", { config: oauthConfig }))), auth0Config && (h(\"div\", null, h(\"amplify-auth0-button\", { config: auth0Config, handleAuthStateChange: this.handleAuthStateChange })))));\n };\n return AmplifyFederatedButtons;\n}());\nvar amplifyStrikeCss = \".sc-amplify-strike-h{--color:var(--amplify-grey);--border-color:var(--amplify-light-grey);--content-background:var(--amplify-white);display:block;width:100%;text-align:center;border-bottom:1px solid var(--border-color);line-height:0.1em;margin:32px 0;color:var(--color)}.strike-content.sc-amplify-strike{background:var(--content-background);padding:0 25px;font-size:var(--amplify-text-sm);font-weight:500}\";\nvar AmplifyStrike = /** @class */ (function () {\n function AmplifyStrike(hostRef) {\n registerInstance(this, hostRef);\n }\n AmplifyStrike.prototype.componentWillLoad = function () {\n console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');\n };\n AmplifyStrike.prototype.render = function () {\n return (h(\"span\", { class: \"strike-content\" }, h(\"slot\", null)));\n };\n return AmplifyStrike;\n}());\nAmplifyStrike.style = amplifyStrikeCss;\nexport { AmplifyFederatedButtons as amplify_federated_buttons, AmplifyStrike as amplify_strike };\n"],"sourceRoot":""}