@reown/appkit-cdn 1.8.15-viem-upgrade.0 → 1.8.15-viem-upgrade-2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ConstantsUtil-DSO-aT76.js +24 -0
- package/dist/ConstantsUtil-DSO-aT76.js.map +1 -0
- package/dist/ExchangeController-D7JbbTDN.js +265 -0
- package/dist/ExchangeController-D7JbbTDN.js.map +1 -0
- package/dist/HelpersUtil-BfwO5f4J.js +141 -0
- package/dist/HelpersUtil-BfwO5f4J.js.map +1 -0
- package/dist/NavigationUtil-Ci15WS4K.js +9 -0
- package/dist/NavigationUtil-Ci15WS4K.js.map +1 -0
- package/dist/PhArrowCircleDown-B41iUlWV.js +74 -0
- package/dist/PhArrowCircleDown-B41iUlWV.js.map +1 -0
- package/dist/PhArrowClockwise-BY8u5n41.js +74 -0
- package/dist/PhArrowClockwise-BY8u5n41.js.map +1 -0
- package/dist/PhArrowDown-ClD8GZ65.js +74 -0
- package/dist/PhArrowDown-ClD8GZ65.js.map +1 -0
- package/dist/PhArrowLeft-B8MXUz60.js +74 -0
- package/dist/PhArrowLeft-B8MXUz60.js.map +1 -0
- package/dist/PhArrowRight-Cewa_Slb.js +74 -0
- package/dist/PhArrowRight-Cewa_Slb.js.map +1 -0
- package/dist/PhArrowSquareOut-whgWh-lD.js +74 -0
- package/dist/PhArrowSquareOut-whgWh-lD.js.map +1 -0
- package/dist/PhArrowUp-B1HXBxie.js +74 -0
- package/dist/PhArrowUp-B1HXBxie.js.map +1 -0
- package/dist/PhArrowUpRight-CfFYe4FP.js +74 -0
- package/dist/PhArrowUpRight-CfFYe4FP.js.map +1 -0
- package/dist/PhArrowsClockwise-gL1Gkrtx.js +74 -0
- package/dist/PhArrowsClockwise-gL1Gkrtx.js.map +1 -0
- package/dist/PhArrowsDownUp-BqUEdUQr.js +74 -0
- package/dist/PhArrowsDownUp-BqUEdUQr.js.map +1 -0
- package/dist/PhArrowsLeftRight-BlZU63eY.js +74 -0
- package/dist/PhArrowsLeftRight-BlZU63eY.js.map +1 -0
- package/dist/PhBank-gbg_jlI7.js +74 -0
- package/dist/PhBank-gbg_jlI7.js.map +1 -0
- package/dist/PhBrowser-CMlD-YJw.js +74 -0
- package/dist/PhBrowser-CMlD-YJw.js.map +1 -0
- package/dist/PhCaretDown-3agTO8Jp.js +74 -0
- package/dist/PhCaretDown-3agTO8Jp.js.map +1 -0
- package/dist/PhCaretLeft-_MTni7Z5.js +74 -0
- package/dist/PhCaretLeft-_MTni7Z5.js.map +1 -0
- package/dist/PhCaretRight-Ci9fAHPG.js +74 -0
- package/dist/PhCaretRight-Ci9fAHPG.js.map +1 -0
- package/dist/PhCaretUp-vFG4Fame.js +74 -0
- package/dist/PhCaretUp-vFG4Fame.js.map +1 -0
- package/dist/PhCheck-mChGK6K_.js +74 -0
- package/dist/PhCheck-mChGK6K_.js.map +1 -0
- package/dist/PhCircleHalf-DZ7-vfxf.js +74 -0
- package/dist/PhCircleHalf-DZ7-vfxf.js.map +1 -0
- package/dist/PhClock-Bc5XWXb6.js +74 -0
- package/dist/PhClock-Bc5XWXb6.js.map +1 -0
- package/dist/PhCompass-Cu2MB-55.js +74 -0
- package/dist/PhCompass-Cu2MB-55.js.map +1 -0
- package/dist/PhCopy-BGUjyTts.js +74 -0
- package/dist/PhCopy-BGUjyTts.js.map +1 -0
- package/dist/PhCreditCard-vxFWID4B.js +74 -0
- package/dist/PhCreditCard-vxFWID4B.js.map +1 -0
- package/dist/PhCurrencyDollar-BfOoDhJr.js +74 -0
- package/dist/PhCurrencyDollar-BfOoDhJr.js.map +1 -0
- package/dist/PhDesktop-Cq6jwzbS.js +74 -0
- package/dist/PhDesktop-Cq6jwzbS.js.map +1 -0
- package/dist/PhDeviceMobile-BCtTp6jj.js +74 -0
- package/dist/PhDeviceMobile-BCtTp6jj.js.map +1 -0
- package/dist/PhDotsThree-BGgD-WIO.js +74 -0
- package/dist/PhDotsThree-BGgD-WIO.js.map +1 -0
- package/dist/PhEnvelope-CQiV0-zG.js +74 -0
- package/dist/PhEnvelope-CQiV0-zG.js.map +1 -0
- package/dist/PhFunnelSimple-BHGtxTNf.js +74 -0
- package/dist/PhFunnelSimple-BHGtxTNf.js.map +1 -0
- package/dist/PhGlobe-Q8oVkf6X.js +74 -0
- package/dist/PhGlobe-Q8oVkf6X.js.map +1 -0
- package/dist/PhIdentificationCard-Cz9LzvVR.js +74 -0
- package/dist/PhIdentificationCard-Cz9LzvVR.js.map +1 -0
- package/dist/PhImage-CP5_qKk-.js +74 -0
- package/dist/PhImage-CP5_qKk-.js.map +1 -0
- package/dist/PhInfo-CTlE1X9Z.js +74 -0
- package/dist/PhInfo-CTlE1X9Z.js.map +1 -0
- package/dist/PhLightbulb-CcLpnAAb.js +74 -0
- package/dist/PhLightbulb-CcLpnAAb.js.map +1 -0
- package/dist/PhMagnifyingGlass-n58GUAck.js +74 -0
- package/dist/PhMagnifyingGlass-n58GUAck.js.map +1 -0
- package/dist/PhPaperPlaneRight-C0sf2XV8.js +74 -0
- package/dist/PhPaperPlaneRight-C0sf2XV8.js.map +1 -0
- package/dist/PhPlus-BJxvt7Uc.js +74 -0
- package/dist/PhPlus-BJxvt7Uc.js.map +1 -0
- package/dist/PhPower-BvktxO2-.js +74 -0
- package/dist/PhPower-BvktxO2-.js.map +1 -0
- package/dist/PhPuzzlePiece-CDDyUPYo.js +74 -0
- package/dist/PhPuzzlePiece-CDDyUPYo.js.map +1 -0
- package/dist/PhQrCode-BlGI8529.js +74 -0
- package/dist/PhQrCode-BlGI8529.js.map +1 -0
- package/dist/PhQuestion-DGZj6iDZ.js +74 -0
- package/dist/PhQuestion-DGZj6iDZ.js.map +1 -0
- package/dist/PhQuestionMark-CTmeI7MQ.js +74 -0
- package/dist/PhQuestionMark-CTmeI7MQ.js.map +1 -0
- package/dist/PhSealCheck-BSlqkxnH.js +74 -0
- package/dist/PhSealCheck-BSlqkxnH.js.map +1 -0
- package/dist/PhSignOut-CEXxlRk3.js +74 -0
- package/dist/PhSignOut-CEXxlRk3.js.map +1 -0
- package/dist/PhSpinner-Do1pY8fG.js +74 -0
- package/dist/PhSpinner-Do1pY8fG.js.map +1 -0
- package/dist/PhTrash-JNKavmpg.js +74 -0
- package/dist/PhTrash-JNKavmpg.js.map +1 -0
- package/dist/PhUser-BW7E-xYg.js +74 -0
- package/dist/PhUser-BW7E-xYg.js.map +1 -0
- package/dist/PhVault-mzxUgBYN.js +74 -0
- package/dist/PhVault-mzxUgBYN.js.map +1 -0
- package/dist/PhWallet-BR9JThKU.js +74 -0
- package/dist/PhWallet-BR9JThKU.js.map +1 -0
- package/dist/PhWarning-DxuQ70WM.js +74 -0
- package/dist/PhWarning-DxuQ70WM.js.map +1 -0
- package/dist/PhWarningCircle-DCI0JC1F.js +74 -0
- package/dist/PhWarningCircle-DCI0JC1F.js.map +1 -0
- package/dist/PhX-CWNXqpGn.js +74 -0
- package/dist/PhX-CWNXqpGn.js.map +1 -0
- package/dist/SwapController-B9-o3mQi.js +684 -0
- package/dist/SwapController-B9-o3mQi.js.map +1 -0
- package/dist/WebCryptoP256-C3tULCeM.js +3306 -0
- package/dist/WebCryptoP256-C3tULCeM.js.map +1 -0
- package/dist/add-D30MIcu9.js +20 -0
- package/dist/add-D30MIcu9.js.map +1 -0
- package/dist/all-wallets-C80If_mR.js +11 -0
- package/dist/all-wallets-C80If_mR.js.map +1 -0
- package/dist/app-store-BmykKf9Z.js +22 -0
- package/dist/app-store-BmykKf9Z.js.map +1 -0
- package/dist/appkit-8yrMZRW-.js +122304 -0
- package/dist/appkit-8yrMZRW-.js.map +1 -0
- package/dist/appkit.js +11 -0
- package/dist/appkit.js.map +1 -0
- package/dist/apple-Dj3k73U9.js +23 -0
- package/dist/apple-Dj3k73U9.js.map +1 -0
- package/dist/arrow-bottom-circle-BChVBNAj.js +16 -0
- package/dist/arrow-bottom-circle-BChVBNAj.js.map +1 -0
- package/dist/arrow-bottom-yR02zZ81.js +13 -0
- package/dist/arrow-bottom-yR02zZ81.js.map +1 -0
- package/dist/arrow-left-Cee83VTx.js +13 -0
- package/dist/arrow-left-Cee83VTx.js.map +1 -0
- package/dist/arrow-right-DQ18mteW.js +13 -0
- package/dist/arrow-right-DQ18mteW.js.map +1 -0
- package/dist/arrow-top-B6s5gNau.js +13 -0
- package/dist/arrow-top-B6s5gNau.js.map +1 -0
- package/dist/async-directive-CMZZt7_p.js +73 -0
- package/dist/async-directive-CMZZt7_p.js.map +1 -0
- package/dist/bank-CbtVBu5E.js +19 -0
- package/dist/bank-CbtVBu5E.js.map +1 -0
- package/dist/basic-DgeOYTPN.js +4914 -0
- package/dist/basic-DgeOYTPN.js.map +1 -0
- package/dist/browser-5XoTmr4n.js +1991 -0
- package/dist/browser-5XoTmr4n.js.map +1 -0
- package/dist/browser-DKlNidhn.js +19 -0
- package/dist/browser-DKlNidhn.js.map +1 -0
- package/dist/card-SMLX2mqy.js +19 -0
- package/dist/card-SMLX2mqy.js.map +1 -0
- package/dist/ccip-CelHgeHp.js +164 -0
- package/dist/ccip-CelHgeHp.js.map +1 -0
- package/dist/checkmark-BFaipJhW.js +16 -0
- package/dist/checkmark-BFaipJhW.js.map +1 -0
- package/dist/checkmark-bold-Bo-g2gCt.js +13 -0
- package/dist/checkmark-bold-Bo-g2gCt.js.map +1 -0
- package/dist/chevron-bottom-CLdpL1_U.js +13 -0
- package/dist/chevron-bottom-CLdpL1_U.js.map +1 -0
- package/dist/chevron-left-BMatzLVm.js +13 -0
- package/dist/chevron-left-BMatzLVm.js.map +1 -0
- package/dist/chevron-right-2QBn-njW.js +13 -0
- package/dist/chevron-right-2QBn-njW.js.map +1 -0
- package/dist/chevron-top-3JfkBBnK.js +13 -0
- package/dist/chevron-top-3JfkBBnK.js.map +1 -0
- package/dist/chrome-store-zmrzd-ux.js +66 -0
- package/dist/chrome-store-zmrzd-ux.js.map +1 -0
- package/dist/class-map-k3nlzPqR.js +101 -0
- package/dist/class-map-k3nlzPqR.js.map +1 -0
- package/dist/clock-CwBvHRGi.js +13 -0
- package/dist/clock-CwBvHRGi.js.map +1 -0
- package/dist/close-DGwKhnz2.js +13 -0
- package/dist/close-DGwKhnz2.js.map +1 -0
- package/dist/clsx.m-D57qXwfE.js +21 -0
- package/dist/clsx.m-D57qXwfE.js.map +1 -0
- package/dist/coinPlaceholder-Bjl3yxih.js +13 -0
- package/dist/coinPlaceholder-Bjl3yxih.js.map +1 -0
- package/dist/compass-Ci53Xt_m.js +13 -0
- package/dist/compass-Ci53Xt_m.js.map +1 -0
- package/dist/copy-DEV1V6UY.js +20 -0
- package/dist/copy-DEV1V6UY.js.map +1 -0
- package/dist/core-C57n14fz.js +16288 -0
- package/dist/core-C57n14fz.js.map +1 -0
- package/dist/cursor-aZqnhG2b.js +8 -0
- package/dist/cursor-aZqnhG2b.js.map +1 -0
- package/dist/cursor-transparent-B1JSDQ4k.js +17 -0
- package/dist/cursor-transparent-B1JSDQ4k.js.map +1 -0
- package/dist/data-capture-4tu-_Un-.js +549 -0
- package/dist/data-capture-4tu-_Un-.js.map +1 -0
- package/dist/desktop-CYHnO2jB.js +14 -0
- package/dist/desktop-CYHnO2jB.js.map +1 -0
- package/dist/disconnect-Bort8PHj.js +13 -0
- package/dist/disconnect-Bort8PHj.js.map +1 -0
- package/dist/discord-DC76-391.js +22 -0
- package/dist/discord-DC76-391.js.map +1 -0
- package/dist/email-CetCpugE.js +421 -0
- package/dist/email-CetCpugE.js.map +1 -0
- package/dist/embedded-wallet-DGmopvFw.js +952 -0
- package/dist/embedded-wallet-DGmopvFw.js.map +1 -0
- package/dist/etherscan-CM1VXVi8.js +11 -0
- package/dist/etherscan-CM1VXVi8.js.map +1 -0
- package/dist/exclamation-triangle-C2EQS3zg.js +9 -0
- package/dist/exclamation-triangle-C2EQS3zg.js.map +1 -0
- package/dist/extension-CrQTWCzR.js +13 -0
- package/dist/extension-CrQTWCzR.js.map +1 -0
- package/dist/external-link-C-HaFB9S.js +13 -0
- package/dist/external-link-C-HaFB9S.js.map +1 -0
- package/dist/facebook-vNJNGTyY.js +31 -0
- package/dist/facebook-vNJNGTyY.js.map +1 -0
- package/dist/farcaster-BojA8Y3Q.js +17 -0
- package/dist/farcaster-BojA8Y3Q.js.map +1 -0
- package/dist/features-BqXSc1qT.js +319 -0
- package/dist/features-BqXSc1qT.js.map +1 -0
- package/dist/filters-CPcSdM3I.js +13 -0
- package/dist/filters-CPcSdM3I.js.map +1 -0
- package/dist/github-lRHD4KBY.js +23 -0
- package/dist/github-lRHD4KBY.js.map +1 -0
- package/dist/google-CxxvUUsR.js +23 -0
- package/dist/google-CxxvUUsR.js.map +1 -0
- package/dist/hashTypedData-CGPAwUvI.js +259 -0
- package/dist/hashTypedData-CGPAwUvI.js.map +1 -0
- package/dist/help-circle-YHj9O9n4.js +17 -0
- package/dist/help-circle-YHj9O9n4.js.map +1 -0
- package/dist/id-BbzMFdj1.js +17 -0
- package/dist/id-BbzMFdj1.js.map +1 -0
- package/dist/if-defined-G2Q1ofvJ.js +11 -0
- package/dist/if-defined-G2Q1ofvJ.js.map +1 -0
- package/dist/image-BXTuNWmr.js +9 -0
- package/dist/image-BXTuNWmr.js.map +1 -0
- package/dist/index-21QOMdJE.js +984 -0
- package/dist/index-21QOMdJE.js.map +1 -0
- package/dist/index-51p9LM0s.js +218 -0
- package/dist/index-51p9LM0s.js.map +1 -0
- package/dist/index-ALlvRvBi.js +3987 -0
- package/dist/index-ALlvRvBi.js.map +1 -0
- package/dist/index-B6tCHS_j.js +120 -0
- package/dist/index-B6tCHS_j.js.map +1 -0
- package/dist/index-B9IUGIqh.js +211 -0
- package/dist/index-B9IUGIqh.js.map +1 -0
- package/dist/index-BFKYwgq3.js +7488 -0
- package/dist/index-BFKYwgq3.js.map +1 -0
- package/dist/index-BPB7fVHQ.js +281 -0
- package/dist/index-BPB7fVHQ.js.map +1 -0
- package/dist/index-BdRMG5oJ.js +126 -0
- package/dist/index-BdRMG5oJ.js.map +1 -0
- package/dist/index-Bowi-aBJ.js +147 -0
- package/dist/index-Bowi-aBJ.js.map +1 -0
- package/dist/index-BpOoitMw.js +131 -0
- package/dist/index-BpOoitMw.js.map +1 -0
- package/dist/index-BqCjN5Bk.js +124 -0
- package/dist/index-BqCjN5Bk.js.map +1 -0
- package/dist/index-Bv2Jkp0T.js +967 -0
- package/dist/index-Bv2Jkp0T.js.map +1 -0
- package/dist/index-C2tJFA0B.js +1372 -0
- package/dist/index-C2tJFA0B.js.map +1 -0
- package/dist/index-C3h1bsiv.js +109 -0
- package/dist/index-C3h1bsiv.js.map +1 -0
- package/dist/index-CFC2NxJ5.js +180 -0
- package/dist/index-CFC2NxJ5.js.map +1 -0
- package/dist/index-CG2tDcOE.js +182 -0
- package/dist/index-CG2tDcOE.js.map +1 -0
- package/dist/index-CM8qnUNO.js +181 -0
- package/dist/index-CM8qnUNO.js.map +1 -0
- package/dist/index-CNivx0yI.js +1178 -0
- package/dist/index-CNivx0yI.js.map +1 -0
- package/dist/index-CStkjfQQ.js +521 -0
- package/dist/index-CStkjfQQ.js.map +1 -0
- package/dist/index-CV3sK6gH.js +7258 -0
- package/dist/index-CV3sK6gH.js.map +1 -0
- package/dist/index-CZkzO2fh.js +70 -0
- package/dist/index-CZkzO2fh.js.map +1 -0
- package/dist/index-Ce3DzdHE.js +520 -0
- package/dist/index-Ce3DzdHE.js.map +1 -0
- package/dist/index-CgVqanW1.js +611 -0
- package/dist/index-CgVqanW1.js.map +1 -0
- package/dist/index-Ci6Y519l.js +249 -0
- package/dist/index-Ci6Y519l.js.map +1 -0
- package/dist/index-CnpO-uMV.js +62 -0
- package/dist/index-CnpO-uMV.js.map +1 -0
- package/dist/index-Cs_Ue1li.js +9530 -0
- package/dist/index-Cs_Ue1li.js.map +1 -0
- package/dist/index-CzIN86Z6.js +52 -0
- package/dist/index-CzIN86Z6.js.map +1 -0
- package/dist/index-DGrOD_Uk.js +136 -0
- package/dist/index-DGrOD_Uk.js.map +1 -0
- package/dist/index-DQgrdARk.js +198 -0
- package/dist/index-DQgrdARk.js.map +1 -0
- package/dist/index-DUrjw7B_.js +92 -0
- package/dist/index-DUrjw7B_.js.map +1 -0
- package/dist/index-DYvUtH2H.js +198 -0
- package/dist/index-DYvUtH2H.js.map +1 -0
- package/dist/index-DjlKuTuO.js +1582 -0
- package/dist/index-DjlKuTuO.js.map +1 -0
- package/dist/index-DrdtZOyM.js +286 -0
- package/dist/index-DrdtZOyM.js.map +1 -0
- package/dist/index-Dt1IUAIj.js +716 -0
- package/dist/index-Dt1IUAIj.js.map +1 -0
- package/dist/index-DvmMzzVa.js +18322 -0
- package/dist/index-DvmMzzVa.js.map +1 -0
- package/dist/index-DzZOIbsR.js +147 -0
- package/dist/index-DzZOIbsR.js.map +1 -0
- package/dist/index-ENsIYRhz.js +542 -0
- package/dist/index-ENsIYRhz.js.map +1 -0
- package/dist/index-QqIUi-wY.js +2402 -0
- package/dist/index-QqIUi-wY.js.map +1 -0
- package/dist/index-SlVjFZvp.js +110 -0
- package/dist/index-SlVjFZvp.js.map +1 -0
- package/dist/index-VKogKIsA.js +985 -0
- package/dist/index-VKogKIsA.js.map +1 -0
- package/dist/index-bd39Gizk.js +153 -0
- package/dist/index-bd39Gizk.js.map +1 -0
- package/dist/index-ciqjpb4e.js +73 -0
- package/dist/index-ciqjpb4e.js.map +1 -0
- package/dist/index-d4z00ajR.js +456 -0
- package/dist/index-d4z00ajR.js.map +1 -0
- package/dist/index-dTaiyIFQ.js +257 -0
- package/dist/index-dTaiyIFQ.js.map +1 -0
- package/dist/index-nkefGcqB.js +9350 -0
- package/dist/index-nkefGcqB.js.map +1 -0
- package/dist/index-pg-zQJY9.js +441 -0
- package/dist/index-pg-zQJY9.js.map +1 -0
- package/dist/index.es-Dpl-2r0L.js +8503 -0
- package/dist/index.es-Dpl-2r0L.js.map +1 -0
- package/dist/info-BhGLu7a7.js +8 -0
- package/dist/info-BhGLu7a7.js.map +1 -0
- package/dist/info-circle-qS-gYigf.js +17 -0
- package/dist/info-circle-qS-gYigf.js.map +1 -0
- package/dist/jsxRuntime.module-Bj81_EKI.js +14 -0
- package/dist/jsxRuntime.module-Bj81_EKI.js.map +1 -0
- package/dist/lightbulb-CkRo4E3y.js +8 -0
- package/dist/lightbulb-CkRo4E3y.js.map +1 -0
- package/dist/localBatchGatewayRequest-BP_oqSkW.js +103 -0
- package/dist/localBatchGatewayRequest-BP_oqSkW.js.map +1 -0
- package/dist/mail-DPd51pyO.js +13 -0
- package/dist/mail-DPd51pyO.js.map +1 -0
- package/dist/metamask-sdk-yihv7E6u.js +16699 -0
- package/dist/metamask-sdk-yihv7E6u.js.map +1 -0
- package/dist/mobile-CRO9ITfa.js +14 -0
- package/dist/mobile-CRO9ITfa.js.map +1 -0
- package/dist/more-DyaHLM9d.js +16 -0
- package/dist/more-DyaHLM9d.js.map +1 -0
- package/dist/native-CMPA4OCm.js +17 -0
- package/dist/native-CMPA4OCm.js.map +1 -0
- package/dist/network-placeholder-DGSqV09i.js +19 -0
- package/dist/network-placeholder-DGSqV09i.js.map +1 -0
- package/dist/nftPlaceholder-CLGGLw6g.js +13 -0
- package/dist/nftPlaceholder-CLGGLw6g.js.map +1 -0
- package/dist/off-CDy-1GjF.js +13 -0
- package/dist/off-CDy-1GjF.js.map +1 -0
- package/dist/onramp-pjFNY0fj.js +979 -0
- package/dist/onramp-pjFNY0fj.js.map +1 -0
- package/dist/parseSignature-CV_ULbSZ.js +2828 -0
- package/dist/parseSignature-CV_ULbSZ.js.map +1 -0
- package/dist/pay-with-exchange-Cz8dXxOa.js +603 -0
- package/dist/pay-with-exchange-Cz8dXxOa.js.map +1 -0
- package/dist/play-store-CdQ0GJhU.js +37 -0
- package/dist/play-store-CdQ0GJhU.js.map +1 -0
- package/dist/plus-DD_oKDcI.js +18 -0
- package/dist/plus-DD_oKDcI.js.map +1 -0
- package/dist/property-8UcTqffH.js +623 -0
- package/dist/property-8UcTqffH.js.map +1 -0
- package/dist/qr-code-BJLuAwDg.js +11 -0
- package/dist/qr-code-BJLuAwDg.js.map +1 -0
- package/dist/receive-Brpo8_fV.js +262 -0
- package/dist/receive-Brpo8_fV.js.map +1 -0
- package/dist/recycle-horizontal-DMqA4Y6p.js +14 -0
- package/dist/recycle-horizontal-DMqA4Y6p.js.map +1 -0
- package/dist/ref-6sYmD-zI.js +43 -0
- package/dist/ref-6sYmD-zI.js.map +1 -0
- package/dist/refresh-SYbxLwZK.js +13 -0
- package/dist/refresh-SYbxLwZK.js.map +1 -0
- package/dist/reown-logo-FMoXntuJ.js +17 -0
- package/dist/reown-logo-FMoXntuJ.js.map +1 -0
- package/dist/search-DyRiO0T8.js +13 -0
- package/dist/search-DyRiO0T8.js.map +1 -0
- package/dist/secp256k1-DCQG8fZg.js +2031 -0
- package/dist/secp256k1-DCQG8fZg.js.map +1 -0
- package/dist/send-AaCUn2jw.js +20 -0
- package/dist/send-AaCUn2jw.js.map +1 -0
- package/dist/send-cysMDEC9.js +1365 -0
- package/dist/send-cysMDEC9.js.map +1 -0
- package/dist/socials-BU9YyLx1.js +796 -0
- package/dist/socials-BU9YyLx1.js.map +1 -0
- package/dist/swapHorizontal-kHwa5wbg.js +13 -0
- package/dist/swapHorizontal-kHwa5wbg.js.map +1 -0
- package/dist/swapHorizontalBold-Bf_Sy4KD.js +13 -0
- package/dist/swapHorizontalBold-Bf_Sy4KD.js.map +1 -0
- package/dist/swapHorizontalMedium-C4oU0KJg.js +21 -0
- package/dist/swapHorizontalMedium-C4oU0KJg.js.map +1 -0
- package/dist/swapHorizontalRoundedBold-IJ8G94V0.js +13 -0
- package/dist/swapHorizontalRoundedBold-IJ8G94V0.js.map +1 -0
- package/dist/swapVertical-CuDVDBMJ.js +13 -0
- package/dist/swapVertical-CuDVDBMJ.js.map +1 -0
- package/dist/swaps-TcZwQiir.js +2121 -0
- package/dist/swaps-TcZwQiir.js.map +1 -0
- package/dist/telegram-DSi6IsaA.js +21 -0
- package/dist/telegram-DSi6IsaA.js.map +1 -0
- package/dist/three-dots-CqgQBZQ6.js +10 -0
- package/dist/three-dots-CqgQBZQ6.js.map +1 -0
- package/dist/transactions-CcagUdpJ.js +38 -0
- package/dist/transactions-CcagUdpJ.js.map +1 -0
- package/dist/twitch-DrUmltT6.js +23 -0
- package/dist/twitch-DrUmltT6.js.map +1 -0
- package/dist/twitterIcon-eNCEY2nh.js +11 -0
- package/dist/twitterIcon-eNCEY2nh.js.map +1 -0
- package/dist/vanilla-CgG5xMJO.js +448 -0
- package/dist/vanilla-CgG5xMJO.js.map +1 -0
- package/dist/verify-DGCdp1PG.js +13 -0
- package/dist/verify-DGCdp1PG.js.map +1 -0
- package/dist/verify-filled-BN5Rdq_X.js +13 -0
- package/dist/verify-filled-BN5Rdq_X.js.map +1 -0
- package/dist/w3m-modal-C23tcwd0.js +2008 -0
- package/dist/w3m-modal-C23tcwd0.js.map +1 -0
- package/dist/w3m-modal-D_WKuA4j.js +1725 -0
- package/dist/w3m-modal-D_WKuA4j.js.map +1 -0
- package/dist/wallet-Dh8w0rox.js +13 -0
- package/dist/wallet-Dh8w0rox.js.map +1 -0
- package/dist/wallet-placeholder-gjfCYn59.js +19 -0
- package/dist/wallet-placeholder-gjfCYn59.js.map +1 -0
- package/dist/wallet-standard-CWX-EDlP.js +523 -0
- package/dist/wallet-standard-CWX-EDlP.js.map +1 -0
- package/dist/walletconnect-BI4tTckl.js +39 -0
- package/dist/walletconnect-BI4tTckl.js.map +1 -0
- package/dist/warning-circle-jCqjcA2f.js +17 -0
- package/dist/warning-circle-jCqjcA2f.js.map +1 -0
- package/dist/x-BfcQ5n6S.js +17 -0
- package/dist/x-BfcQ5n6S.js.map +1 -0
- package/package.json +10 -10
|
@@ -0,0 +1,2008 @@
|
|
|
1
|
+
import { a3 as ModalController, ba as SIWXUtil, R as RouterController, t as ConnectionController, m as css, r as resetStyles, o as i, x, A as AlertController, n as elementStyles, v as vars, C as ChainController, a4 as AssetUtil, b0 as AssetController, E as EventsController, O as OptionsController, F as ConnectorController, q as i$1, S as SnackController, aP as ApiController, a5 as ThemeController, bb as initializeTheming, bc as AdapterController } from "./appkit-8yrMZRW-.js";
|
|
2
|
+
import { n, r } from "./class-map-k3nlzPqR.js";
|
|
3
|
+
import { o } from "./if-defined-G2Q1ofvJ.js";
|
|
4
|
+
import { c as customElement, U as UiHelperUtil } from "./index-CNivx0yI.js";
|
|
5
|
+
import "./index-CM8qnUNO.js";
|
|
6
|
+
import "./index-Bowi-aBJ.js";
|
|
7
|
+
import { H as HelpersUtil } from "./HelpersUtil-BfwO5f4J.js";
|
|
8
|
+
import { C as ConstantsUtil } from "./ConstantsUtil-DSO-aT76.js";
|
|
9
|
+
import "./index-DUrjw7B_.js";
|
|
10
|
+
import "./index-BdRMG5oJ.js";
|
|
11
|
+
import "./index-CG2tDcOE.js";
|
|
12
|
+
import "./index-CgVqanW1.js";
|
|
13
|
+
import { S as SwapController } from "./SwapController-B9-o3mQi.js";
|
|
14
|
+
import "./index-51p9LM0s.js";
|
|
15
|
+
const ModalUtil = {
|
|
16
|
+
isUnsupportedChainView() {
|
|
17
|
+
return RouterController.state.view === "UnsupportedChain" || RouterController.state.view === "SwitchNetwork" && RouterController.state.history.includes("UnsupportedChain");
|
|
18
|
+
},
|
|
19
|
+
async safeClose() {
|
|
20
|
+
if (this.isUnsupportedChainView()) {
|
|
21
|
+
ModalController.shake();
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const isSIWXCloseDisabled = await SIWXUtil.isSIWXCloseDisabled();
|
|
25
|
+
if (isSIWXCloseDisabled) {
|
|
26
|
+
ModalController.shake();
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
if (RouterController.state.view === "DataCapture" || RouterController.state.view === "DataCaptureOtpConfirm") {
|
|
30
|
+
ConnectionController.disconnect();
|
|
31
|
+
}
|
|
32
|
+
ModalController.close();
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
const styles$a = css`
|
|
36
|
+
:host {
|
|
37
|
+
display: block;
|
|
38
|
+
border-radius: clamp(0px, ${({ borderRadius }) => borderRadius["8"]}, 44px);
|
|
39
|
+
box-shadow: 0 0 0 1px ${({ tokens }) => tokens.theme.foregroundPrimary};
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
}
|
|
42
|
+
`;
|
|
43
|
+
var __decorate$a = function(decorators, target, key, desc) {
|
|
44
|
+
var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
45
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
|
|
46
|
+
else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
|
|
47
|
+
return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
|
|
48
|
+
};
|
|
49
|
+
let WuiCard = class WuiCard2 extends i {
|
|
50
|
+
render() {
|
|
51
|
+
return x`<slot></slot>`;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
WuiCard.styles = [resetStyles, styles$a];
|
|
55
|
+
WuiCard = __decorate$a([
|
|
56
|
+
customElement("wui-card")
|
|
57
|
+
], WuiCard);
|
|
58
|
+
const styles$9 = css`
|
|
59
|
+
:host {
|
|
60
|
+
width: 100%;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
:host > wui-flex {
|
|
64
|
+
width: 100%;
|
|
65
|
+
display: flex;
|
|
66
|
+
align-items: center;
|
|
67
|
+
justify-content: center;
|
|
68
|
+
gap: ${({ spacing }) => spacing[2]};
|
|
69
|
+
padding: ${({ spacing }) => spacing[3]};
|
|
70
|
+
border-radius: ${({ borderRadius }) => borderRadius[6]};
|
|
71
|
+
border: 1px solid ${({ tokens }) => tokens.theme.borderPrimary};
|
|
72
|
+
box-sizing: border-box;
|
|
73
|
+
background-color: ${({ tokens }) => tokens.theme.foregroundPrimary};
|
|
74
|
+
box-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.25);
|
|
75
|
+
color: ${({ tokens }) => tokens.theme.textPrimary};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
:host > wui-flex[data-type='info'] {
|
|
79
|
+
.icon-box {
|
|
80
|
+
background-color: ${({ tokens }) => tokens.theme.foregroundSecondary};
|
|
81
|
+
|
|
82
|
+
wui-icon {
|
|
83
|
+
color: ${({ tokens }) => tokens.theme.iconDefault};
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
:host > wui-flex[data-type='success'] {
|
|
88
|
+
.icon-box {
|
|
89
|
+
background-color: ${({ tokens }) => tokens.core.backgroundSuccess};
|
|
90
|
+
|
|
91
|
+
wui-icon {
|
|
92
|
+
color: ${({ tokens }) => tokens.core.borderSuccess};
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
:host > wui-flex[data-type='warning'] {
|
|
97
|
+
.icon-box {
|
|
98
|
+
background-color: ${({ tokens }) => tokens.core.backgroundWarning};
|
|
99
|
+
|
|
100
|
+
wui-icon {
|
|
101
|
+
color: ${({ tokens }) => tokens.core.borderWarning};
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
:host > wui-flex[data-type='error'] {
|
|
106
|
+
.icon-box {
|
|
107
|
+
background-color: ${({ tokens }) => tokens.core.backgroundError};
|
|
108
|
+
|
|
109
|
+
wui-icon {
|
|
110
|
+
color: ${({ tokens }) => tokens.core.borderError};
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
wui-flex {
|
|
116
|
+
width: 100%;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
wui-text {
|
|
120
|
+
word-break: break-word;
|
|
121
|
+
flex: 1;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.close {
|
|
125
|
+
cursor: pointer;
|
|
126
|
+
color: ${({ tokens }) => tokens.theme.iconDefault};
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.icon-box {
|
|
130
|
+
height: 40px;
|
|
131
|
+
width: 40px;
|
|
132
|
+
border-radius: ${({ borderRadius }) => borderRadius["2"]};
|
|
133
|
+
background-color: var(--local-icon-bg-value);
|
|
134
|
+
}
|
|
135
|
+
`;
|
|
136
|
+
var __decorate$9 = function(decorators, target, key, desc) {
|
|
137
|
+
var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
138
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
|
|
139
|
+
else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
|
|
140
|
+
return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
|
|
141
|
+
};
|
|
142
|
+
const TYPE_ICON_NAME = {
|
|
143
|
+
info: "info",
|
|
144
|
+
success: "checkmark",
|
|
145
|
+
warning: "warningCircle",
|
|
146
|
+
error: "warning"
|
|
147
|
+
};
|
|
148
|
+
let WuiAlertBar = class WuiAlertBar2 extends i {
|
|
149
|
+
constructor() {
|
|
150
|
+
super(...arguments);
|
|
151
|
+
this.message = "";
|
|
152
|
+
this.type = "info";
|
|
153
|
+
}
|
|
154
|
+
render() {
|
|
155
|
+
return x`
|
|
156
|
+
<wui-flex
|
|
157
|
+
data-type=${o(this.type)}
|
|
158
|
+
flexDirection="row"
|
|
159
|
+
justifyContent="space-between"
|
|
160
|
+
alignItems="center"
|
|
161
|
+
gap="2"
|
|
162
|
+
>
|
|
163
|
+
<wui-flex columnGap="2" flexDirection="row" alignItems="center">
|
|
164
|
+
<wui-flex
|
|
165
|
+
flexDirection="row"
|
|
166
|
+
alignItems="center"
|
|
167
|
+
justifyContent="center"
|
|
168
|
+
class="icon-box"
|
|
169
|
+
>
|
|
170
|
+
<wui-icon color="inherit" size="md" name=${TYPE_ICON_NAME[this.type]}></wui-icon>
|
|
171
|
+
</wui-flex>
|
|
172
|
+
<wui-text variant="md-medium" color="inherit" data-testid="wui-alertbar-text"
|
|
173
|
+
>${this.message}</wui-text
|
|
174
|
+
>
|
|
175
|
+
</wui-flex>
|
|
176
|
+
<wui-icon
|
|
177
|
+
class="close"
|
|
178
|
+
color="inherit"
|
|
179
|
+
size="sm"
|
|
180
|
+
name="close"
|
|
181
|
+
@click=${this.onClose}
|
|
182
|
+
></wui-icon>
|
|
183
|
+
</wui-flex>
|
|
184
|
+
`;
|
|
185
|
+
}
|
|
186
|
+
onClose() {
|
|
187
|
+
AlertController.close();
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
WuiAlertBar.styles = [resetStyles, styles$9];
|
|
191
|
+
__decorate$9([
|
|
192
|
+
n()
|
|
193
|
+
], WuiAlertBar.prototype, "message", void 0);
|
|
194
|
+
__decorate$9([
|
|
195
|
+
n()
|
|
196
|
+
], WuiAlertBar.prototype, "type", void 0);
|
|
197
|
+
WuiAlertBar = __decorate$9([
|
|
198
|
+
customElement("wui-alertbar")
|
|
199
|
+
], WuiAlertBar);
|
|
200
|
+
const styles$8 = css`
|
|
201
|
+
:host {
|
|
202
|
+
display: block;
|
|
203
|
+
position: absolute;
|
|
204
|
+
top: ${({ spacing }) => spacing["3"]};
|
|
205
|
+
left: ${({ spacing }) => spacing["4"]};
|
|
206
|
+
right: ${({ spacing }) => spacing["4"]};
|
|
207
|
+
opacity: 0;
|
|
208
|
+
pointer-events: none;
|
|
209
|
+
}
|
|
210
|
+
`;
|
|
211
|
+
var __decorate$8 = function(decorators, target, key, desc) {
|
|
212
|
+
var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
213
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
|
|
214
|
+
else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
|
|
215
|
+
return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
|
|
216
|
+
};
|
|
217
|
+
const presets = {
|
|
218
|
+
info: {
|
|
219
|
+
backgroundColor: "fg-350",
|
|
220
|
+
iconColor: "fg-325",
|
|
221
|
+
icon: "info"
|
|
222
|
+
},
|
|
223
|
+
success: {
|
|
224
|
+
backgroundColor: "success-glass-reown-020",
|
|
225
|
+
iconColor: "success-125",
|
|
226
|
+
icon: "checkmark"
|
|
227
|
+
},
|
|
228
|
+
warning: {
|
|
229
|
+
backgroundColor: "warning-glass-reown-020",
|
|
230
|
+
iconColor: "warning-100",
|
|
231
|
+
icon: "warningCircle"
|
|
232
|
+
},
|
|
233
|
+
error: {
|
|
234
|
+
backgroundColor: "error-glass-reown-020",
|
|
235
|
+
iconColor: "error-125",
|
|
236
|
+
icon: "warning"
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
let W3mAlertBar = class W3mAlertBar2 extends i {
|
|
240
|
+
constructor() {
|
|
241
|
+
super();
|
|
242
|
+
this.unsubscribe = [];
|
|
243
|
+
this.open = AlertController.state.open;
|
|
244
|
+
this.onOpen(true);
|
|
245
|
+
this.unsubscribe.push(AlertController.subscribeKey("open", (val) => {
|
|
246
|
+
this.open = val;
|
|
247
|
+
this.onOpen(false);
|
|
248
|
+
}));
|
|
249
|
+
}
|
|
250
|
+
disconnectedCallback() {
|
|
251
|
+
this.unsubscribe.forEach((unsubscribe) => unsubscribe());
|
|
252
|
+
}
|
|
253
|
+
render() {
|
|
254
|
+
const { message, variant } = AlertController.state;
|
|
255
|
+
const preset = presets[variant];
|
|
256
|
+
return x`
|
|
257
|
+
<wui-alertbar
|
|
258
|
+
message=${message}
|
|
259
|
+
backgroundColor=${preset == null ? void 0 : preset.backgroundColor}
|
|
260
|
+
iconColor=${preset == null ? void 0 : preset.iconColor}
|
|
261
|
+
icon=${preset == null ? void 0 : preset.icon}
|
|
262
|
+
type=${variant}
|
|
263
|
+
></wui-alertbar>
|
|
264
|
+
`;
|
|
265
|
+
}
|
|
266
|
+
onOpen(isMounted) {
|
|
267
|
+
if (this.open) {
|
|
268
|
+
this.animate([
|
|
269
|
+
{ opacity: 0, transform: "scale(0.85)" },
|
|
270
|
+
{ opacity: 1, transform: "scale(1)" }
|
|
271
|
+
], {
|
|
272
|
+
duration: 150,
|
|
273
|
+
fill: "forwards",
|
|
274
|
+
easing: "ease"
|
|
275
|
+
});
|
|
276
|
+
this.style.cssText = `pointer-events: auto`;
|
|
277
|
+
} else if (!isMounted) {
|
|
278
|
+
this.animate([
|
|
279
|
+
{ opacity: 1, transform: "scale(1)" },
|
|
280
|
+
{ opacity: 0, transform: "scale(0.85)" }
|
|
281
|
+
], {
|
|
282
|
+
duration: 150,
|
|
283
|
+
fill: "forwards",
|
|
284
|
+
easing: "ease"
|
|
285
|
+
});
|
|
286
|
+
this.style.cssText = `pointer-events: none`;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
};
|
|
290
|
+
W3mAlertBar.styles = styles$8;
|
|
291
|
+
__decorate$8([
|
|
292
|
+
r()
|
|
293
|
+
], W3mAlertBar.prototype, "open", void 0);
|
|
294
|
+
W3mAlertBar = __decorate$8([
|
|
295
|
+
customElement("w3m-alertbar")
|
|
296
|
+
], W3mAlertBar);
|
|
297
|
+
const styles$7 = css`
|
|
298
|
+
button {
|
|
299
|
+
display: block;
|
|
300
|
+
display: flex;
|
|
301
|
+
align-items: center;
|
|
302
|
+
padding: ${({ spacing }) => spacing[1]};
|
|
303
|
+
transition: background-color ${({ durations }) => durations["lg"]}
|
|
304
|
+
${({ easings }) => easings["ease-out-power-2"]};
|
|
305
|
+
will-change: background-color;
|
|
306
|
+
border-radius: ${({ borderRadius }) => borderRadius[32]};
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
wui-image {
|
|
310
|
+
border-radius: 100%;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
wui-text {
|
|
314
|
+
padding-left: ${({ spacing }) => spacing[1]};
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.left-icon-container,
|
|
318
|
+
.right-icon-container {
|
|
319
|
+
width: 24px;
|
|
320
|
+
height: 24px;
|
|
321
|
+
justify-content: center;
|
|
322
|
+
align-items: center;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
wui-icon {
|
|
326
|
+
color: ${({ tokens }) => tokens.theme.iconDefault};
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/* -- Sizes --------------------------------------------------- */
|
|
330
|
+
button[data-size='lg'] {
|
|
331
|
+
height: 32px;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
button[data-size='md'] {
|
|
335
|
+
height: 28px;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
button[data-size='sm'] {
|
|
339
|
+
height: 24px;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
button[data-size='lg'] wui-image {
|
|
343
|
+
width: 24px;
|
|
344
|
+
height: 24px;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
button[data-size='md'] wui-image {
|
|
348
|
+
width: 20px;
|
|
349
|
+
height: 20px;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
button[data-size='sm'] wui-image {
|
|
353
|
+
width: 16px;
|
|
354
|
+
height: 16px;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
button[data-size='lg'] .left-icon-container {
|
|
358
|
+
width: 24px;
|
|
359
|
+
height: 24px;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
button[data-size='md'] .left-icon-container {
|
|
363
|
+
width: 20px;
|
|
364
|
+
height: 20px;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
button[data-size='sm'] .left-icon-container {
|
|
368
|
+
width: 16px;
|
|
369
|
+
height: 16px;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/* -- Variants --------------------------------------------------------- */
|
|
373
|
+
button[data-type='filled-dropdown'] {
|
|
374
|
+
background-color: ${({ tokens }) => tokens.theme.foregroundPrimary};
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
button[data-type='text-dropdown'] {
|
|
378
|
+
background-color: transparent;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
/* -- Focus states --------------------------------------------------- */
|
|
382
|
+
button:focus-visible:enabled {
|
|
383
|
+
background-color: ${({ tokens }) => tokens.theme.foregroundSecondary};
|
|
384
|
+
box-shadow: 0 0 0 4px ${({ tokens }) => tokens.core.foregroundAccent040};
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
/* -- Hover & Active states ----------------------------------------------------------- */
|
|
388
|
+
@media (hover: hover) and (pointer: fine) {
|
|
389
|
+
button:hover:enabled,
|
|
390
|
+
button:active:enabled {
|
|
391
|
+
background-color: ${({ tokens }) => tokens.theme.foregroundSecondary};
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
/* -- Disabled states --------------------------------------------------- */
|
|
396
|
+
button:disabled {
|
|
397
|
+
background-color: ${({ tokens }) => tokens.theme.foregroundSecondary};
|
|
398
|
+
opacity: 0.5;
|
|
399
|
+
}
|
|
400
|
+
`;
|
|
401
|
+
var __decorate$7 = function(decorators, target, key, desc) {
|
|
402
|
+
var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
403
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
|
|
404
|
+
else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
|
|
405
|
+
return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
|
|
406
|
+
};
|
|
407
|
+
const TEXT_VARIANT_BY_SIZE = {
|
|
408
|
+
lg: "lg-regular",
|
|
409
|
+
md: "md-regular",
|
|
410
|
+
sm: "sm-regular"
|
|
411
|
+
};
|
|
412
|
+
const ICON_SIZE_BY_SIZE = {
|
|
413
|
+
lg: "lg",
|
|
414
|
+
md: "md",
|
|
415
|
+
sm: "sm"
|
|
416
|
+
};
|
|
417
|
+
let WuiSelect = class WuiSelect2 extends i {
|
|
418
|
+
constructor() {
|
|
419
|
+
super(...arguments);
|
|
420
|
+
this.imageSrc = "";
|
|
421
|
+
this.text = "";
|
|
422
|
+
this.size = "lg";
|
|
423
|
+
this.type = "text-dropdown";
|
|
424
|
+
this.disabled = false;
|
|
425
|
+
}
|
|
426
|
+
render() {
|
|
427
|
+
return x`<button ?disabled=${this.disabled} data-size=${this.size} data-type=${this.type}>
|
|
428
|
+
${this.imageTemplate()} ${this.textTemplate()}
|
|
429
|
+
<wui-flex class="right-icon-container">
|
|
430
|
+
<wui-icon name="chevronBottom"></wui-icon>
|
|
431
|
+
</wui-flex>
|
|
432
|
+
</button>`;
|
|
433
|
+
}
|
|
434
|
+
textTemplate() {
|
|
435
|
+
const textSize = TEXT_VARIANT_BY_SIZE[this.size];
|
|
436
|
+
if (this.text) {
|
|
437
|
+
return x`<wui-text color="primary" variant=${textSize}>${this.text}</wui-text>`;
|
|
438
|
+
}
|
|
439
|
+
return null;
|
|
440
|
+
}
|
|
441
|
+
imageTemplate() {
|
|
442
|
+
if (this.imageSrc) {
|
|
443
|
+
return x`<wui-image src=${this.imageSrc} alt="select visual"></wui-image>`;
|
|
444
|
+
}
|
|
445
|
+
const iconSize = ICON_SIZE_BY_SIZE[this.size];
|
|
446
|
+
return x` <wui-flex class="left-icon-container">
|
|
447
|
+
<wui-icon size=${iconSize} name="networkPlaceholder"></wui-icon>
|
|
448
|
+
</wui-flex>`;
|
|
449
|
+
}
|
|
450
|
+
};
|
|
451
|
+
WuiSelect.styles = [resetStyles, elementStyles, styles$7];
|
|
452
|
+
__decorate$7([
|
|
453
|
+
n()
|
|
454
|
+
], WuiSelect.prototype, "imageSrc", void 0);
|
|
455
|
+
__decorate$7([
|
|
456
|
+
n()
|
|
457
|
+
], WuiSelect.prototype, "text", void 0);
|
|
458
|
+
__decorate$7([
|
|
459
|
+
n()
|
|
460
|
+
], WuiSelect.prototype, "size", void 0);
|
|
461
|
+
__decorate$7([
|
|
462
|
+
n()
|
|
463
|
+
], WuiSelect.prototype, "type", void 0);
|
|
464
|
+
__decorate$7([
|
|
465
|
+
n({ type: Boolean })
|
|
466
|
+
], WuiSelect.prototype, "disabled", void 0);
|
|
467
|
+
WuiSelect = __decorate$7([
|
|
468
|
+
customElement("wui-select")
|
|
469
|
+
], WuiSelect);
|
|
470
|
+
const styles$6 = css`
|
|
471
|
+
:host {
|
|
472
|
+
height: 60px;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
:host > wui-flex {
|
|
476
|
+
box-sizing: border-box;
|
|
477
|
+
background-color: var(--local-header-background-color);
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
wui-text {
|
|
481
|
+
background-color: var(--local-header-background-color);
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
wui-flex.w3m-header-title {
|
|
485
|
+
transform: translateY(0);
|
|
486
|
+
opacity: 1;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
wui-flex.w3m-header-title[view-direction='prev'] {
|
|
490
|
+
animation:
|
|
491
|
+
slide-down-out 120ms forwards ${({ easings }) => easings["ease-out-power-2"]},
|
|
492
|
+
slide-down-in 120ms forwards ${({ easings }) => easings["ease-out-power-2"]};
|
|
493
|
+
animation-delay: 0ms, 200ms;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
wui-flex.w3m-header-title[view-direction='next'] {
|
|
497
|
+
animation:
|
|
498
|
+
slide-up-out 120ms forwards ${({ easings }) => easings["ease-out-power-2"]},
|
|
499
|
+
slide-up-in 120ms forwards ${({ easings }) => easings["ease-out-power-2"]};
|
|
500
|
+
animation-delay: 0ms, 200ms;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
wui-icon-button[data-hidden='true'] {
|
|
504
|
+
opacity: 0 !important;
|
|
505
|
+
pointer-events: none;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
@keyframes slide-up-out {
|
|
509
|
+
from {
|
|
510
|
+
transform: translateY(0px);
|
|
511
|
+
opacity: 1;
|
|
512
|
+
}
|
|
513
|
+
to {
|
|
514
|
+
transform: translateY(3px);
|
|
515
|
+
opacity: 0;
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
@keyframes slide-up-in {
|
|
520
|
+
from {
|
|
521
|
+
transform: translateY(-3px);
|
|
522
|
+
opacity: 0;
|
|
523
|
+
}
|
|
524
|
+
to {
|
|
525
|
+
transform: translateY(0);
|
|
526
|
+
opacity: 1;
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
@keyframes slide-down-out {
|
|
531
|
+
from {
|
|
532
|
+
transform: translateY(0px);
|
|
533
|
+
opacity: 1;
|
|
534
|
+
}
|
|
535
|
+
to {
|
|
536
|
+
transform: translateY(-3px);
|
|
537
|
+
opacity: 0;
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
@keyframes slide-down-in {
|
|
542
|
+
from {
|
|
543
|
+
transform: translateY(3px);
|
|
544
|
+
opacity: 0;
|
|
545
|
+
}
|
|
546
|
+
to {
|
|
547
|
+
transform: translateY(0);
|
|
548
|
+
opacity: 1;
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
`;
|
|
552
|
+
var __decorate$6 = function(decorators, target, key, desc) {
|
|
553
|
+
var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
554
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
|
|
555
|
+
else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
|
|
556
|
+
return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
|
|
557
|
+
};
|
|
558
|
+
const BETA_SCREENS = ["SmartSessionList"];
|
|
559
|
+
const BACKGROUND_OVERRIDES = {
|
|
560
|
+
PayWithExchange: vars.tokens.theme.foregroundPrimary
|
|
561
|
+
};
|
|
562
|
+
function headings() {
|
|
563
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
564
|
+
const connectorName = (_b = (_a = RouterController.state.data) == null ? void 0 : _a.connector) == null ? void 0 : _b.name;
|
|
565
|
+
const walletName = (_d = (_c = RouterController.state.data) == null ? void 0 : _c.wallet) == null ? void 0 : _d.name;
|
|
566
|
+
const networkName = (_f = (_e = RouterController.state.data) == null ? void 0 : _e.network) == null ? void 0 : _f.name;
|
|
567
|
+
const name = walletName ?? connectorName;
|
|
568
|
+
const connectors = ConnectorController.getConnectors();
|
|
569
|
+
const isEmail = connectors.length === 1 && ((_g = connectors[0]) == null ? void 0 : _g.id) === "w3m-email";
|
|
570
|
+
const socialProvider = (_h = ChainController.getAccountData()) == null ? void 0 : _h.socialProvider;
|
|
571
|
+
const socialTitle = socialProvider ? socialProvider.charAt(0).toUpperCase() + socialProvider.slice(1) : "Connect Social";
|
|
572
|
+
return {
|
|
573
|
+
Connect: `Connect ${isEmail ? "Email" : ""} Wallet`,
|
|
574
|
+
Create: "Create Wallet",
|
|
575
|
+
ChooseAccountName: void 0,
|
|
576
|
+
Account: void 0,
|
|
577
|
+
AccountSettings: void 0,
|
|
578
|
+
AllWallets: "All Wallets",
|
|
579
|
+
ApproveTransaction: "Approve Transaction",
|
|
580
|
+
BuyInProgress: "Buy",
|
|
581
|
+
UsageExceeded: "Usage Exceeded",
|
|
582
|
+
ConnectingExternal: name ?? "Connect Wallet",
|
|
583
|
+
ConnectingWalletConnect: name ?? "WalletConnect",
|
|
584
|
+
ConnectingWalletConnectBasic: "WalletConnect",
|
|
585
|
+
ConnectingSiwe: "Sign In",
|
|
586
|
+
Convert: "Convert",
|
|
587
|
+
ConvertSelectToken: "Select token",
|
|
588
|
+
ConvertPreview: "Preview Convert",
|
|
589
|
+
Downloads: name ? `Get ${name}` : "Downloads",
|
|
590
|
+
EmailLogin: "Email Login",
|
|
591
|
+
EmailVerifyOtp: "Confirm Email",
|
|
592
|
+
EmailVerifyDevice: "Register Device",
|
|
593
|
+
GetWallet: "Get a Wallet",
|
|
594
|
+
Networks: "Choose Network",
|
|
595
|
+
OnRampProviders: "Choose Provider",
|
|
596
|
+
OnRampActivity: "Activity",
|
|
597
|
+
OnRampTokenSelect: "Select Token",
|
|
598
|
+
OnRampFiatSelect: "Select Currency",
|
|
599
|
+
Pay: "How you pay",
|
|
600
|
+
ProfileWallets: "Wallets",
|
|
601
|
+
SwitchNetwork: networkName ?? "Switch Network",
|
|
602
|
+
Transactions: "Activity",
|
|
603
|
+
UnsupportedChain: "Switch Network",
|
|
604
|
+
UpgradeEmailWallet: "Upgrade Your Wallet",
|
|
605
|
+
UpdateEmailWallet: "Edit Email",
|
|
606
|
+
UpdateEmailPrimaryOtp: "Confirm Current Email",
|
|
607
|
+
UpdateEmailSecondaryOtp: "Confirm New Email",
|
|
608
|
+
WhatIsABuy: "What is Buy?",
|
|
609
|
+
RegisterAccountName: "Choose Name",
|
|
610
|
+
RegisterAccountNameSuccess: "",
|
|
611
|
+
WalletReceive: "Receive",
|
|
612
|
+
WalletCompatibleNetworks: "Compatible Networks",
|
|
613
|
+
Swap: "Swap",
|
|
614
|
+
SwapSelectToken: "Select Token",
|
|
615
|
+
SwapPreview: "Preview Swap",
|
|
616
|
+
WalletSend: "Send",
|
|
617
|
+
WalletSendPreview: "Review Send",
|
|
618
|
+
WalletSendSelectToken: "Select Token",
|
|
619
|
+
WalletSendConfirmed: "Confirmed",
|
|
620
|
+
WhatIsANetwork: "What is a network?",
|
|
621
|
+
WhatIsAWallet: "What is a Wallet?",
|
|
622
|
+
ConnectWallets: "Connect Wallet",
|
|
623
|
+
ConnectSocials: "All Socials",
|
|
624
|
+
ConnectingSocial: socialTitle,
|
|
625
|
+
ConnectingMultiChain: "Select Chain",
|
|
626
|
+
ConnectingFarcaster: "Farcaster",
|
|
627
|
+
SwitchActiveChain: "Switch Chain",
|
|
628
|
+
SmartSessionCreated: void 0,
|
|
629
|
+
SmartSessionList: "Smart Sessions",
|
|
630
|
+
SIWXSignMessage: "Sign In",
|
|
631
|
+
PayLoading: "Payment in Progress",
|
|
632
|
+
DataCapture: "Profile",
|
|
633
|
+
DataCaptureOtpConfirm: "Confirm Email",
|
|
634
|
+
FundWallet: "Fund Wallet",
|
|
635
|
+
PayWithExchange: "Deposit from Exchange",
|
|
636
|
+
PayWithExchangeSelectAsset: "Select Asset",
|
|
637
|
+
SmartAccountSettings: "Smart Account Settings"
|
|
638
|
+
};
|
|
639
|
+
}
|
|
640
|
+
let W3mHeader = class W3mHeader2 extends i {
|
|
641
|
+
constructor() {
|
|
642
|
+
super();
|
|
643
|
+
this.unsubscribe = [];
|
|
644
|
+
this.heading = headings()[RouterController.state.view];
|
|
645
|
+
this.network = ChainController.state.activeCaipNetwork;
|
|
646
|
+
this.networkImage = AssetUtil.getNetworkImage(this.network);
|
|
647
|
+
this.showBack = false;
|
|
648
|
+
this.prevHistoryLength = 1;
|
|
649
|
+
this.view = RouterController.state.view;
|
|
650
|
+
this.viewDirection = "";
|
|
651
|
+
this.unsubscribe.push(AssetController.subscribeNetworkImages(() => {
|
|
652
|
+
this.networkImage = AssetUtil.getNetworkImage(this.network);
|
|
653
|
+
}), RouterController.subscribeKey("view", (val) => {
|
|
654
|
+
setTimeout(() => {
|
|
655
|
+
this.view = val;
|
|
656
|
+
this.heading = headings()[val];
|
|
657
|
+
}, ConstantsUtil.ANIMATION_DURATIONS.HeaderText);
|
|
658
|
+
this.onViewChange();
|
|
659
|
+
this.onHistoryChange();
|
|
660
|
+
}), ChainController.subscribeKey("activeCaipNetwork", (val) => {
|
|
661
|
+
this.network = val;
|
|
662
|
+
this.networkImage = AssetUtil.getNetworkImage(this.network);
|
|
663
|
+
}));
|
|
664
|
+
}
|
|
665
|
+
disconnectCallback() {
|
|
666
|
+
this.unsubscribe.forEach((unsubscribe) => unsubscribe());
|
|
667
|
+
}
|
|
668
|
+
render() {
|
|
669
|
+
const backgroundColor = BACKGROUND_OVERRIDES[RouterController.state.view] ?? vars.tokens.theme.backgroundPrimary;
|
|
670
|
+
this.style.setProperty("--local-header-background-color", backgroundColor);
|
|
671
|
+
return x`
|
|
672
|
+
<wui-flex
|
|
673
|
+
.padding=${["0", "4", "0", "4"]}
|
|
674
|
+
justifyContent="space-between"
|
|
675
|
+
alignItems="center"
|
|
676
|
+
>
|
|
677
|
+
${this.leftHeaderTemplate()} ${this.titleTemplate()} ${this.rightHeaderTemplate()}
|
|
678
|
+
</wui-flex>
|
|
679
|
+
`;
|
|
680
|
+
}
|
|
681
|
+
onWalletHelp() {
|
|
682
|
+
EventsController.sendEvent({ type: "track", event: "CLICK_WALLET_HELP" });
|
|
683
|
+
RouterController.push("WhatIsAWallet");
|
|
684
|
+
}
|
|
685
|
+
async onClose() {
|
|
686
|
+
await ModalUtil.safeClose();
|
|
687
|
+
}
|
|
688
|
+
rightHeaderTemplate() {
|
|
689
|
+
var _a, _b, _c;
|
|
690
|
+
const isSmartSessionsEnabled = (_c = (_b = (_a = OptionsController) == null ? void 0 : _a.state) == null ? void 0 : _b.features) == null ? void 0 : _c.smartSessions;
|
|
691
|
+
if (RouterController.state.view !== "Account" || !isSmartSessionsEnabled) {
|
|
692
|
+
return this.closeButtonTemplate();
|
|
693
|
+
}
|
|
694
|
+
return x`<wui-flex>
|
|
695
|
+
<wui-icon-button
|
|
696
|
+
icon="clock"
|
|
697
|
+
size="lg"
|
|
698
|
+
iconSize="lg"
|
|
699
|
+
type="neutral"
|
|
700
|
+
variant="primary"
|
|
701
|
+
@click=${() => RouterController.push("SmartSessionList")}
|
|
702
|
+
data-testid="w3m-header-smart-sessions"
|
|
703
|
+
></wui-icon-button>
|
|
704
|
+
${this.closeButtonTemplate()}
|
|
705
|
+
</wui-flex> `;
|
|
706
|
+
}
|
|
707
|
+
closeButtonTemplate() {
|
|
708
|
+
return x`
|
|
709
|
+
<wui-icon-button
|
|
710
|
+
icon="close"
|
|
711
|
+
size="lg"
|
|
712
|
+
type="neutral"
|
|
713
|
+
variant="primary"
|
|
714
|
+
iconSize="lg"
|
|
715
|
+
@click=${this.onClose.bind(this)}
|
|
716
|
+
data-testid="w3m-header-close"
|
|
717
|
+
></wui-icon-button>
|
|
718
|
+
`;
|
|
719
|
+
}
|
|
720
|
+
titleTemplate() {
|
|
721
|
+
const isBeta = BETA_SCREENS.includes(this.view);
|
|
722
|
+
return x`
|
|
723
|
+
<wui-flex
|
|
724
|
+
view-direction="${this.viewDirection}"
|
|
725
|
+
class="w3m-header-title"
|
|
726
|
+
alignItems="center"
|
|
727
|
+
gap="2"
|
|
728
|
+
>
|
|
729
|
+
<wui-text
|
|
730
|
+
display="inline"
|
|
731
|
+
variant="lg-regular"
|
|
732
|
+
color="primary"
|
|
733
|
+
data-testid="w3m-header-text"
|
|
734
|
+
>
|
|
735
|
+
${this.heading}
|
|
736
|
+
</wui-text>
|
|
737
|
+
${isBeta ? x`<wui-tag variant="accent" size="md">Beta</wui-tag>` : null}
|
|
738
|
+
</wui-flex>
|
|
739
|
+
`;
|
|
740
|
+
}
|
|
741
|
+
leftHeaderTemplate() {
|
|
742
|
+
var _a;
|
|
743
|
+
const { view } = RouterController.state;
|
|
744
|
+
const isConnectHelp = view === "Connect";
|
|
745
|
+
const isEmbeddedEnable = OptionsController.state.enableEmbedded;
|
|
746
|
+
const isApproveTransaction = view === "ApproveTransaction";
|
|
747
|
+
const isConnectingSIWEView = view === "ConnectingSiwe";
|
|
748
|
+
const isAccountView = view === "Account";
|
|
749
|
+
const enableNetworkSwitch = OptionsController.state.enableNetworkSwitch;
|
|
750
|
+
const shouldHideBack = isApproveTransaction || isConnectingSIWEView || isConnectHelp && isEmbeddedEnable;
|
|
751
|
+
if (isAccountView && enableNetworkSwitch) {
|
|
752
|
+
return x`<wui-select
|
|
753
|
+
id="dynamic"
|
|
754
|
+
data-testid="w3m-account-select-network"
|
|
755
|
+
active-network=${o((_a = this.network) == null ? void 0 : _a.name)}
|
|
756
|
+
@click=${this.onNetworks.bind(this)}
|
|
757
|
+
imageSrc=${o(this.networkImage)}
|
|
758
|
+
></wui-select>`;
|
|
759
|
+
}
|
|
760
|
+
if (this.showBack && !shouldHideBack) {
|
|
761
|
+
return x`<wui-icon-button
|
|
762
|
+
data-testid="header-back"
|
|
763
|
+
id="dynamic"
|
|
764
|
+
icon="chevronLeft"
|
|
765
|
+
size="lg"
|
|
766
|
+
iconSize="lg"
|
|
767
|
+
type="neutral"
|
|
768
|
+
variant="primary"
|
|
769
|
+
@click=${this.onGoBack.bind(this)}
|
|
770
|
+
></wui-icon-button>`;
|
|
771
|
+
}
|
|
772
|
+
return x`<wui-icon-button
|
|
773
|
+
data-hidden=${!isConnectHelp}
|
|
774
|
+
id="dynamic"
|
|
775
|
+
icon="helpCircle"
|
|
776
|
+
size="lg"
|
|
777
|
+
iconSize="lg"
|
|
778
|
+
type="neutral"
|
|
779
|
+
variant="primary"
|
|
780
|
+
@click=${this.onWalletHelp.bind(this)}
|
|
781
|
+
></wui-icon-button>`;
|
|
782
|
+
}
|
|
783
|
+
onNetworks() {
|
|
784
|
+
if (this.isAllowedNetworkSwitch()) {
|
|
785
|
+
EventsController.sendEvent({ type: "track", event: "CLICK_NETWORKS" });
|
|
786
|
+
RouterController.push("Networks");
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
isAllowedNetworkSwitch() {
|
|
790
|
+
const requestedCaipNetworks = ChainController.getAllRequestedCaipNetworks();
|
|
791
|
+
const isMultiNetwork = requestedCaipNetworks ? requestedCaipNetworks.length > 1 : false;
|
|
792
|
+
const isValidNetwork = requestedCaipNetworks == null ? void 0 : requestedCaipNetworks.find(({ id }) => {
|
|
793
|
+
var _a;
|
|
794
|
+
return id === ((_a = this.network) == null ? void 0 : _a.id);
|
|
795
|
+
});
|
|
796
|
+
return isMultiNetwork || !isValidNetwork;
|
|
797
|
+
}
|
|
798
|
+
onViewChange() {
|
|
799
|
+
const { history } = RouterController.state;
|
|
800
|
+
let direction = ConstantsUtil.VIEW_DIRECTION.Next;
|
|
801
|
+
if (history.length < this.prevHistoryLength) {
|
|
802
|
+
direction = ConstantsUtil.VIEW_DIRECTION.Prev;
|
|
803
|
+
}
|
|
804
|
+
this.prevHistoryLength = history.length;
|
|
805
|
+
this.viewDirection = direction;
|
|
806
|
+
}
|
|
807
|
+
async onHistoryChange() {
|
|
808
|
+
var _a;
|
|
809
|
+
const { history } = RouterController.state;
|
|
810
|
+
const buttonEl = (_a = this.shadowRoot) == null ? void 0 : _a.querySelector("#dynamic");
|
|
811
|
+
if (history.length > 1 && !this.showBack && buttonEl) {
|
|
812
|
+
await buttonEl.animate([{ opacity: 1 }, { opacity: 0 }], {
|
|
813
|
+
duration: 200,
|
|
814
|
+
fill: "forwards",
|
|
815
|
+
easing: "ease"
|
|
816
|
+
}).finished;
|
|
817
|
+
this.showBack = true;
|
|
818
|
+
buttonEl.animate([{ opacity: 0 }, { opacity: 1 }], {
|
|
819
|
+
duration: 200,
|
|
820
|
+
fill: "forwards",
|
|
821
|
+
easing: "ease"
|
|
822
|
+
});
|
|
823
|
+
} else if (history.length <= 1 && this.showBack && buttonEl) {
|
|
824
|
+
await buttonEl.animate([{ opacity: 1 }, { opacity: 0 }], {
|
|
825
|
+
duration: 200,
|
|
826
|
+
fill: "forwards",
|
|
827
|
+
easing: "ease"
|
|
828
|
+
}).finished;
|
|
829
|
+
this.showBack = false;
|
|
830
|
+
buttonEl.animate([{ opacity: 0 }, { opacity: 1 }], {
|
|
831
|
+
duration: 200,
|
|
832
|
+
fill: "forwards",
|
|
833
|
+
easing: "ease"
|
|
834
|
+
});
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
onGoBack() {
|
|
838
|
+
RouterController.goBack();
|
|
839
|
+
}
|
|
840
|
+
};
|
|
841
|
+
W3mHeader.styles = styles$6;
|
|
842
|
+
__decorate$6([
|
|
843
|
+
r()
|
|
844
|
+
], W3mHeader.prototype, "heading", void 0);
|
|
845
|
+
__decorate$6([
|
|
846
|
+
r()
|
|
847
|
+
], W3mHeader.prototype, "network", void 0);
|
|
848
|
+
__decorate$6([
|
|
849
|
+
r()
|
|
850
|
+
], W3mHeader.prototype, "networkImage", void 0);
|
|
851
|
+
__decorate$6([
|
|
852
|
+
r()
|
|
853
|
+
], W3mHeader.prototype, "showBack", void 0);
|
|
854
|
+
__decorate$6([
|
|
855
|
+
r()
|
|
856
|
+
], W3mHeader.prototype, "prevHistoryLength", void 0);
|
|
857
|
+
__decorate$6([
|
|
858
|
+
r()
|
|
859
|
+
], W3mHeader.prototype, "view", void 0);
|
|
860
|
+
__decorate$6([
|
|
861
|
+
r()
|
|
862
|
+
], W3mHeader.prototype, "viewDirection", void 0);
|
|
863
|
+
W3mHeader = __decorate$6([
|
|
864
|
+
customElement("w3m-header")
|
|
865
|
+
], W3mHeader);
|
|
866
|
+
const styles$5 = css`
|
|
867
|
+
:host {
|
|
868
|
+
display: flex;
|
|
869
|
+
align-items: center;
|
|
870
|
+
gap: ${({ spacing }) => spacing[1]};
|
|
871
|
+
padding: ${({ spacing }) => spacing[2]} ${({ spacing }) => spacing[3]}
|
|
872
|
+
${({ spacing }) => spacing[2]} ${({ spacing }) => spacing[2]};
|
|
873
|
+
border-radius: ${({ borderRadius }) => borderRadius[20]};
|
|
874
|
+
background-color: ${({ tokens }) => tokens.theme.foregroundPrimary};
|
|
875
|
+
box-shadow:
|
|
876
|
+
0px 0px 8px 0px rgba(0, 0, 0, 0.1),
|
|
877
|
+
inset 0 0 0 1px ${({ tokens }) => tokens.theme.borderPrimary};
|
|
878
|
+
max-width: 320px;
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
wui-icon-box {
|
|
882
|
+
border-radius: ${({ borderRadius }) => borderRadius.round} !important;
|
|
883
|
+
overflow: hidden;
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
wui-loading-spinner {
|
|
887
|
+
padding: ${({ spacing }) => spacing[1]};
|
|
888
|
+
background-color: ${({ tokens }) => tokens.core.foregroundAccent010};
|
|
889
|
+
border-radius: ${({ borderRadius }) => borderRadius.round} !important;
|
|
890
|
+
}
|
|
891
|
+
`;
|
|
892
|
+
var __decorate$5 = function(decorators, target, key, desc) {
|
|
893
|
+
var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
894
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
|
|
895
|
+
else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
|
|
896
|
+
return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
|
|
897
|
+
};
|
|
898
|
+
let WuiSnackbar = class WuiSnackbar2 extends i {
|
|
899
|
+
constructor() {
|
|
900
|
+
super(...arguments);
|
|
901
|
+
this.message = "";
|
|
902
|
+
this.variant = "success";
|
|
903
|
+
}
|
|
904
|
+
render() {
|
|
905
|
+
return x`
|
|
906
|
+
${this.templateIcon()}
|
|
907
|
+
<wui-text variant="lg-regular" color="primary" data-testid="wui-snackbar-message"
|
|
908
|
+
>${this.message}</wui-text
|
|
909
|
+
>
|
|
910
|
+
`;
|
|
911
|
+
}
|
|
912
|
+
templateIcon() {
|
|
913
|
+
const COLOR = {
|
|
914
|
+
success: "success",
|
|
915
|
+
error: "error",
|
|
916
|
+
warning: "warning",
|
|
917
|
+
info: "default"
|
|
918
|
+
};
|
|
919
|
+
const ICON = {
|
|
920
|
+
success: "checkmark",
|
|
921
|
+
error: "warning",
|
|
922
|
+
warning: "warningCircle",
|
|
923
|
+
info: "info"
|
|
924
|
+
};
|
|
925
|
+
if (this.variant === "loading") {
|
|
926
|
+
return x`<wui-loading-spinner size="md" color="accent-primary"></wui-loading-spinner>`;
|
|
927
|
+
}
|
|
928
|
+
return x`<wui-icon-box
|
|
929
|
+
size="md"
|
|
930
|
+
color=${COLOR[this.variant]}
|
|
931
|
+
icon=${ICON[this.variant]}
|
|
932
|
+
></wui-icon-box>`;
|
|
933
|
+
}
|
|
934
|
+
};
|
|
935
|
+
WuiSnackbar.styles = [resetStyles, styles$5];
|
|
936
|
+
__decorate$5([
|
|
937
|
+
n()
|
|
938
|
+
], WuiSnackbar.prototype, "message", void 0);
|
|
939
|
+
__decorate$5([
|
|
940
|
+
n()
|
|
941
|
+
], WuiSnackbar.prototype, "variant", void 0);
|
|
942
|
+
WuiSnackbar = __decorate$5([
|
|
943
|
+
customElement("wui-snackbar")
|
|
944
|
+
], WuiSnackbar);
|
|
945
|
+
const styles$4 = i$1`
|
|
946
|
+
:host {
|
|
947
|
+
display: block;
|
|
948
|
+
position: absolute;
|
|
949
|
+
opacity: 0;
|
|
950
|
+
pointer-events: none;
|
|
951
|
+
top: 11px;
|
|
952
|
+
left: 50%;
|
|
953
|
+
width: max-content;
|
|
954
|
+
}
|
|
955
|
+
`;
|
|
956
|
+
var __decorate$4 = function(decorators, target, key, desc) {
|
|
957
|
+
var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
958
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
|
|
959
|
+
else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
|
|
960
|
+
return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
|
|
961
|
+
};
|
|
962
|
+
let W3mSnackBar = class W3mSnackBar2 extends i {
|
|
963
|
+
constructor() {
|
|
964
|
+
super();
|
|
965
|
+
this.unsubscribe = [];
|
|
966
|
+
this.timeout = void 0;
|
|
967
|
+
this.open = SnackController.state.open;
|
|
968
|
+
this.unsubscribe.push(SnackController.subscribeKey("open", (val) => {
|
|
969
|
+
this.open = val;
|
|
970
|
+
this.onOpen();
|
|
971
|
+
}));
|
|
972
|
+
}
|
|
973
|
+
disconnectedCallback() {
|
|
974
|
+
clearTimeout(this.timeout);
|
|
975
|
+
this.unsubscribe.forEach((unsubscribe) => unsubscribe());
|
|
976
|
+
}
|
|
977
|
+
render() {
|
|
978
|
+
const { message, variant } = SnackController.state;
|
|
979
|
+
return x` <wui-snackbar message=${message} variant=${variant}></wui-snackbar> `;
|
|
980
|
+
}
|
|
981
|
+
onOpen() {
|
|
982
|
+
clearTimeout(this.timeout);
|
|
983
|
+
if (this.open) {
|
|
984
|
+
this.animate([
|
|
985
|
+
{ opacity: 0, transform: "translateX(-50%) scale(0.85)" },
|
|
986
|
+
{ opacity: 1, transform: "translateX(-50%) scale(1)" }
|
|
987
|
+
], {
|
|
988
|
+
duration: 150,
|
|
989
|
+
fill: "forwards",
|
|
990
|
+
easing: "ease"
|
|
991
|
+
});
|
|
992
|
+
if (this.timeout) {
|
|
993
|
+
clearTimeout(this.timeout);
|
|
994
|
+
}
|
|
995
|
+
if (SnackController.state.autoClose) {
|
|
996
|
+
this.timeout = setTimeout(() => SnackController.hide(), 2500);
|
|
997
|
+
}
|
|
998
|
+
} else {
|
|
999
|
+
this.animate([
|
|
1000
|
+
{ opacity: 1, transform: "translateX(-50%) scale(1)" },
|
|
1001
|
+
{ opacity: 0, transform: "translateX(-50%) scale(0.85)" }
|
|
1002
|
+
], {
|
|
1003
|
+
duration: 150,
|
|
1004
|
+
fill: "forwards",
|
|
1005
|
+
easing: "ease"
|
|
1006
|
+
});
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
};
|
|
1010
|
+
W3mSnackBar.styles = styles$4;
|
|
1011
|
+
__decorate$4([
|
|
1012
|
+
r()
|
|
1013
|
+
], W3mSnackBar.prototype, "open", void 0);
|
|
1014
|
+
W3mSnackBar = __decorate$4([
|
|
1015
|
+
customElement("w3m-snackbar")
|
|
1016
|
+
], W3mSnackBar);
|
|
1017
|
+
const styles$3 = css`
|
|
1018
|
+
:host {
|
|
1019
|
+
z-index: ${({ tokens }) => tokens.core.zIndex};
|
|
1020
|
+
display: block;
|
|
1021
|
+
backface-visibility: hidden;
|
|
1022
|
+
will-change: opacity;
|
|
1023
|
+
position: fixed;
|
|
1024
|
+
top: 0;
|
|
1025
|
+
left: 0;
|
|
1026
|
+
right: 0;
|
|
1027
|
+
bottom: 0;
|
|
1028
|
+
pointer-events: none;
|
|
1029
|
+
opacity: 0;
|
|
1030
|
+
background-color: ${({ tokens }) => tokens.theme.overlay};
|
|
1031
|
+
backdrop-filter: blur(0px);
|
|
1032
|
+
transition:
|
|
1033
|
+
opacity ${({ durations }) => durations["lg"]} ${({ easings }) => easings["ease-out-power-2"]},
|
|
1034
|
+
backdrop-filter ${({ durations }) => durations["lg"]}
|
|
1035
|
+
${({ easings }) => easings["ease-out-power-2"]};
|
|
1036
|
+
will-change: opacity;
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
:host(.open) {
|
|
1040
|
+
opacity: 1;
|
|
1041
|
+
backdrop-filter: blur(8px);
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
:host(.appkit-modal) {
|
|
1045
|
+
position: relative;
|
|
1046
|
+
pointer-events: unset;
|
|
1047
|
+
background: none;
|
|
1048
|
+
width: 100%;
|
|
1049
|
+
opacity: 1;
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
wui-card {
|
|
1053
|
+
max-width: var(--apkt-modal-width);
|
|
1054
|
+
width: 100%;
|
|
1055
|
+
position: relative;
|
|
1056
|
+
outline: none;
|
|
1057
|
+
transform: translateY(4px);
|
|
1058
|
+
box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.05);
|
|
1059
|
+
transition:
|
|
1060
|
+
transform ${({ durations }) => durations["lg"]}
|
|
1061
|
+
${({ easings }) => easings["ease-out-power-2"]},
|
|
1062
|
+
border-radius ${({ durations }) => durations["lg"]}
|
|
1063
|
+
${({ easings }) => easings["ease-out-power-1"]},
|
|
1064
|
+
background-color ${({ durations }) => durations["lg"]}
|
|
1065
|
+
${({ easings }) => easings["ease-out-power-1"]},
|
|
1066
|
+
box-shadow ${({ durations }) => durations["lg"]}
|
|
1067
|
+
${({ easings }) => easings["ease-out-power-1"]};
|
|
1068
|
+
will-change: border-radius, background-color, transform, box-shadow;
|
|
1069
|
+
background-color: ${({ tokens }) => tokens.theme.backgroundPrimary};
|
|
1070
|
+
padding: var(--local-modal-padding);
|
|
1071
|
+
box-sizing: border-box;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
:host(.open) wui-card {
|
|
1075
|
+
transform: translateY(0px);
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
wui-card::before {
|
|
1079
|
+
z-index: 1;
|
|
1080
|
+
pointer-events: none;
|
|
1081
|
+
content: '';
|
|
1082
|
+
position: absolute;
|
|
1083
|
+
inset: 0;
|
|
1084
|
+
border-radius: clamp(0px, var(--apkt-borderRadius-8), 44px);
|
|
1085
|
+
transition: box-shadow ${({ durations }) => durations["lg"]}
|
|
1086
|
+
${({ easings }) => easings["ease-out-power-2"]};
|
|
1087
|
+
transition-delay: ${({ durations }) => durations["md"]};
|
|
1088
|
+
will-change: box-shadow;
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
:host([data-mobile-fullscreen='true']) wui-card::before {
|
|
1092
|
+
border-radius: 0px;
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
:host([data-border='true']) wui-card::before {
|
|
1096
|
+
box-shadow: inset 0px 0px 0px 4px ${({ tokens }) => tokens.theme.foregroundSecondary};
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
:host([data-border='false']) wui-card::before {
|
|
1100
|
+
box-shadow: inset 0px 0px 0px 1px ${({ tokens }) => tokens.theme.borderPrimaryDark};
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
:host([data-border='true']) wui-card {
|
|
1104
|
+
animation:
|
|
1105
|
+
fade-in ${({ durations }) => durations["lg"]} ${({ easings }) => easings["ease-out-power-2"]},
|
|
1106
|
+
card-background-border var(--apkt-duration-dynamic)
|
|
1107
|
+
${({ easings }) => easings["ease-out-power-2"]};
|
|
1108
|
+
animation-fill-mode: backwards, both;
|
|
1109
|
+
animation-delay: var(--apkt-duration-dynamic);
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
:host([data-border='false']) wui-card {
|
|
1113
|
+
animation:
|
|
1114
|
+
fade-in ${({ durations }) => durations["lg"]} ${({ easings }) => easings["ease-out-power-2"]},
|
|
1115
|
+
card-background-default var(--apkt-duration-dynamic)
|
|
1116
|
+
${({ easings }) => easings["ease-out-power-2"]};
|
|
1117
|
+
animation-fill-mode: backwards, both;
|
|
1118
|
+
animation-delay: 0s;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
:host(.appkit-modal) wui-card {
|
|
1122
|
+
max-width: var(--apkt-modal-width);
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
wui-card[shake='true'] {
|
|
1126
|
+
animation:
|
|
1127
|
+
fade-in ${({ durations }) => durations["lg"]} ${({ easings }) => easings["ease-out-power-2"]},
|
|
1128
|
+
w3m-shake ${({ durations }) => durations["xl"]}
|
|
1129
|
+
${({ easings }) => easings["ease-out-power-2"]};
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
wui-flex {
|
|
1133
|
+
overflow-x: hidden;
|
|
1134
|
+
overflow-y: auto;
|
|
1135
|
+
display: flex;
|
|
1136
|
+
align-items: center;
|
|
1137
|
+
justify-content: center;
|
|
1138
|
+
width: 100%;
|
|
1139
|
+
height: 100%;
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
@media (max-height: 700px) and (min-width: 431px) {
|
|
1143
|
+
wui-flex {
|
|
1144
|
+
align-items: flex-start;
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
wui-card {
|
|
1148
|
+
margin: var(--apkt-spacing-6) 0px;
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
@media (max-width: 430px) {
|
|
1153
|
+
:host([data-mobile-fullscreen='true']) {
|
|
1154
|
+
height: 100dvh;
|
|
1155
|
+
}
|
|
1156
|
+
:host([data-mobile-fullscreen='true']) wui-flex {
|
|
1157
|
+
align-items: stretch;
|
|
1158
|
+
}
|
|
1159
|
+
:host([data-mobile-fullscreen='true']) wui-card {
|
|
1160
|
+
max-width: 100%;
|
|
1161
|
+
height: 100%;
|
|
1162
|
+
border-radius: 0;
|
|
1163
|
+
border: none;
|
|
1164
|
+
}
|
|
1165
|
+
:host(:not([data-mobile-fullscreen='true'])) wui-flex {
|
|
1166
|
+
align-items: flex-end;
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
:host(:not([data-mobile-fullscreen='true'])) wui-card {
|
|
1170
|
+
max-width: 100%;
|
|
1171
|
+
border-bottom: none;
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
:host(:not([data-mobile-fullscreen='true'])) wui-card[data-embedded='true'] {
|
|
1175
|
+
border-bottom-left-radius: clamp(0px, var(--apkt-borderRadius-8), 44px);
|
|
1176
|
+
border-bottom-right-radius: clamp(0px, var(--apkt-borderRadius-8), 44px);
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
:host(:not([data-mobile-fullscreen='true'])) wui-card:not([data-embedded='true']) {
|
|
1180
|
+
border-bottom-left-radius: 0px;
|
|
1181
|
+
border-bottom-right-radius: 0px;
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
wui-card[shake='true'] {
|
|
1185
|
+
animation: w3m-shake 0.5s ${({ easings }) => easings["ease-out-power-2"]};
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
@keyframes fade-in {
|
|
1190
|
+
0% {
|
|
1191
|
+
transform: scale(0.99) translateY(4px);
|
|
1192
|
+
}
|
|
1193
|
+
100% {
|
|
1194
|
+
transform: scale(1) translateY(0);
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
@keyframes w3m-shake {
|
|
1199
|
+
0% {
|
|
1200
|
+
transform: scale(1) rotate(0deg);
|
|
1201
|
+
}
|
|
1202
|
+
20% {
|
|
1203
|
+
transform: scale(1) rotate(-1deg);
|
|
1204
|
+
}
|
|
1205
|
+
40% {
|
|
1206
|
+
transform: scale(1) rotate(1.5deg);
|
|
1207
|
+
}
|
|
1208
|
+
60% {
|
|
1209
|
+
transform: scale(1) rotate(-1.5deg);
|
|
1210
|
+
}
|
|
1211
|
+
80% {
|
|
1212
|
+
transform: scale(1) rotate(1deg);
|
|
1213
|
+
}
|
|
1214
|
+
100% {
|
|
1215
|
+
transform: scale(1) rotate(0deg);
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
@keyframes card-background-border {
|
|
1220
|
+
from {
|
|
1221
|
+
background-color: ${({ tokens }) => tokens.theme.backgroundPrimary};
|
|
1222
|
+
}
|
|
1223
|
+
to {
|
|
1224
|
+
background-color: ${({ tokens }) => tokens.theme.foregroundSecondary};
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
@keyframes card-background-default {
|
|
1229
|
+
from {
|
|
1230
|
+
background-color: ${({ tokens }) => tokens.theme.foregroundSecondary};
|
|
1231
|
+
}
|
|
1232
|
+
to {
|
|
1233
|
+
background-color: ${({ tokens }) => tokens.theme.backgroundPrimary};
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
`;
|
|
1237
|
+
var __decorate$3 = function(decorators, target, key, desc) {
|
|
1238
|
+
var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1239
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
|
|
1240
|
+
else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
|
|
1241
|
+
return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
|
|
1242
|
+
};
|
|
1243
|
+
const SCROLL_LOCK = "scroll-lock";
|
|
1244
|
+
const PADDING_OVERRIDES = {
|
|
1245
|
+
PayWithExchange: "0",
|
|
1246
|
+
PayWithExchangeSelectAsset: "0"
|
|
1247
|
+
};
|
|
1248
|
+
class W3mModalBase extends i {
|
|
1249
|
+
constructor() {
|
|
1250
|
+
super();
|
|
1251
|
+
this.unsubscribe = [];
|
|
1252
|
+
this.abortController = void 0;
|
|
1253
|
+
this.hasPrefetched = false;
|
|
1254
|
+
this.enableEmbedded = OptionsController.state.enableEmbedded;
|
|
1255
|
+
this.open = ModalController.state.open;
|
|
1256
|
+
this.caipAddress = ChainController.state.activeCaipAddress;
|
|
1257
|
+
this.caipNetwork = ChainController.state.activeCaipNetwork;
|
|
1258
|
+
this.shake = ModalController.state.shake;
|
|
1259
|
+
this.filterByNamespace = ConnectorController.state.filterByNamespace;
|
|
1260
|
+
this.padding = vars.spacing[1];
|
|
1261
|
+
this.mobileFullScreen = OptionsController.state.enableMobileFullScreen;
|
|
1262
|
+
this.initializeTheming();
|
|
1263
|
+
ApiController.prefetchAnalyticsConfig();
|
|
1264
|
+
this.unsubscribe.push(...[
|
|
1265
|
+
ModalController.subscribeKey("open", (val) => val ? this.onOpen() : this.onClose()),
|
|
1266
|
+
ModalController.subscribeKey("shake", (val) => this.shake = val),
|
|
1267
|
+
ChainController.subscribeKey("activeCaipNetwork", (val) => this.onNewNetwork(val)),
|
|
1268
|
+
ChainController.subscribeKey("activeCaipAddress", (val) => this.onNewAddress(val)),
|
|
1269
|
+
OptionsController.subscribeKey("enableEmbedded", (val) => this.enableEmbedded = val),
|
|
1270
|
+
ConnectorController.subscribeKey("filterByNamespace", (val) => {
|
|
1271
|
+
var _a;
|
|
1272
|
+
if (this.filterByNamespace !== val && !((_a = ChainController.getAccountData(val)) == null ? void 0 : _a.caipAddress)) {
|
|
1273
|
+
ApiController.fetchRecommendedWallets();
|
|
1274
|
+
this.filterByNamespace = val;
|
|
1275
|
+
}
|
|
1276
|
+
}),
|
|
1277
|
+
RouterController.subscribeKey("view", () => {
|
|
1278
|
+
this.dataset["border"] = HelpersUtil.hasFooter() ? "true" : "false";
|
|
1279
|
+
this.padding = PADDING_OVERRIDES[RouterController.state.view] ?? vars.spacing[1];
|
|
1280
|
+
})
|
|
1281
|
+
]);
|
|
1282
|
+
}
|
|
1283
|
+
firstUpdated() {
|
|
1284
|
+
this.dataset["border"] = HelpersUtil.hasFooter() ? "true" : "false";
|
|
1285
|
+
if (this.mobileFullScreen) {
|
|
1286
|
+
this.setAttribute("data-mobile-fullscreen", "true");
|
|
1287
|
+
}
|
|
1288
|
+
if (this.caipAddress) {
|
|
1289
|
+
if (this.enableEmbedded) {
|
|
1290
|
+
ModalController.close();
|
|
1291
|
+
this.prefetch();
|
|
1292
|
+
return;
|
|
1293
|
+
}
|
|
1294
|
+
this.onNewAddress(this.caipAddress);
|
|
1295
|
+
}
|
|
1296
|
+
if (this.open) {
|
|
1297
|
+
this.onOpen();
|
|
1298
|
+
}
|
|
1299
|
+
if (this.enableEmbedded) {
|
|
1300
|
+
this.prefetch();
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
disconnectedCallback() {
|
|
1304
|
+
this.unsubscribe.forEach((unsubscribe) => unsubscribe());
|
|
1305
|
+
this.onRemoveKeyboardListener();
|
|
1306
|
+
}
|
|
1307
|
+
render() {
|
|
1308
|
+
this.style.setProperty("--local-modal-padding", this.padding);
|
|
1309
|
+
if (this.enableEmbedded) {
|
|
1310
|
+
return x`${this.contentTemplate()}
|
|
1311
|
+
<w3m-tooltip></w3m-tooltip> `;
|
|
1312
|
+
}
|
|
1313
|
+
return this.open ? x`
|
|
1314
|
+
<wui-flex @click=${this.onOverlayClick.bind(this)} data-testid="w3m-modal-overlay">
|
|
1315
|
+
${this.contentTemplate()}
|
|
1316
|
+
</wui-flex>
|
|
1317
|
+
<w3m-tooltip></w3m-tooltip>
|
|
1318
|
+
` : null;
|
|
1319
|
+
}
|
|
1320
|
+
contentTemplate() {
|
|
1321
|
+
return x` <wui-card
|
|
1322
|
+
shake="${this.shake}"
|
|
1323
|
+
data-embedded="${o(this.enableEmbedded)}"
|
|
1324
|
+
role="alertdialog"
|
|
1325
|
+
aria-modal="true"
|
|
1326
|
+
tabindex="0"
|
|
1327
|
+
data-testid="w3m-modal-card"
|
|
1328
|
+
>
|
|
1329
|
+
<w3m-header></w3m-header>
|
|
1330
|
+
<w3m-router></w3m-router>
|
|
1331
|
+
<w3m-footer></w3m-footer>
|
|
1332
|
+
<w3m-snackbar></w3m-snackbar>
|
|
1333
|
+
<w3m-alertbar></w3m-alertbar>
|
|
1334
|
+
</wui-card>`;
|
|
1335
|
+
}
|
|
1336
|
+
async onOverlayClick(event) {
|
|
1337
|
+
if (event.target === event.currentTarget) {
|
|
1338
|
+
if (this.mobileFullScreen) {
|
|
1339
|
+
return;
|
|
1340
|
+
}
|
|
1341
|
+
await this.handleClose();
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
async handleClose() {
|
|
1345
|
+
await ModalUtil.safeClose();
|
|
1346
|
+
}
|
|
1347
|
+
initializeTheming() {
|
|
1348
|
+
const { themeVariables, themeMode } = ThemeController.state;
|
|
1349
|
+
const defaultThemeMode = UiHelperUtil.getColorTheme(themeMode);
|
|
1350
|
+
initializeTheming(themeVariables, defaultThemeMode);
|
|
1351
|
+
}
|
|
1352
|
+
onClose() {
|
|
1353
|
+
this.open = false;
|
|
1354
|
+
this.classList.remove("open");
|
|
1355
|
+
this.onScrollUnlock();
|
|
1356
|
+
SnackController.hide();
|
|
1357
|
+
this.onRemoveKeyboardListener();
|
|
1358
|
+
}
|
|
1359
|
+
onOpen() {
|
|
1360
|
+
this.open = true;
|
|
1361
|
+
this.classList.add("open");
|
|
1362
|
+
this.onScrollLock();
|
|
1363
|
+
this.onAddKeyboardListener();
|
|
1364
|
+
}
|
|
1365
|
+
onScrollLock() {
|
|
1366
|
+
const styleTag = document.createElement("style");
|
|
1367
|
+
styleTag.dataset["w3m"] = SCROLL_LOCK;
|
|
1368
|
+
styleTag.textContent = `
|
|
1369
|
+
body {
|
|
1370
|
+
touch-action: none;
|
|
1371
|
+
overflow: hidden;
|
|
1372
|
+
overscroll-behavior: contain;
|
|
1373
|
+
}
|
|
1374
|
+
w3m-modal {
|
|
1375
|
+
pointer-events: auto;
|
|
1376
|
+
}
|
|
1377
|
+
`;
|
|
1378
|
+
document.head.appendChild(styleTag);
|
|
1379
|
+
}
|
|
1380
|
+
onScrollUnlock() {
|
|
1381
|
+
const styleTag = document.head.querySelector(`style[data-w3m="${SCROLL_LOCK}"]`);
|
|
1382
|
+
if (styleTag) {
|
|
1383
|
+
styleTag.remove();
|
|
1384
|
+
}
|
|
1385
|
+
}
|
|
1386
|
+
onAddKeyboardListener() {
|
|
1387
|
+
var _a;
|
|
1388
|
+
this.abortController = new AbortController();
|
|
1389
|
+
const card = (_a = this.shadowRoot) == null ? void 0 : _a.querySelector("wui-card");
|
|
1390
|
+
card == null ? void 0 : card.focus();
|
|
1391
|
+
window.addEventListener("keydown", (event) => {
|
|
1392
|
+
if (event.key === "Escape") {
|
|
1393
|
+
this.handleClose();
|
|
1394
|
+
} else if (event.key === "Tab") {
|
|
1395
|
+
const { tagName } = event.target;
|
|
1396
|
+
if (tagName && !tagName.includes("W3M-") && !tagName.includes("WUI-")) {
|
|
1397
|
+
card == null ? void 0 : card.focus();
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
}, this.abortController);
|
|
1401
|
+
}
|
|
1402
|
+
onRemoveKeyboardListener() {
|
|
1403
|
+
var _a;
|
|
1404
|
+
(_a = this.abortController) == null ? void 0 : _a.abort();
|
|
1405
|
+
this.abortController = void 0;
|
|
1406
|
+
}
|
|
1407
|
+
async onNewAddress(caipAddress) {
|
|
1408
|
+
const isSwitchingNamespace = ChainController.state.isSwitchingNamespace;
|
|
1409
|
+
const isInProfileView = RouterController.state.view === "ProfileWallets";
|
|
1410
|
+
const shouldClose = !caipAddress && !isSwitchingNamespace && !isInProfileView;
|
|
1411
|
+
if (shouldClose) {
|
|
1412
|
+
ModalController.close();
|
|
1413
|
+
}
|
|
1414
|
+
await SIWXUtil.initializeIfEnabled(caipAddress);
|
|
1415
|
+
this.caipAddress = caipAddress;
|
|
1416
|
+
ChainController.setIsSwitchingNamespace(false);
|
|
1417
|
+
}
|
|
1418
|
+
onNewNetwork(nextCaipNetwork) {
|
|
1419
|
+
var _a, _b;
|
|
1420
|
+
const prevCaipNetwork = this.caipNetwork;
|
|
1421
|
+
const prevCaipNetworkId = (_a = prevCaipNetwork == null ? void 0 : prevCaipNetwork.caipNetworkId) == null ? void 0 : _a.toString();
|
|
1422
|
+
const nextNetworkId = (_b = nextCaipNetwork == null ? void 0 : nextCaipNetwork.caipNetworkId) == null ? void 0 : _b.toString();
|
|
1423
|
+
const didNetworkChange = prevCaipNetworkId !== nextNetworkId;
|
|
1424
|
+
const isUnsupportedNetworkScreen = RouterController.state.view === "UnsupportedChain";
|
|
1425
|
+
const isModalOpen = ModalController.state.open;
|
|
1426
|
+
let shouldGoBack = false;
|
|
1427
|
+
if (this.enableEmbedded && RouterController.state.view === "SwitchNetwork") {
|
|
1428
|
+
shouldGoBack = true;
|
|
1429
|
+
}
|
|
1430
|
+
if (didNetworkChange) {
|
|
1431
|
+
SwapController.resetState();
|
|
1432
|
+
}
|
|
1433
|
+
if (isModalOpen && isUnsupportedNetworkScreen) {
|
|
1434
|
+
shouldGoBack = true;
|
|
1435
|
+
}
|
|
1436
|
+
if (shouldGoBack && RouterController.state.view !== "SIWXSignMessage") {
|
|
1437
|
+
RouterController.goBack();
|
|
1438
|
+
}
|
|
1439
|
+
this.caipNetwork = nextCaipNetwork;
|
|
1440
|
+
}
|
|
1441
|
+
prefetch() {
|
|
1442
|
+
if (!this.hasPrefetched) {
|
|
1443
|
+
ApiController.prefetch();
|
|
1444
|
+
ApiController.fetchWalletsByPage({ page: 1 });
|
|
1445
|
+
this.hasPrefetched = true;
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
W3mModalBase.styles = styles$3;
|
|
1450
|
+
__decorate$3([
|
|
1451
|
+
n({ type: Boolean })
|
|
1452
|
+
], W3mModalBase.prototype, "enableEmbedded", void 0);
|
|
1453
|
+
__decorate$3([
|
|
1454
|
+
r()
|
|
1455
|
+
], W3mModalBase.prototype, "open", void 0);
|
|
1456
|
+
__decorate$3([
|
|
1457
|
+
r()
|
|
1458
|
+
], W3mModalBase.prototype, "caipAddress", void 0);
|
|
1459
|
+
__decorate$3([
|
|
1460
|
+
r()
|
|
1461
|
+
], W3mModalBase.prototype, "caipNetwork", void 0);
|
|
1462
|
+
__decorate$3([
|
|
1463
|
+
r()
|
|
1464
|
+
], W3mModalBase.prototype, "shake", void 0);
|
|
1465
|
+
__decorate$3([
|
|
1466
|
+
r()
|
|
1467
|
+
], W3mModalBase.prototype, "filterByNamespace", void 0);
|
|
1468
|
+
__decorate$3([
|
|
1469
|
+
r()
|
|
1470
|
+
], W3mModalBase.prototype, "padding", void 0);
|
|
1471
|
+
__decorate$3([
|
|
1472
|
+
r()
|
|
1473
|
+
], W3mModalBase.prototype, "mobileFullScreen", void 0);
|
|
1474
|
+
let W3mModal = class W3mModal2 extends W3mModalBase {
|
|
1475
|
+
};
|
|
1476
|
+
W3mModal = __decorate$3([
|
|
1477
|
+
customElement("w3m-modal")
|
|
1478
|
+
], W3mModal);
|
|
1479
|
+
let AppKitModal = class AppKitModal2 extends W3mModalBase {
|
|
1480
|
+
};
|
|
1481
|
+
AppKitModal = __decorate$3([
|
|
1482
|
+
customElement("appkit-modal")
|
|
1483
|
+
], AppKitModal);
|
|
1484
|
+
const styles$2 = css`
|
|
1485
|
+
.icon-box {
|
|
1486
|
+
width: 64px;
|
|
1487
|
+
height: 64px;
|
|
1488
|
+
border-radius: ${({ borderRadius }) => borderRadius[5]};
|
|
1489
|
+
background-color: ${({ colors }) => colors.semanticError010};
|
|
1490
|
+
}
|
|
1491
|
+
`;
|
|
1492
|
+
var __decorate$2 = function(decorators, target, key, desc) {
|
|
1493
|
+
var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1494
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
|
|
1495
|
+
else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
|
|
1496
|
+
return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
|
|
1497
|
+
};
|
|
1498
|
+
let W3mUsageExceededView = class W3mUsageExceededView2 extends i {
|
|
1499
|
+
constructor() {
|
|
1500
|
+
super();
|
|
1501
|
+
}
|
|
1502
|
+
render() {
|
|
1503
|
+
return x`
|
|
1504
|
+
<wui-flex
|
|
1505
|
+
flexDirection="column"
|
|
1506
|
+
alignItems="center"
|
|
1507
|
+
gap="4"
|
|
1508
|
+
.padding="${["1", "3", "4", "3"]}"
|
|
1509
|
+
>
|
|
1510
|
+
<wui-flex justifyContent="center" alignItems="center" class="icon-box">
|
|
1511
|
+
<wui-icon size="xxl" color="error" name="warningCircle"></wui-icon>
|
|
1512
|
+
</wui-flex>
|
|
1513
|
+
|
|
1514
|
+
<wui-text variant="lg-medium" color="primary" align="center">
|
|
1515
|
+
The app isn't responding as expected
|
|
1516
|
+
</wui-text>
|
|
1517
|
+
<wui-text variant="md-regular" color="secondary" align="center">
|
|
1518
|
+
Try again or reach out to the app team for help.
|
|
1519
|
+
</wui-text>
|
|
1520
|
+
|
|
1521
|
+
<wui-button
|
|
1522
|
+
variant="neutral-secondary"
|
|
1523
|
+
size="md"
|
|
1524
|
+
@click=${this.onTryAgainClick.bind(this)}
|
|
1525
|
+
data-testid="w3m-usage-exceeded-button"
|
|
1526
|
+
>
|
|
1527
|
+
<wui-icon color="inherit" slot="iconLeft" name="refresh"></wui-icon>
|
|
1528
|
+
Try Again
|
|
1529
|
+
</wui-button>
|
|
1530
|
+
</wui-flex>
|
|
1531
|
+
`;
|
|
1532
|
+
}
|
|
1533
|
+
onTryAgainClick() {
|
|
1534
|
+
RouterController.goBack();
|
|
1535
|
+
}
|
|
1536
|
+
};
|
|
1537
|
+
W3mUsageExceededView.styles = styles$2;
|
|
1538
|
+
W3mUsageExceededView = __decorate$2([
|
|
1539
|
+
customElement("w3m-usage-exceeded-view")
|
|
1540
|
+
], W3mUsageExceededView);
|
|
1541
|
+
const styles$1 = css`
|
|
1542
|
+
:host {
|
|
1543
|
+
width: 100%;
|
|
1544
|
+
}
|
|
1545
|
+
`;
|
|
1546
|
+
var __decorate$1 = function(decorators, target, key, desc) {
|
|
1547
|
+
var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1548
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
|
|
1549
|
+
else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
|
|
1550
|
+
return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
|
|
1551
|
+
};
|
|
1552
|
+
let W3mListWallet = class W3mListWallet2 extends i {
|
|
1553
|
+
constructor() {
|
|
1554
|
+
super(...arguments);
|
|
1555
|
+
this.hasImpressionSent = false;
|
|
1556
|
+
this.walletImages = [];
|
|
1557
|
+
this.imageSrc = "";
|
|
1558
|
+
this.name = "";
|
|
1559
|
+
this.size = "md";
|
|
1560
|
+
this.tabIdx = void 0;
|
|
1561
|
+
this.disabled = false;
|
|
1562
|
+
this.showAllWallets = false;
|
|
1563
|
+
this.loading = false;
|
|
1564
|
+
this.loadingSpinnerColor = "accent-100";
|
|
1565
|
+
this.rdnsId = "";
|
|
1566
|
+
this.displayIndex = void 0;
|
|
1567
|
+
this.walletRank = void 0;
|
|
1568
|
+
this.namespaces = [];
|
|
1569
|
+
}
|
|
1570
|
+
connectedCallback() {
|
|
1571
|
+
super.connectedCallback();
|
|
1572
|
+
}
|
|
1573
|
+
disconnectedCallback() {
|
|
1574
|
+
super.disconnectedCallback();
|
|
1575
|
+
this.cleanupIntersectionObserver();
|
|
1576
|
+
}
|
|
1577
|
+
updated(changedProperties) {
|
|
1578
|
+
super.updated(changedProperties);
|
|
1579
|
+
if (changedProperties.has("name") || changedProperties.has("imageSrc") || changedProperties.has("walletRank")) {
|
|
1580
|
+
this.hasImpressionSent = false;
|
|
1581
|
+
}
|
|
1582
|
+
const hasWalletRankChanged = changedProperties.has("walletRank") && this.walletRank;
|
|
1583
|
+
if (hasWalletRankChanged && !this.intersectionObserver) {
|
|
1584
|
+
this.setupIntersectionObserver();
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1587
|
+
setupIntersectionObserver() {
|
|
1588
|
+
this.intersectionObserver = new IntersectionObserver((entries) => {
|
|
1589
|
+
entries.forEach((entry) => {
|
|
1590
|
+
if (entry.isIntersecting && !this.loading && !this.hasImpressionSent) {
|
|
1591
|
+
this.sendImpressionEvent();
|
|
1592
|
+
}
|
|
1593
|
+
});
|
|
1594
|
+
}, { threshold: 0.1 });
|
|
1595
|
+
this.intersectionObserver.observe(this);
|
|
1596
|
+
}
|
|
1597
|
+
cleanupIntersectionObserver() {
|
|
1598
|
+
if (this.intersectionObserver) {
|
|
1599
|
+
this.intersectionObserver.disconnect();
|
|
1600
|
+
this.intersectionObserver = void 0;
|
|
1601
|
+
}
|
|
1602
|
+
}
|
|
1603
|
+
sendImpressionEvent() {
|
|
1604
|
+
if (!this.name || this.hasImpressionSent || !this.walletRank) {
|
|
1605
|
+
return;
|
|
1606
|
+
}
|
|
1607
|
+
this.hasImpressionSent = true;
|
|
1608
|
+
if (this.rdnsId || this.name) {
|
|
1609
|
+
EventsController.sendWalletImpressionEvent({
|
|
1610
|
+
name: this.name,
|
|
1611
|
+
walletRank: this.walletRank,
|
|
1612
|
+
rdnsId: this.rdnsId,
|
|
1613
|
+
view: RouterController.state.view,
|
|
1614
|
+
displayIndex: this.displayIndex
|
|
1615
|
+
});
|
|
1616
|
+
}
|
|
1617
|
+
}
|
|
1618
|
+
handleGetWalletNamespaces() {
|
|
1619
|
+
const isMultiChain = Object.keys(AdapterController.state.adapters).length > 1;
|
|
1620
|
+
if (isMultiChain) {
|
|
1621
|
+
return this.namespaces;
|
|
1622
|
+
}
|
|
1623
|
+
return [];
|
|
1624
|
+
}
|
|
1625
|
+
render() {
|
|
1626
|
+
return x`
|
|
1627
|
+
<wui-list-wallet
|
|
1628
|
+
.walletImages=${this.walletImages}
|
|
1629
|
+
imageSrc=${o(this.imageSrc)}
|
|
1630
|
+
name=${this.name}
|
|
1631
|
+
size=${o(this.size)}
|
|
1632
|
+
tagLabel=${o(this.tagLabel)}
|
|
1633
|
+
.tagVariant=${this.tagVariant}
|
|
1634
|
+
.walletIcon=${this.walletIcon}
|
|
1635
|
+
.tabIdx=${this.tabIdx}
|
|
1636
|
+
.disabled=${this.disabled}
|
|
1637
|
+
.showAllWallets=${this.showAllWallets}
|
|
1638
|
+
.loading=${this.loading}
|
|
1639
|
+
loadingSpinnerColor=${this.loadingSpinnerColor}
|
|
1640
|
+
.namespaces=${this.handleGetWalletNamespaces()}
|
|
1641
|
+
></wui-list-wallet>
|
|
1642
|
+
`;
|
|
1643
|
+
}
|
|
1644
|
+
};
|
|
1645
|
+
W3mListWallet.styles = styles$1;
|
|
1646
|
+
__decorate$1([
|
|
1647
|
+
n({ type: Array })
|
|
1648
|
+
], W3mListWallet.prototype, "walletImages", void 0);
|
|
1649
|
+
__decorate$1([
|
|
1650
|
+
n()
|
|
1651
|
+
], W3mListWallet.prototype, "imageSrc", void 0);
|
|
1652
|
+
__decorate$1([
|
|
1653
|
+
n()
|
|
1654
|
+
], W3mListWallet.prototype, "name", void 0);
|
|
1655
|
+
__decorate$1([
|
|
1656
|
+
n()
|
|
1657
|
+
], W3mListWallet.prototype, "size", void 0);
|
|
1658
|
+
__decorate$1([
|
|
1659
|
+
n()
|
|
1660
|
+
], W3mListWallet.prototype, "tagLabel", void 0);
|
|
1661
|
+
__decorate$1([
|
|
1662
|
+
n()
|
|
1663
|
+
], W3mListWallet.prototype, "tagVariant", void 0);
|
|
1664
|
+
__decorate$1([
|
|
1665
|
+
n()
|
|
1666
|
+
], W3mListWallet.prototype, "walletIcon", void 0);
|
|
1667
|
+
__decorate$1([
|
|
1668
|
+
n()
|
|
1669
|
+
], W3mListWallet.prototype, "tabIdx", void 0);
|
|
1670
|
+
__decorate$1([
|
|
1671
|
+
n({ type: Boolean })
|
|
1672
|
+
], W3mListWallet.prototype, "disabled", void 0);
|
|
1673
|
+
__decorate$1([
|
|
1674
|
+
n({ type: Boolean })
|
|
1675
|
+
], W3mListWallet.prototype, "showAllWallets", void 0);
|
|
1676
|
+
__decorate$1([
|
|
1677
|
+
n({ type: Boolean })
|
|
1678
|
+
], W3mListWallet.prototype, "loading", void 0);
|
|
1679
|
+
__decorate$1([
|
|
1680
|
+
n({ type: String })
|
|
1681
|
+
], W3mListWallet.prototype, "loadingSpinnerColor", void 0);
|
|
1682
|
+
__decorate$1([
|
|
1683
|
+
n()
|
|
1684
|
+
], W3mListWallet.prototype, "rdnsId", void 0);
|
|
1685
|
+
__decorate$1([
|
|
1686
|
+
n()
|
|
1687
|
+
], W3mListWallet.prototype, "displayIndex", void 0);
|
|
1688
|
+
__decorate$1([
|
|
1689
|
+
n()
|
|
1690
|
+
], W3mListWallet.prototype, "walletRank", void 0);
|
|
1691
|
+
__decorate$1([
|
|
1692
|
+
n({ type: Array })
|
|
1693
|
+
], W3mListWallet.prototype, "namespaces", void 0);
|
|
1694
|
+
W3mListWallet = __decorate$1([
|
|
1695
|
+
customElement("w3m-list-wallet")
|
|
1696
|
+
], W3mListWallet);
|
|
1697
|
+
const styles = css`
|
|
1698
|
+
:host {
|
|
1699
|
+
--local-duration-height: 0s;
|
|
1700
|
+
--local-duration: ${({ durations }) => durations["lg"]};
|
|
1701
|
+
--local-transition: ${({ easings }) => easings["ease-out-power-2"]};
|
|
1702
|
+
}
|
|
1703
|
+
|
|
1704
|
+
.container {
|
|
1705
|
+
display: block;
|
|
1706
|
+
overflow: hidden;
|
|
1707
|
+
overflow: hidden;
|
|
1708
|
+
position: relative;
|
|
1709
|
+
height: var(--local-container-height);
|
|
1710
|
+
transition: height var(--local-duration-height) var(--local-transition);
|
|
1711
|
+
will-change: height, padding-bottom;
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
.container[data-mobile-fullscreen='true'] {
|
|
1715
|
+
overflow: scroll;
|
|
1716
|
+
}
|
|
1717
|
+
|
|
1718
|
+
.page {
|
|
1719
|
+
position: absolute;
|
|
1720
|
+
top: 0;
|
|
1721
|
+
left: 0;
|
|
1722
|
+
right: 0;
|
|
1723
|
+
width: 100%;
|
|
1724
|
+
height: auto;
|
|
1725
|
+
width: inherit;
|
|
1726
|
+
box-sizing: border-box;
|
|
1727
|
+
display: flex;
|
|
1728
|
+
flex-direction: column;
|
|
1729
|
+
background-color: ${({ tokens }) => tokens.theme.backgroundPrimary};
|
|
1730
|
+
border-bottom-left-radius: var(--local-border-bottom-radius);
|
|
1731
|
+
border-bottom-right-radius: var(--local-border-bottom-radius);
|
|
1732
|
+
transition: border-bottom-left-radius var(--local-duration) var(--local-transition);
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1735
|
+
.page[data-mobile-fullscreen='true'] {
|
|
1736
|
+
height: 100%;
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1739
|
+
.page-content {
|
|
1740
|
+
display: flex;
|
|
1741
|
+
flex-direction: column;
|
|
1742
|
+
min-height: 100%;
|
|
1743
|
+
}
|
|
1744
|
+
|
|
1745
|
+
.footer {
|
|
1746
|
+
height: var(--apkt-footer-height);
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1749
|
+
div.page[view-direction^='prev-'] .page-content {
|
|
1750
|
+
animation:
|
|
1751
|
+
slide-left-out var(--local-duration) forwards var(--local-transition),
|
|
1752
|
+
slide-left-in var(--local-duration) forwards var(--local-transition);
|
|
1753
|
+
animation-delay: 0ms, var(--local-duration, ${({ durations }) => durations["lg"]});
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
div.page[view-direction^='next-'] .page-content {
|
|
1757
|
+
animation:
|
|
1758
|
+
slide-right-out var(--local-duration) forwards var(--local-transition),
|
|
1759
|
+
slide-right-in var(--local-duration) forwards var(--local-transition);
|
|
1760
|
+
animation-delay: 0ms, var(--local-duration, ${({ durations }) => durations["lg"]});
|
|
1761
|
+
}
|
|
1762
|
+
|
|
1763
|
+
@keyframes slide-left-out {
|
|
1764
|
+
from {
|
|
1765
|
+
transform: translateX(0px) scale(1);
|
|
1766
|
+
opacity: 1;
|
|
1767
|
+
filter: blur(0px);
|
|
1768
|
+
}
|
|
1769
|
+
to {
|
|
1770
|
+
transform: translateX(8px) scale(0.99);
|
|
1771
|
+
opacity: 0;
|
|
1772
|
+
filter: blur(4px);
|
|
1773
|
+
}
|
|
1774
|
+
}
|
|
1775
|
+
|
|
1776
|
+
@keyframes slide-left-in {
|
|
1777
|
+
from {
|
|
1778
|
+
transform: translateX(-8px) scale(0.99);
|
|
1779
|
+
opacity: 0;
|
|
1780
|
+
filter: blur(4px);
|
|
1781
|
+
}
|
|
1782
|
+
to {
|
|
1783
|
+
transform: translateX(0) translateY(0) scale(1);
|
|
1784
|
+
opacity: 1;
|
|
1785
|
+
filter: blur(0px);
|
|
1786
|
+
}
|
|
1787
|
+
}
|
|
1788
|
+
|
|
1789
|
+
@keyframes slide-right-out {
|
|
1790
|
+
from {
|
|
1791
|
+
transform: translateX(0px) scale(1);
|
|
1792
|
+
opacity: 1;
|
|
1793
|
+
filter: blur(0px);
|
|
1794
|
+
}
|
|
1795
|
+
to {
|
|
1796
|
+
transform: translateX(-8px) scale(0.99);
|
|
1797
|
+
opacity: 0;
|
|
1798
|
+
filter: blur(4px);
|
|
1799
|
+
}
|
|
1800
|
+
}
|
|
1801
|
+
|
|
1802
|
+
@keyframes slide-right-in {
|
|
1803
|
+
from {
|
|
1804
|
+
transform: translateX(8px) scale(0.99);
|
|
1805
|
+
opacity: 0;
|
|
1806
|
+
filter: blur(4px);
|
|
1807
|
+
}
|
|
1808
|
+
to {
|
|
1809
|
+
transform: translateX(0) translateY(0) scale(1);
|
|
1810
|
+
opacity: 1;
|
|
1811
|
+
filter: blur(0px);
|
|
1812
|
+
}
|
|
1813
|
+
}
|
|
1814
|
+
`;
|
|
1815
|
+
var __decorate = function(decorators, target, key, desc) {
|
|
1816
|
+
var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1817
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
|
|
1818
|
+
else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
|
|
1819
|
+
return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
|
|
1820
|
+
};
|
|
1821
|
+
const HEADER_HEIGHT = 60;
|
|
1822
|
+
let W3mRouterContainer = class W3mRouterContainer2 extends i {
|
|
1823
|
+
constructor() {
|
|
1824
|
+
super(...arguments);
|
|
1825
|
+
this.resizeObserver = void 0;
|
|
1826
|
+
this.transitionDuration = "0.15s";
|
|
1827
|
+
this.transitionFunction = "";
|
|
1828
|
+
this.history = "";
|
|
1829
|
+
this.view = "";
|
|
1830
|
+
this.setView = void 0;
|
|
1831
|
+
this.viewDirection = "";
|
|
1832
|
+
this.historyState = "";
|
|
1833
|
+
this.previousHeight = "0px";
|
|
1834
|
+
this.mobileFullScreen = OptionsController.state.enableMobileFullScreen;
|
|
1835
|
+
this.onViewportResize = () => {
|
|
1836
|
+
this.updateContainerHeight();
|
|
1837
|
+
};
|
|
1838
|
+
}
|
|
1839
|
+
updated(changedProps) {
|
|
1840
|
+
if (changedProps.has("history")) {
|
|
1841
|
+
const newHistory = this.history;
|
|
1842
|
+
if (this.historyState !== "" && this.historyState !== newHistory) {
|
|
1843
|
+
this.onViewChange(newHistory);
|
|
1844
|
+
}
|
|
1845
|
+
}
|
|
1846
|
+
if (changedProps.has("transitionDuration")) {
|
|
1847
|
+
this.style.setProperty("--local-duration", this.transitionDuration);
|
|
1848
|
+
}
|
|
1849
|
+
if (changedProps.has("transitionFunction")) {
|
|
1850
|
+
this.style.setProperty("--local-transition", this.transitionFunction);
|
|
1851
|
+
}
|
|
1852
|
+
}
|
|
1853
|
+
firstUpdated() {
|
|
1854
|
+
var _a;
|
|
1855
|
+
if (this.transitionFunction) {
|
|
1856
|
+
this.style.setProperty("--local-transition", this.transitionFunction);
|
|
1857
|
+
}
|
|
1858
|
+
this.style.setProperty("--local-duration", this.transitionDuration);
|
|
1859
|
+
this.historyState = this.history;
|
|
1860
|
+
this.resizeObserver = new ResizeObserver((entries) => {
|
|
1861
|
+
var _a2;
|
|
1862
|
+
for (const entry of entries) {
|
|
1863
|
+
if (entry.target === this.getWrapper()) {
|
|
1864
|
+
let newHeight = entry.contentRect.height;
|
|
1865
|
+
const footerHeight = parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--apkt-footer-height") || "0");
|
|
1866
|
+
if (this.mobileFullScreen) {
|
|
1867
|
+
const viewportHeight = ((_a2 = window.visualViewport) == null ? void 0 : _a2.height) || window.innerHeight;
|
|
1868
|
+
const headerHeight = this.getHeaderHeight();
|
|
1869
|
+
newHeight = viewportHeight - headerHeight - footerHeight;
|
|
1870
|
+
this.style.setProperty("--local-border-bottom-radius", "0px");
|
|
1871
|
+
} else {
|
|
1872
|
+
const totalHeight = newHeight + footerHeight;
|
|
1873
|
+
newHeight = totalHeight;
|
|
1874
|
+
this.style.setProperty("--local-border-bottom-radius", footerHeight ? "var(--apkt-borderRadius-5)" : "0px");
|
|
1875
|
+
}
|
|
1876
|
+
this.style.setProperty("--local-container-height", `${newHeight}px`);
|
|
1877
|
+
if (this.previousHeight !== "0px") {
|
|
1878
|
+
this.style.setProperty("--local-duration-height", this.transitionDuration);
|
|
1879
|
+
}
|
|
1880
|
+
this.previousHeight = `${newHeight}px`;
|
|
1881
|
+
}
|
|
1882
|
+
}
|
|
1883
|
+
});
|
|
1884
|
+
this.resizeObserver.observe(this.getWrapper());
|
|
1885
|
+
this.updateContainerHeight();
|
|
1886
|
+
window.addEventListener("resize", this.onViewportResize);
|
|
1887
|
+
(_a = window.visualViewport) == null ? void 0 : _a.addEventListener("resize", this.onViewportResize);
|
|
1888
|
+
}
|
|
1889
|
+
disconnectedCallback() {
|
|
1890
|
+
var _a;
|
|
1891
|
+
const wrapper = this.getWrapper();
|
|
1892
|
+
if (wrapper && this.resizeObserver) {
|
|
1893
|
+
this.resizeObserver.unobserve(wrapper);
|
|
1894
|
+
}
|
|
1895
|
+
window.removeEventListener("resize", this.onViewportResize);
|
|
1896
|
+
(_a = window.visualViewport) == null ? void 0 : _a.removeEventListener("resize", this.onViewportResize);
|
|
1897
|
+
}
|
|
1898
|
+
render() {
|
|
1899
|
+
return x`
|
|
1900
|
+
<div class="container" data-mobile-fullscreen="${o(this.mobileFullScreen)}">
|
|
1901
|
+
<div
|
|
1902
|
+
class="page"
|
|
1903
|
+
data-mobile-fullscreen="${o(this.mobileFullScreen)}"
|
|
1904
|
+
view-direction="${this.viewDirection}"
|
|
1905
|
+
>
|
|
1906
|
+
<div class="page-content">
|
|
1907
|
+
<slot></slot>
|
|
1908
|
+
</div>
|
|
1909
|
+
</div>
|
|
1910
|
+
</div>
|
|
1911
|
+
`;
|
|
1912
|
+
}
|
|
1913
|
+
onViewChange(history) {
|
|
1914
|
+
const historyArr = history.split(",").filter(Boolean);
|
|
1915
|
+
const prevArr = this.historyState.split(",").filter(Boolean);
|
|
1916
|
+
const prevLength = prevArr.length;
|
|
1917
|
+
const newLength = historyArr.length;
|
|
1918
|
+
const newView = historyArr[historyArr.length - 1] || "";
|
|
1919
|
+
const duration = UiHelperUtil.cssDurationToNumber(this.transitionDuration);
|
|
1920
|
+
let direction = "";
|
|
1921
|
+
if (newLength > prevLength) {
|
|
1922
|
+
direction = "next";
|
|
1923
|
+
} else if (newLength < prevLength) {
|
|
1924
|
+
direction = "prev";
|
|
1925
|
+
} else if (newLength === prevLength && historyArr[newLength - 1] !== prevArr[prevLength - 1]) {
|
|
1926
|
+
direction = "next";
|
|
1927
|
+
}
|
|
1928
|
+
this.viewDirection = `${direction}-${newView}`;
|
|
1929
|
+
setTimeout(() => {
|
|
1930
|
+
var _a;
|
|
1931
|
+
this.historyState = history;
|
|
1932
|
+
(_a = this.setView) == null ? void 0 : _a.call(this, newView);
|
|
1933
|
+
}, duration);
|
|
1934
|
+
setTimeout(() => {
|
|
1935
|
+
this.viewDirection = "";
|
|
1936
|
+
}, duration * 2);
|
|
1937
|
+
}
|
|
1938
|
+
getWrapper() {
|
|
1939
|
+
var _a;
|
|
1940
|
+
return (_a = this.shadowRoot) == null ? void 0 : _a.querySelector("div.page");
|
|
1941
|
+
}
|
|
1942
|
+
updateContainerHeight() {
|
|
1943
|
+
var _a;
|
|
1944
|
+
const wrapper = this.getWrapper();
|
|
1945
|
+
if (!wrapper) {
|
|
1946
|
+
return;
|
|
1947
|
+
}
|
|
1948
|
+
const footerHeight = parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--apkt-footer-height") || "0");
|
|
1949
|
+
let newHeight = 0;
|
|
1950
|
+
if (this.mobileFullScreen) {
|
|
1951
|
+
const viewportHeight = ((_a = window.visualViewport) == null ? void 0 : _a.height) || window.innerHeight;
|
|
1952
|
+
const headerHeight = this.getHeaderHeight();
|
|
1953
|
+
newHeight = viewportHeight - headerHeight - footerHeight;
|
|
1954
|
+
this.style.setProperty("--local-border-bottom-radius", "0px");
|
|
1955
|
+
} else {
|
|
1956
|
+
newHeight = wrapper.getBoundingClientRect().height + footerHeight;
|
|
1957
|
+
this.style.setProperty("--local-border-bottom-radius", footerHeight ? "var(--apkt-borderRadius-5)" : "0px");
|
|
1958
|
+
}
|
|
1959
|
+
this.style.setProperty("--local-container-height", `${newHeight}px`);
|
|
1960
|
+
if (this.previousHeight !== "0px") {
|
|
1961
|
+
this.style.setProperty("--local-duration-height", this.transitionDuration);
|
|
1962
|
+
}
|
|
1963
|
+
this.previousHeight = `${newHeight}px`;
|
|
1964
|
+
}
|
|
1965
|
+
getHeaderHeight() {
|
|
1966
|
+
return HEADER_HEIGHT;
|
|
1967
|
+
}
|
|
1968
|
+
};
|
|
1969
|
+
W3mRouterContainer.styles = [styles];
|
|
1970
|
+
__decorate([
|
|
1971
|
+
n({ type: String })
|
|
1972
|
+
], W3mRouterContainer.prototype, "transitionDuration", void 0);
|
|
1973
|
+
__decorate([
|
|
1974
|
+
n({ type: String })
|
|
1975
|
+
], W3mRouterContainer.prototype, "transitionFunction", void 0);
|
|
1976
|
+
__decorate([
|
|
1977
|
+
n({ type: String })
|
|
1978
|
+
], W3mRouterContainer.prototype, "history", void 0);
|
|
1979
|
+
__decorate([
|
|
1980
|
+
n({ type: String })
|
|
1981
|
+
], W3mRouterContainer.prototype, "view", void 0);
|
|
1982
|
+
__decorate([
|
|
1983
|
+
n({ attribute: false })
|
|
1984
|
+
], W3mRouterContainer.prototype, "setView", void 0);
|
|
1985
|
+
__decorate([
|
|
1986
|
+
r()
|
|
1987
|
+
], W3mRouterContainer.prototype, "viewDirection", void 0);
|
|
1988
|
+
__decorate([
|
|
1989
|
+
r()
|
|
1990
|
+
], W3mRouterContainer.prototype, "historyState", void 0);
|
|
1991
|
+
__decorate([
|
|
1992
|
+
r()
|
|
1993
|
+
], W3mRouterContainer.prototype, "previousHeight", void 0);
|
|
1994
|
+
__decorate([
|
|
1995
|
+
r()
|
|
1996
|
+
], W3mRouterContainer.prototype, "mobileFullScreen", void 0);
|
|
1997
|
+
W3mRouterContainer = __decorate([
|
|
1998
|
+
customElement("w3m-router-container")
|
|
1999
|
+
], W3mRouterContainer);
|
|
2000
|
+
export {
|
|
2001
|
+
AppKitModal,
|
|
2002
|
+
W3mListWallet,
|
|
2003
|
+
W3mModal,
|
|
2004
|
+
W3mModalBase,
|
|
2005
|
+
W3mRouterContainer,
|
|
2006
|
+
W3mUsageExceededView
|
|
2007
|
+
};
|
|
2008
|
+
//# sourceMappingURL=w3m-modal-C23tcwd0.js.map
|