1import { 2 t 3} from "./chunk-36T4QO4H.js"; 4import { 5 n 6} from "./chunk-YCYYQRQ6.js"; 7import { 8 x 9} from "./chunk-PO34BIG7.js"; 10import "./chunk-NZGFA6TT.js"; 11import "./chunk-7XAQQ7SI.js"; 12import "./chunk-VQYZO3XL.js"; 13import "./chunk-Z6KXXKZH.js"; 14import "./chunk-MV3ZEJD7.js"; 15import "./chunk-SHLKPWHJ.js"; 16import "./chunk-5I6QSZAY.js"; 17import "./chunk-ARTDLMGJ.js"; 18import "./chunk-XKUWNRAU.js"; 19import "./chunk-BI6FLLBF.js"; 20import { 21 e 22} from "./chunk-DELSWSYH.js"; 23import { 24 I, 25 M2 as M, 26 P2 as P, 27 dt, 28 le, 29 require_lib 30} from "./chunk-GW6OWVAS.js"; 31import { 32 require_jsx_runtime 33} from "./chunk-V3VQYMUU.js"; 34import "./chunk-F7LOI2M5.js"; 35import "./chunk-FUATFXFK.js"; 36import "./chunk-DRQXJS52.js"; 37import "./chunk-EKGTQN7B.js"; 38import "./chunk-57LJOLTQ.js"; 39import "./chunk-QOAWOBZZ.js"; 40import "./chunk-CXC3RFJP.js"; 41import "./chunk-LOYGATPO.js"; 42import "./chunk-MWZBDUVS.js"; 43import "./chunk-IVTAVDWF.js"; 44import { 45 require_react 46} from "./chunk-2TKNTQO7.js"; 47import { 48 __toESM, 49 init_buffer_shim 50} from "./chunk-DMHST2WB.js"; 51 52// ../node_modules/@privy-io/react-auth/dist/esm/EmbeddedWalletKeyExportScreen-BlAL_BUV.mjs 53init_buffer_shim(); 54var import_jsx_runtime = __toESM(require_jsx_runtime(), 1); 55var import_react = __toESM(require_react(), 1); 56var import_react_device_detect = __toESM(require_lib(), 1); 57var y = ({ address: o2, accessToken: i2, appConfigTheme: n3, onClose: a, isLoading: l = false, exportButtonProps: s }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(n, { title: "Export wallet", subtitle: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: ["Copy either your private key or seed phrase to export your wallet.", " ", /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { href: "https://privy-io.notion.site/Transferring-your-account-9dab9e16c6034a7ab1ff7fa479b02828", target: "blank", rel: "noopener noreferrer", children: "Learn more" })] }), onClose: a, watermark: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(f, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(t, { theme: n3, children: "Never share your private key or seed phrase with anyone." }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(x, { title: "Your wallet", address: o2, showCopyButton: true }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { width: "100%" }, children: l ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(g, {}) : i2 && s && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(w, { accessToken: i2, dimensions: { height: "44px" }, ...s }) })] }) }); 58var f = /* @__PURE__ */ dt.div.withConfig({ displayName: "ContentContainer", componentId: "sc-b9fde557-0" })(["display:flex;flex-direction:column;gap:1.25rem;text-align:left;"]); 59var g = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(v, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(x2, { children: "Loading..." }) }); 60var v = /* @__PURE__ */ dt.div.withConfig({ displayName: "PlaceholderContainer", componentId: "sc-b9fde557-1" })(["display:flex;gap:12px;height:44px;"]); 61var x2 = /* @__PURE__ */ dt.div.withConfig({ displayName: "PlaceholderButton", componentId: "sc-b9fde557-2" })(["display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:16px;font-weight:500;border-radius:var(--privy-border-radius-md);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-3);"]); 62function w(r2) { 63 let [a, d] = (0, import_react.useState)(r2.dimensions.width), [c, s] = (0, import_react.useState)(void 0), p = (0, import_react.useRef)(null); 64 (0, import_react.useEffect)((() => { 65 if (p.current && void 0 === a) { 66 let { width: e4 } = p.current.getBoundingClientRect(); 67 d(e4); 68 } 69 let e3 = getComputedStyle(document.documentElement); 70 s({ background: e3.getPropertyValue("--privy-color-background"), background2: e3.getPropertyValue("--privy-color-background-2"), foreground3: e3.getPropertyValue("--privy-color-foreground-3"), foregroundAccent: e3.getPropertyValue("--privy-color-foreground-accent"), accent: e3.getPropertyValue("--privy-color-accent"), accentDark: e3.getPropertyValue("--privy-color-accent-dark"), success: e3.getPropertyValue("--privy-color-success"), colorScheme: e3.getPropertyValue("color-scheme") }); 71 }), []); 72 let m = "ethereum" === r2.chainType && !r2.imported && !r2.isUnifiedWallet; 73 return (0, import_jsx_runtime.jsx)("div", { ref: p, children: a && /* @__P
73URE__ */ (0, import_jsx_runtime.jsxs)(b, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("iframe", { style: { position: "absolute", zIndex: 1 }, width: a, height: r2.dimensions.height, allow: "clipboard-write self *", src: e({ origin: r2.origin, path: `/apps/${r2.appId}/embedded-wallets/export`, query: r2.isUnifiedWallet ? { v: "1-unified", wallet_id: r2.walletId, client_id: r2.appClientId, width: `${a}px`, caid: r2.clientAnalyticsId, phrase_export: m, ...c } : { v: "1", entropy_id: r2.entropyId, entropy_id_verifier: r2.entropyIdVerifier, hd_wallet_index: r2.hdWalletIndex, chain_type: r2.chainType, client_id: r2.appClientId, width: `${a}px`, caid: r2.clientAnalyticsId, phrase_export: m, ...c }, hash: { token: r2.accessToken } }) }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(C, { children: "Loading..." }), m && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(C, { children: "Loading..." })] }) }); 74} 75var I2 = { component: () => { 76 let [t3, r2] = (0, import_react.useState)(null), { authenticated: n3, user: a } = M(), { closePrivyModal: l, createAnalyticsEvent: d, clientAnalyticsId: c, client: h } = I(), f2 = le(), { data: g2, onUserCloseViaDialogOrKeybindRef: v2 } = P(), { onFailure: x3, onSuccess: w2, origin: I3, appId: b2, appClientId: C2, entropyId: k, entropyIdVerifier: j, walletId: _, hdWalletIndex: A, chainType: P2, address: T, isUnifiedWallet: V, imported: W } = g2.keyExport, B = (e3) => { 77 l({ shouldCallAuthOnSuccess: false }), x3("string" == typeof e3 ? Error(e3) : e3); 78 }, L = () => { 79 l({ shouldCallAuthOnSuccess: false }), w2(), d({ eventName: "embedded_wallet_key_export_completed", payload: { walletAddress: T } }); 80 }; 81 return (0, import_react.useEffect)((() => { 82 if (!n3) return B("User must be authenticated before exporting their wallet"); 83 h.getAccessToken().then(r2).catch(B); 84 }), [n3, a]), v2.current = L, /* @__PURE__ */ (0, import_jsx_runtime.jsx)(y, { address: T, accessToken: t3, appConfigTheme: f2.appearance.palette.colorScheme, onClose: L, isLoading: !t3, exportButtonProps: t3 ? { origin: I3, appId: b2, appClientId: C2, clientAnalyticsId: c, entropyId: k, entropyIdVerifier: j, walletId: _, hdWalletIndex: A, isUnifiedWallet: V, imported: W, chainType: P2 } : void 0 }); 85} }; 86var b = /* @__PURE__ */ dt.div.withConfig({ displayName: "ButtonContainer", componentId: "sc-b9fde557-3" })(["overflow:visible;position:relative;overflow:none;height:44px;display:flex;gap:12px;"]); 87var C = /* @__PURE__ */ dt.div.withConfig({ displayName: "LoadingButton", componentId: "sc-b9fde557-4" })(["display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:16px;font-weight:500;border-radius:var(--privy-border-radius-md);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-3);"]); 88export { 89 I2 as EmbeddedWalletKeyExportScreen, 90 y as EmbeddedWalletKeyExportView, 91 I2 as default 92}; 93//# sourceMappingURL=EmbeddedWalletKeyExportScreen-BlAL_BUV-FTKOH4JE.js.map
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.