react-hoc-modal
Version:
React component for easy create modals
3 lines • 47.2 kB
JavaScript
/*! For license information please see index.js.LICENSE.txt */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],e):"object"==typeof exports?exports.Modal=e(require("react"),require("react-dom")):t.Modal=e(t.react,t["react-dom"])}(this,((t,e)=>(()=>{"use strict";var r={183:(t,e,r)=>{r.d(e,{Z:()=>s});var n=r(537),o=r.n(n),i=r(645),a=r.n(i)()(o());a.push([t.id,".auFl248wvNmqeaiQe63K{display:flex;flex-direction:column;width:100%;height:100%;border-radius:10px 10px 0 0;transform:translateY(100%);transition:transform .1s ease;border:0;padding:0;bottom:0;gap:10px;overflow:hidden;box-sizing:border-box;background-color:#fff;box-shadow:0px 0px 6px hsla(0,0%,100%,.6);touch-action:none}.auFl248wvNmqeaiQe63K .uPvlPzlHmYR1aF6ZnO9l{display:flex;flex-direction:row;justify-content:center;margin-top:15px}.auFl248wvNmqeaiQe63K .p4sqqbBaBKpMqVSuf0IX{width:20%;max-width:90px;height:4px;background-color:#ccc}.auFl248wvNmqeaiQe63K.oKX_CUSmF2waz4FJVCiP{transition:none}.auFl248wvNmqeaiQe63K .ZcUQHs9wEVtshn72Vjnh{flex:1;display:flex;flex-direction:column;gap:15px}.auFl248wvNmqeaiQe63K .Udu462nEtHCsRq5yvr_m{flex:1;flex-basis:0;display:flex;flex-direction:column;border-radius:5px;gap:10px;position:relative;width:100%;max-height:90vh;padding:10px;overflow:auto;color:#000;overscroll-behavior-y:contain;overscroll-behavior:none}.auFl248wvNmqeaiQe63K .Udu462nEtHCsRq5yvr_m ::-webkit-scrollbar{width:5px;-webkit-transition:.3s;transition:.3s}.auFl248wvNmqeaiQe63K .Udu462nEtHCsRq5yvr_m ::-webkit-scrollbar-thumb{background-color:#979faa}.auFl248wvNmqeaiQe63K .LlBbA7rd_mCUEh8kYucb{display:flex;flex-direction:row;justify-content:space-around;align-items:center;font-size:20px;box-sizing:border-box;padding:15px 10px;background-color:#fff;color:#303843;width:100%}.auFl248wvNmqeaiQe63K .LlBbA7rd_mCUEh8kYucb .r0Rdrp3sbjaLMQtkuQFQ{flex:1;text-align:center;padding:0 5px 0 5px}.auFl248wvNmqeaiQe63K .zMGE1GoJnU84qu4haSuf{display:flex;flex-direction:row;justify-content:center;margin-bottom:15px;color:#000}.dark .auFl248wvNmqeaiQe63K{background-color:#041030}.dark .auFl248wvNmqeaiQe63K .LlBbA7rd_mCUEh8kYucb{color:#fff;background-color:#051f3d}.dark .auFl248wvNmqeaiQe63K .zMGE1GoJnU84qu4haSuf{color:#fff}.dark .auFl248wvNmqeaiQe63K .Udu462nEtHCsRq5yvr_m{background-color:#041030;color:#e0e1e5}","",{version:3,sources:["webpack://./src/Components/BottomSheet/style.module.scss"],names:[],mappings:"AAAA,sBACC,YAAA,CACG,qBAAA,CACH,UAAA,CACG,WAAA,CACA,2BAAA,CACH,0BAAA,CACA,6BAAA,CACA,QAAA,CACA,SAAA,CACA,QAAA,CACA,QAAA,CACG,eAAA,CACH,qBAAA,CACA,qBAAA,CACA,yCAAA,CACA,iBAAA,CAEA,4CACC,YAAA,CACA,kBAAA,CACA,sBAAA,CACA,eAAA,CAGD,4CACC,SAAA,CACA,cAAA,CACA,UAAA,CACA,qBAAA,CAGD,2CACC,eAAA,CAGD,4CACC,MAAA,CACA,YAAA,CACA,qBAAA,CACA,QAAA,CAGD,4CACC,MAAA,CACA,YAAA,CACA,YAAA,CACA,qBAAA,CACA,iBAAA,CACA,QAAA,CACA,iBAAA,CACA,UAAA,CACA,eAAA,CACA,YAAA,CACA,aAAA,CACA,UAAA,CACA,6BAAA,CACA,wBAAA,CAEA,gEACC,SAAA,CACA,sBAAA,CAAA,cAAA,CAGD,sEACC,wBAAA,CAIF,4CACC,YAAA,CACA,kBAAA,CACA,4BAAA,CACA,kBAAA,CACA,cAAA,CACA,qBAAA,CACA,iBAAA,CACA,qBAAA,CACA,aAAA,CACA,UAAA,CAEA,kEACC,MAAA,CACA,iBAAA,CACA,mBAAA,CAIF,4CACC,YAAA,CACA,kBAAA,CACA,sBAAA,CACA,kBAAA,CACA,UAAA,CAGD,4BACC,wBAAA,CAEA,kDACC,UAAA,CACA,wBAAA,CAGD,kDACC,UAAA,CAGD,kDACC,wBAAA,CACA,aAAA",sourcesContent:[".bottomsheet-container {\r\n\tdisplay: flex;\r\n flex-direction: column;\r\n\twidth: 100%;\r\n height: 100%;\r\n border-radius: 10px 10px 0 0;\r\n\ttransform: translateY(100%);\r\n\ttransition: transform 0.1s ease;\r\n\tborder: 0;\r\n\tpadding: 0;\r\n\tbottom: 0;\r\n\tgap: 10px;\r\n overflow: hidden;\r\n\tbox-sizing: border-box;\r\n\tbackground-color: #FFFFFF;\r\n\tbox-shadow: 0px 0px 6px hsla(0, 0%, 100%, .6);\r\n\ttouch-action: none;\r\n\r\n\t.bottomsheet-handle-container {\r\n\t\tdisplay: flex;\r\n\t\tflex-direction: row;\r\n\t\tjustify-content: center;\r\n\t\tmargin-top: 15px;\r\n\t}\r\n\r\n\t.bottomsheet-handle-indicator {\r\n\t\twidth: 20%;\r\n\t\tmax-width: 90px;\r\n\t\theight: 4px;\r\n\t\tbackground-color: #CCCCCC;\r\n\t}\r\n\r\n\t&.touch {\r\n\t\ttransition: none;\r\n\t}\r\n\r\n\t.bottomsheet {\r\n\t\tflex: 1;\r\n\t\tdisplay: flex;\r\n\t\tflex-direction: column;\r\n\t\tgap: 15px;\r\n\t}\r\n\r\n\t.content {\r\n\t\tflex: 1;\r\n\t\tflex-basis: 0;\r\n\t\tdisplay: flex;\r\n\t\tflex-direction: column;\r\n\t\tborder-radius: 5px;\r\n\t\tgap: 10px;\r\n\t\tposition: relative;\r\n\t\twidth: 100%;\r\n\t\tmax-height: 90vh;\r\n\t\tpadding: 10px;\r\n\t\toverflow: auto;\r\n\t\tcolor: #000000;\r\n\t\toverscroll-behavior-y: contain;\r\n\t\toverscroll-behavior: none;\r\n\r\n\t\t::-webkit-scrollbar {\r\n\t\t\twidth: 5px;\r\n\t\t\ttransition: 0.3s;\r\n\t\t}\r\n\r\n\t\t::-webkit-scrollbar-thumb {\r\n\t\t\tbackground-color: #979faa;\r\n\t\t}\r\n\t}\r\n\r\n\t.header {\r\n\t\tdisplay: flex;\r\n\t\tflex-direction: row;\r\n\t\tjustify-content: space-around;\r\n\t\talign-items: center;\r\n\t\tfont-size: 20px;\r\n\t\tbox-sizing: border-box;\r\n\t\tpadding: 15px 10px;\r\n\t\tbackground-color: #FFFFFF;\r\n\t\tcolor: #303843;\r\n\t\twidth: 100%;\r\n\r\n\t\t.text {\r\n\t\t\tflex: 1;\r\n\t\t\ttext-align: center;\r\n\t\t\tpadding: 0 5px 0 5px;\r\n\t\t}\r\n\t}\r\n\r\n\t.footer {\r\n\t\tdisplay: flex;\r\n\t\tflex-direction: row;\r\n\t\tjustify-content: center;\r\n\t\tmargin-bottom: 15px;\r\n\t\tcolor: #000000;\r\n\t}\r\n\r\n\t:global(.dark) & {\r\n\t\tbackground-color: #041030;\r\n\r\n\t\t.header {\r\n\t\t\tcolor: #ffffff;\r\n\t\t\tbackground-color: #051f3d;\r\n\t\t}\r\n\r\n\t\t.footer {\r\n\t\t\tcolor: #FFFFFF;\r\n\t\t}\r\n\r\n\t\t.content {\r\n\t\t\tbackground-color: #041030;\r\n\t\t\tcolor: #E0E1E5;\r\n\t\t}\r\n\t}\r\n}"],sourceRoot:""}]),a.locals={"bottomsheet-container":"auFl248wvNmqeaiQe63K","bottomsheet-handle-container":"uPvlPzlHmYR1aF6ZnO9l","bottomsheet-handle-indicator":"p4sqqbBaBKpMqVSuf0IX",touch:"oKX_CUSmF2waz4FJVCiP",bottomsheet:"ZcUQHs9wEVtshn72Vjnh",content:"Udu462nEtHCsRq5yvr_m",header:"LlBbA7rd_mCUEh8kYucb",text:"r0Rdrp3sbjaLMQtkuQFQ",footer:"zMGE1GoJnU84qu4haSuf"};const s=a},976:(t,e,r)=>{r.d(e,{Z:()=>s});var n=r(537),o=r.n(n),i=r(645),a=r.n(i)()(o());a.push([t.id,".a9v6mDxRnfuVmzzE3lpt{padding:.4em 1.2em;font-size:1em;font-weight:400;background-color:rgba(0,0,0,0);color:#000;border-radius:inherit;border:1px solid #ccc;cursor:pointer}.a9v6mDxRnfuVmzzE3lpt:active,.a9v6mDxRnfuVmzzE3lpt:focus{border:none;outline:none}","",{version:3,sources:["webpack://./src/Components/PopupItem/style.module.scss"],names:[],mappings:"AAAA,sBACC,kBAAA,CACA,aAAA,CACA,eAAA,CACA,8BAAA,CACA,UAAA,CACA,qBAAA,CACA,qBAAA,CACA,cAAA,CAEA,yDACC,WAAA,CACA,YAAA",sourcesContent:[".popup-item {\r\n\tpadding: 0.4em 1.2em;\r\n\tfont-size: 1em;\r\n\tfont-weight: 400;\r\n\tbackground-color: transparent;\r\n\tcolor: #000000;\r\n\tborder-radius: inherit;\r\n\tborder: 1px solid #CCCCCC;\r\n\tcursor: pointer;\r\n\r\n\t&:active, &:focus {\r\n\t\tborder: none;\r\n\t\toutline: none;\r\n\t}\r\n}"],sourceRoot:""}]),a.locals={"popup-item":"a9v6mDxRnfuVmzzE3lpt"};const s=a},114:(t,e,r)=>{r.d(e,{Z:()=>s});var n=r(537),o=r.n(n),i=r(645),a=r.n(i)()(o());a.push([t.id,".HX0nZDtNdg0wY9FWuLAA .W2Ds8wAhvNFrK9XiY_pF{display:block;position:fixed;width:100%;height:100%;background-color:rgba(0,0,0,0);cursor:pointer;z-index:0;-webkit-tap-highlight-color:rgba(0,0,0,0)}.HX0nZDtNdg0wY9FWuLAA .TgGY93Zr6bV4CpXmeWx8{display:flex;position:fixed;border:0;outline:0;padding:0;margin:0;max-width:550px;transform:translate(0, 0);top:0;left:0;box-shadow:0px 0px 6px hsla(0,0%,100%,.6);border-radius:5px;overflow:hidden}.HX0nZDtNdg0wY9FWuLAA .TgGY93Zr6bV4CpXmeWx8 .gc7shEHPTskFJbfSIS_t{display:flex;flex-direction:column}","",{version:3,sources:["webpack://./src/Components/Popup/style.module.scss"],names:[],mappings:"AAEC,4CACC,aAAA,CACA,cAAA,CACA,UAAA,CACA,WAAA,CACA,8BAAA,CACA,cAAA,CACA,SAAA,CACA,yCAAA,CAGD,4CACC,YAAA,CACA,cAAA,CACA,QAAA,CACA,SAAA,CACA,SAAA,CACA,QAAA,CACA,eAAA,CACA,yBAAA,CACA,KAAA,CACA,MAAA,CACA,yCAAA,CACA,iBAAA,CACA,eAAA,CAEA,kEACC,YAAA,CACA,qBAAA",sourcesContent:[".popup-wrapper {\r\n\r\n\t.background {\r\n\t\tdisplay: block;\r\n\t\tposition: fixed;\r\n\t\twidth: 100%;\r\n\t\theight: 100%;\r\n\t\tbackground-color: transparent;\r\n\t\tcursor: pointer;\r\n\t\tz-index: 0;\r\n\t\t-webkit-tap-highlight-color: transparent;\r\n\t}\r\n\r\n\t.popup-container {\r\n\t\tdisplay: flex;\r\n\t\tposition: fixed;\r\n\t\tborder: 0;\r\n\t\toutline: 0;\r\n\t\tpadding: 0;\r\n\t\tmargin: 0;\r\n\t\tmax-width: 550px;\r\n\t\ttransform: translate(0, 0);\r\n\t\ttop: 0;\r\n\t\tleft: 0;\r\n\t\tbox-shadow: 0px 0px 6px hsla(0, 0%, 100%, .6);\r\n\t\tborder-radius: 5px;\r\n\t\toverflow: hidden;\r\n\r\n\t\t.popup {\r\n\t\t\tdisplay: flex;\r\n\t\t\tflex-direction: column;\r\n\t\t}\r\n\t}\r\n}"],sourceRoot:""}]),a.locals={"popup-wrapper":"HX0nZDtNdg0wY9FWuLAA",background:"W2Ds8wAhvNFrK9XiY_pF","popup-container":"TgGY93Zr6bV4CpXmeWx8",popup:"gc7shEHPTskFJbfSIS_t"};const s=a},474:(t,e,r)=>{r.d(e,{Z:()=>s});var n=r(537),o=r.n(n),i=r(645),a=r.n(i)()(o());a.push([t.id,'body.ywYO81ak9V2WIJshiWw1{overflow:hidden !important}.O8Njhgivk3CHTeUsdCyX{display:flex;position:fixed;top:0;left:0;width:100vw;height:100vh;height:100dvh;margin:0;transition:opacity .3s;z-index:999;opacity:0;overscroll-behavior-y:contain;overscroll-behavior:none}.O8Njhgivk3CHTeUsdCyX::backdrop{opacity:0}.O8Njhgivk3CHTeUsdCyX.mK0fClNyueZQWKEEULsh{opacity:1}.O8Njhgivk3CHTeUsdCyX div{box-sizing:border-box}.O8Njhgivk3CHTeUsdCyX .B7jzb437Fjh0Gj6QlUbJ{display:block;position:absolute;width:100%;height:100%;background-color:rgba(4,16,48,.95);cursor:pointer;z-index:0;-webkit-tap-highlight-color:rgba(0,0,0,0)}.gRhEnP0R9rw5OLEia6Yn{flex:1;display:flex}.gRhEnP0R9rw5OLEia6Yn .PscWQ4HRVQVP6mFHWB9v{display:flex;position:fixed;border:0;outline:0;padding:0;margin:0;max-width:550px;transform:translate(-50%, -50%);top:50%;left:50%}.gRhEnP0R9rw5OLEia6Yn .PscWQ4HRVQVP6mFHWB9v:focus{outline:0}.gRhEnP0R9rw5OLEia6Yn .PscWQ4HRVQVP6mFHWB9v.UIwbcJfBamxrdMkx7A7n{transition:none !important;-webkit-user-select:none !important;-moz-user-select:none !important;user-select:none !important;cursor:pointer !important}.BHZjmmgrhQQsarR1edUN{display:flex;flex-direction:row;justify-content:flex-end;margin:10px 2px;cursor:pointer}.O8Njhgivk3CHTeUsdCyX.O7tWoEoCsojbptUicu4l .B7jzb437Fjh0Gj6QlUbJ,.O8Njhgivk3CHTeUsdCyX.O7tWoEoCsojbptUicu4l .BHZjmmgrhQQsarR1edUN{cursor:unset}.PVA97UqXD6mqTq4PCiTr{display:flex;flex-direction:column;justify-content:center;align-items:center;border-radius:0 0 10px 10px;font-size:18px;min-width:300px;width:100%;max-height:90vh;overflow:hidden;box-shadow:0px 0px 6px hsla(0,0%,100%,.6)}.O8Njhgivk3CHTeUsdCyX.CzxTqGUtYht8ffj_cnXN .PscWQ4HRVQVP6mFHWB9v{transform:none;transition:none}.O8Njhgivk3CHTeUsdCyX.EKyfaWskiqxBxqBkLp8_ .PscWQ4HRVQVP6mFHWB9v{transform:scale(0.8);transition:transform .3s}.O8Njhgivk3CHTeUsdCyX.mK0fClNyueZQWKEEULsh.EKyfaWskiqxBxqBkLp8_ .PscWQ4HRVQVP6mFHWB9v{transform:scale(1)}.PoFqJ4IB_z32EOUskcQM{display:flex;flex-direction:row;justify-content:space-around;align-items:center;font-size:20px;color:#fff;box-sizing:border-box;padding:15px 10px;background-color:#051f3d;width:100%}.PoFqJ4IB_z32EOUskcQM ._iJtB0LUeHWOHhkUBZAf{flex:1;text-align:center;padding:0 5px 0 5px}.uzKTIXmHOjtfU2zzx3JU{display:flex;position:relative;justify-content:center;align-items:center;width:20px;height:20px;cursor:pointer;opacity:.7;transition:transform .3s,opacity .3s}.uzKTIXmHOjtfU2zzx3JU.ixeu6lwp8pGfP3ipXcKr{width:30px;height:30px}.uzKTIXmHOjtfU2zzx3JU::before,.uzKTIXmHOjtfU2zzx3JU::after{content:"";display:block;position:absolute;width:100%;height:3px;background-color:#fff}.uzKTIXmHOjtfU2zzx3JU::before{transform:rotate(45deg)}.uzKTIXmHOjtfU2zzx3JU::after{transform:rotate(-45deg)}.uzKTIXmHOjtfU2zzx3JU:active{transform:scale(1.1)}.uzKTIXmHOjtfU2zzx3JU:hover{opacity:1}.qLDg19C906Nj4DExWecR{flex:1;display:block;position:relative;width:100%;max-height:90vh;padding:10px;overflow:auto;color:#000}.qLDg19C906Nj4DExWecR::-webkit-scrollbar{width:5px;-webkit-transition:.3s;transition:.3s}.qLDg19C906Nj4DExWecR::-webkit-scrollbar-thumb{background-color:#979faa}.i7L7Rf8SZltNXB8_jOgX{display:flex;flex-direction:row;justify-content:space-around;width:100%;border-radius:0 0 7px 7px;color:#fff;gap:10px;padding:5px}.O8Njhgivk3CHTeUsdCyX.light .B7jzb437Fjh0Gj6QlUbJ{background-color:rgba(63,66,73,.6)}.O8Njhgivk3CHTeUsdCyX.light dialog,.O8Njhgivk3CHTeUsdCyX.light .PVA97UqXD6mqTq4PCiTr,.O8Njhgivk3CHTeUsdCyX.light .PoFqJ4IB_z32EOUskcQM,.O8Njhgivk3CHTeUsdCyX.light .qLDg19C906Nj4DExWecR,.O8Njhgivk3CHTeUsdCyX.light .i7L7Rf8SZltNXB8_jOgX{background-color:#fff;color:#303843}.O8Njhgivk3CHTeUsdCyX.light .PVA97UqXD6mqTq4PCiTr{border-radius:0}.O8Njhgivk3CHTeUsdCyX.light .PoFqJ4IB_z32EOUskcQM .uzKTIXmHOjtfU2zzx3JU::before,.O8Njhgivk3CHTeUsdCyX.light .PoFqJ4IB_z32EOUskcQM .uzKTIXmHOjtfU2zzx3JU::after{background-color:#303843}.O8Njhgivk3CHTeUsdCyX.light .i7L7Rf8SZltNXB8_jOgX{box-shadow:0px 0px 15px 0px rgba(0,0,0,.3)}.O8Njhgivk3CHTeUsdCyX.dark dialog,.O8Njhgivk3CHTeUsdCyX.dark .PVA97UqXD6mqTq4PCiTr,.O8Njhgivk3CHTeUsdCyX.dark .qLDg19C906Nj4DExWecR{background-color:#041030;color:#e0e1e5}.O8Njhgivk3CHTeUsdCyX.dark .i7L7Rf8SZltNXB8_jOgX,.O8Njhgivk3CHTeUsdCyX.dark .PVA97UqXD6mqTq4PCiTr{background-color:#041030}',"",{version:3,sources:["webpack://./src/style.module.scss"],names:[],mappings:"AACA,0BACC,0BAAA,CAED,sBACC,YAAA,CAGA,cAAA,CACA,KAAA,CACA,MAAA,CACA,WAAA,CACA,YAAA,CACA,aAAA,CACA,QAAA,CACA,sBAAA,CACA,WAAA,CACA,SAAA,CACA,6BAAA,CACA,wBAAA,CAEA,gCACC,SAAA,CAGD,2CACC,SAAA,CAGD,0BACC,qBAAA,CAGD,4CACC,aAAA,CACA,iBAAA,CACA,UAAA,CACA,WAAA,CACA,kCAAA,CACA,cAAA,CACA,SAAA,CACA,yCAAA,CAIF,sBACC,MAAA,CACA,YAAA,CAEA,4CACC,YAAA,CACA,cAAA,CACA,QAAA,CACA,SAAA,CACA,SAAA,CACA,QAAA,CACA,eAAA,CACA,+BAAA,CACA,OAAA,CACA,QAAA,CAEA,kDACC,SAAA,CAGD,iEACC,0BAAA,CACA,mCAAA,CAAA,gCAAA,CAAA,2BAAA,CACA,yBAAA,CAOH,sBACC,YAAA,CACA,kBAAA,CACA,wBAAA,CACA,eAAA,CACA,cAAA,CAGD,kIACC,YAAA,CAGD,sBACC,YAAA,CACA,qBAAA,CACA,sBAAA,CACA,kBAAA,CACA,2BAAA,CACA,cAAA,CACA,eAAA,CACA,UAAA,CACA,eAAA,CACA,eAAA,CACA,yCAAA,CAID,iEACC,cAAA,CACA,eAAA,CAGD,iEACC,oBAAA,CACA,wBAAA,CAGD,sFACC,kBAAA,CAGD,sBACC,YAAA,CACA,kBAAA,CACA,4BAAA,CACA,kBAAA,CACA,cAAA,CACA,UAAA,CACA,qBAAA,CACA,iBAAA,CACA,wBAAA,CACA,UAAA,CAGD,4CACC,MAAA,CACA,iBAAA,CACA,mBAAA,CAKD,sBACC,YAAA,CACA,iBAAA,CACA,sBAAA,CACA,kBAAA,CACA,UAAA,CACA,WAAA,CACA,cAAA,CACA,UAAA,CACA,oCAAA,CAGD,2CACC,UAAA,CACA,WAAA,CAGD,2DACC,UAAA,CACA,aAAA,CACA,iBAAA,CACA,UAAA,CACA,UAAA,CACA,qBAAA,CAGD,8BACC,uBAAA,CAGD,6BACC,wBAAA,CAGD,6BACC,oBAAA,CAGD,4BACC,SAAA,CAGD,sBACC,MAAA,CACA,aAAA,CACA,iBAAA,CACA,UAAA,CACA,eAAA,CACA,YAAA,CACA,aAAA,CACA,UAAA,CAGD,yCACC,SAAA,CACA,sBAAA,CAAA,cAAA,CAGD,+CACC,wBAAA,CAGD,sBACC,YAAA,CACA,kBAAA,CACA,4BAAA,CACA,UAAA,CACA,yBAAA,CACA,UAAA,CACA,QAAA,CACA,WAAA,CAMD,kDACC,kCAAA,CAGD,2OACC,qBAAA,CACA,aAAA,CAGD,kDACC,eAAA,CAGD,+JACC,wBAAA,CAGD,kDACC,0CAAA,CAKD,oIACC,wBAAA,CACA,aAAA,CAGD,kGACC,wBAAA",sourcesContent:['/* Modal */\r\nbody.block-scroll {\r\n\toverflow: hidden !important;\r\n}\r\n.container {\r\n\tdisplay: flex;\r\n\t// justify-content: center;\r\n\t// align-items: center;\r\n\tposition: fixed;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\twidth: 100vw;\r\n\theight: 100vh;\r\n\theight: 100dvh;\r\n\tmargin: 0;\r\n\ttransition: opacity 0.3s;\r\n\tz-index: 999;\r\n\topacity: 0;\r\n\toverscroll-behavior-y: contain;\r\n\toverscroll-behavior: none;\r\n\r\n\t&::backdrop {\r\n\t\topacity: 0;\r\n\t}\r\n\r\n\t&.active {\r\n\t\topacity: 1;\r\n\t}\r\n\r\n\tdiv {\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\r\n\t.background {\r\n\t\tdisplay: block;\r\n\t\tposition: absolute;\r\n\t\twidth: 100%;\r\n\t\theight: 100%;\r\n\t\tbackground-color: rgba(4, 16, 48, 0.95);\r\n\t\tcursor: pointer;\r\n\t\tz-index: 0;\r\n\t\t-webkit-tap-highlight-color: transparent;\r\n\t}\r\n}\r\n\r\n.modal-wrapper {\r\n\tflex: 1;\r\n\tdisplay: flex;\r\n\t\r\n\t.modal-container {\r\n\t\tdisplay: flex;\r\n\t\tposition: fixed;\r\n\t\tborder: 0;\r\n\t\toutline: 0;\r\n\t\tpadding: 0;\r\n\t\tmargin: 0;\r\n\t\tmax-width: 550px;\r\n\t\ttransform: translate(-50%, -50%);\r\n\t\ttop: 50%;\r\n\t\tleft: 50%;\r\n\r\n\t\t&:focus {\r\n\t\t\toutline: 0;\r\n\t\t}\r\n\r\n\t\t&.drag {\r\n\t\t\ttransition: none !important;\r\n\t\t\tuser-select: none !important;\r\n\t\t\tcursor: pointer !important;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\r\n\r\n.close-block {\r\n\tdisplay: flex;\r\n\tflex-direction: row;\r\n\tjustify-content: flex-end;\r\n\tmargin: 10px 2px;\r\n\tcursor: pointer;\r\n}\r\n\r\n.container.cursor-unset .background, .container.cursor-unset .close-block {\r\n\tcursor: unset;\r\n}\r\n\r\n.modal {\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\tjustify-content: center;\r\n\talign-items: center;\r\n\tborder-radius: 0 0 10px 10px;\r\n\tfont-size: 18px;\r\n\tmin-width: 300px;\r\n\twidth: 100%;\r\n\tmax-height: 90vh;\r\n\toverflow: hidden;\r\n\tbox-shadow: 0px 0px 6px rgb(255 255 255 / 60%);\r\n}\r\n\r\n/* Effects */\r\n.container.effect-none .modal-container {\r\n\ttransform: none;\r\n\ttransition: none;\r\n}\r\n\r\n.container.effect-scale .modal-container {\r\n\ttransform: scale(0.8);\r\n\ttransition: transform 0.3s;\r\n}\r\n\r\n.container.active.effect-scale .modal-container {\r\n\ttransform: scale(1);\r\n}\r\n\r\n.header {\r\n\tdisplay: flex;\r\n\tflex-direction: row;\r\n\tjustify-content: space-around;\r\n\talign-items: center;\r\n\tfont-size: 20px;\r\n\tcolor: #ffffff;\r\n\tbox-sizing: border-box;\r\n\tpadding: 15px 10px;\r\n\tbackground-color: #051f3d;\r\n\twidth: 100%;\r\n}\r\n\r\n.header .text {\r\n\tflex: 1;\r\n\ttext-align: center;\r\n\tpadding: 0 5px 0 5px;\r\n}\r\n\r\n/* Close button */\r\n\r\n.close {\r\n\tdisplay: flex;\r\n\tposition: relative;\r\n\tjustify-content: center;\r\n\talign-items: center;\r\n\twidth: 20px;\r\n\theight: 20px;\r\n\tcursor: pointer;\r\n\topacity: 0.7;\r\n\ttransition: transform 0.3s, opacity 0.3s;\r\n}\r\n\r\n.close.large {\r\n\twidth: 30px;\r\n\theight: 30px;\r\n}\r\n\r\n.close::before, .close::after {\r\n\tcontent: "";\r\n\tdisplay: block;\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n\theight: 3px;\r\n\tbackground-color: #FFFFFF;\r\n}\r\n\r\n.close::before {\r\n\ttransform: rotate(45deg);\r\n}\r\n\r\n.close::after {\r\n\ttransform: rotate(-45deg);\r\n}\r\n\r\n.close:active {\r\n\ttransform: scale(1.1);\r\n}\r\n\r\n.close:hover {\r\n\topacity: 1;\r\n}\r\n\r\n.content {\r\n\tflex: 1;\r\n\tdisplay: block;\r\n\tposition: relative;\r\n\twidth: 100%;\r\n\tmax-height: 90vh;\r\n\tpadding: 10px;\r\n\toverflow: auto;\r\n\tcolor: #000000;\r\n}\r\n\r\n.content::-webkit-scrollbar {\r\n\twidth: 5px;\r\n\ttransition: 0.3s;\r\n}\r\n\r\n.content::-webkit-scrollbar-thumb {\r\n\tbackground-color: #979faa;\r\n}\r\n\r\n.footer {\r\n\tdisplay: flex;\r\n\tflex-direction: row;\r\n\tjustify-content: space-around;\r\n\twidth: 100%;\r\n\tborder-radius: 0 0 7px 7px;\r\n\tcolor: #FFFFFF;\r\n\tgap: 10px;\r\n\tpadding: 5px;\r\n}\r\n\r\n/* Themes */\r\n\r\n/* light */\r\n.container:global(.light) .background {\r\n\tbackground-color: rgba(63, 66, 73, 0.60);\r\n}\r\n\r\n.container:global(.light) dialog, .container:global(.light) .modal, .container:global(.light) .header, .container:global(.light) .content, .container:global(.light) .footer {\r\n\tbackground-color: #FFFFFF;\r\n\tcolor: #303843;\r\n}\r\n\r\n.container:global(.light) .modal {\r\n\tborder-radius: 0;\r\n}\r\n\r\n.container:global(.light) .header .close::before, .container:global(.light) .header .close::after {\r\n\tbackground-color: #303843;\r\n}\r\n\r\n.container:global(.light) .footer {\r\n\tbox-shadow: 0px 0px 15px 0px rgb(0 0 0 / 30%);\r\n}\r\n\r\n\r\n/* Dark */\r\n.container:global(.dark) dialog, .container:global(.dark) .modal, .container:global(.dark) .content {\r\n\tbackground-color: #041030;\r\n\tcolor: #E0E1E5;\r\n}\r\n\r\n.container:global(.dark) .footer, .container:global(.dark) .modal {\r\n\tbackground-color: #041030;\r\n}'],sourceRoot:""}]),a.locals={"block-scroll":"ywYO81ak9V2WIJshiWw1",container:"O8Njhgivk3CHTeUsdCyX",active:"mK0fClNyueZQWKEEULsh",background:"B7jzb437Fjh0Gj6QlUbJ","modal-wrapper":"gRhEnP0R9rw5OLEia6Yn","modal-container":"PscWQ4HRVQVP6mFHWB9v",drag:"UIwbcJfBamxrdMkx7A7n","close-block":"BHZjmmgrhQQsarR1edUN","cursor-unset":"O7tWoEoCsojbptUicu4l",modal:"PVA97UqXD6mqTq4PCiTr","effect-none":"CzxTqGUtYht8ffj_cnXN","effect-scale":"EKyfaWskiqxBxqBkLp8_",header:"PoFqJ4IB_z32EOUskcQM",text:"_iJtB0LUeHWOHhkUBZAf",close:"uzKTIXmHOjtfU2zzx3JU",large:"ixeu6lwp8pGfP3ipXcKr",content:"qLDg19C906Nj4DExWecR",footer:"i7L7Rf8SZltNXB8_jOgX"};const s=a},645:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r="",n=void 0!==e[5];return e[4]&&(r+="@supports (".concat(e[4],") {")),e[2]&&(r+="@media ".concat(e[2]," {")),n&&(r+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),r+=t(e),n&&(r+="}"),e[2]&&(r+="}"),e[4]&&(r+="}"),r})).join("")},e.i=function(t,r,n,o,i){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(n)for(var s=0;s<this.length;s++){var A=this[s][0];null!=A&&(a[A]=!0)}for(var l=0;l<t.length;l++){var c=[].concat(t[l]);n&&a[c[0]]||(void 0!==i&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=i),r&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=r):c[2]=r),o&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=o):c[4]="".concat(o)),e.push(c))}},e}},537:t=>{t.exports=function(t){var e=t[1],r=t[3];if(!r)return e;if("function"==typeof btoa){var n=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),i="/*# ".concat(o," */");return[e].concat([i]).join("\n")}return[e].join("\n")}},106:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=class{constructor(){Object.defineProperty(this,"viewport",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"content",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.viewport=this.mountViewport(),this.content=""===this.viewport.content?[]:this.viewport.content.split(",").map((t=>t.trim().split("=")))}mountViewport(){const t=document.head.querySelector("meta[name='viewport']");if(t)return t;{const t=document.createElement("meta");return t.name="viewport",t.content="",document.head.appendChild(t),t}}findIndex(t){return this.content.findIndex((e=>e[0]===t))}save(){this.viewport.content=this.content.map((t=>t.join("="))).join(",")}add(t,e){this.has(t)||(this.content.push([t,String(e)]),this.save())}remove(t){const e=this.findIndex(t);e<0||(this.content.splice(e,1),this.save())}has(t){return this.findIndex(t)>=0}}},251:(t,e,r)=>{var n=r(317),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,A={key:!0,ref:!0,__self:!0,__source:!0};function l(t,e,r){var n,i={},l=null,c=null;for(n in void 0!==r&&(l=""+r),void 0!==e.key&&(l=""+e.key),void 0!==e.ref&&(c=e.ref),e)a.call(e,n)&&!A.hasOwnProperty(n)&&(i[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps)void 0===i[n]&&(i[n]=e[n]);return{$$typeof:o,type:t,key:l,ref:c,props:i,_owner:s.current}}e.Fragment=i,e.jsx=l,e.jsxs=l},893:(t,e,r)=>{t.exports=r(251)},37:(t,e,r)=>{r.r(e),r.d(e,{default:()=>m});var n=r(379),o=r.n(n),i=r(795),a=r.n(i),s=r(569),A=r.n(s),l=r(565),c=r.n(l),d=r(216),u=r.n(d),C=r(589),f=r.n(C),p=r(183),h={};h.styleTagTransform=f(),h.setAttributes=c(),h.insert=A().bind(null,"head"),h.domAPI=a(),h.insertStyleElement=u(),o()(p.Z,h);const m=p.Z&&p.Z.locals?p.Z.locals:void 0},298:(t,e,r)=>{r.r(e),r.d(e,{default:()=>m});var n=r(379),o=r.n(n),i=r(795),a=r.n(i),s=r(569),A=r.n(s),l=r(565),c=r.n(l),d=r(216),u=r.n(d),C=r(589),f=r.n(C),p=r(976),h={};h.styleTagTransform=f(),h.setAttributes=c(),h.insert=A().bind(null,"head"),h.domAPI=a(),h.insertStyleElement=u(),o()(p.Z,h);const m=p.Z&&p.Z.locals?p.Z.locals:void 0},530:(t,e,r)=>{r.r(e),r.d(e,{default:()=>m});var n=r(379),o=r.n(n),i=r(795),a=r.n(i),s=r(569),A=r.n(s),l=r(565),c=r.n(l),d=r(216),u=r.n(d),C=r(589),f=r.n(C),p=r(114),h={};h.styleTagTransform=f(),h.setAttributes=c(),h.insert=A().bind(null,"head"),h.domAPI=a(),h.insertStyleElement=u(),o()(p.Z,h);const m=p.Z&&p.Z.locals?p.Z.locals:void 0},237:(t,e,r)=>{r.r(e),r.d(e,{default:()=>m});var n=r(379),o=r.n(n),i=r(795),a=r.n(i),s=r(569),A=r.n(s),l=r(565),c=r.n(l),d=r(216),u=r.n(d),C=r(589),f=r.n(C),p=r(474),h={};h.styleTagTransform=f(),h.setAttributes=c(),h.insert=A().bind(null,"head"),h.domAPI=a(),h.insertStyleElement=u(),o()(p.Z,h);const m=p.Z&&p.Z.locals?p.Z.locals:void 0},379:t=>{var e=[];function r(t){for(var r=-1,n=0;n<e.length;n++)if(e[n].identifier===t){r=n;break}return r}function n(t,n){for(var i={},a=[],s=0;s<t.length;s++){var A=t[s],l=n.base?A[0]+n.base:A[0],c=i[l]||0,d="".concat(l," ").concat(c);i[l]=c+1;var u=r(d),C={css:A[1],media:A[2],sourceMap:A[3],supports:A[4],layer:A[5]};if(-1!==u)e[u].references++,e[u].updater(C);else{var f=o(C,n);n.byIndex=s,e.splice(s,0,{identifier:d,updater:f,references:1})}a.push(d)}return a}function o(t,e){var r=e.domAPI(e);return r.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;r.update(t=e)}else r.remove()}}t.exports=function(t,o){var i=n(t=t||[],o=o||{});return function(t){t=t||[];for(var a=0;a<i.length;a++){var s=r(i[a]);e[s].references--}for(var A=n(t,o),l=0;l<i.length;l++){var c=r(i[l]);0===e[c].references&&(e[c].updater(),e.splice(c,1))}i=A}}},569:t=>{var e={};t.exports=function(t,r){var n=function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}e[t]=r}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},216:t=>{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},565:(t,e,r)=>{t.exports=function(t){var e=r.nc;e&&t.setAttribute("nonce",e)}},795:t=>{t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(r){!function(t,e,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var o=void 0!==r.layer;o&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,o&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var i=r.sourceMap;i&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleTagTransform(n,t,e.options)}(e,t,r)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},589:t=>{t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},591:function(t,e,r){var n=this&&this.__rest||function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.BottomSheet=void 0;const i=r(893),a=r(317),s=r(382),A=o(r(37)),l=r(983),c=r(131),d=o(r(732));e.BottomSheet=t=>{var{onBackground:e,onClose:r,renderProps:o}=t,u=n(t,["onBackground","onClose","renderProps"]);const{render:C,dialogStyle:f,bottomSheetSnapPoints:p,className:h,style:m,children:b,title:x}=u,g=(0,a.useContext)(l.ContainerContext),v=(0,c.useStyle)(A.default,"_bottomsheet-"),[y,w]=(0,a.useState)([]),j=(0,a.useRef)(null),k=(0,a.useRef)(null),[O,B]=(0,a.useState)(0),P=(0,a.useRef)(null),_=(0,a.useRef)(null),M=(0,a.useRef)(-1),U=(0,a.useMemo)((()=>{const t=y.findIndex((t=>parseFloat(t)===O));return t>=0&&M.current!==t&&(M.current=t),M.current}),[y,O]),E=(0,a.useMemo)((()=>y.at(U)),[y,U]),S=(0,a.useMemo)((()=>{var t;return null!==(t=y.at(-1))&&void 0!==t?t:"50%"}),[y]),F=(0,a.useMemo)((()=>parseFloat(S)),[S]),N=(0,a.useMemo)((()=>F/100),[F]),q=((0,a.useMemo)((()=>E===S),[E,S]),(0,a.useMemo)((()=>Math.round(O)===F),[O,F])),R=(0,a.useMemo)((()=>Math.abs(O-F)/100*window.innerHeight),[O,F]),H=()=>{B(0),o.hide()},T=(0,a.useCallback)(((t,e)=>{const r="string"==typeof t?parseFloat(t):t,n=e.map((t=>parseFloat(t)));if(0===n.length)return-1;if(r<n[0]/1.5)return-1;if(1===n.length)return 0;for(let t=1;t<n.length;t++)if(r<(n[t-1]+n[t])/2)return t-1;return n.length-1}),[]),D=(0,a.useCallback)((t=>{var e;null===(e=j.current)||void 0===e||e.classList.add(A.default.touch),P.current=t.touches[0].clientY,_.current=O}),[O]),z=(0,a.useCallback)((t=>{if(null===P.current||null===_.current)return;const e=t.touches[0].clientY,r=Math.abs((e-P.current)/window.innerHeight*100-_.current);r>=100||r<=0||e>window.innerHeight||B(r>F?F:r)}),[P.current,_.current,F]),I=(0,a.useCallback)((()=>{var t;null===(t=j.current)||void 0===t||t.classList.remove(A.default.touch);const e=T(O,y);if(e>=0){const t=parseFloat(y[e]);B(t)}else H()}),[O,y]);return(0,a.useEffect)((()=>{var t;if(k.current&&(!p||p&&"auto"===p[0])){let e=(null===(t=k.current)||void 0===t?void 0:t.offsetHeight)/window.innerHeight*100;e=e>=100?100:e,w([`${e}%`])}else w(null!=p?p:["50%"])}),[p]),(0,a.useEffect)((()=>{var t;y.length>0&&B(parseFloat(null!==(t=y[0])&&void 0!==t?t:10))}),[y]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:(0,s.Style)("background"),onClick:H}),(0,i.jsxs)("dialog",{className:v("bottomsheet-container"),tabIndex:1,role:"dialog",style:Object.assign(Object.assign({},f),{transform:`translateY(${Math.abs(O-100)}%)`}),ref:j,onTouchStart:D,onTouchMove:z,onTouchEnd:I,onTouchCancel:I,open:!0,children:[(0,i.jsx)("div",{className:v("bottomsheet-handle-container"),children:(0,i.jsx)("span",{className:v("bottomsheet-handle-indicator")})}),"function"==typeof C?C(o):(0,i.jsxs)("div",{className:v("bottomsheet")+(h?" "+h:""),style:Object.assign(Object.assign({},m),{flexGrow:N}),children:[(0,i.jsx)("header",{className:v("header"),children:(0,i.jsx)("div",{className:v("text"),children:x})}),(0,i.jsx)(d.default,{className:v("content"),active:q,style:m,ref:k,children:b}),g.footer?(0,i.jsx)("footer",{className:v("footer"),style:{transform:`translateY(-${R}px)`},children:g.footer}):null]})]})]})}},777:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0});const n=r(591);e.default=n.BottomSheet},494:function(t,e,r){var n=this&&this.__rest||function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r};Object.defineProperty(e,"__esModule",{value:!0}),e.ContentScroll=void 0;const o=r(893),i=r(317),a=(0,i.memo)((0,i.forwardRef)(((t,e)=>{var{style:r,active:a,onScroll:s}=t,A=n(t,["style","active","onScroll"]);const l=(0,i.useRef)(!0),c=(0,i.useCallback)((t=>{const e=t.currentTarget;l.current=0===e.scrollTop,"function"==typeof s&&s(t)}),[]),d=(0,i.useCallback)((t=>{a&&!l.current&&t.stopPropagation()}),[l,a]);return(0,o.jsx)("div",Object.assign({},A,{onTouchMove:d,onScroll:c,style:Object.assign(Object.assign({},r),{overflow:a?"auto":"hidden"}),ref:e}))})));e.ContentScroll=a},732:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0});const n=r(494);e.default=n.ContentScroll},225:function(t,e,r){var n=this&&this.__rest||function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Modal=void 0;const i=r(893),a=r(317),s=r(983),A=o(r(732)),l=o(r(237)),c=r(131);e.Modal=t=>{var{onBackground:e,onClose:r,renderProps:o}=t,d=n(t,["onBackground","onClose","renderProps"]);const{render:u,dialogStyle:C,hideCloseButton:f,className:p,style:h,title:m,children:b,contentStyle:x,closeLabel:g,bottomSheetMaxWidth:v,draggable:y}=d,w=(0,c.useStyle)(l.default,"_modal-"),j=(0,a.useContext)(s.ContainerContext),k=(0,a.useRef)(null),[O,B]=(0,a.useState)({x:0,y:0}),P=(0,a.useRef)({x:0,y:0}),_=(0,a.useRef)({x:0,y:0}),M=(0,a.useRef)({x:0,y:0,width:0,height:0}),U=(0,a.useRef)(!1),E=t=>{var e,{target:r}=t,o=n(t,["target"]);if(!r.closest("header")||!y||!k.current)return;const{x:i,y:a,width:s,height:A}=k.current.getBoundingClientRect(),{clientX:c,clientY:d}="touches"in o?o.touches[0]:o;U.current=!0,P.current={x:c,y:d},M.current={x:i,y:a,width:s,height:A},null===(e=k.current)||void 0===e||e.classList.add(l.default.drag)},S=()=>{var t;U.current&&(U.current=!1,_.current=Object.assign({},O),null===(t=k.current)||void 0===t||t.classList.remove(l.default.drag))},F=t=>{if(!U.current)return;const{clientX:e,clientY:r}="touches"in t?t.touches[0]:t,n=e-P.current.x,o=r-P.current.y,i=_.current.x+n,a=_.current.y+o,s=window.innerWidth/2,A=window.innerHeight/2,l=s-M.current.width/2,c=A-M.current.height/2,d=Math.max(Math.min(i,l),-l),u=Math.max(Math.min(a,c),-c);B({x:d,y:u})};return(0,i.jsxs)("div",{className:w("modal-wrapper"),onMouseDown:E,onMouseUp:S,onMouseLeave:S,onMouseMove:F,onTouchStart:E,onTouchEnd:S,onTouchCancel:S,onTouchMove:F,children:[(0,i.jsx)("div",{className:w("background"),onClick:e}),(0,i.jsxs)("dialog",{className:w("modal-container"),tabIndex:1,role:"dialog",style:Object.assign(Object.assign({},C),{maxWidth:v,transform:`translate(calc(-50% + ${O.x}px), calc(-50% + ${O.y}px))`}),ref:k,open:!0,children:["function"==typeof u&&!f&&(0,i.jsx)("div",{className:w("close-block"),onClick:e,children:(0,i.jsx)("div",{className:w(["close","large"]),onClick:r})}),"function"==typeof u?u(o):(0,i.jsxs)("div",{className:w("modal")+(p?" "+p:""),style:h,children:[(0,i.jsxs)("header",{className:w("header"),children:[(0,i.jsx)("div",{className:w("text"),children:m}),!f&&(g?(0,i.jsx)("span",{children:g,onClick:r}):(0,i.jsx)("span",{className:w("close"),onClick:r}))]}),(0,i.jsx)(A.default,{className:w("content"),style:x,active:!0,children:b}),j.footer?(0,i.jsx)("footer",{className:w("footer"),ref:o.footerRef,children:j.footer}):null]})]})]})}},933:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0});const n=r(225);e.default=n.Modal},874:function(t,e,r){var n=this&&this.__rest||function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.PopupItem=void 0;const i=r(893),a=r(317),s=r(131),A=o(r(298)),l=r(983);e.PopupItem=t=>{var{className:e,onClick:r}=t,o=n(t,["className","onClick"]);const c=(0,s.useStyle)(A.default,"_popup-"),{hide:d}=(0,a.useContext)(l.ContainerContext),u=(0,a.useCallback)((t=>{"function"==typeof r&&r(t),d()}),[r]);return(0,i.jsx)("button",Object.assign({},o,{className:c("popup-item")+(e?` ${e}`:""),onClick:u}))}},822:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0});const n=r(874);e.default=n.PopupItem},948:function(t,e,r){var n=this&&this.__rest||function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Popup=void 0;const i=r(893),a=r(317),s=r(983),A=o(r(530)),l=r(131);e.Popup=t=>{var{onBackground:e,onClose:r,renderProps:o}=t,c=n(t,["onBackground","onClose","renderProps"]);const{render:d,dialogStyle:u,className:C,style:f,children:p,bottomSheetMaxWidth:h,popupPreferTop:m}=c,b=(0,l.useStyle)(A.default,"_popup-"),x=(0,a.useContext)(s.ContainerContext),g=(0,a.useRef)(null),[v,y]=(0,a.useState)({x:0,y:0});return(0,a.useEffect)((()=>{x.initPosition.current&&((t,e=!1)=>{if(!g.current)return;const r=g.current,n=r.offsetWidth,o=r.offsetHeight,i=window.innerWidth,a=window.innerHeight;let s=t.x+t.width/2-n/2;s=Math.max(0,Math.min(s,i-n));const A=t.y+t.height+8+o<=a,l=t.y-o-8>=0;let c;c=e?l?t.y-o-8:t.y+t.height+8:A?t.y+t.height+8:t.y-o-8,c=Math.max(0,Math.min(c,a-o)),y({x:s,y:c})})(x.initPosition.current,m)}),[x.initPosition,m]),(0,i.jsxs)("div",{className:b("popup-wrapper"),children:[(0,i.jsx)("div",{className:b("background"),onClick:e}),(0,i.jsx)("dialog",{className:b("popup-container"),tabIndex:1,role:"dialog",style:Object.assign(Object.assign({},u),{maxWidth:h,transform:`translate(${v.x}px, ${v.y}px)`}),ref:g,open:!0,children:"function"==typeof d?d(o):(0,i.jsx)("div",{className:b("popup")+(C?" "+C:""),style:f,children:p})})]})}},793:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0});const n=r(948);e.default=n.Popup},607:function(t,e,r){var n=this&&this.__rest||function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r};Object.defineProperty(e,"__esModule",{value:!0}),e.Config=void 0;const o=r(317),i=r(730),a=r(983);e.Config=t=>{var{children:e}=t,r=n(t,["children"]);const s=(0,o.useContext)(a.WhithModalContext),[A,l]=(0,o.useState)(!1);return(0,o.useLayoutEffect)((()=>{s.setConfig(Object.assign({},r))}),[r.title,r.disableClose]),(0,o.useLayoutEffect)((()=>{requestAnimationFrame((()=>l(!0)))}),[]),s.footerRef&&s.footerRef.current||A?(0,i.createPortal)("function"==typeof e?e(s):e,s.footerRef.current):null}},1:function(t,e,r){var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Container=void 0;const o=r(893),i=r(317),a=r(730),s=r(257),A=n(r(237)),l=n(r(106)),c=r(382),d=n(r(933)),u=n(r(777)),C=n(r(793)),f=r(983),p=(0,i.forwardRef)(((t,e)=>{const{bottomSheet:r,name:n,disableClose:p=!1,backgroundClose:h=!0,bottomSheetMaxWidth:m=550,popup:b,theme:x="light",effect:g="scale",onHide:v}=t,y=(0,i.useRef)(null),w=(0,i.useRef)(null),j=(0,i.useRef)(!1),k=(0,i.useRef)(),[O,B]=(0,i.useState)(!1),[P,_]=(0,i.useState)(!1),[M,U]=(0,i.useState)(),E=(0,i.useContext)(s.ProviderContext),S=()=>{B(!0)},F=t=>{t&&"target"in t&&(k.current=t.target.getBoundingClientRect()),S()},N=()=>{const t=y.current;t&&(t.ontransitionend=()=>{B(!1)},null==t||t.classList.remove(A.default.active))},q=()=>{N()},R=()=>{p||N()},H=()=>{h&&R()},T=t=>{if(!document.body)return;const e=document.body.classList;t?e.add(A.default["block-scroll"]):e.remove(A.default["block-scroll"])},D=t=>{"Escape"===t.code&&q()},z=t=>{const e=(t?t.target.innerWidth:window.innerWidth)<=m;e!==P&&_(e)};(0,i.useEffect)((()=>{j.current=O;const t=new l.default;O?(t.add("interactive-widget","resizes-content"),requestAnimationFrame((()=>{var t;return null===(t=y.current)||void 0===t?void 0:t.classList.add(A.default.active)}))):(t.remove("interactive-widget"),null==v||v()),requestAnimationFrame((()=>{!O&&E.count()>0||T(O)}))}),[O]),(0,i.useEffect)((()=>()=>{j.current=!1,T(!1)}),[]),(0,i.useLayoutEffect)((()=>(z(),window.addEventListener("resize",z),()=>{window.removeEventListener("resize",z)})),[P,m]),(0,i.useLayoutEffect)((()=>{if(!y.current)return;const t=y.current;h?null==t||t.classList.remove(A.default["cursor-unset"]):null==t||t.classList.add(A.default["cursor-unset"])}),[h]),(0,i.useLayoutEffect)((()=>(E.push(n,{show:S,hide:N,showStatus:j}),document.addEventListener("keydown",D),()=>{document.removeEventListener("keydown",D)})),[]),(0,i.useImperativeHandle)(e,(()=>({show:S,showPopup:F,hide:q,footerRef:w})));const I=(0,i.useMemo)((()=>{const t=[(0,c.Style)("container")];return x&&t.push(x),g&&t.push(A.default["effect-"+g]),r&&t.push(A.default.bottomsheet),t.join(" ")}),[x,g,r]);if(!E.modals||!E.modals.current)return null;const X=Object.assign(Object.assign({},t),{showPopup:F,show:S,hide:q,footerRef:w});return(0,a.createPortal)((0,o.jsx)(f.ContainerContext.Provider,{value:{initPosition:k,footer:M,setFooter:U,hide:q},children:O&&(0,o.jsx)("div",{className:I,ref:y,children:r&&P?(0,o.jsx)(u.default,Object.assign({},t,{onBackground:H,onClose:R,renderProps:X})):b?(0,o.jsx)(C.default,Object.assign({},t,{onBackground:H,onClose:R,renderProps:X})):(0,o.jsx)(d.default,Object.assign({},t,{onBackground:H,onClose:R,renderProps:X}))})}),E.modals.current)}));e.Container=p},983:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WhithModalContext=e.ContainerContext=e.ProviderContext=void 0;const n=r(317);e.ProviderContext=(0,n.createContext)({push:()=>{},count:()=>0,modals:null}),e.ContainerContext=(0,n.createContext)({hide:()=>{},setFooter:t=>{},initPosition:{current:void 0},footer:{}}),e.WhithModalContext=(0,n.createContext)({setConfig:()=>{},state:{},footerRef:null,showPopup:()=>{},show:()=>{},hide:()=>{}})},445:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Footer=void 0;const n=r(317),o=r(983);e.Footer=({children:t})=>{const e=(0,n.useContext)(o.ContainerContext);return(0,n.useEffect)((()=>{t&&e.setFooter(t)}),[t]),null}},257:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.staticAction=e.ProviderContext=e.Provider=void 0;const n=r(893),o=r(317),i=r(983);Object.defineProperty(e,"ProviderContext",{enumerable:!0,get:function(){return i.ProviderContext}});const a=(0,o.createRef)();e.staticAction=a,e.Provider=({children:t,SPA:e=!1})=>{const r=(0,o.useRef)({}),s=(0,o.useRef)(null),A=t=>{t in r.current&&r.current[t].show()},l=t=>{t&&t in r.current?r.current[t].hide():Object.keys(r.current).forEach(l)};return e||(0,o.useImperativeHandle)(s,(()=>{const t="__modals-container",e=document.getElementById(t);if(e)return e;{const e=document.createElement("div");return e.id=t,document.body.appendChild(e),e}})),(0,o.useImperativeHandle)(a,(()=>({show:A,hide:l}))),(0,n.jsxs)(i.ProviderContext.Provider,{value:{push:(t,e)=>{r.current[t]=e},modals:s,count:()=>Object.values(r.current).filter((t=>!0===t.showStatus.current)).length},children:[t,e&&(0,n.jsx)("div",{ref:s})]})}},382:function(t,e,r){var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Style=void 0;const o=n(r(237));e.Style=(t,r,n="_modal-")=>(r=null!=r?r:o.default,Array.isArray(t)?t.map((()=>(0,e.Style)(t,n))).join(" "):`${r[t]} ${n}${t}`)},131:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.useStyle=void 0;const n=r(317),o=r(382);e.useStyle=(t,e="_modal-")=>(0,n.useCallback)((r=>(0,o.Style)(r,t,e)),[t,e])},629:function(t,e,r){var n=this&&this.__rest||function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ModalPopupItem=e.ModalContentScroll=e.ModalFooter=e.ModalConfig=e.ModalProvider=e.useModal=e.withModal=void 0;const i=r(893),a=r(317),s=r(1),A=r(607);Object.defineProperty(e,"ModalConfig",{enumerable:!0,get:function(){return A.Config}});const l=r(257);Object.defineProperty(e,"ModalProvider",{enumerable:!0,get:function(){return l.Provider}});const c=r(670);Object.defineProperty(e,"withModal",{enumerable:!0,get:function(){return c.withModal}});const d=r(325);Object.defineProperty(e,"useModal",{enumerable:!0,get:function(){return d.useModal}});const u=r(445);Object.defineProperty(e,"ModalFooter",{enumerable:!0,get:function(){return u.Footer}});const C=o(r(732));e.ModalContentScroll=C.default;const f=o(r(822));e.ModalPopupItem=f.default;const p=Object.assign(Object.assign({},(0,a.forwardRef)(((t,e)=>{var r=n(t,[]);return(0,i.jsx)(s.Container,Object.assign({},r,{ref:e}))}))),{Provider:l.Provider,Footer:u.Footer,ContentScroll:C.default,PopupItem:f.default,Config:A.Config,show:t=>l.staticAction.current.show(t),hide:t=>l.staticAction.current.hide(t),withModal:c.withModal,useModal:d.useModal});e.default=p},325:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.useModal=void 0;const n=r(317),o=r(983);e.useModal=(t,e=[])=>{const{setConfig:r,show:i,hide:a,state:s}=(0,n.useContext)(o.WhithModalContext);return(0,n.useLayoutEffect)((()=>{t&&r(t)}),e),{show:i,hide:a,setConfig:r,state:s}}},670:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.withModal=void 0;const n=r(893),o=r(317),i=r(1),a=r(983);e.withModal=(t,e)=>{const r=(0,o.createRef)(),s=()=>{var t;null===(t=r.current)||void 0===t||t.show()},A=t=>{var e;null===(e=r.current)||void 0===e||e.showPopup(t)},l=()=>{var t;null===(t=r.current)||void 0===t||t.hide()};return Object.assign(Object.assign({},(0,o.forwardRef)(((c,d)=>{var u,C,f;const p=(0,o.useRef)(null),[h,m]=(0,o.useState)(),b=(0,o.useId)(),[x,g]=(0,o.useState)(e);return(0,o.useEffect)((()=>{g(e)}),[e]),(0,o.useImperativeHandle)(r,(()=>Object.assign(Object.assign({},p.current),{setState:m}))),(0,n.jsx)(a.WhithModalContext.Provider,{value:{setConfig:t=>{g((e=>Object.assign(Object.assign({},e),t)))},state:h,footerRef:null===(u=p.current)||void 0===u?void 0:u.footerRef,showPopup:A,show:s,hide:l},children:(0,n.jsx)(i.Container,Object.assign({name:null!==(C=null==x?void 0:x.name)&&void 0!==C?C:b,title:null!==(f=null==x?void 0:x.title)&&void 0!==f?f:""},x,{ref:p,children:(0,n.jsx)(t,Object.assign({},c,{ref:d}))}))})}))),{showPopup:A,show:s,hide:l,setState:t=>{"function"==typeof r.current.setState&&r.current.setState(t)}})}},317:e=>{e.exports=t},730:t=>{t.exports=e}},n={};function o(t){var e=n[t];if(void 0!==e)return e.exports;var i=n[t]={id:t,exports:{}};return r[t].call(i.exports,i,i.exports,o),i.exports}return o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.nc=void 0,o(629)})()));
//# sourceMappingURL=index.js.map