UNPKG

@campnetwork/sdk

Version:
758 lines (730 loc) 144 kB
'use client'; import React, { createContext, useState, useContext, useLayoutEffect, useEffect, useRef, useSyncExternalStore } from 'react'; import { Auth } from '../core.esm'; import { WagmiContext, useAccount, useConnectorClient } from 'wagmi'; import 'axios'; import 'viem'; import 'viem/accounts'; import 'viem/siwe'; import { EthereumProvider } from '@walletconnect/ethereum-provider'; import { createPortal } from 'react-dom'; import { useQuery } from '@tanstack/react-query'; const ModalContext = createContext({ isButtonDisabled: false, setIsButtonDisabled: () => { }, isVisible: false, setIsVisible: () => { }, isLinkingVisible: false, setIsLinkingVisible: () => { }, currentlyLinking: null, setCurrentlyLinking: () => { }, }); const ModalProvider = ({ children }) => { const [isVisible, setIsVisible] = useState(false); const [isLinkingVisible, setIsLinkingVisible] = useState(false); const [currentlyLinking, setCurrentlyLinking] = useState(null); const [isButtonDisabled, setIsButtonDisabled] = useState(false); return (React.createElement(ModalContext.Provider, { value: { isButtonDisabled, setIsButtonDisabled, isVisible, setIsVisible, isLinkingVisible, setIsLinkingVisible, currentlyLinking, setCurrentlyLinking, } }, children)); }; /****************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */ function __rest(s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; } function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); } typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { var e = new Error(message); return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; }; const formatAddress = (address, n = 8) => { return `${address.slice(0, n)}...${address.slice(-n)}`; }; const capitalize = (str) => { return str.charAt(0).toUpperCase() + str.slice(1); }; const testnet = { id: 325000, name: "Camp Network Testnet V2", nativeCurrency: { decimals: 18, name: "Ether", symbol: "ETH", }, rpcUrls: { default: { http: ["https://rpc-campnetwork.xyz"], }, }, blockExplorers: { default: { name: "Explorer", url: "https://camp-network-testnet.blockscout.com", }, }, }; var constants = { SIWE_MESSAGE_STATEMENT: "Connect with Camp Network", AUTH_HUB_BASE_API: "https://wv2h4to5qa.execute-api.us-east-2.amazonaws.com/dev", AVAILABLE_SOCIALS: ["twitter", "discord", "spotify", "tiktok", "telegram"], ACKEE_INSTANCE: "https://ackee-production-01bd.up.railway.app", ACKEE_EVENTS: { USER_CONNECTED: "ed42542d-b676-4112-b6d9-6db98048b2e0", USER_DISCONNECTED: "20af31ac-e602-442e-9e0e-b589f4dd4016", TWITTER_LINKED: "7fbea086-90ef-4679-ba69-f47f9255b34c", DISCORD_LINKED: "d73f5ae3-a8e8-48f2-8532-85e0c7780d6a", SPOTIFY_LINKED: "fc1788b4-c984-42c8-96f4-c87f6bb0b8f7", TIKTOK_LINKED: "4a2ffdd3-f0e9-4784-8b49-ff76ec1c0a6a", TELEGRAM_LINKED: "9006bc5d-bcc9-4d01-a860-4f1a201e8e47", }, }; let providers = []; const providerStore = { value: () => providers, subscribe: (callback) => { function onAnnouncement(event) { if (providers.some((p) => p.info.uuid === event.detail.info.uuid)) return; providers = [...providers, event.detail]; callback(providers); } if (typeof window === "undefined") return; window.addEventListener("eip6963:announceProvider", onAnnouncement); window.dispatchEvent(new Event("eip6963:requestProvider")); return () => window.removeEventListener("eip6963:announceProvider", onAnnouncement); }, }; /** The MIT License (MIT) Copyright (c) Tobias Reich Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ const isBrowser = typeof window !== "undefined"; const navigator = isBrowser ? window === null || window === void 0 ? void 0 : window.navigator : { userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3", language: "en", languages: [], platform: "", vendor: "", maxTouchPoints: 0, hardwareConcurrency: 0, deviceMemory: 0, }; const location = isBrowser ? window === null || window === void 0 ? void 0 : window.location : { href: "", protocol: "", host: "", hostname: "", port: "", pathname: "", search: "", hash: "", }; /** * Validates options and sets defaults for undefined properties. * @param {?Object} opts * @returns {Object} opts - Validated options. */ const validate = function (opts = {}) { // Create new object to avoid changes by reference const _opts = {}; // Defaults to false _opts.detailed = opts.detailed === true; // Defaults to true _opts.ignoreLocalhost = opts.ignoreLocalhost !== false; // Defaults to true _opts.ignoreOwnVisits = opts.ignoreOwnVisits !== false; return _opts; }; /** * Determines if a host is a localhost. * @param {String} hostname - Hostname that should be tested. * @returns {Boolean} isLocalhost */ const isLocalhost = function (hostname) { return (hostname === "" || hostname === "localhost" || hostname === "127.0.0.1" || hostname === "::1"); }; /** * Determines if user agent is a bot. Approach is to get most bots, assuming other bots don't run JS. * Source: https://stackoverflow.com/questions/20084513/detect-search-crawlers-via-javascript/20084661 * @param {String} userAgent - User agent that should be tested. * @returns {Boolean} isBot */ const isBot = function (userAgent) { return /bot|crawler|spider|crawling/i.test(userAgent); }; /** * Checks if an id is a fake id. This is the case when Ackee ignores you because of the `ackee_ignore` cookie. * @param {String} id - Id that should be tested. * @returns {Boolean} isFakeId */ const isFakeId = function (id) { return id === "88888888-8888-8888-8888-888888888888"; }; /** * Checks if the website is in background (e.g. user has minimzed or switched tabs). * @returns {boolean} */ const isInBackground = function () { return document.visibilityState === "hidden"; }; /** * Get the optional source parameter. * @returns {String} source */ const source = function () { const source = (location.search.split(`source=`)[1] || "").split("&")[0]; return source === "" ? undefined : source; }; /** * Gathers all platform-, screen- and user-related information. * @param {Boolean} detailed - Include personal data. * @returns {Object} attributes - User-related information. */ const attributes = function (detailed = false) { var _a; const defaultData = { siteLocation: (_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.href, siteReferrer: document.referrer, source: source(), }; const detailedData = { siteLanguage: navigator ? ((navigator === null || navigator === void 0 ? void 0 : navigator.language) || (navigator === null || navigator === void 0 ? void 0 : navigator.language) || "").substr(0, 2) : "", screenWidth: screen.width, screenHeight: screen.height, screenColorDepth: screen.colorDepth, browserWidth: window === null || window === void 0 ? void 0 : window.outerWidth, browserHeight: window === null || window === void 0 ? void 0 : window.outerHeight, }; return Object.assign(Object.assign({}, defaultData), (detailed === true ? detailedData : {})); }; /** * Creates an object with a query and variables property to create a record on the server. * @param {String} domainId - Id of the domain. * @param {Object} input - Data that should be transferred to the server. * @returns {Object} Create record body. */ const createRecordBody = function (domainId, input) { return { query: ` mutation createRecord($domainId: ID!, $input: CreateRecordInput!) { createRecord(domainId: $domainId, input: $input) { payload { id } } } `, variables: { domainId, input, }, }; }; /** * Creates an object with a query and variables property to update a record on the server. * @param {String} recordId - Id of the record. * @returns {Object} Update record body. */ const updateRecordBody = function (recordId) { return { query: ` mutation updateRecord($recordId: ID!) { updateRecord(id: $recordId) { success } } `, variables: { recordId, }, }; }; /** * Creates an object with a query and variables property to create an action on the server. * @param {String} eventId - Id of the event. * @param {Object} input - Data that should be transferred to the server. * @returns {Object} Create action body. */ const createActionBody = function (eventId, input) { return { query: ` mutation createAction($eventId: ID!, $input: CreateActionInput!) { createAction(eventId: $eventId, input: $input) { payload { id } } } `, variables: { eventId, input, }, }; }; /** * Creates an object with a query and variables property to update an action on the server. * @param {String} actionId - Id of the action. * @param {Object} input - Data that should be transferred to the server. * @returns {Object} Update action body. */ const updateActionBody = function (actionId, input) { return { query: ` mutation updateAction($actionId: ID!, $input: UpdateActionInput!) { updateAction(id: $actionId, input: $input) { success } } `, variables: { actionId, input, }, }; }; /** * Construct URL to the GraphQL endpoint of Ackee. * @param {String} server - URL of the Ackee server. * @returns {String} endpoint - URL to the GraphQL endpoint of the Ackee server. */ const endpoint = function (server) { const hasTrailingSlash = server.substr(-1) === "/"; return server + (hasTrailingSlash === true ? "" : "/") + "api"; }; /** * Sends a request to a specified URL. * Won't catch all errors as some are already logged by the browser. * In this case the callback won't fire. * @param {String} url - URL to the GraphQL endpoint of the Ackee server. * @param {Object} body - JSON which will be send to the server. * @param {Object} opts - Options. * @param {?Function} next - The callback that handles the response. Receives the following properties: json. */ const send = function (url, body, opts, next) { const xhr = new XMLHttpRequest(); xhr.open("POST", url); xhr.onload = () => { if (xhr.status !== 200) { throw new Error("Server returned with an unhandled status"); } let json = null; try { json = JSON.parse(xhr.responseText); } catch (e) { throw new Error("Failed to parse response from server"); } if (json.errors != null) { throw new Error(json.errors[0].message); } if (typeof next === "function") { return next(json); } }; xhr.setRequestHeader("Content-Type", "application/json;charset=UTF-8"); // xhr.withCredentials = opts.ignoreOwnVisits ?? false; xhr.withCredentials = false; xhr.send(JSON.stringify(body)); }; /** * Looks for an element with Ackee attributes and executes Ackee with the given attributes. * Fails silently. */ const detect = function () { const elem = document.querySelector("[data-ackee-domain-id]"); if (elem == null) return; const server = elem.getAttribute("data-ackee-server") || ""; const domainId = elem.getAttribute("data-ackee-domain-id") || ""; const opts = elem.getAttribute("data-ackee-opts") || "{}"; create(server, JSON.parse(opts)).record(domainId); }; /** * Creates a new instance. * @param {String} server - URL of the Ackee server. * @param {?Object} opts * @returns {Object} instance */ const create = function (server, opts) { opts = validate(opts); const url = endpoint(server); const noop = () => { }; // Fake instance when Ackee ignores you const fakeInstance = { record: () => ({ stop: noop }), updateRecord: () => ({ stop: noop }), action: noop, updateAction: noop, }; if (opts.ignoreLocalhost === true && isLocalhost(location.hostname) === true && isBrowser === true) { // console.warn("Ackee ignores you because you are on localhost"); return fakeInstance; } if (isBot(navigator ? navigator.userAgent : "") === true) { // console.warn("Ackee ignores you because you are a bot"); return fakeInstance; } // Creates a new record on the server and updates the record // very x seconds to track the duration of the visit. Tries to use // the default attributes when there're no custom attributes defined. const _record = (domainId, attrs = attributes(opts.detailed), next) => { // Function to stop updating the record let isStopped = false; const stop = () => { isStopped = true; }; send(url, createRecordBody(domainId, attrs), opts, (json) => { const recordId = json.data.createRecord.payload.id; if (isFakeId(recordId) === true) { // return console.warn("Ackee ignores you because this is your own site"); return; } const interval = setInterval(() => { if (isStopped === true) { clearInterval(interval); return; } if (isInBackground() === true) return; send(url, updateRecordBody(recordId), opts); }, 15000); if (typeof next === "function") { return next(recordId); } }); return { stop }; }; // Updates a record very x seconds to track the duration of the visit const _updateRecord = (recordId) => { // Function to stop updating the record let isStopped = false; const stop = () => { isStopped = true; }; if (isFakeId(recordId) === true) { // console.warn("Ackee ignores you because this is your own site"); return { stop }; } const interval = setInterval(() => { if (isStopped === true) { clearInterval(interval); return; } if (isInBackground() === true) return; send(url, updateRecordBody(recordId)); }, 15000); return { stop }; }; // Creates a new action on the server const _action = (eventId, attrs, next) => { send(url, createActionBody(eventId, attrs), opts, (json) => { const actionId = json.data.createAction.payload.id; if (isFakeId(actionId) === true) { // return console.warn("Ackee ignores you because this is your own site"); return; } if (typeof next === "function") { return next(actionId); } }); }; // Updates an action const _updateAction = (actionId, attrs) => { if (isFakeId(actionId) === true) { // return console.warn("Ackee ignores you because this is your own site"); return; } send(url, updateActionBody(actionId, attrs)); }; // Return the real instance return { record: _record, updateRecord: _updateRecord, action: _action, updateAction: _updateAction, }; }; // Only run Ackee automatically when executed in a browser environment if (isBrowser === true) { detect(); } const SocialsContext = createContext({ query: null, }); const SocialsProvider = ({ children }) => { const { authenticated } = useAuthState(); const { auth } = useContext(CampContext); if (!auth) { throw new Error("Auth instance is not available"); } const query = useQuery({ queryKey: ["socials", authenticated], queryFn: () => auth.getLinkedSocials(), }); return (React.createElement(SocialsContext.Provider, { value: { query, } }, children)); }; function styleInject(css, ref) { if ( ref === void 0 ) ref = {}; var insertAt = ref.insertAt; if (!css || typeof document === 'undefined') { return; } var head = document.head || document.getElementsByTagName('head')[0]; var style = document.createElement('style'); style.type = 'text/css'; if (insertAt === 'top') { if (head.firstChild) { head.insertBefore(style, head.firstChild); } else { head.appendChild(style); } } else { head.appendChild(style); } if (style.styleSheet) { style.styleSheet.cssText = css; } else { style.appendChild(document.createTextNode(css)); } } var css_248z$2 = ".toasts-module_toast-container__Bhoiq{bottom:10px;display:flex;flex-direction:column-reverse;gap:10px;position:fixed;right:10px;z-index:1000}.toasts-module_toast__C-fnX{word-wrap:break-word;border-radius:5px;box-shadow:0 2px 10px rgba(0,0,0,.1);color:#fff;cursor:pointer;font-size:14px;max-width:300px;opacity:.9;padding:10px 20px;position:relative}.toasts-module_toast-info__ho5FH{background-color:#007bff}.toasts-module_toast-warning__KTUFG{background-color:#cc4e02}.toasts-module_toast-error__-y03G{background-color:#dc3545}.toasts-module_toast-success__qgwDJ{background-color:#28a745}.toasts-module_toast-enter__Gduwi{animation:toasts-module_toast-in__uFYoe .3s forwards}.toasts-module_toast-exit__obsng{animation:toasts-module_toast-out__-c3s6 .3s forwards}@keyframes toasts-module_toast-in__uFYoe{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@keyframes toasts-module_toast-out__-c3s6{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(20px)}}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRvYXN0cy5tb2R1bGUuY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLHNDQUVFLFdBQVksQ0FHWixZQUFhLENBQ2IsNkJBQThCLENBQzlCLFFBQVMsQ0FOVCxjQUFlLENBRWYsVUFBVyxDQUNYLFlBSUYsQ0FFQSw0QkFVRSxvQkFBcUIsQ0FSckIsaUJBQWtCLENBR2xCLG9DQUF5QyxDQUZ6QyxVQUFXLENBSVgsY0FBZSxDQUhmLGNBQWUsQ0FLZixlQUFnQixDQUhoQixVQUFZLENBTFosaUJBQWtCLENBT2xCLGlCQUdGLENBRUEsaUNBQ0Usd0JBQ0YsQ0FFQSxvQ0FDRSx3QkFDRixDQUVBLGtDQUNFLHdCQUNGLENBRUEsb0NBQ0Usd0JBQ0YsQ0FFQSxrQ0FDRSxvREFDRixDQUVBLGlDQUNFLHFEQUNGLENBRUEseUNBQ0UsR0FDRSxTQUFVLENBQ1YsMEJBQ0YsQ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yOiAjMjhhNzQ1O1xyXG59XHJcblxyXG4udG9hc3QtZW50ZXIge1xyXG4gIGFuaW1hdGlvbjogdG9hc3QtaW4gMC4zcyBmb3J3YXJkcztcclxufVxyXG5cclxuLnRvYXN0LWV4aXQge1xyXG4gIGFuaW1hdGlvbjogdG9hc3Qtb3V0IDAuM3MgZm9yd2FyZHM7XHJcbn1cclxuXHJcbkBrZXlmcmFtZXMgdG9hc3QtaW4ge1xyXG4gIGZyb20ge1xyXG4gICAgb3BhY2l0eTogMDtcclxuICAgIHRyYW5zZm9ybTogdHJhbnNsYXRlWSgyMHB4KTtcclxuICB9XHJcbiAgdG8ge1xyXG4gICAgb3BhY2l0eTogMTtcclxuICAgIHRyYW5zZm9ybTogdHJhbnNsYXRlWSgwKTtcclxuICB9XHJcbn1cclxuXHJcbkBrZXlmcmFtZXMgdG9hc3Qtb3V0IHtcclxuICBmcm9tIHtcclxuICAgIG9wYWNpdHk6IDE7XHJcbiAgICB0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoMCk7XHJcbiAgfVxyXG4gIHRvIHtcclxuICAgIG9wYWNpdHk6IDA7XHJcbiAgICB0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoMjBweCk7XHJcbiAgfVxyXG59XHJcbiJdfQ== */"; var styles$1 = {"toast-container":"toasts-module_toast-container__Bhoiq","toast":"toasts-module_toast__C-fnX","toast-info":"toasts-module_toast-info__ho5FH","toast-warning":"toasts-module_toast-warning__KTUFG","toast-error":"toasts-module_toast-error__-y03G","toast-success":"toasts-module_toast-success__qgwDJ","toast-enter":"toasts-module_toast-enter__Gduwi","toast-in":"toasts-module_toast-in__uFYoe","toast-exit":"toasts-module_toast-exit__obsng","toast-out":"toasts-module_toast-out__-c3s6"}; styleInject(css_248z$2); /** * Creates a wrapper element and appends it to the body. * @param { string } wrapperId The wrapper ID. * @returns { HTMLElement } The wrapper element. */ const createWrapperAndAppendToBody = (wrapperId) => { const wrapperElement = document.createElement("div"); wrapperElement.setAttribute("id", wrapperId); document.body.appendChild(wrapperElement); return wrapperElement; }; /** * The ReactPortal component. Renders children in a portal. * @param { { children: JSX.Element, wrapperId: string } } props The props. * @returns { JSX.Element } The ReactPortal component. */ const ReactPortal = ({ children, wrapperId = "react-portal-wrapper", }) => { const [wrapperElement, setWrapperElement] = useState(null); useLayoutEffect(() => { let element = document.getElementById(wrapperId); let systemCreated = false; if (!element) { systemCreated = true; element = createWrapperAndAppendToBody(wrapperId); } setWrapperElement(element); return () => { if (systemCreated && (element === null || element === void 0 ? void 0 : element.parentNode)) { element.parentNode.removeChild(element); } }; }, [wrapperId]); if (wrapperElement === null) return null; return createPortal(children, wrapperElement); }; /** * The ClientOnly component. Renders children only on the client. Needed for Next.js. * @param { { children: JSX.Element } } props The props. * @returns { JSX.Element } The ClientOnly component. */ const ClientOnly = (_a) => { var { children } = _a, delegated = __rest(_a, ["children"]); const [hasMounted, setHasMounted] = useState(false); useEffect(() => { setHasMounted(true); }, []); if (!hasMounted) { return null; } return React.createElement("div", Object.assign({}, delegated), children); }; const getIconByConnectorName = (name) => { switch (name) { case "AppKit Auth": return "data:image/svg+xml,%3Csvg width='56' height='56' viewBox='0 0 56 56' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='56' height='56' rx='16.3333' fill='%23FF573B'/%3E%3Cpath d='M11.6667 33.8333H44.3334V38.5C44.3334 39.7886 43.2501 40.8333 41.9137 40.8333H14.0865C12.7501 40.8333 11.6667 39.7886 11.6667 38.5V33.8333Z' fill='%23202020'/%3E%3Cpath d='M11.6667 24.5H44.3334V31.5H11.6667V24.5Z' fill='%23202020'/%3E%3Cpath d='M11.6667 17.5C11.6667 16.2113 12.7501 15.1666 14.0865 15.1666H41.9137C43.2501 15.1666 44.3334 16.2113 44.3334 17.5V22.1666H11.6667V17.5Z' fill='%23202020'/%3E%3C/svg%3E"; case "Privy Wallet": return "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='-25 -25 410 514' fill='none' id='svg-669804622_503'%3E%3Cpath d='M180 359.794C279.396 359.794 360 279.236 360 179.897C360 80.5579 279.396 0 180 0C80.604 0 0 80.5579 0 179.897C0 279.236 80.604 359.794 180 359.794Z' fill='%23010110'/%3E%3Cpath d='M180 463.997C247.932 463.997 303.012 452.411 303.012 438.2C303.012 423.988 247.968 412.402 180 412.402C112.032 412.402 56.9883 423.988 56.9883 438.2C56.9883 452.411 112.032 463.997 180 463.997Z' fill='%23010110'/%3E%3C/svg%3E"; default: if (name.toLowerCase().includes("privy")) { return "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='-25 -25 410 514' fill='none' id='svg-669804622_503'%3E%3Cpath d='M180 359.794C279.396 359.794 360 279.236 360 179.897C360 80.5579 279.396 0 180 0C80.604 0 0 80.5579 0 179.897C0 279.236 80.604 359.794 180 359.794Z' fill='%23010110'/%3E%3Cpath d='M180 463.997C247.932 463.997 303.012 452.411 303.012 438.2C303.012 423.988 247.968 412.402 180 412.402C112.032 412.402 56.9883 423.988 56.9883 438.2C56.9883 452.411 112.032 463.997 180 463.997Z' fill='%23010110'/%3E%3C/svg%3E"; } else if (name.toLowerCase().includes("appkit")) { return "data:image/svg+xml,%3Csvg width='56' height='56' viewBox='0 0 56 56' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='56' height='56' rx='16.3333' fill='%23FF573B'/%3E%3Cpath d='M11.6667 33.8333H44.3334V38.5C44.3334 39.7886 43.2501 40.8333 41.9137 40.8333H14.0865C12.7501 40.8333 11.6667 39.7886 11.6667 38.5V33.8333Z' fill='%23202020'/%3E%3Cpath d='M11.6667 24.5H44.3334V31.5H11.6667V24.5Z' fill='%23202020'/%3E%3Cpath d='M11.6667 17.5C11.6667 16.2113 12.7501 15.1666 14.0865 15.1666H41.9137C43.2501 15.1666 44.3334 16.2113 44.3334 17.5V22.1666H11.6667V17.5Z' fill='%23202020'/%3E%3C/svg%3E"; } else return ""; } }; const ToastContext = React.createContext(undefined); const ToastProvider = ({ children }) => { const [toasts, setToasts] = useState([]); const timers = useRef({}); const remainingTimes = useRef({}); const startTimes = useRef({}); const isHovering = useRef(false); const addToast = (message, type = "info", duration = 3000) => { const id = Date.now(); setToasts((prevToasts) => [ ...prevToasts, { id, message, type, isVisible: true }, ]); remainingTimes.current[id] = duration; startTimes.current[id] = Date.now(); timers.current[id] = setTimeout(() => removeToast(id), duration); }; const removeToast = (id) => { setToasts((prevToasts) => prevToasts.map((toast) => toast.id === id ? Object.assign(Object.assign({}, toast), { isVisible: false }) : toast)); setTimeout(() => { setToasts((prevToasts) => prevToasts.filter((toast) => toast.id !== id)); delete timers.current[id]; delete remainingTimes.current[id]; delete startTimes.current[id]; }, 300); }; const handleMouseEnter = () => { isHovering.current = true; Object.keys(timers.current).forEach((id) => { clearTimeout(timers.current[Number(id)]); remainingTimes.current[Number(id)] -= Date.now() - startTimes.current[Number(id)]; }); }; const handleMouseLeave = () => { isHovering.current = false; Object.keys(remainingTimes.current).forEach((id) => { if (remainingTimes.current[Number(id)] > 0) { startTimes.current[Number(id)] = Date.now(); timers.current[Number(id)] = setTimeout(() => removeToast(Number(id)), remainingTimes.current[Number(id)]); } }); }; return (React.createElement(ToastContext.Provider, { value: { addToast } }, children, React.createElement(ReactPortal, { wrapperId: "toast-wrapper" }, React.createElement("div", { className: styles$1["toast-container"], onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave }, toasts.map((toast) => (React.createElement("div", { key: toast.id, className: `${styles$1.toast} ${styles$1[`toast-${toast.type}`]} ${toast.isVisible ? styles$1["toast-enter"] : styles$1["toast-exit"]}`, onClick: () => removeToast(toast.id) }, toast.message))))))); }; const useToast = () => { const context = React.useContext(ToastContext); if (context === undefined) { throw new Error("useToast must be used within a ToastProvider"); } return context; }; const CampContext = createContext({ clientId: null, auth: null, setAuth: () => { }, wagmiAvailable: false, ackee: null, setAckee: () => { }, }); /** * CampProvider * @param {Object} props The props * @param {string} props.clientId The Camp client ID * @param {string} props.redirectUri The redirect URI to use after social oauths * @param {React.ReactNode} props.children The children components * @param {boolean} props.allowAnalytics Whether to allow analytics to be sent * @returns {JSX.Element} The CampProvider component */ const CampProvider = ({ clientId, redirectUri, children, allowAnalytics = true, }) => { const isServer = typeof window === "undefined"; const ackeeInstance = allowAnalytics && !isServer ? create(constants.ACKEE_INSTANCE, { detailed: false, ignoreLocalhost: true, ignoreOwnVisits: false, }) : null; const [ackee, setAckee] = useState(ackeeInstance); const [auth, setAuth] = useState(new Auth({ clientId, redirectUri: redirectUri ? redirectUri : !isServer ? window.location.href : "", ackeeInstance, })); const wagmiContext = useContext(WagmiContext); return (React.createElement(CampContext.Provider, { value: { clientId, auth, setAuth, wagmiAvailable: wagmiContext !== undefined, ackee, setAckee, } }, React.createElement(SocialsProvider, null, React.createElement(ToastProvider, null, React.createElement(ModalProvider, null, children))))); }; var css_248z$1 = "@import url(\"https://api.fontshare.com/v2/css?f[]=satoshi@1&display=swap\");.auth-module_modal__yyg5L{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background-color:#000;background-color:rgba(0,0,0,.4);height:100%;left:0;overflow:auto;position:fixed;top:0;transition:all .3s;width:100%;z-index:85}.auth-module_modal__yyg5L .auth-module_container__7utns{align-items:center;background-color:#fefefe;border:1px solid #888;border-radius:1.5rem;box-sizing:border-box;display:flex;flex-direction:column;font-family:Satoshi,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;justify-content:center;left:50%;padding:1.5rem 1.5rem 1rem;position:absolute;top:50%;transform:translate(-50%,-50%);width:300px;@media screen and (max-width:440px){border-bottom-left-radius:0;border-bottom-right-radius:0;bottom:0;top:auto;transform:translate(-50%);width:100%}}.auth-module_container__7utns h2{font-size:1.25rem;margin-bottom:1rem;margin-top:0}.auth-module_container__7utns .auth-module_header__pX9nM{align-items:center;color:#333;display:flex;flex-direction:column;font-size:1.2rem;font-weight:700;justify-content:center;margin-bottom:1rem;text-align:center;width:100%}.auth-module_container__7utns .auth-module_header__pX9nM .auth-module_small-modal-icon__YayD1{height:2rem;margin-bottom:.5rem;margin-top:.5rem;width:2rem}.auth-module_container__7utns .auth-module_header__pX9nM .auth-module_wallet-address__AVVA5{color:#777;font-size:.75rem;font-weight:400;margin-top:.5rem}.auth-module_container__7utns .auth-module_close-button__uZrho{background-color:#fff;border:2px solid #ddd;border-radius:100%;color:#aaa;font-size:1.5rem;height:1.25rem;position:absolute;right:1rem;top:1rem;transition:color .15s;width:1.25rem}.auth-module_close-button__uZrho>.auth-module_close-icon__SSCni{display:block;height:1rem;padding:.15rem;position:relative;width:1rem}.auth-module_container__7utns .auth-module_close-button__uZrho:hover{background-color:#ddd;color:#888;cursor:pointer}.auth-module_container__7utns .auth-module_linking-text__uz3ud{color:#777;font-size:1rem;text-align:center}.auth-module_provider-list__6vISy{box-sizing:border-box;display:flex;flex-direction:column;gap:.5rem;margin-bottom:.75rem;max-height:17.9rem;overflow-y:auto;padding-left:.5rem;padding-right:.5rem;scrollbar-color:#ccc #f1f1f1;scrollbar-width:thin;width:100%}.auth-module_provider-list__6vISy.auth-module_big__jQxvN{max-height:16rem}.auth-module_provider-list__6vISy::-webkit-scrollbar{border-radius:.25rem;width:.5rem}.auth-module_provider-list__6vISy::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.25rem}.auth-module_provider-list__6vISy::-webkit-scrollbar-track{background-color:#f1f1f1;border-radius:.25rem}.auth-module_spinner__hfzlH:after{animation:auth-module_spin__tm9l6 1s linear infinite;border:.25rem solid #f3f3f3;border-radius:50%;border-top-color:#ff6f00;content:\"\";display:block;height:1rem;width:1rem}.auth-module_spinner__hfzlH{align-self:center;display:flex;justify-content:center;margin-left:auto;margin-right:.25rem}@keyframes auth-module_spin__tm9l6{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.auth-module_modal-icon__CV7ah{align-items:center;display:flex;height:4rem;justify-content:center;margin-bottom:.25rem;margin-top:.5rem;padding:.35rem;width:4rem}.auth-module_modal-icon__CV7ah svg{height:3.6rem;width:3.6rem}.auth-module_container__7utns a.auth-module_footer-text__CQnh6{color:#bbb;font-size:.75rem;text-decoration:none}.auth-module_container__7utns a.auth-module_footer-text__CQnh6:hover{text-decoration:underline}.auth-module_disconnect-button__bsu-3{background-color:#ff6f00;border:none;border-radius:.75rem;box-shadow:inset 0 2px 0 hsla(0,0%,100%,.15),inset 0 -2px 4px rgba(0,0,0,.05),0 1px 1px rgba(46,54,80,.075);color:#fff;font-size:1rem;height:2.5rem;margin-bottom:.75rem;margin-top:1rem;padding:1rem;padding-block:0;width:100%}.auth-module_disconnect-button__bsu-3:hover{background-color:#cc4e02;cursor:pointer}.auth-module_disconnect-button__bsu-3:disabled{background-color:#ccc;cursor:not-allowed}.auth-module_linking-button__g1GlL{background-color:#ff6f00;border:none;border-radius:.75rem;box-shadow:inset 0 2px 0 hsla(0,0%,100%,.15),inset 0 -2px 4px rgba(0,0,0,.05),0 1px 1px rgba(46,54,80,.075);color:#fff;font-size:1rem;height:2.5rem;margin-bottom:.75rem;margin-top:1rem;padding:1rem;padding-block:0;width:100%}.auth-module_linking-button__g1GlL:hover{background-color:#cc4e02;cursor:pointer}.auth-module_linking-button__g1GlL:disabled{background-color:#ccc;cursor:not-allowed}.auth-module_socials-wrapper__PshV3{display:flex;flex-direction:column;gap:1rem;margin-block:.5rem;width:100%}.auth-module_socials-container__iDzfJ{display:flex;flex-direction:column;gap:.5rem;width:100%}.auth-module_socials-container__iDzfJ .auth-module_connector-container__4wn11{align-items:center;display:flex;gap:.25rem;justify-content:flex-start;position:relative}.auth-module_socials-container__iDzfJ .auth-module_connector-button__j79HA{align-items:center;background-color:#fefefe;border:1px solid #ddd;border-radius:.75rem;color:#333;display:flex;font-size:.875rem;gap:.25rem;height:2.5rem;padding:.75rem;position:relative;width:100%}.auth-module_socials-container__iDzfJ .auth-module_connector-button__j79HA:hover{background-color:#ddd;cursor:pointer}.auth-module_socials-container__iDzfJ .auth-module_connector-button__j79HA:disabled{background-color:#fefefe;cursor:default}.auth-module_socials-container__iDzfJ .auth-module_connector-button__j79HA svg{color:#333;height:1.5rem;margin-right:.5rem;width:1.5rem}.auth-module_socials-container__iDzfJ .auth-module_connector-connected__JvDQb{align-items:center;background-color:#eee;border:1px solid #ddd;border-radius:.25rem;color:#333;display:flex;flex:1;font-size:.875rem;gap:.25rem;padding:.5rem .75rem;position:relative;width:100%}.auth-module_socials-container__iDzfJ .auth-module_connector-connected__JvDQb svg{color:#333;height:1.5rem;margin-right:.5rem;width:1.5rem}.auth-module_socials-container__iDzfJ h3{color:#333;margin:0}.auth-module_connector-button__j79HA .auth-module_connector-checkmark__ZS6zU{height:1rem!important;position:absolute;right:-.5rem;top:-.5rem;width:1rem!important}.auth-module_unlink-connector-button__6Fwkp{align-items:center;background-color:#999;border:none;border-radius:.5rem;box-shadow:inset 0 2px 0 hsla(0,0%,100%,.15),inset 0 -2px 4px rgba(0,0,0,.05),0 1px 1px rgba(46,54,80,.075);color:#fff;display:flex;font-size:.75rem;gap:.25rem;padding:.25rem .675rem .25rem .5rem;position:absolute;right:.375rem;text-align:center;transition:background-color .15s}.auth-module_unlink-connector-button__6Fwkp svg{stroke:#fff!important;height:.875rem!important;margin-right:0!important;width:.875rem!important}.auth-module_unlink-connector-button__6Fwkp:hover{background-color:#888;cursor:pointer}.auth-module_unlink-connector-button__6Fwkp:disabled{background-color:#ccc;cursor:not-allowed}@keyframes auth-module_loader__gH3ZC{0%{transform:translateX(0)}50%{transform:translateX(100%)}to{transform:translateX(0)}}.auth-module_loader__gH3ZC{background-color:#ddd;border-radius:.125rem;height:.4rem;margin-bottom:.5rem;margin-top:.5rem;position:relative;width:4rem}.auth-module_loader__gH3ZC:before{animation:auth-module_loader__gH3ZC 1.5s ease-in-out infinite;background-color:#ff6f00;border-radius:.125rem;content:\"\";display:block;height:.4rem;left:0;position:absolute;width:2rem}.auth-module_no-socials__wEx0t{color:#777;font-size:.875rem;margin-top:.5rem;text-align:center}.auth-module_divider__z65Me{align-items:center;display:flex;gap:.5rem;margin-bottom:.5rem;margin-top:.5rem}.auth-module_divider__z65Me:after,.auth-module_divider__z65Me:before{border-bottom:1px solid #ddd;content:\"\";flex:1}input.auth-module_tiktok-input__FeqdG{border:1px solid gray;border-radius:.75rem;color:#000;font-family:Satoshi,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;font-size:1rem;font-weight:600;height:2.75rem;line-height:1.333rem;margin-top:1rem;padding-inline:1rem;width:100%}input.auth-module_tiktok-input__FeqdG.auth-module_invalid__qqgK6{border-color:#dc3545;outline-color:#dc3545}.auth-module_otp-input-container__B2NH6{display:flex;gap:.5rem;justify-content:center;margin-top:1rem}.auth-module_otp-input__vjImt{border:1px solid #ccc;border-radius:.5rem;font-size:1.5rem;height:2.5rem;outline:none;text-align:center;transition:border-color .2s;width:2rem}.auth-module_otp-input__vjImt:focus{border-color:#ff6f00}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImF1dGgubW9kdWxlLmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSwwRUFBMEUsQ0FFMUUsMEJBVUUsaUNBQTBCLENBQTFCLHlCQUEwQixDQUYxQixxQkFBOEIsQ0FDOUIsK0JBQW9DLENBSHBDLFdBQVksQ0FIWixNQUFPLENBSVAsYUFBYyxDQU5kLGNBQWUsQ0FHZixLQUFNLENBT04sa0JBQW9CLENBTnBCLFVBQVcsQ0FIWCxVQVVGLENBRUEsd0RBY0Usa0JBQW1CLENBWm5CLHdCQUF5QixDQUd6QixxQkFBc0IsQ0FFdEIsb0JBQXFCLENBTnJCLHFCQUFzQixDQVV0QixZQUFhLENBQ2IscUJBQXNCLENBSnRCLDBJQUVZLENBR1osc0JBQXVCLENBSXZCLFFBQVMsQ0FiVCwwQkFBb0IsQ0FXcEIsaUJBQWtC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