1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,763151,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e.r(271645);r.default=function(e){(0,n.useEffect)(function(){if(e){var t=document.querySelectorAll('script[src="'.concat(e,'"]'))[0];t||((t=document.createElement("script")).src=e,t.async=!0,document.body.appendChild(t))}},[e])}},897540,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,r.default=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{pollFrequency:1e3,retries:100,parent:window},n=r.pollFrequency,o=void 0===n?1e3:n,i=r.retries,a=void 0===i?100:i,s=r.parent,u=void 0===s?window:s;if(u&&u.hasOwnProperty(t))return Promise.resolve(u[t]);if(!a)return Promise.resolve(void 0);var c=a-1;return new Promise(function(e){return setTimeout(e,"function"==typeof o?o({retries:c}):o)}).then(function(){return e(t,{pollFrequency:o,parent:u,retries:c})})}},187873,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,o=(n=e.r(897540))&&n.__esModule?n:{default:n};r.default={APPLE_SCRIPT_SRC:"https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js",signIn:function(e){var t=e.authOptions,r=e.onSuccess,n=e.onError;return(0,o.default)("AppleID").then(function(){return window.AppleID||console.error(Error("Error loading apple script")),window.AppleID.auth.init(t),window.AppleID.auth.signIn().then(function(e){return r&&r(e),e}).catch(function(e){return n?n(e):console.error(e),null})}).catch(function(e){return n?n(e):console.error(e),null})}}},422051,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=s(e.r(271645)),o=s(e.r(763151)),i=s(e.r(187873)),a=["onSuccess","onError","skipScript","authOptions","iconProps","render","uiType","className","noDefaultStyle","buttonExtraChildren"];function s(e){return e&&e.__esModule?e:{default:e}}function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var l="\n.react-apple-signin-auth-btn {\n background-color: transparent;\n border: none;\n padding: 0;\n cursor: pointer;\n border-radius: 4px;\n padding: 0 8px 0 2px;\n font-size: 14px;\n font-size: 1em;\n line-height: 1;\n border: 1px solid #000;\n overflow: hidden;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n}\n.react-apple-signin-auth-btn-light {\n background-color: #FFF;\n color: #000;\n border-color: #000;\n}\n.react-apple-signin-auth-btn-dark {\n background-color: #000;\n color: #FFF;\n border-color: #FFF;\n}".replace(/ {2}|\n/g,"");r.default=function(e){var t=e.onSuccess,r=e.onError,s=e.skipScript,f=e.authOptions,d=e.iconProps,p=e.render,h=e.uiType,y=void 0===h?"dark":h,m=e.className,g=e.noDefaultStyle,v=void 0!==g&&g,b=e.buttonExtraChildren,w=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,a);(0,o.default)(void 0!==s&&s?null:i.default.APPLE_SCRIPT_SRC);var k=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach(function(t){var n,o,i;n=e,o=t,i=r[t],o in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({children:n.default.createElement(n.default.Fragment,null,n.default.createElement("svg",u({width:"24px",height:"44px",viewBox:"0 0 24 44"},d),n.default.createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},n.default.createElement("rect",{fill:"light"===y?"#FFF":"#000",x:"0",y:"0",width:"24",height:"44"}),n.default.createElement("path",{d:"M12.2337427,16.9879688 C12.8896607,16.9879688 13.7118677,16.5445313 14.2014966,15.9532812 C14.6449341,15.4174609 14.968274,14.6691602 14.968274,13.9208594 C14.968274,13.8192383 14.9590357,13.7176172 14.9405591,13.6344727 C14.2107349,13.6621875 13.3330982,14.1241016 12.8065162,14.7430664 C12.3907935,15.2142188 12.012024,15.9532812 12.012024,16.7108203 C12.012024,16.8216797 12.0305005,16.9325391 12.0397388,16.9694922 C12.0859302,16.9787305 12.1598365,16.9879688 12.2337427,16.9879688 Z M9.92417241,28.1662891 C10.8202857,28.1662891 11.2175318,27.56
158008 12.3353638,27.5658008 C13.4716724,27.5658008 13.721106,28.1478125 14.7188404,28.1478125 C15.6980982,28.1478125 16.3540162,27.2424609 16.972981,26.3555859 C17.6658521,25.339375 17.9522388,24.3416406 17.9707154,24.2954492 C17.9060474,24.2769727 16.0306763,23.5101953 16.0306763,21.3576758 C16.0306763,19.491543 17.5088013,18.6508594 17.5919459,18.5861914 C16.612688,17.1819727 15.1253248,17.1450195 14.7188404,17.1450195 C13.6194849,17.1450195 12.7233716,17.8101758 12.1598365,17.8101758 C11.5501099,17.8101758 10.7463794,17.1819727 9.79483648,17.1819727 C7.98413335,17.1819727 6.14571538,18.6785742 6.14571538,21.5054883 C6.14571538,23.2607617 6.8293482,25.1176563 7.67003179,26.3186328 C8.39061773,27.3348438 9.01882085,28.1662891 9.92417241,28.1662891 Z",fill:"light"===y?"#000":"#FFF",fillRule:"nonzero"}))),void 0===b?"Continue with Apple":b),onClick:function(e){e&&(e.preventDefault(),e.stopPropagation()),i.default.signIn({authOptions:f,onSuccess:t,onError:r})}},w);return p?p(k):n.default.createElement(n.default.Fragment,null,n.default.createElement("button",u({className:"".concat(v?"":"react-apple-signin-auth-btn react-apple-signin-auth-btn-".concat(y)).concat(m?" ".concat(m):""),type:"button","aria-label":"Signin with apple ID"},k)),v?null:n.default.createElement("style",null,l))}},915209,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"appleAuthHelpers",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(r,"useScript",{enumerable:!0,get:function(){return i.default}}),r.default=void 0;var n=a(e.r(422051)),o=a(e.r(187873)),i=a(e.r(763151));function a(e){return e&&e.__esModule?e:{default:e}}r.default=n.default},556720,(e,t,r)=>{e.e,t.exports=function(e){var t=[function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=void 0;"undefined"!=typeof window&&(n=window.document.createElement("a")),t.omit=function(e,t){return Object.keys(e).reduce(function(r,n){return -1===t.indexOf(n)&&(r[n]=e[n]),r},{})},t.parseAsURL=function(e){return n||(n=window.document.createElement("a")),n.href=e,{protocol:n.protocol,hostname:n.hostname,port:n.port,pathname:n.pathname,search:n.search,hash:n.hash,host:n.host,toString:function(){return this.protocol+"//"+this.host+("/"===this.pathname?"":this.pathname)+this.search+this.hash}}},t.getQueryStringValue=function(e){return decodeURIComponent(window.location.search.replace(RegExp("^(?:.*[&\\?]"+encodeURIComponent(e).replace(/[.+*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))},t.getHashValue=function(e){var t=window.location.hash.match(RegExp(e+"=([^&]*)"));return t?t[1]:null},t.cleanLocation=function(){if(window.history&&window.history.pushState){var e=window.location,t=e.protocol,r=e.host,n=e.pathname,o=e.search,i=e.hash,a=/access_token/.test(i)?"":i||"",s=o.split("&").reduce(function(e,t,r){var n=/rslCallback=/.test(t)||/code=/.test(t)||/state=/.test(t)||/error=/.test(t)||/error_reason=/.test(t);return 0===r&&n?"?":0===r?t:n?e:e+"&"+t},"");return s="?"===s?"":s,window.history.pushState({html:document.body.innerHTML,pageTitle:document.title},"",t+"//"+r+n+s+a),!0}},t.rslError=function(e){var t=[];return t.push("["+e.provider+"]["+e.type+"] "+e.description),e.error&&t.push(JSON.stringify(e.error,null,2)),Error(t.join("\n\nORIGINAL ERROR: "))},t.timestampFromNow=function(e){var t=new Date;return t.setSeconds(t.getSeconds()+e)}},function(e,t){!function(e){"use strict";if(!e.fetch){var t={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(t.arrayBuffer)var r=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],n=function(e){return e&&DataView.prototype.isPrototypeOf(e)},o=ArrayBuffer.isView||function(e){return e&&r.indexOf(Object.prototype.toString.call(e))>-1};l.prototype.append=function(e,t){e=s(e),t=u(t);var r=this.map[e];this.map[e]=r?r+","+t:t},l.prototype.delete=function(e){delete this.map[s(e)]},l.prototype.get=function(e){return e=s(e),this.has(e)?this.map[e]:null},l.prototype.has=function(e){return this.map.hasOwnProperty(s(e))},l.prototype.set=function(e,t){this.map[s(e)]=u(t)},l.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},l.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),c(e)},l.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),c(e)},l.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),c(e)},t.iterable&&(l.prototype[Symbol.iterator]=l.prototype.entries);
1var i=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},y.call(m.prototype),y.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},v.error=function(){var e=new v(null,{status:0,statusText:""});return e.type="error",e};var a=[301,302,303,307,308];v.redirect=function(e,t){if(-1===a.indexOf(t))throw RangeError("Invalid status code");return new v(null,{status:t,headers:{location:e}})},e.Headers=l,e.Request=m,e.Response=v,e.fetch=function(e,r){return new Promise(function(n,o){var i=new m(e,r),a=new XMLHttpRequest;a.onload=function(){var e,t,r={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new l,e.split(/\r?\n/).forEach(function(e){var r=e.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();t.append(n,o)}}),t)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL"),n(new v("response"in a?a.response:a.responseText,r))},a.onerror=function(){o(TypeError("Network request failed"))},a.ontimeout=function(){o(TypeError("Network request failed"))},a.open(i.method,i.url,!0),"include"===i.credentials&&(a.withCredentials=!0),"responseType"in a&&t.blob&&(a.responseType="blob"),i.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send(void 0===i._bodyInit?null:i._bodyInit)})},e.fetch.polyfill=!0}function s(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw TypeError("Invalid character in header field name");return e.toLowerCase()}function u(e){return"string"!=typeof e&&(e=String(e)),e}function c(e){var r={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return t.iterable&&(r[Symbol.iterator]=function(){return r}),r}function l(e){this.map={},e instanceof l?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function f(e){if(e.bodyUsed)return Promise.reject(TypeError("Already read"));e.bodyUsed=!0}function d(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function p(e){var t=new FileReader,r=d(t);return t.readAsArrayBuffer(e),r}function h(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(t.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(t.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(t.arrayBuffer&&t.blob&&n(e))this._bodyArrayBuffer=h(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else if(t.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||o(e)))this._bodyArrayBuffer=h(e);else throw Error("unsupported BodyInit type");else this._bodyText="";!this.headers.get("content-type")&&("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},t.blob&&(this.blob=function(){var e=f(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(!this._bodyFormData)return Promise.resolve(new Blob([this._bodyText]));throw Error("could not read FormData body as blob")},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(p)}),this.text=function(){var e,t,r,n=f(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=d(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}(this._bodyArrayBuffer));if(!this._bodyFormData)return Promise.resolve(this._bodyText);throw Error("could not read FormData body as text")},t.formData&&(this.formData=function(){return this.text().then(g)}),this.json=function(){return this.text().then(JSON.parse)},this}function m(e,t){var r,n,o=(t=t||{}).body;if(e instanceof m){if(e.bodyUsed)throw TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new l(e.headers)),this.method=e.method,this.mode=e.mode,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",(t.headers||!this.headers)&&(this.headers=new l(t.headers)),this.method=(n=(r=t.method||this.method||"GET").toUpperCase(),i.indexOf(n)>-1?n:r),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function g(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(o))}}),t}function v(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new l(t.headers),this.url=t.url||"",this._initBody(e)}}("undefined"!=typeof self?self:this)},function(e,t,r){var n=r(3);e.exports=r(12)(n.isElement,!0)},function(e,t,r){"use strict";e.exports=r(11)},function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,r){t.exports=e},function(e,t,r){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0});var n=c(r(15)),o=c(r(16)),i=c(r(17)),a=c(r(21)),s=c(r(22)),u=c(r(24));function c(e){return e&&e.__esModule?e:{default:e}}t.default={amazon:n.default,github:i.default,google:a.default,facebook:o.default,instagram:s.default,linkedin:u.default}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();t.default=function(){function e(t){if(!(this instanceof e))throw TypeError("Cannot call a class as a function");this._provider=t,this._profile={id:void 0,name:void 0,firstName:void 0,lastName:void 0,email:void 0,profilePicUrl:void 0,gender:void 0},this._token={accessToken:void 0,expiresAt:void 0}}return n(e,[{key:"provider",set:function(e){this._provider=e},get:function(){return this._provider}},{key:"profile",set:function(e){this._profile=e},get:function(){return this._profile}},{key:"token",set:function(e){this._token=e},get:function(){return this._token}}]),e}()},function(e,t,r){r(1),e.exports=r(9)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OldSocialLogin=void 0;var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(10);Object.defineProperty(t,"OldSocialLogin",{enumerable:!0,get:function(){return h(i).default}});var a=h(r(2)),s=r(5),u=h(s),c=h(r(25)),l=h(r(6)),f=h(r(7)),d=r(0),p=h(r(26));function h(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){var r,i;return i=r=function(r){if("function"!=typeof r&&null!==r)throw TypeError("Super expression must either be null or a function, not "+typeof r);function i(t){if(!(this instanceof i))throw TypeError("Cannot call a class as a function");var r=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,t));return r.isStateless=!e.prototype.render,r.state={isLoaded:!1,isConnected:!1,isFetching:!1},r.sdk=l.default[t.provider],r.accessToken=null,r.fetchProvider="instagram"===t.provider||"github"===t.provider,r.loadPromise=Promise.resolve(),r.node=null,r.onLoginSuccess=r.onLoginSuccess.bind(r),r.onLoginFailure=r.onLoginFailure.bind(r),r.onLogoutFailure=r.onLogoutFailure.bind(r),r.onLogoutSuccess=r.onLogoutSuccess.bind(r),r.login=r.login.bind(r),r.logout=r.logout.bind(r),r.setInstance=r.setInstance.bind(r),r}return i.prototype=Object.create(r&&r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(i,r):i.__proto__=r),o(i,[{key:"componentDidMount",value:function(){var e=this,t=this.props,r=t.appId,o=t.autoCleanUri,i=t.autoLogin,a=t.gatekeeper,s=t.redirect,u=t.scope,c=t.version;this.loadPromise=(0,p.default)(this.sdk.load({appId:r,redirect:s,gatekeeper:a,scope:u,version:c}).then(function(t){return o&&(0,d.cleanLocation)(),t&&(e.accessToken=t),e.setState(function(e){return n({},e,{isLoaded:!0})},function(){"function"==typeof e.props.onLoaded&&e.props.onLoaded(),(i||e.accessToken)&&(e.fetchProvider&&!e.accessToken?e.sdk.login(r,s).catch(e.onLoginFailure):e.sdk.checkLogin(!0).then(e.onLoginSuccess,e.onLoginFailure))}),null},this.onLoginFailure))}},{key:"componentWillReceiveProps",value:function(e){var t=this,r=this.props,o=r.appId,i=r.gatekeeper;"github"!==r.provider||i||o===e.appId||this.setState(function(){return{isLoaded:!1,isFetching:!1,isConnected:!1}},function(){t.sdk.load(e.appId).then(function(){t.setState(function(e){return n({},e,{isLoaded:!0})})},t.onLoginFailure)})}},{key:"componentWillUnmount",value:function(){this.loadPromise.cancel(),this.node=null}},{key:"setInstance",value:function(e){this.node=e,"function"==typeof this.props.getInstance&&this.props.getInstance(e)}},{key:"login",value:function(){var e=this;(navigator.onLine||!this.props.onInternetFailure||!1!==this.props.onInternetFailure())&&(!this.state.isLoaded||this.state.isConnected||this.state.isFetching?this.state.isLoaded&&this.state.isConnected?this.props.onLoginFailure("User already connected"):this.state.isLoaded&&this.state.isFetching?this.props.onLoginFailure("Fetching user"):this.state.isLoaded?this.props.onLoginFailure("Unknown error"):this.props.onLoginFailure("SDK not loaded"):this.setState(function(e){return n({},e,{isFetching:!0})},function(){e.sdk.login().then(e.onLoginSuccess,e.onLoginFailure).catch(e.onLoginFailure)}))}},{key:"onLoginSuccess",value:function(e){var t=this.props,r=t.onLoginSuccess,o=t.provider,i=new f.default(o),a=this.sdk.generateUser(e);i.profile=a.profile,i.token=a.token,this.node?this.setState(function(e){return n({},e,{isFetching:!1,isConnected:!0})},function(){"function"==typeof r&&r(i)}):"function"==typeof r&&r(i)}},{key:"onLoginFailure",value:function(e){var t=this.props.onLoginFailure;this.setState(function(e){return n({},e,{isFetching:!1,isConnected:!1})},function(){"function"==typeof t&&t(e)})}},{key:"logout",value:function(){this.state.isLoaded&&this.state.isConnected?this.sdk.logout().then(this.onLogoutSuccess,this.onLogoutFailure):this.state.isLoaded&&!this.state.isConnected?this.props.onLoginFailure("User not connected"):this.props.onLoginFailure("SDK not loaded")}},{key:"onLogoutSuccess",value:function(){var e=this.props.onLogoutSuccess;this.node?this.setState(function(e){return n({},e,{isConnected:!1})},function(){"function"==typeof e&&e()}):"function"==typeof e&&e()}},{key:"onLogoutFailure",value:function(e){"function"==typeof this.props.onLoginFailure&&this.props.onLoginFailure(e)}},{key:"render",value:function(){var r=(0,d.omit)(this.props,["appId","scope","autoCleanUri","autoLogin","gate
1keeper","getInstance","onLoginFailure","onLoginSuccess","onLogoutFailure","onLogoutSuccess","provider","redirect","onInternetFailure","ref"]),o={};return(this.props.onLogoutFailure||this.props.onLogoutSuccess)&&(o={triggerLogout:this.logout}),this.isStateless||(o=n({},o,{ref:this.setInstance})),this.state.isLoaded?u.default.createElement(e,n({triggerLogin:this.login},o,r)):t?u.default.createElement(t,null):null}}]),i}(s.Component),r.propTypes={appId:a.default.string.isRequired,autoCleanUri:a.default.bool,autoLogin:a.default.bool,gatekeeper:a.default.string,getInstance:a.default.func,onLoginFailure:a.default.func,onLoginSuccess:a.default.func,onLogoutFailure:a.default.func,onLogoutSuccess:a.default.func,onInternetFailure:a.default.func,provider:a.default.oneOf(c.default.providers).isRequired,redirect:function(e,t,r){if("instagram"===e.provider&&(!e[t]||"string"!=typeof e[t]))return Error("Missing required `"+t+"` prop of type `string` on "+r+".")},scope:a.default.oneOfType([a.default.array,a.default.string])},i}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=c(r(2)),i=r(5),a=c(i),s=c(r(6)),u=c(r(7));function c(e){return e&&e.__esModule?e:{default:e}}var l=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+typeof e);function t(e){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");var r=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.id="sl"+Math.floor(65535*Math.random()),r.handleSocialLoginInvokeSuccess=r.handleSocialLoginInvokeSuccess.bind(r),r.handleSocialLoginInvokeFailure=r.handleSocialLoginInvokeFailure.bind(r),r.handleLogin=r.handleLogin.bind(r),r}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),n(t,[{key:"handleSocialLoginInvokeSuccess",value:function(e){var t=this.props,r=t.callback,n=t.provider,o=new u.default,i=void 0,a=void 0;switch(n){case"google":var s=window.gapi.auth2.getAuthInstance().currentUser.get().getBasicProfile(),c=window.gapi.auth2.getAuthInstance().currentUser.get().getAuthResponse(!0);i={id:s.getId(),name:s.getName(),firstName:s.getGivenName(),lastName:s.getFamilyName(),email:s.getEmail(),profilePicURL:s.getImageUrl()},a={accessToken:c.access_token,idToken:c.id_token,scope:c.scope,expiresIn:c.expires_in,firstIssued_at:c.first_issued_at,expiresAt:c.expires_at};break;case"facebook":i={id:e.id,name:e.name,firstName:e.first_name,lastName:e.last_name,email:e.email,profilePicURL:e.picture.data.url},a={accessToken:e.authResponse.accessToken,expiresAt:e.authResponse.expiresIn};break;case"linkedin":i={id:window.IN.ENV.auth.member_id,name:e.values[0].firstName+" "+e.values[0].lastName,firstName:e.values[0].firstName,lastName:e.values[0].lastName,email:e.values[0].emailAddress,profilePicURL:e.values[0].pictureUrl},a={accessToken:void 0};var l=new Date;l.setSeconds(l.getSeconds()+window.IN.ENV.auth.oauth_expires_in),o.token.expiresAt=l;break;default:throw Error("Provider â"+n+"â isnât supported.")}o.provider=n,o.profile=i,o.token=a,r(o,null)}},{key:"handleSocialLoginInvokeFailure",value:function(e){this.props.callback(null,e)}},{key:"handleLogin",value:function(e,t){var r=this,n=this.props,o=n.appId,i=n.provider,a=n.version,s=this.handleSocialLoginInvokeSuccess;"facebook"===i?(window.FB.init({appId:o,xfbml:!0,version:"v"+a}),window.FB.login(function(e){window.FB.api("/me",{fields:"email,name,id,first_name,last_name,picture"},function(t){Object.assign(t,e),s(t)})},{scope:"email"})):"linkedin"===i&&window.IN.User.authorize(function(e){window.IN.API.Profile("me").fields(["id","firstName","lastName","pictureUrl","publicProfileUrl","emailAddress"]).result(function(e){s(e)}).error(function(e){r.handleSocialLoginInvokeFailure(e)})})}},{key:"componentDidMount",value:function(){var e=this.props.appI
1d;"google"===this.props.provider?s.default.google.oldLoad(e,this.id,this.handleSocialLoginInvokeSuccess,this.handleSocialLoginInvokeFailure):"facebook"===this.props.provider?s.default.facebook.oldLoad(e):"linkedin"===this.props.provider&&s.default.linkedin.oldLoad(e)}},{key:"getProfile",value:function(){window.IN.API.Profile("me").fields(["id","firstName","lastName","pictureUrl","publicProfileUrl","emailAddress"]).result(function(e){alert(e)})}},{key:"render",value:function(){return a.default.createElement("div",{id:this.id,onClick:this.handleLogin},this.props.children)}}]),t}(i.Component);l.propTypes={appId:o.default.string.isRequired,callback:o.default.func,children:o.default.oneOfType([o.default.string,o.default.number,o.default.element,o.default.node]).isRequired,provider:o.default.oneOf(["facebook","google","linkedin"]).isRequired,version:o.default.string},l.defaultProps={version:"2.8"},t.default=l},function(e,t,r){"use strict";!function(){Object.defineProperty(t,"__esModule",{value:!0});var e="function"==typeof Symbol&&Symbol.for,r=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119,b=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var o=0,i="Warning: "+e.replace(/%s/g,function(){return r[o++]});"undefined"!=typeof console&&console.warn(i);try{throw Error(i)}catch(e){}},w=function(e,t){if(void 0===t)throw Error("`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning message argument");if(!e){for(var r=arguments.length,n=Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];b.apply(void 0,[t].concat(n))}};function k(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:var p=e.type;switch(p){case c:case l:case o:case a:case i:case d:return p;default:var m=p&&p.$$typeof;switch(m){case u:case f:case s:return m;default:return t}}case y:case h:case n:return t}}}var _=!1;function P(e){return k(e)===l}t.typeOf=k,t.AsyncMode=c,t.ConcurrentMode=l,t.ContextConsumer=u,t.ContextProvider=s,t.Element=r,t.ForwardRef=f,t.Fragment=o,t.Lazy=y,t.Memo=h,t.Portal=n,t.Profiler=a,t.StrictMode=i,t.Suspense=d,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===l||e===a||e===i||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===h||e.$$typeof===s||e.$$typeof===u||e.$$typeof===f||e.$$typeof===m||e.$$typeof===g||e.$$typeof===v)},t.isAsyncMode=function(e){return _||(_=!0,w(!1,"The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),P(e)||k(e)===c},t.isConcurrentMode=P,t.isContextConsumer=function(e){return k(e)===u},t.isContextProvider=function(e){return k(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return k(e)===f},t.isFragment=function(e){return k(e)===o},t.isLazy=function(e){return k(e)===y},t.isMemo=function(e){return k(e)===h},t.isPortal=function(e){return k(e)===n},t.isProfiler=function(e){return k(e)===a},t.isStrictMode=function(e){return k(e)===i},t.isSuspense=function(e){return k(e)===d}}()},function(e,t,r){"use strict";var n=r(3),o=r(13),i=r(4),a=r(14),s=Function.call.bind(Object.prototype.hasOwnProperty),u=function(){};function c(){return null}u=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw Error(t)}catch(e){}},e.exports=function(e,t){var r="function"==typeof Symbol&&Symbol.iterator,l="<<anonymous>>",f={array:h("array"),bool:h("boolean"),func:h("function"),number:h("number"),object:h("object"),string:h("string"),symbol:h("symbol"),any:p(c),arrayOf:function(e){return p(function(t,r,n,o,a){if("function"!=typeof e)return new d("Property `"+a+"` of component `"+n+"` has invali
1d PropType notation inside arrayOf.");var s=t[r];if(!Array.isArray(s))return new d("Invalid "+o+" `"+a+"` of type "+("`"+y(s)+"` supplied to `")+n+"`, expected an array.");for(var u=0;u<s.length;u++){var c=e(s,u,n,o,a+"["+u+"]",i);if(c instanceof Error)return c}return null})},element:p(function(t,r,n,o,i){var a=t[r];return e(a)?null:new d("Invalid "+o+" `"+i+"` of type "+("`"+y(a)+"` supplied to `")+n+"`, expected a single ReactElement.")}),elementType:p(function(e,t,r,o,i){var a=e[t];return n.isValidElementType(a)?null:new d("Invalid "+o+" `"+i+"` of type "+("`"+y(a)+"` supplied to `")+r+"`, expected a single ReactElement type.")}),instanceOf:function(e){return p(function(t,r,n,o,i){if(!(t[r]instanceof e)){var a,s=e.name||l;return new d("Invalid "+o+" `"+i+"` of type "+("`"+((a=t[r]).constructor&&a.constructor.name?a.constructor.name:l)+"` supplied to `")+n+"`, expected instance of `"+s+"`.")}return null})},node:p(function(t,n,o,i,a){return!function t(n){switch(typeof n){case"number":case"string":case"undefined":return!0;case"boolean":return!n;case"object":if(Array.isArray(n))return n.every(t);if(null===n||e(n))return!0;var o=function(e){var t=e&&(r&&e[r]||e["@@iterator"]);if("function"==typeof t)return t}(n);if(!o)return!1;var i,a=o.call(n);if(o!==n.entries){for(;!(i=a.next()).done;)if(!t(i.value))return!1}else for(;!(i=a.next()).done;){var s=i.value;if(s&&!t(s[1]))return!1}return!0;default:return!1}}(t[n])?new d("Invalid "+i+" `"+a+"` supplied to `"+o+"`, expected a ReactNode."):null}),objectOf:function(e){return p(function(t,r,n,o,a){if("function"!=typeof e)return new d("Property `"+a+"` of component `"+n+"` has invalid PropType notation inside objectOf.");var u=t[r],c=y(u);if("object"!==c)return new d("Invalid "+o+" `"+a+"` of type "+("`"+c+"` supplied to `")+n+"`, expected an object.");for(var l in u)if(s(u,l)){var f=e(u,l,n,o,a+"."+l,i);if(f instanceof Error)return f}return null})},oneOf:function(e){return Array.isArray(e)?p(function(t,r,n,o,i){for(var a,s=t[r],u=0;u<e.length;u++)if(s===(a=e[u])?0!==s||1/s==1/a:s!=s&&a!=a)return null;var c=JSON.stringify(e,function(e,t){return"symbol"===m(t)?String(t):t});return new d("Invalid "+o+" `"+i+"` of value `"+String(s)+"` "+("supplied to `"+n+"`, expected one of ")+c+".")}):(arguments.length>1?u("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):u("Invalid argument supplied to oneOf, expected an array."),c)},oneOfType:function(e){if(!Array.isArray(e))return u("Invalid argument supplied to oneOfType, expected an instance of array."),c;for(var t=0;t<e.length;t++){var r=e[t];if("function"!=typeof r)return u("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+function(e){var t=m(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}(r)+" at index "+t+"."),c}return p(function(t,r,n,o,a){for(var s=0;s<e.length;s++)if(null==(0,e[s])(t,r,n,o,a,i))return null;return new d("Invalid "+o+" `"+a+"` supplied to `"+n+"`.")})},shape:function(e){return p(function(t,r,n,o,a){var s=t[r],u=y(s);if("object"!==u)return new d("Invalid "+o+" `"+a+"` of type `"+u+"` supplied to `"+n+"`, expected `object`.");for(var c in e){var l=e[c];if(l){var f=l(s,c,n,o,a+"."+c,i);if(f)return f}}return null})},exact:function(e){return p(function(t,r,n,a,s){var u=t[r],c=y(u);if("object"!==c)return new d("Invalid "+a+" `"+s+"` of type `"+c+"` supplied to `"+n+"`, expected `object`.");var l=o({},t[r],e);for(var f in l){var p=e[f];if(!p)return new d("Invalid "+a+" `"+s+"` key `"+f+"` supplied to `"+n+"`.\nBad object: "+JSON.stringify(t[r],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var h=p(u,f,n,a,s+"."+f,i);if(h)return h}return null})}};function d(e){this.message=e,this.stack=""}function p(e){var r={},n=0;function o(o,a,s,c,f,p,h){if(c=c||l,p=p||s,h!==i){if(t){var y=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw y.name="Invariant Violation",y}else if("undefined"!=typeof console){var m=c+":"+s;!r[m]&&n<3&&(u("You are manually calling a React.PropTypes validation function for the `"+p+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),r[m]=!0,n++)}}return null!=a[s]?e(a,s,c,f,p):o?new d(null===a[s]?"The "+f+" `"+p+"` is marked as required in `"+c+"`, but its value is `null`.":"The "+f+" `"+p+"` is marked as required in `"+c+"`, but its value is `undefined`."):null}var a=o.bind(null,!1);return a.isRequired=o.bind(null,!0),a}function h(e){return p(function(t,r,n,o,i,a){var s=t[r];return y(s)!==e?new d("Invalid "+o+" `"+i+"` of type "+("`"+m(s)+"` supplied to `")+n+"`, expected `"+e+"`."):null})}function y(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":"symbol"===t||e&&("Symbol"===e["@@toStringTag"]||"function"==typeof Symbol&&e instanceof Symbol)?"symbol":t}function m(e){if(null==e)return""+e;var t=y(e);if("object"===t){if(e instanceof Date)return"date";else if(e instanceof RegExp)return"regexp"}return t}return d.prototype=Error.prototype,f.checkPropTypes=a,f.resetWarningCache=a.resetWarningCache,f.PropTypes=f,f}},function(e,t,r){"use strict";var n=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=!function(){try{var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==n.join(""))return!1;var o={};if("abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},o)).join(""))return!1;return!0}catch(e){return!1}}()?function(e,t){for(var r,a,s=function(e){if(null==e)throw TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),u=1;u<arguments.length;u++){for(var c in r=Object(arguments[u]))o.call(r,c)&&(s[c]=r[c]);if(n){a=n(r);for(var l=0;l<a.length;l++)i.call(r,a[l])&&(s[a[l]]=r[a[l]])}}return s}:Object.assign},function(e,t,r){"use strict";var n=function(){}
1,o=r(4),i={},a=Function.call.bind(Object.prototype.hasOwnProperty);function s(e,t,r,s,u){for(var c in e)if(a(e,c)){var l;try{if("function"!=typeof e[c]){var f=Error((s||"React class")+": "+r+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[c]+"`.");throw f.name="Invariant Violation",f}l=e[c](t,c,s,r,null,o)}catch(e){l=e}if(!l||l instanceof Error||n((s||"React class")+": type specification of "+r+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof l+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),l instanceof Error&&!(l.message in i)){i[l.message]=!0;var d=u?u():"";n("Failed "+r+" type: "+l.message+(null!=d?d:""))}}}n=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw Error(t)}catch(e){}},s.resetWarningCache=function(){i={}},e.exports=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o=r(0),i=["profile"],a=function(){return new Promise(function(e,t){window.amazon.Login.authorize({scope:i},function(r){return r.error?t((0,o.rslError)({provider:"amazon",type:"auth",description:"Authentication failed",error:r})):s(r).then(e,t)})})},s=function(e){return new Promise(function(t,r){window.amazon.Login.retrieveProfile(e.access_token,function(i){return i.error?r((0,o.rslError)({provider:"amazon",type:"get_profile",description:"Failed to get user profile",error:i})):t(n({},e,i))})})};t.default={checkLogin:a,generateUser:function(e){return{profile:{id:e.profile.CustomerId,name:e.profile.Name,firstName:e.profile.Name,lastName:e.profile.Name,email:e.profile.PrimaryEmail,profilePicURL:void 0},token:{accessToken:e.access_token,expiresAt:(0,o.timestampFromNow)(e.expires_in)}}},load:function(e){var t=e.appId,r=e.scope;return new Promise(function(e){if(document.getElementById("amazon-sdk"))return e();Array.isArray(r)?i=i.concat(r):"string"==typeof r&&r&&(i=i.concat(r.split(","))),i=i.reduce(function(e,t){return"string"==typeof t&&-1===e.indexOf(t)&&e.push(t.trim()),e},[]);var n=document.getElementsByTagName("script")[0],o=document.createElement("script");o.src="https://api-cdn.amazon.com/sdk/login1.js",o.id="amazon-sdk",o.async=!0,window.onAmazonLoginReady=function(){return window.amazon.Login.setClientId(t),e()},n?n.parentNode.appendChild(o):document.appendChild(o)})},login:function(){return new Promise(function(e,t){return a().then(e,t)})},logout:function(){return new Promise(function(e){return window.amazon.Login.logout(),e()})}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o=r(0),i=["public_profile","email"],a=function(e){return new Promise(function(t,r){if(!e.authResponse)return r((0,o.rslError)({provider:"facebook",type:"auth",description:"Authentication failed",error:e}));switch(e.status){case"connected":s().then(function(r){return t(n({},r,e.authResponse))});break;case"not_authorized":case"unknown":return r((0,o.rslError)({provider:"facebook",type:"auth",description:"Authentication has been cancelled or an unknown error occurred",error:e}))}})},s=function(){return new Promise(function(e){window.FB.api("/me","GET",{fields:"email,name,id,first_name,last_name,picture"},e)})};t.default={checkLogin:function(){return new Promise(function(e,t){window.FB.getLoginStatus(function(r){return a(r).then(e,t)})})},generateUser:function(e){return{profile:{id:e.id,name:e.name,firstName:e.first_name,lastName:e.last_name,email:e.email,profilePicURL:e.picture.data.url},token:{accessToken:e.accessToken,expiresAt:(0,o.timestampFromNow)(e.expiresIn)}}},load:function(e){var t=e.appId,r=e.scope,n=e.version;return new Promise(function(e){if(document.getElementById("facebook-jssdk"))return e();Array.isArray(r)?i=i.concat(r):"string"==typeof r&&r&&(i=i.concat(r.split(","))),i=i.reduce(function(e,t){return"string"==typeof t&&-1===e.indexOf(t)&&e.push(t.trim()),e},[]).join(",");var o=document.getElementsByTagName("script")[0],a=document.createElement("script");a.src="https://connect.facebook.net/en_US/sdk.js",a.id="facebook-jssdk",window.fbAsyncInit=function(){return window.FB.init({appId:t,xfbml:!0,version:n||"v5.
10"}),e()},o?o.parentNode.appendChild(a):document.appendChild(a)})},login:function(){return new Promise(function(e,t){window.FB.login(function(r){return a(r).then(e,t)},{scope:i})})},logout:function(){return new Promise(function(e){window.FB.logout(e)})},oldLoad:function(e){var t="fb-client",r=document.getElementsByTagName("script")[0],n=void 0;document.getElementById(t)||((n=document.createElement("script")).id=t,n.src="//connect.facebook.net/en_US/all.js",n.onLoad=function(){window.fbAsyncInit=function(){window.FB.init({appId:e,xfbml:!0,version:"v3.3"})}},r.parentNode.insertBefore(n,r))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=(n=r(18))&&n.__esModule?n:{default:n},i=r(0),a=!1,s=void 0,u=void 0,c=void 0,l=void 0;"undefined"==typeof window||window.fetch||r(1);var f=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?d():!u&&a?Promise.reject((0,i.rslError)({provider:"github",type:"access_token",description:"No access token available",error:null})):new Promise(function(e,t){window.fetch("https://api.github.com/graphql",{method:"POST",headers:new Headers({Authorization:"Bearer "+(u||c)}),body:JSON.stringify({query:"query { viewer { login, name, email, avatarUrl, id } }"})}).then(function(e){return e.json()}).then(function(r){return r.message||r.errors?t((0,i.rslError)({provider:"github",type:"check_login",description:"Failed to fetch user data",error:r})):e(r)}).catch(function(){return t((0,i.rslError)({provider:"github",type:"check_login",description:"Failed to fetch user data due to window.fetch() error",error:null}))})})},d=function(){return new Promise(function(e,t){f().then(function(t){return e(t)}).catch(function(e){if(!a)return t(e);window.open(l,"_self")})})};t.default={checkLogin:f,generateUser:function(e){var t=e.data.viewer;return{profile:{id:t.id,name:t.login,firstName:t.name,lastName:t.name,email:t.email,profilePicURL:t.avatarUrl},token:{accessToken:u||c,expiresAt:1/0}}},load:function(e){var t=e.appId,r=e.gatekeeper,n=e.redirect,f=e.scope;return new Promise(function(e,d){if(!t)return d((0,i.rslError)({provider:"github",type:"load",description:"Cannot load SDK without appId",error:null}));if(c=t,!r)return e();s=r,a=!0;var p=(0,i.parseAsURL)(n),h="rslCallback=github",y=["user"];if(Array.isArray(f)?y=f:"string"==typeof f&&f&&(y=f.split(",")),y=y.reduce(function(e,t){return"string"==typeof t&&-1===e.indexOf(t)&&e.push(t.trim()),e},[]).join("%20"),p.search=p.search?p.search+"&"+h:"?"+h,l="https://github.com/login/oauth/authorize?client_id="+c+"&redirect_uri="+encodeURIComponent(p.toString())+"&scope="+y+"&state="+(0,o.default)(n,o.default.URL),"github"!==(0,i.getQueryStringValue)("rslCallback"))return e();new Promise(function(e,t){var r=(0,i.getQueryStringValue)("code");if(!r)return t(Error("Authorization code not found"));window.fetch(s+"/authenticate/"+r).then(function(e){return e.json()}).then(function(r){return r.error||!r.token?t((0,i.rslError)({provider:"github",type:"access_token",description:"Got error from fetch access token",error:r})):e(r.token)}).catch(function(e){return t((0,i.rslError)({provider:"github",type:"access_token",description:"Failed to fetch user data due to window.fetch() error",error:e}))})}).then(function(t){return e(u=t)}).catch(d)})},login:d,logout:function(){return new Promise(function(e,t){return t((0,i.rslError)({provider:"github",type:"logout",description:"Cannot logout from github provider",error:null}))})}}},function(e,t,r){var n=r(19),o=r(20);function i(e,t,r,i){if("string"==typeof e&&(e=function(e){for(var t=Array((e=unescape(encodeURIComponent(e))).length),r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}(e)),"string"==typeof t&&(a=[],t.replace(/[a-fA-F0-9]{2}/g,function(e){a.push(parseInt(e,16))}),t=a),!Array.isArray(e))throw TypeError("name must be an array of bytes");if(!Array.isArray(t)||16!=t.length)throw TypeError("namespace must be uuid string or an Array of 16 byte values");var a,s=n(t.concat(e));return s[6]=15&s[6]|80,s[8]=63&s[8]|128,r||o(s)}i.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",i.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",e.exports=i},function(e,t,r){"use strict";function n(e,t){return e<<t|e>>>32-t}e.exports=function(e){var t=[0x5a827999,0x6ed9eba1,0x8f1bbcdc,0xca62c1d6],r=[0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0];if("string"==typeof e){var o=unescape(encodeURIComponent(e));e=Array(o.length);for(var i=0;i<o.length;
1i++)e[i]=o.charCodeAt(i)}e.push(128);for(var a=Math.ceil((e.length/4+2)/16),s=Array(a),i=0;i<a;i++){s[i]=Array(16);for(var u=0;u<16;u++)s[i][u]=e[64*i+4*u]<<24|e[64*i+4*u+1]<<16|e[64*i+4*u+2]<<8|e[64*i+4*u+3]}s[a-1][14]=(e.length-1)*8/0x100000000,s[a-1][14]=Math.floor(s[a-1][14]),s[a-1][15]=(e.length-1)*8|0;for(var i=0;i<a;i++){for(var c=Array(80),l=0;l<16;l++)c[l]=s[i][l];for(var l=16;l<80;l++)c[l]=n(c[l-3]^c[l-8]^c[l-14]^c[l-16],1);for(var f=r[0],d=r[1],p=r[2],h=r[3],y=r[4],l=0;l<80;l++){var m=Math.floor(l/20),g=n(f,5)+function(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:case 3:return t^r^n;case 2:return t&r^t&n^r&n}}(m,d,p,h)+y+t[m]+c[l]>>>0;y=h,h=p,p=n(d,30)>>>0,d=f,f=g}r[0]=r[0]+f>>>0,r[1]=r[1]+d>>>0,r[2]=r[2]+p>>>0,r[3]=r[3]+h>>>0,r[4]=r[4]+y>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]}},function(e,t){for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);e.exports=function(e,t){var n=t||0;return r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=function(){return new Promise(function(e,t){var r=window.gapi.auth2.getAuthInstance();return r.isSignedIn.get()?e(r.currentUser.get()):t((0,n.rslError)({provider:"google",type:"check_login",description:"Not authenticated",error:null}))})};t.default={checkLogin:o,generateUser:function(e){var t="",r=e.getBasicProfile(),n=e.getAuthResponse(!0),o=new XMLHttpRequest;return o.open("GET","https://www.googleapis.com/oauth2/v1/userinfo?access_token="+n.access_token,!1),o.send(null),200===o.status&&(t=JSON.parse(o.responseText).gender),{profile:{id:r.getId(),name:r.getName(),firstName:r.getGivenName(),lastName:r.getFamilyName(),email:r.getEmail(),profilePicURL:r.getImageUrl(),gender:t},token:{accessToken:n.access_token,idToken:n.id_token,scope:n.scope,expiresIn:n.expires_in,firstIssued_at:n.first_issued_at,expiresAt:n.expires_at}}},load:function(e){var t=e.appId,r=e.scope;return new Promise(function(e,o){var i=document.getElementsByTagName("script")[0],a=document.createElement("script");a.src="https://apis.google.com/js/api.js",a.id="gapi-client",a.onload=function(){window.gapi.load("auth2",function(){window.gapi.auth2.getAuthInstance()?e():window.gapi.auth2.init({client_id:t,fetchBasicProfile:!0,scope:r?Array.isArray(r)&&r.join(" ")||r:null}).then(function(){return e()},function(e){return o((0,n.rslError)({provider:"google",type:"load",description:"Failed to load SDK",error:e}))})})},i?i.parentNode.appendChild(a):document.appendChild(a)})},login:function(){return new Promise(function(e,t){window.gapi.auth2.getAuthInstance().sign
1In().then(function(){return o().then(e,t)},function(e){return t((0,n.rslError)({provider:"google",type:"auth",description:"Authentication failed",error:e}))})})},logout:function(){return new Promise(function(e,t){window.gapi.auth2.getAuthInstance().signOut().then(e,t)})},oldLoad:function(e,t,r,n){var o=document.createElement("script");o.src="https://apis.google.com/js/api.js",o.id="gapi-client",o.onload=function(){window.gapi.load("auth2",function(){window.gapi.auth2.getAuthInstance()||window.gapi.auth2.init({client_id:e}),window.gapi.auth2.getAuthInstance().attachClickHandler(t,{},r,n)})},0===document.getElementsByTagName("script").length?document.appendChild(o):document.getElementsByTagName("script")[0].parentNode.appendChild(o)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=(n=r(23))&&n.__esModule?n:{default:n},i=r(0),a=void 0,s=void 0,u=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?c():s?new Promise(function(e,t){(0,o.default)("https://api.instagram.com/v1/users/self/?access_token="+s).then(function(e){return e.json()}).then(function(r){return 200!==r.meta.code?t((0,i.rslError)({provider:"instagram",type:"check_login",description:"Failed to fetch user data",error:r.meta})):e({data:r.data,accessToken:s})}).catch(function(e){return t({fetchErr:!0,err:(0,i.rslError)({provider:"instagram",type:"check_login",description:"Failed to fetch user data due to fetch error",error:e})})})}):Promise.reject((0,i.rslError)({provider:"instagram",type:"access_token",description:"No access token available",error:null}))},c=function(){return new Promise(function(e,t){u().then(function(t){return e(t)}).catch(function(e){if(e.fetchErr)return t(e.err);window.open(a,"_self")})})};t.default={checkLogin:u,generateUser:function(e){return{profile:{id:e.data.id,name:e.data.full_name,firstName:e.data.full_name,lastName:e.data.full_name,email:void 0,profilePicURL:e.data.profile_picture},token:{accessToken:e.accessToken,expiresAt:1/0}}},load:function(e){var t=e.appId,r=e.redirect,n=e.scope;return new Promise(function(e,o){var u=(0,i.parseAsURL)(r),c="rslCallback=instagram",l=["user_profile"];if(Array.isArray(n)?l=l.concat(n):"string"==typeof n&&n&&(l=l.concat(n.split(","))),l=l.reduce(function(e,t){return"string"==typeof t&&-1===e.indexOf(t)&&e.push(t.trim()),e},[]).join("+"),u.search=u.search?u.search+"&"+c:"?"+c,a="https://api.instagram.com/oauth/authorize/?client_id="+t+"&scope="+l+"&redirect_uri="+encodeURIComponent(u.toString())+"&response_type=code","instagram"===(0,i.getQueryStringValue)("rslCallback"))if((0,i.getQueryStringValue)("error"))return o((0,i.rslError)({provider:"instagram",type:"auth",description:"Authentication failed",error:{error_reason:(0,i.getQueryStringValue)("error_reason"),error_description:(0,i.getQueryStringValue)("error_description")}}));else s=(0,i.getHashValue)("access_token");return e(s)})},login:c,logout:function(){return new Promise(function(e){return s=void 0,e()})}}},function(e,t,r){var n,o,i;i=function(e,t){"use strict";function r(e){try{delete window[e]}catch(t){window[e]=void 0}}function n(e){var t=document.getElementById(e);t&&document.getElementsByTagName("head")[0].removeChild(t)}t.exports=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],o=e,i=t.timeout||5e3,a=t.jsonpCallback||"callback",s=void 0;return new Promise(function(u,c){var l=t.jsonpCallbackFunction||"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random()),f=a+"_"+l;window[l]=function(e){u({ok:!0,json:function(){return Promise.resolve(e)}}),s&&clearTimeout(s),n(f),r(l)},o+=-1===o.indexOf("?")?"?":"&";var d=document.createElement("script");d.setAttribute("src",""+o+a+"="+l),t.charset&&d.setAttribute("charset",t.charset),d.id=f,document.getElementsByTagName("head")[0].appendChild(d),s=setTimeout(function(){c(Error("JSONP request to "+e+" timed out")),r(l),n(f),window[l]=function(){r(l)}},i),d.onerror=function(){c(Error("JSONP request to "+e+" failed")),r(l),n(f),s&&clearTimeout(s)}})}},n=[t,e],void 0===(o=i.apply(t,n))||(e.exports=o)},function(e,t,r){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=function(){return new Promise(function(e,t){return window.IN.User.isAuthorized()?i().then(e,t):t((0,n.rslError)({provider:"linkedin",type:"check_login",description:"Not authenticated",error:null}))})},i=function(){return new Promise(function(e,t){window.IN.API.Profile("me").fields(["id","firstName","lastName","pictureUrl","publicProfileUrl","emailAddress"]).result(e).error(function(e){return t((0,n.rslError)({provider:"linkedin",type:"get_profile",description:"Failed to get user profile",error:e}))})})};t.default={checkLogin:o,generateUser:function(e){return{profile:{id:window.IN.ENV.auth.member_id,name:e.values[0].firstName+" "+e.values[0].lastName,firstName:e.values[0].firstName,lastName:e.values[0].lastName,email:e.values[0].emailAddress,publicProfileURL:e.values[0].publicProfileUrl,profilePicURL:e.values[0].pictureUrl},token:{accessToken:window.IN.ENV.auth.oauth_token,expiresAt:(0,n.timestampFromNow)(window.IN.ENV.auth.oauth_expires_in)}}},load:function(e){var t=e.appId;return new Promise(function(e){if(document.getElementById("linkedin-client"))return e();var r=document.getElementsByTagName("script")[0],n=document.createElement("script");n.src="//platform.linkedin.com/in.js?async=true",n.id="linkedin-client",n.onload=function(){return window.IN.init({api_key:t}),e()},r?r.parentNode.appendChild(n):document.appendChild(n)})},login:function(){return new Promise(function(e,t){window.IN.User.authorize(function(){return o().then(i).then(e).catch(t)})})},logout:function(){return new Promise(function(e){window.IN.User.logout(e)})},oldLoad:function(e){var t="li-client",r=document.getElementsByTagName("script")[0],n=void 0;document.getElementById(t)||((n=document.createElement("script")).id=t,n.src="//platform.linkedin.com/in.js?async=true",n.onload=function(){window.IN.init({api_key:e,authorize:!0})},r.parentNode.insertBefore(n,r))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={providers:["amazon","facebook","github","google","instagram","linkedin"]}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=!1;return{promise:new Promise(function(r,n){e.then(function(e){return t?n(Error({isCanceled:!0})):r(e)}),e.catch(function(e){return t?n(Error({isCanceled:!0})):n(e)})}),cancel:function(){t=!0}}}}],r={};function n(e){if(r[e])return r[e].exports;var o=r[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=r,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=8)}(e.r(271645))},202591,e=>{"use strict";var t,r=e.i(843476);e.i(72180);var n=e.i(483014),o=e.i(647163);function i({className:e="fill-black"}){return(0,r.jsx)("svg",{className:(0,o.cn)("",e),viewBox:"0 0 21 21",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M10.2485 5.82324C11.3149 5.82324 12.2505 5.39191 13.055 4.52924C13.8596 3.66656 14.262 2.66343 14.262 1.51983C14.262 1.39423 14.2524 1.21574 14.2332 0.984375C14.0927 1.00421 13.9874 1.02073 13.9171 1.03395C12.9337 1.17939 12.0685 1.67848 11.3213 2.53122C10.5742 3.38398 10.2007 4.29623 10.2007 5.26798C10.2007 5.38033 10.2166 5.56545 10.2485 5.82324ZM14.0704 20.9844C14.8303 20.9844 15.67 20.4456 16.5895 19.3681C17.5091 18.2906 18.2115 17.0247 18.6968 15.5704C16.8897 14.6053 15.9861 13.2204 15.9861 11.4157C15.9861 9.90852 16.7172 8.61949 18.1796 7.54859C17.1643 6.23309 15.8233 5.57534 14.1566 5.57534C13.4542 5.57534 12.8124 5.68442 12.2313 5.90256L11.8673 6.04139L11.3788 6.2397C11.0595 6.3653 10.769 6.42812 10.5072 6.42812C10.3028 6.42812 10.0346 6.35539 9.70257 6.20995L9.32899 6.0513L8.9746 5.90256C8.45735 5.67781 7.9018 5.56543 7.30794 5.56543C5.71789 5.56543 4.44076 6.12071 3.47651 7.23128C2.51227 8.34183 2.03015 9.80606 2.03015 11.6239C2.03015 14.1822 2.80281 16.5455 4.34816 18.7137C
15.42096 20.2275 6.40117 20.9844 7.28877 20.9844C7.66554 20.9844 8.03909 20.9084 8.40946 20.7563L8.87881 20.558L9.25239 20.4192C9.77601 20.2275 10.2581 20.1316 10.6987 20.1316C11.1649 20.1316 11.7013 20.2539 12.3079 20.4985L12.6049 20.6175C13.2243 20.8621 13.7128 20.9844 14.0704 20.9844Z"})})}var a=e.i(654637),s=((t=s||{}).facebook="facebook",t.google="google",t.apple="apple",t.form="form",t),u=e.i(846696),c=e.i(759421),l=e.i(533622),f=e.i(406876);e.i(646012);var d=e.i(950239);let p=e=>{try{let t=(0,d.getAnalytics)(f.app);(0,d.setUserId)(t,e)}catch(e){console.log(e)}};var h=e.i(810936),y=e.i(217255),m=e.i(948148),g=e.i(618566),v=e.i(271645),b=e.i(915209),w=e.i(930928),k=e.i(558425),_=e.i(480280);let P=({locale:e,APPLECLIENTID:t,setIsSendLogin:o,setIsOpen:f,isRoute:d,isWidget:P=!1,isLoginToken:O=!1})=>{let E=(0,g.useRouter)(),{data:I,update:S}=(0,y.useSession)(),{setStep:x}=(0,w.widgetReservationStore)(),j=(0,m.useTranslations)("form");(0,v.useEffect)(()=>{if(I?.user){let{user:e}=I;(0,l.default)(a.default.login,{AnalyticsParameterMethod:s.apple,collaboratorId:e.id,email:e.email,fullName:`${e.firstName} ${e.lastName}`}),p(`${e.id}`),o&&o(!0),f&&f(!1),d&&E.push("/dashboard")}},[I]);let L=async t=>{if(O)try{let r={token:t.authorization.code},n=new k.Repository(e),o=await n.collaborators.appleLogin(r);(0,_.setToken)(o.token),u.toast.success(j("success.text_1")),E.refresh(),x(5)}catch(e){u.toast.error((0,c.messageError)(e,j))}else try{let r=await (0,y.signIn)("apple",{token:t.authorization.code,locale:e,redirect:!1});r?.status===200?(u.toast.success(j("success.text_1")),P?(E.refresh(),x(5)):await S()):u.toast.error(j("error.text_1"),{description:"error"})}catch(e){u.toast.error((0,c.messageError)(e,j),{description:"error"})}};return(0,r.jsx)(b.default,{authOptions:{clientId:t,scope:"email name",redirectURI:h.REDIRECT_URI_APPLE,usePopup:!0},uiType:"dark",onSuccess:e=>L(e),onError:e=>{console.log(e)},render:e=>(0,r.jsx)(n.ButtonSocialMedia,{...e,icon:i})})};var O=e.i(2430),E=v,I=e.i(556720);class S extends E.default.Component{render(){let{children:e,triggerLogin:t,...n}=this.props;return(0,r.jsx)("button",{onClick:t,...n,children:e})}}let x=(0,I.default)(S);function j({locale:e,FACEBOOK_APP_ID:t,setIsSendLogin:o,setIsOpen:i,isRoute:f,isWidget:d=!1,isLoginToken:h=!1}){let b=(0,g.useRouter)(),{data:P,update:E}=(0,y.useSession)(),{setStep:I}=(0,w.widgetReservationStore)(),S=(0,m.useTranslations)("form");(0,v.useEffect)(()=>{if(P?.user){let{user:e}=P;(0,l.default)(a.default.login,{AnalyticsParameterMethod:s.facebook,collaboratorId:e.id,email:e.email,fullName:`${e.firstName} ${e.lastName}`}),p(`${e.id}`),o&&o(!0),i&&i(!1),f&&b.push("/dashboard")}},[P]);let j=async t=>{if(h)try{let r={token:t._token.accessToken},n=new k.Repository(e),o=await n.collaborators.facebookLogin(r);(0,_.setToken)(o.token),u.toast.success(S("success.text_1")),b.refresh(),I(5)}catch(e){u.toast.error((0,c.messageError)(e,S))}else try{let r=await (0,y.signIn)("facebook",{token:t._token.accessToken,locale:e,redirect:!1});r?.status===200?(u.toast.success(S("success.text_1")),d?(b.refresh(),I(5)):await E()):u.toast.error(S("error.text_1"),{description:"error"})}catch(e){u.toast.error((0,c.messageError)(e,S))}};return(0,r.jsx)(x,{provider:"facebook",appId:t,onLoginSuccess:j,onLoginFailure:e=>{console.log(e)},children:(0,r.jsx)(n.ComponentSocialMedia,{icon:O.default})})}function L({className:e="fill-black"}){return(0,r.jsx)("svg",{className:(0,o.cn)("",e),viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.6842 9.19714H11.1029V12.9905H16.0424C15.5819 15.4004 13.6564 16.7839 11.1029 16.7839C8.08887 16.7839 5.66098 14.1955 5.66098 10.9822C5.66098 7.76901 8.08887 5.1806 11.1029 5.1806C12.4006 5.1806 13.5726 5.67154 14.4936 6.47485L17.1727 3.61859C15.5401 2.10126 13.447 1.16406 11.1029 1.16406C5.99589 1.16406 1.89355 5.53766 1.89355 10.9822C1.89355 16.4268 5.99589 20.8004 11.1029 20.8004C15.7075 20.8004 19.8936 17.2301 19.8936 10.9822C19.8936 10.4021 19.8098 9.77728 19.6842 9.19714Z"})})}function C({locale:e,GOOGLE_APP_ID:t,setIsSendLogin:o,setIsOpen:i,isRoute:f,isWidget:d=!1,isLoginToken:h=!1}){let b=(0,g.useRouter)(),{data:P,update:O}=(0,y.useSession)(),{setStep:E}=(0,w.widgetReservationStore)(),I=(0,m.useTranslations)("form");(0,v.useEffect)(()=>
1{if(P?.user){let{user:e}=P;(0,l.default)(a.default.login,{AnalyticsParameterMethod:s.google,collaboratorId:e.id,email:e.email,fullName:`${e.firstName} ${e.lastName}`}),p(`${e.id}`),o&&o(!0),i&&i(!1),f&&b.push("/dashboard")}},[P]);let S=async t=>{if(h)try{let r={token:t._token.accessToken},n=new k.Repository(e),o=await n.collaborators.googleLogin(r);(0,_.setToken)(o.token),u.toast.success(I("success.text_1")),b.refresh(),E(5)}catch(e){u.toast.error((0,c.messageError)(e,I))}else try{let r=await (0,y.signIn)("google",{token:t._token.accessToken,locale:e,redirect:!1});r?.status===200?(u.toast.success(I("success.text_1"),{description:"success"}),d?(b.refresh(),E(5)):await O()):u.toast.error(I("error.text_1"),{description:"error"})}catch(e){u.toast.error((0,c.messageError)(e,I),{description:"error"})}};return(0,r.jsx)(x,{provider:"google",appId:t,onLoginSuccess:S,onLoginFailure:e=>{console.error(e)},children:(0,r.jsx)(n.ComponentSocialMedia,{icon:L})})}function A({locale:e,FACEBOOK_APP_ID:t,APPLECLIENTID:n,GOOGLE_APP_ID:o,setIsSendLogin:i,setIsOpen:a,isRoute:s=!1,isWidget:u=!1,isLoginToken:c=!1}){return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(y.SessionProvider,{children:[(0,r.jsx)(j,{locale:e,FACEBOOK_APP_ID:t,setIsSendLogin:i,setIsOpen:a,isRoute:s,isWidget:u,isLoginToken:c}),(0,r.jsx)(P,{locale:e,APPLECLIENTID:n,setIsSendLogin:i,setIsOpen:a,isRoute:s,isWidget:u,isLoginToken:c}),(0,r.jsx)(C,{locale:e,GOOGLE_APP_ID:o,setIsSendLogin:i,setIsOpen:a,isRoute:s,isWidget:u,isLoginToken:c})]})})}e.s(["default",()=>A],202591)}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.