From f669760f2f6d66f8526e54be44c508f98f3631f3 Mon Sep 17 00:00:00 2001 From: iower Date: Wed, 13 Nov 2024 20:14:34 +0500 Subject: [PATCH] Updates --- assets/{index-f9a762ae.js => index-4cc2d84d.js} | 6 +++--- index.html | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) rename assets/{index-f9a762ae.js => index-4cc2d84d.js} (99%) diff --git a/assets/index-f9a762ae.js b/assets/index-4cc2d84d.js similarity index 99% rename from assets/index-f9a762ae.js rename to assets/index-4cc2d84d.js index ca511c5..d232edc 100644 --- a/assets/index-f9a762ae.js +++ b/assets/index-4cc2d84d.js @@ -88,7 +88,7 @@ and limitations under the License. * by Pedro Ladaria * https://github.com/pladaria/reconnecting-websocket * License MIT - */var vp=function(){if(typeof WebSocket<"u")return WebSocket},yp=function(C){return typeof C<"u"&&!!C&&C.CLOSING===2},H8={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0,startClosed:!1,debug:!1},Ep=function(){function C(e,t,n){var r=this;n===void 0&&(n={}),this._listeners={error:[],message:[],open:[],close:[]},this._retryCount=-1,this._shouldReconnect=!0,this._connectLock=!1,this._binaryType="blob",this._closeCalled=!1,this._messageQueue=[],this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this._handleOpen=function(i){r._debug("open event");var a=r._options.minUptime,l=a===void 0?H8.minUptime:a;clearTimeout(r._connectTimeout),r._uptimeTimeout=setTimeout(function(){return r._acceptOpen()},l),r._ws.binaryType=r._binaryType,r._messageQueue.forEach(function(s){return r._ws.send(s)}),r._messageQueue=[],r.onopen&&r.onopen(i),r._listeners.open.forEach(function(s){return r._callEventListener(i,s)})},this._handleMessage=function(i){r._debug("message event"),r.onmessage&&r.onmessage(i),r._listeners.message.forEach(function(a){return r._callEventListener(i,a)})},this._handleError=function(i){r._debug("error event",i.message),r._disconnect(void 0,i.message==="TIMEOUT"?"timeout":void 0),r.onerror&&r.onerror(i),r._debug("exec error listeners"),r._listeners.error.forEach(function(a){return r._callEventListener(i,a)}),r._connect()},this._handleClose=function(i){r._debug("close event"),r._clearTimeouts(),r._shouldReconnect&&r._connect(),r.onclose&&r.onclose(i),r._listeners.close.forEach(function(a){return r._callEventListener(i,a)})},this._url=e,this._protocols=t,this._options=n,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}return Object.defineProperty(C,"CONNECTING",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(C,"OPEN",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(C,"CLOSING",{get:function(){return 2},enumerable:!0,configurable:!0}),Object.defineProperty(C,"CLOSED",{get:function(){return 3},enumerable:!0,configurable:!0}),Object.defineProperty(C.prototype,"CONNECTING",{get:function(){return C.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(C.prototype,"OPEN",{get:function(){return C.OPEN},enumerable:!0,configurable:!0}),Object.defineProperty(C.prototype,"CLOSING",{get:function(){return C.CLOSING},enumerable:!0,configurable:!0}),Object.defineProperty(C.prototype,"CLOSED",{get:function(){return C.CLOSED},enumerable:!0,configurable:!0}),Object.defineProperty(C.prototype,"binaryType",{get:function(){return this._ws?this._ws.binaryType:this._binaryType},set:function(e){this._binaryType=e,this._ws&&(this._ws.binaryType=e)},enumerable:!0,configurable:!0}),Object.defineProperty(C.prototype,"retryCount",{get:function(){return Math.max(this._retryCount,0)},enumerable:!0,configurable:!0}),Object.defineProperty(C.prototype,"bufferedAmount",{get:function(){var e=this._messageQueue.reduce(function(t,n){return typeof n=="string"?t+=n.length:n instanceof Blob?t+=n.size:t+=n.byteLength,t},0);return e+(this._ws?this._ws.bufferedAmount:0)},enumerable:!0,configurable:!0}),Object.defineProperty(C.prototype,"extensions",{get:function(){return this._ws?this._ws.extensions:""},enumerable:!0,configurable:!0}),Object.defineProperty(C.prototype,"protocol",{get:function(){return this._ws?this._ws.protocol:""},enumerable:!0,configurable:!0}),Object.defineProperty(C.prototype,"readyState",{get:function(){return this._ws?this._ws.readyState:this._options.startClosed?C.CLOSED:C.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(C.prototype,"url",{get:function(){return this._ws?this._ws.url:""},enumerable:!0,configurable:!0}),C.prototype.close=function(e,t){if(e===void 0&&(e=1e3),this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(e,t)},C.prototype.reconnect=function(e,t){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(e,t),this._connect())},C.prototype.send=function(e){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",e),this._ws.send(e);else{var t=this._options.maxEnqueuedMessages,n=t===void 0?H8.maxEnqueuedMessages:t;this._messageQueue.length"],e))},C.prototype._getNextDelay=function(){var e=this._options,t=e.reconnectionDelayGrowFactor,n=t===void 0?H8.reconnectionDelayGrowFactor:t,r=e.minReconnectionDelay,i=r===void 0?H8.minReconnectionDelay:r,a=e.maxReconnectionDelay,l=a===void 0?H8.maxReconnectionDelay:a,s=0;return this._retryCount>0&&(s=i*Math.pow(n,this._retryCount-1),s>l&&(s=l)),this._debug("next delay",s),s},C.prototype._wait=function(){var e=this;return new Promise(function(t){setTimeout(t,e._getNextDelay())})},C.prototype._getNextUrl=function(e){if(typeof e=="string")return Promise.resolve(e);if(typeof e=="function"){var t=e();if(typeof t=="string")return Promise.resolve(t);if(t.then)return t}throw Error("Invalid URL")},C.prototype._connect=function(){var e=this;if(!(this._connectLock||!this._shouldReconnect)){this._connectLock=!0;var t=this._options,n=t.maxRetries,r=n===void 0?H8.maxRetries:n,i=t.connectionTimeout,a=i===void 0?H8.connectionTimeout:i,l=t.WebSocket,s=l===void 0?vp():l;if(this._retryCount>=r){this._debug("max retries reached",this._retryCount,">=",r);return}if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),!yp(s))throw Error("No valid WebSocket class provided");this._wait().then(function(){return e._getNextUrl(e._url)}).then(function(M){e._closeCalled||(e._debug("connect",{url:M,protocols:e._protocols}),e._ws=e._protocols?new s(M,e._protocols):new s(M),e._ws.binaryType=e._binaryType,e._connectLock=!1,e._addListeners(),e._connectTimeout=setTimeout(function(){return e._handleTimeout()},a))})}},C.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new mp(Error("TIMEOUT"),this))},C.prototype._disconnect=function(e,t){if(e===void 0&&(e=1e3),this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(e,t),this._handleClose(new gp(e,t,this))}catch{}}},C.prototype._acceptOpen=function(){this._debug("accept open"),this._retryCount=0},C.prototype._callEventListener=function(e,t){"handleEvent"in t?t.handleEvent(e):t(e)},C.prototype._removeListeners=function(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))},C.prototype._addListeners=function(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))},C.prototype._clearTimeouts=function(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)},C}();const wp="wss://api.dappsheriff.com/fool",xp=()=>{const{roomId:C,setState:e}=Ft(),{ref:t}=Ot(),{userId:n,authString:r}=Z6(),i=o.useMemo(()=>{if(!C||!n)return null;const l=`${wp}/rooms/${C}/ws?player_id=${n}${t?`&ref=${t}`:""}&auth=${encodeURIComponent(r)}`;return new Ep(l)},[C,n,r,t]);return o.useEffect(()=>{i&&(!C||!n)&&console.log("not",C,n)},[i,C,n]),o.useEffect(()=>{const l=s=>{try{const M=JSON.parse(s.data);console.log("WS:",M),M.error&&console.error("WS error",M.error),M.data&&e(M.data)}catch(M){console.error("WS: cannot decode message",M)}};return i==null||i.addEventListener("message",l),()=>{i==null||i.removeEventListener("message",l)}},[i,e]),o.useEffect(()=>{const l=()=>{i==null||i.close()};return window.addEventListener("beforeunload",l),()=>{window.removeEventListener("beforeunload",l)}},[i]),o.useEffect(()=>()=>{i==null||i.close()},[]),{send:l=>{i==null||i.send(JSON.stringify(l))}}},Sp=void 0,Z6=()=>{var a,l;const[C,e]=Wl(),t=e||Sp||"",n=!!t,r=((a=C==null?void 0:C.user)==null?void 0:a.id)||void 0||void 0,i=(l=C==null?void 0:C.user)==null?void 0:l.username;return{isAuth:n,authString:t,userId:r,username:i}},ql=()=>{const C=n=>{navigator.clipboard.writeText(n),t(!0)},[e,t]=o.useState(!1);return o.useEffect(()=>{e&&setTimeout(()=>{t(!1)},1e3)},[e]),{copy:C,isCopied:e}},o0=(C=!0)=>({handleJsonResponse:t=>{if(t.status,!t.ok)throw new Error(`[${t.status}] ${t.statusText}`);return t.json()}}),j7=()=>{const C=md(),{isTg:e}=Dt();return{openExternal:n=>{var r;e?n.startsWith("https://t.me")?C.openTelegramLink(n):C.openLink(n):(r=window.open(n,"_blank"))==null||r.focus()}}},Dt=()=>{var e;return{isTg:((e=window.Telegram)==null?void 0:e.WebApp.platform)!=="unknown"}},Vp="https://t.me/durakton_playbot",Jl=({roomId:C})=>{const{data:e}=a0(),{t}=S8(),{points:n}=Nt(),r={room_id:C,ref:(e==null?void 0:e.ref.code)||void 0},i=btoa(JSON.stringify(r)).split("=").join("").split("+").join("-").split("/").join("_"),a=`${Vp}/app?startapp=${i}`,l=`https://t.me/share/url?text=${encodeURIComponent(t("playDurakWithMe",{winPoints:n.win}))}&url=${encodeURIComponent(a)}&`;return{shareUrl:a,shareLink:l}},Ot=()=>{const[C]=Wl(),{isStarted:e,setIsStarted:t,setRoomId:n}=Ft(),r=e0(),i=F7(),a=new URLSearchParams(i.search),l=(C==null?void 0:C.start_param)||a.get("start")||void 0;let s;if(l)try{const u=l.split("-").join("+").split("_").join("/"),c=atob(u);s=JSON.parse(c),console.log("startParamJson",s)}catch(u){console.error("Cannot parse start param",u)}const M=(s==null?void 0:s.ref)||a.get("ref")||void 0,Z=(s==null?void 0:s.room_id)||a.get("room_id")||void 0;return o.useEffect(()=>{e||(t(!0),Z&&(n(Z),r(`/room?roomId=${Z}`)))},[e,M,Z,r,t,n]),{startParam:l,startParamJson:s,ref:M,roomId:Z}},li=C=>{let e;const t=new Set,n=(Z,u)=>{const c=typeof Z=="function"?Z(e):Z;if(!Object.is(c,e)){const f=e;e=u??(typeof c!="object"||c===null)?c:Object.assign({},e,c),t.forEach(p=>p(e,f))}},r=()=>e,s={setState:n,getState:r,getInitialState:()=>M,subscribe:Z=>(t.add(Z),()=>t.delete(Z)),destroy:()=>{t.clear()}},M=e=C(n,r,s);return s},bp=C=>C?li(C):li;var Yl={exports:{}},Xl={},Cs={exports:{}},es={};/** + */var vp=function(){if(typeof WebSocket<"u")return WebSocket},yp=function(C){return typeof C<"u"&&!!C&&C.CLOSING===2},H8={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0,startClosed:!1,debug:!1},Ep=function(){function C(e,t,n){var r=this;n===void 0&&(n={}),this._listeners={error:[],message:[],open:[],close:[]},this._retryCount=-1,this._shouldReconnect=!0,this._connectLock=!1,this._binaryType="blob",this._closeCalled=!1,this._messageQueue=[],this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this._handleOpen=function(i){r._debug("open event");var a=r._options.minUptime,l=a===void 0?H8.minUptime:a;clearTimeout(r._connectTimeout),r._uptimeTimeout=setTimeout(function(){return r._acceptOpen()},l),r._ws.binaryType=r._binaryType,r._messageQueue.forEach(function(s){return r._ws.send(s)}),r._messageQueue=[],r.onopen&&r.onopen(i),r._listeners.open.forEach(function(s){return r._callEventListener(i,s)})},this._handleMessage=function(i){r._debug("message event"),r.onmessage&&r.onmessage(i),r._listeners.message.forEach(function(a){return r._callEventListener(i,a)})},this._handleError=function(i){r._debug("error event",i.message),r._disconnect(void 0,i.message==="TIMEOUT"?"timeout":void 0),r.onerror&&r.onerror(i),r._debug("exec error listeners"),r._listeners.error.forEach(function(a){return r._callEventListener(i,a)}),r._connect()},this._handleClose=function(i){r._debug("close event"),r._clearTimeouts(),r._shouldReconnect&&r._connect(),r.onclose&&r.onclose(i),r._listeners.close.forEach(function(a){return r._callEventListener(i,a)})},this._url=e,this._protocols=t,this._options=n,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}return Object.defineProperty(C,"CONNECTING",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(C,"OPEN",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(C,"CLOSING",{get:function(){return 2},enumerable:!0,configurable:!0}),Object.defineProperty(C,"CLOSED",{get:function(){return 3},enumerable:!0,configurable:!0}),Object.defineProperty(C.prototype,"CONNECTING",{get:function(){return C.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(C.prototype,"OPEN",{get:function(){return C.OPEN},enumerable:!0,configurable:!0}),Object.defineProperty(C.prototype,"CLOSING",{get:function(){return C.CLOSING},enumerable:!0,configurable:!0}),Object.defineProperty(C.prototype,"CLOSED",{get:function(){return C.CLOSED},enumerable:!0,configurable:!0}),Object.defineProperty(C.prototype,"binaryType",{get:function(){return this._ws?this._ws.binaryType:this._binaryType},set:function(e){this._binaryType=e,this._ws&&(this._ws.binaryType=e)},enumerable:!0,configurable:!0}),Object.defineProperty(C.prototype,"retryCount",{get:function(){return Math.max(this._retryCount,0)},enumerable:!0,configurable:!0}),Object.defineProperty(C.prototype,"bufferedAmount",{get:function(){var e=this._messageQueue.reduce(function(t,n){return typeof n=="string"?t+=n.length:n instanceof Blob?t+=n.size:t+=n.byteLength,t},0);return e+(this._ws?this._ws.bufferedAmount:0)},enumerable:!0,configurable:!0}),Object.defineProperty(C.prototype,"extensions",{get:function(){return this._ws?this._ws.extensions:""},enumerable:!0,configurable:!0}),Object.defineProperty(C.prototype,"protocol",{get:function(){return this._ws?this._ws.protocol:""},enumerable:!0,configurable:!0}),Object.defineProperty(C.prototype,"readyState",{get:function(){return this._ws?this._ws.readyState:this._options.startClosed?C.CLOSED:C.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(C.prototype,"url",{get:function(){return this._ws?this._ws.url:""},enumerable:!0,configurable:!0}),C.prototype.close=function(e,t){if(e===void 0&&(e=1e3),this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(e,t)},C.prototype.reconnect=function(e,t){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(e,t),this._connect())},C.prototype.send=function(e){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",e),this._ws.send(e);else{var t=this._options.maxEnqueuedMessages,n=t===void 0?H8.maxEnqueuedMessages:t;this._messageQueue.length"],e))},C.prototype._getNextDelay=function(){var e=this._options,t=e.reconnectionDelayGrowFactor,n=t===void 0?H8.reconnectionDelayGrowFactor:t,r=e.minReconnectionDelay,i=r===void 0?H8.minReconnectionDelay:r,a=e.maxReconnectionDelay,l=a===void 0?H8.maxReconnectionDelay:a,s=0;return this._retryCount>0&&(s=i*Math.pow(n,this._retryCount-1),s>l&&(s=l)),this._debug("next delay",s),s},C.prototype._wait=function(){var e=this;return new Promise(function(t){setTimeout(t,e._getNextDelay())})},C.prototype._getNextUrl=function(e){if(typeof e=="string")return Promise.resolve(e);if(typeof e=="function"){var t=e();if(typeof t=="string")return Promise.resolve(t);if(t.then)return t}throw Error("Invalid URL")},C.prototype._connect=function(){var e=this;if(!(this._connectLock||!this._shouldReconnect)){this._connectLock=!0;var t=this._options,n=t.maxRetries,r=n===void 0?H8.maxRetries:n,i=t.connectionTimeout,a=i===void 0?H8.connectionTimeout:i,l=t.WebSocket,s=l===void 0?vp():l;if(this._retryCount>=r){this._debug("max retries reached",this._retryCount,">=",r);return}if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),!yp(s))throw Error("No valid WebSocket class provided");this._wait().then(function(){return e._getNextUrl(e._url)}).then(function(M){e._closeCalled||(e._debug("connect",{url:M,protocols:e._protocols}),e._ws=e._protocols?new s(M,e._protocols):new s(M),e._ws.binaryType=e._binaryType,e._connectLock=!1,e._addListeners(),e._connectTimeout=setTimeout(function(){return e._handleTimeout()},a))})}},C.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new mp(Error("TIMEOUT"),this))},C.prototype._disconnect=function(e,t){if(e===void 0&&(e=1e3),this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(e,t),this._handleClose(new gp(e,t,this))}catch{}}},C.prototype._acceptOpen=function(){this._debug("accept open"),this._retryCount=0},C.prototype._callEventListener=function(e,t){"handleEvent"in t?t.handleEvent(e):t(e)},C.prototype._removeListeners=function(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))},C.prototype._addListeners=function(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))},C.prototype._clearTimeouts=function(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)},C}();const wp="wss://api.dappsheriff.com/fool",xp=()=>{const{roomId:C,setState:e}=Ft(),{ref:t}=Ot(),{userId:n,authString:r}=Z6(),i=o.useMemo(()=>{if(!C||!n)return null;const l=`${wp}/rooms/${C}/ws?player_id=${n}${t?`&ref=${t}`:""}&auth=${encodeURIComponent(r)}`;return new Ep(l)},[C,n,r,t]);return o.useEffect(()=>{i&&(!C||!n)&&console.log("not",C,n)},[i,C,n]),o.useEffect(()=>{const l=s=>{try{const M=JSON.parse(s.data);console.log("WS:",M),M.error&&console.error("WS error",M.error),M.data&&e(M.data)}catch(M){console.error("WS: cannot decode message",M)}};return i==null||i.addEventListener("message",l),()=>{i==null||i.removeEventListener("message",l)}},[i,e]),o.useEffect(()=>{const l=()=>{i==null||i.close()};return window.addEventListener("beforeunload",l),()=>{window.removeEventListener("beforeunload",l)}},[i]),o.useEffect(()=>()=>{i==null||i.close()},[]),{send:l=>{i==null||i.send(JSON.stringify(l))}}},Sp=void 0,Z6=()=>{var a,l;const[C,e]=Wl(),t=e||Sp||"",n=!!t,r=((a=C==null?void 0:C.user)==null?void 0:a.id)||void 0||void 0,i=(l=C==null?void 0:C.user)==null?void 0:l.username;return{isAuth:n,authString:t,userId:r,username:i}},ql=()=>{const C=n=>{navigator.clipboard.writeText(n),t(!0)},[e,t]=o.useState(!1);return o.useEffect(()=>{e&&setTimeout(()=>{t(!1)},1e3)},[e]),{copy:C,isCopied:e}},o0=(C=!0)=>({handleJsonResponse:t=>{if(t.status,!t.ok)throw new Error(`[${t.status}] ${t.statusText}`);return t.json()}}),j7=()=>{const C=md(),{isTg:e}=Dt();return{openLink:n=>{var r;e?n.startsWith("https://t.me")?C.openTelegramLink(n):C.openLink(n):(r=window.open(n,"_blank"))==null||r.focus()}}},Dt=()=>{var e;return{isTg:((e=window.Telegram)==null?void 0:e.WebApp.platform)!=="unknown"}},Vp="https://t.me/durakton_playbot",Jl=({roomId:C})=>{const{data:e}=a0(),{t}=S8(),{points:n}=Nt(),r={room_id:C,ref:(e==null?void 0:e.ref.code)||void 0},i=btoa(JSON.stringify(r)).split("=").join("").split("+").join("-").split("/").join("_"),a=`${Vp}/app?startapp=${i}`,l=`https://t.me/share/url?text=${encodeURIComponent(t("playDurakWithMe",{winPoints:n.win}))}&url=${encodeURIComponent(a)}&`;return{shareUrl:a,shareLink:l}},Ot=()=>{const[C]=Wl(),{isStarted:e,setIsStarted:t,setRoomId:n}=Ft(),r=e0(),i=F7(),a=new URLSearchParams(i.search),l=(C==null?void 0:C.start_param)||a.get("start")||void 0;let s;if(l)try{const u=l.split("-").join("+").split("_").join("/"),c=atob(u);s=JSON.parse(c),console.log("startParamJson",s)}catch(u){console.error("Cannot parse start param",u)}const M=(s==null?void 0:s.ref)||a.get("ref")||void 0,Z=(s==null?void 0:s.room_id)||a.get("room_id")||void 0;return o.useEffect(()=>{e||(t(!0),Z&&(n(Z),r(`/room?roomId=${Z}`)))},[e,M,Z,r,t,n]),{startParam:l,startParamJson:s,ref:M,roomId:Z}},li=C=>{let e;const t=new Set,n=(Z,u)=>{const c=typeof Z=="function"?Z(e):Z;if(!Object.is(c,e)){const f=e;e=u??(typeof c!="object"||c===null)?c:Object.assign({},e,c),t.forEach(p=>p(e,f))}},r=()=>e,s={setState:n,getState:r,getInitialState:()=>M,subscribe:Z=>(t.add(Z),()=>t.delete(Z)),destroy:()=>{t.clear()}},M=e=C(n,r,s);return s},bp=C=>C?li(C):li;var Yl={exports:{}},Xl={},Cs={exports:{}},es={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -115,7 +115,7 @@ amplitude.init(, { Visit https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-default-events for more details.`;C.loggerProvider.warn(e),bi=!0}},Qg=function(){var C="@amplitude/plugin-network-checker-browser",e="before",t=u3(),n=[],r=function(s,M){t&&(t.addEventListener(s,M),n.push({type:s,handler:M}))},i=function(){n.forEach(function(s){var M=s.type,Z=s.handler;t&&t.removeEventListener(M,Z)}),n=[]},a=function(s,M){return j(void 0,void 0,void 0,function(){return O(this,function(Z){return typeof navigator>"u"?(s.loggerProvider.debug("Network connectivity checker plugin is disabled because navigator is not available."),s.offline=!1,[2]):(s.offline=!navigator.onLine,r("online",function(){s.loggerProvider.debug("Network connectivity changed to online."),s.offline=!1,setTimeout(function(){M.flush()},s.flushIntervalMillis)}),r("offline",function(){s.loggerProvider.debug("Network connectivity changed to offline."),s.offline=!0}),[2])})})},l=function(){return j(void 0,void 0,void 0,function(){return O(this,function(s){return i(),[2]})})};return{name:C,type:e,setup:a,teardown:l}},Kg="Network error occurred, remote config fetch failed",Gg="Remote config successfully fetched",qg="Remote config fetch rejected due to exceeded retry count",ki="Remote config fetch rejected due to timeout after 5 seconds",_i="Unexpected error occurred",Jg="https://sr-client-cfg.amplitude.com/config",Yg="https://sr-client-cfg.stag2.amplitude.com/config",Xg="https://sr-client-cfg.eu.amplitude.com/config",Cv=function(){function C(e){var t=e.localConfig,n=e.configKeys,r=this;this.retryTimeout=1e3,this.attempts=0,this.sessionTargetingMatch=!1,this.metrics={},this.getRemoteConfig=function(i,a,l){return j(r,void 0,void 0,function(){var s,M,Z;return O(this,function(u){switch(u.label){case 0:return s=Date.now(),[4,this.fetchWithTimeout(l)];case 1:return M=u.sent(),M&&(Z=M.configs&&M.configs[i],Z)?(this.metrics.fetchTimeAPISuccess=Date.now()-s,[2,Z[a]]):(this.metrics.fetchTimeAPIFail=Date.now()-s,[2,void 0])}})})},this.fetchWithTimeout=function(i){return j(r,void 0,void 0,function(){var a,l,s;return O(this,function(M){switch(M.label){case 0:return a=new AbortController,l=setTimeout(function(){return a.abort()},5e3),[4,this.fetchRemoteConfig(a.signal,i)];case 1:return s=M.sent(),clearTimeout(l),[2,s]}})})},this.fetchRemoteConfig=function(i,a){return j(r,void 0,void 0,function(){var l,s,M,Z,u,c,f,p,h,v,d,L,m;return O(this,function(g){switch(g.label){case 0:if(a===this.lastFetchedSessionId&&this.attempts>=this.localConfig.flushMaxRetries)return[2,this.completeRequest({err:qg})];if(i.aborted)return[2,this.completeRequest({err:ki})];a!==this.lastFetchedSessionId&&(this.lastFetchedSessionId=a,this.attempts=0),g.label=1;case 1:g.trys.push([1,3,,4]),l=new URLSearchParams({api_key:this.localConfig.apiKey});try{for(s=Q1(this.configKeys),M=s.next();!M.done;M=s.next())Z=M.value,l.append("config_keys",Z)}catch(V){d={error:V}}finally{try{M&&!M.done&&(L=s.return)&&L.call(s)}finally{if(d)throw d.error}}return a&&l.set("session_id",String(a)),u={headers:{Accept:"*/*"},method:"GET"},c="".concat(this.getServerUrl(),"?").concat(l.toString()),this.attempts+=1,[4,fetch(c,$($({},u),{signal:i}))];case 2:if(f=g.sent(),f===null)return[2,this.completeRequest({err:_i})];switch(p=new M0().buildStatus(f.status),p){case R1.Success:return this.attempts=0,[2,this.parseAndStoreConfig(f)];case R1.Failed:return[2,this.retryFetch(i,a)];default:return[2,this.completeRequest({err:Kg})]}case 3:return h=g.sent(),v=h,i.aborted?[2,this.completeRequest({err:ki})]:[2,this.completeRequest({err:(m=v.message)!==null&&m!==void 0?m:_i})];case 4:return[2]}})})},this.retryFetch=function(i,a){return j(r,void 0,void 0,function(){var l=this;return O(this,function(s){switch(s.label){case 0:return[4,new Promise(function(M){return setTimeout(M,l.attempts*l.retryTimeout)})];case 1:return s.sent(),[2,this.fetchRemoteConfig(i,a)]}})})},this.parseAndStoreConfig=function(i){return j(r,void 0,void 0,function(){var a;return O(this,function(l){switch(l.label){case 0:return[4,i.json()];case 1:return a=l.sent(),this.completeRequest({success:Gg}),[2,a]}})})},this.localConfig=t,this.configKeys=n}return C.prototype.getServerUrl=function(){return this.localConfig.serverZone===S9.STAGING?Yg:this.localConfig.serverZone===S9.EU?Xg:Jg},C.prototype.completeRequest=function(e){var t=e.err,n=e.success;if(t)throw new Error(t);n&&this.localConfig.loggerProvider.log(n)},C}(),ev=function(C){var e=C.localConfig,t=C.configKeys;return j(void 0,void 0,void 0,function(){return O(this,function(n){return[2,new Cv({localConfig:e,configKeys:t})]})})},tv=ev,nv=function(){function C(e){this.config=e,this.config.loggerProvider.debug("Local configuration before merging with remote config",JSON.stringify(this.config,null,2))}return C.prototype.initialize=function(){return j(this,void 0,void 0,function(){var e;return O(this,function(t){switch(t.label){case 0:return e=this,[4,tv({localConfig:this.config,configKeys:["analyticsSDK"]})];case 1:return e.remoteConfigFetch=t.sent(),[2]}})})},C.prototype.generateJoinedConfig=function(){var e,t,n,r;return j(this,void 0,void 0,function(){var i,a,l;return O(this,function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),a=this.remoteConfigFetch,a?[4,this.remoteConfigFetch.getRemoteConfig("analyticsSDK","browserSDK",this.config.sessionId)]:[3,2];case 1:a=s.sent(),s.label=2;case 2:return i=a,this.config.loggerProvider.debug("Remote configuration:",JSON.stringify(i,null,2)),i&&"autocapture"in i&&(typeof i.autocapture=="boolean"&&(this.config.autocapture=i.autocapture),typeof i.autocapture=="object"&&(this.config.autocapture===void 0&&(this.config.autocapture=i.autocapture),typeof this.config.autocapture=="boolean"&&(this.config.autocapture=$({attribution:this.config.autocapture,fileDownloads:this.config.autocapture,formInteractions:this.config.autocapture,pageViews:this.config.autocapture,sessions:this.config.autocapture,elementInteractions:this.config.autocapture},i.autocapture)),typeof this.config.autocapture=="object"&&(this.config.autocapture=$($({},this.config.autocapture),i.autocapture))),this.config.defaultTracking=this.config.autocapture),this.config.loggerProvider.debug("Joined configuration: ",JSON.stringify(this.config,null,2)),(e=(r=this.config).requestMetadata)!==null&&e!==void 0||(r.requestMetadata=new ls),!((t=this.remoteConfigFetch)===null||t===void 0)&&t.metrics.fetchTimeAPISuccess&&this.config.requestMetadata.recordHistogram("remote_config_fetch_time_API_success",this.remoteConfigFetch.metrics.fetchTimeAPISuccess),!((n=this.remoteConfigFetch)===null||n===void 0)&&n.metrics.fetchTimeAPIFail&&this.config.requestMetadata.recordHistogram("remote_config_fetch_time_API_fail",this.remoteConfigFetch.metrics.fetchTimeAPIFail),[3,4];case 3:return l=s.sent(),this.config.loggerProvider.error("Failed to fetch remote configuration because of error: ",l),[3,4];case 4:return[2,this.config]}})})},C}(),rv=function(C){return j(void 0,void 0,void 0,function(){var e;return O(this,function(t){switch(t.label){case 0:return e=new nv(C),[4,e.initialize()];case 1:return t.sent(),[2,e]}})})},iv="@amplitude/plugin-autocapture-browser",be="[Amplitude] Element Clicked",av="[Amplitude] Element Changed",ov="[Amplitude] Element ID",lv="[Amplitude] Element Class",ps="[Amplitude] Element Tag",ms="[Amplitude] Element Text",sv="[Amplitude] Element Hierarchy",Mv="[Amplitude] Element Href",Zv="[Amplitude] Element Position Left",uv="[Amplitude] Element Position Top",cv="[Amplitude] Element Aria Label",Lv="[Amplitude] Element Attributes",gs="[Amplitude] Element Selector",dv="[Amplitude] Element Parent Label",vs="[Amplitude] Page URL",fv="[Amplitude] Page Title",hv="[Amplitude] Viewport Height",pv="[Amplitude] Viewport Width",Q5="https://app.amplitude.com",mv="https://app.eu.amplitude.com",gv="https://apps.stag2.amplitude.com",vv={US:Q5,EU:mv,STAGING:gv},yv="https://cdn.amplitude.com/libs/visual-tagging-selector-1.0.0-alpha.js.gz",ke="amp-visual-tagging-selector-highlight";function g1(C){return typeof C=="function"}function ys(C){var e=function(n){Error.call(n),n.stack=new Error().stack},t=C(e);return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var aC=ys(function(C){return function(t){C(this),this.message=t?t.length+` errors occurred during unsubscription: `+t.map(function(n,r){return r+1+") "+n.toString()}).join(` - `):"",this.name="UnsubscriptionError",this.errors=t}});function _e(C,e){if(C){var t=C.indexOf(e);0<=t&&C.splice(t,1)}}var u0=function(){function C(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return C.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var l=Q1(a),s=l.next();!s.done;s=l.next()){var M=s.value;M.remove(this)}}catch(h){e={error:h}}finally{try{s&&!s.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}else a.remove(this);var Z=this.initialTeardown;if(g1(Z))try{Z()}catch(h){i=h instanceof aC?h.errors:[h]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var c=Q1(u),f=c.next();!f.done;f=c.next()){var p=f.value;try{Hi(p)}catch(h){i=i??[],h instanceof aC?i=$1($1([],l1(i)),l1(h.errors)):i.push(h)}}}catch(h){n={error:h}}finally{try{f&&!f.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}if(i)throw new aC(i)}},C.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)Hi(e);else{if(e instanceof C){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(e)}},C.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},C.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},C.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&_e(t,e)},C.prototype.remove=function(e){var t=this._finalizers;t&&_e(t,e),e instanceof C&&e._removeParent(this)},C.EMPTY=function(){var e=new C;return e.closed=!0,e}(),C}();u0.EMPTY;function Es(C){return C instanceof u0||C&&"closed"in C&&g1(C.remove)&&g1(C.add)&&g1(C.unsubscribe)}function Hi(C){g1(C)?C():C.unsubscribe()}var ws={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},He={setTimeout:function(C,e){for(var t=[],n=2;n0&&d(r)},void 0,void 0,function(){p!=null&&p.closed||p==null||p.unsubscribe(),h=null})),!v&&d(n!=null?typeof n=="number"?n:+n-s.now():r)})}function Xv(C){throw new Jv(C)}function S3(C,e){return e3(function(t,n){var r=0;t.subscribe(H2(n,function(i){n.next(C.call(e,i,r++))}))})}var Cy=Array.isArray;function ey(C,e){return Cy(e)?C.apply(void 0,$1([],l1(e))):C(e)}function ty(C){return S3(function(e){return ey(C,e)})}function ny(C,e,t,n,r,i,a,l){var s=[],M=0,Z=0,u=!1,c=function(){u&&!s.length&&!M&&e.complete()},f=function(h){return M0&&(n=r[0]),d0(n)}else throw new Error("Selector was not found.")}function vy(C,e){return C.nodeType===Node.DOCUMENT_NODE?C:C===e.root?C.ownerDocument:C}function k5(C,e,t){for(var n=null,r=[],i=C,a=0,l=function(){var M,Z,u=H5(yy(i))||H5.apply(void 0,$1([],l1(Ey(i)),!1))||H5.apply(void 0,$1([],l1(wy(i)),!1))||H5(xy(i))||[Ni()],c=Sy(i);if(e=="all")c&&(u=u.concat(u.filter(lC).map(function(d){return _5(d,c)})));else if(e=="two")u=u.slice(0,1),c&&(u=u.concat(u.filter(lC).map(function(d){return _5(d,c)})));else if(e=="one"){var f=l1(u=u.slice(0,1),1),p=f[0];c&&lC(p)&&(u=[_5(p,c)])}else e=="none"&&(u=[Ni()],c&&(u=[_5(u[0],c)]));try{for(var h=(M=void 0,Q1(u)),v=h.next();!v.done;v=h.next()){var p=v.value;p.level=a}}catch(d){M={error:d}}finally{try{v&&!v.done&&(Z=h.return)&&Z.call(h)}finally{if(M)throw M.error}}if(r.push(u),r.length>=k3.seedMinLength&&(n=Ii(r,t),n))return"break";i=i.parentElement,a++};i;){var s=l();if(s==="break")break}return n||(n=Ii(r,t)),!n&&t?t():n}function Ii(C,e){var t,n,r=C.reduce(function(M,Z){return M*Z.length},1);if(r>k3.threshold)return e?e():null;var i=qs(Gs(C));try{for(var a=Q1(i),l=a.next();!l.done;l=a.next()){var s=l.value;if(Ks(s))return s}}catch(M){t={error:M}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return null}function d0(C){for(var e=C[0],t=e.name,n=1;n ").concat(t):t="".concat(C[n].name," ").concat(t),e=C[n]}return t}function Ai(C){return C.map(function(e){return e.penalty}).reduce(function(e,t){return e+t},0)}function Ks(C){var e=d0(C);switch($t.querySelectorAll(e).length){case 0:throw new Error("Can't select any node with this selector: ".concat(e));case 1:return!0;default:return!1}}function yy(C){var e=C.getAttribute("id");return e&&k3.idName(e)?{name:"#"+CSS.escape(e),penalty:0}:null}function Ey(C){var e=Array.from(C.attributes).filter(function(t){return k3.attr(t.name,t.value)});return e.map(function(t){return{name:"[".concat(CSS.escape(t.name),'="').concat(CSS.escape(t.value),'"]'),penalty:.5}})}function wy(C){var e=Array.from(C.classList).filter(k3.className);return e.map(function(t){return{name:"."+CSS.escape(t),penalty:1}})}function xy(C){var e=C.tagName.toLowerCase();return k3.tagName(e)?{name:e,penalty:2}:null}function Ni(){return{name:"*",penalty:3}}function Sy(C){var e=C.parentNode;if(!e)return null;var t=e.firstChild;if(!t)return null;for(var n=0;t&&(t.nodeType===Node.ELEMENT_NODE&&n++,t!==C);)t=t.nextSibling;return n}function _5(C,e){return{name:C.name+":nth-child(".concat(e,")"),penalty:C.penalty+1}}function lC(C){return C.name!=="html"&&!C.name.startsWith("#")}function H5(){for(var C=[],e=0;e0?t:null}function Vy(C){return C!=null}function Gs(C,e){var t,n,r,i,a,l;return e===void 0&&(e=[]),O(this,function(s){switch(s.label){case 0:if(!(C.length>0))return[3,9];s.label=1;case 1:s.trys.push([1,6,7,8]),t=Q1(C[0]),n=t.next(),s.label=2;case 2:return n.done?[3,5]:(r=n.value,[5,Q1(Gs(C.slice(1,C.length),e.concat(r)))]);case 3:s.sent(),s.label=4;case 4:return n=t.next(),[3,2];case 5:return[3,8];case 6:return i=s.sent(),a={error:i},[3,8];case 7:try{n&&!n.done&&(l=t.return)&&l.call(t)}finally{if(a)throw a.error}return[7];case 8:return[3,11];case 9:return[4,e];case 10:s.sent(),s.label=11;case 11:return[2]}})}function qs(C){return $1([],l1(C),!1).sort(function(e,t){return Ai(e)-Ai(t)})}function Js(C,e,t){var n,r,i;return t===void 0&&(t={counter:0,visited:new Map}),O(this,function(a){switch(a.label){case 0:if(!(C.length>2&&C.length>k3.optimizedMinLength))return[3,5];n=1,a.label=1;case 1:return nk3.maxNumberOfTries?[2]:(t.counter+=1,r=$1([],l1(C),!1),r.splice(n,1),i=d0(r),t.visited.has(i)?[2]:Ks(r)&&by(r,e)?[4,r]:[3,4]):[3,5];case 2:return a.sent(),t.visited.set(i,!0),[5,Q1(Js(r,e,t))];case 3:a.sent(),a.label=4;case 4:return n++,[3,1];case 5:return[2]}})}function by(C,e){return $t.querySelector(d0(C))===e}var ky=["input","select","textarea"],sC=function(C,e){return function(t,n){var r,i,a,l=C.pageUrlAllowlist,s=C.shouldTrackEventResolver,M=(i=(r=n==null?void 0:n.tagName)===null||r===void 0?void 0:r.toLowerCase)===null||i===void 0?void 0:i.call(r);if(!M)return!1;if(s)return s(t,n);if(!Hy(window.location.href,l))return!1;var Z=String(n==null?void 0:n.getAttribute("type"))||"";if(typeof Z=="string")switch(Z.toLowerCase()){case"hidden":return!1;case"password":return!1}if(e){var u=e.some(function(f){var p;return!!(!((p=n==null?void 0:n.matches)===null||p===void 0)&&p.call(n,f))});if(!u)return!1}switch(M){case"input":case"select":case"textarea":return t==="change"||t==="click";default:{var c=(a=window==null?void 0:window.getComputedStyle)===null||a===void 0?void 0:a.call(window,n);return c&&c.getPropertyValue("cursor")==="pointer"&&t==="click"?!0:t==="click"}}}},Ys=function(C){if(C==null)return!1;if(typeof C=="string"){var e=/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/;if(e.test((C||"").replace(/[- ]/g,"")))return!1;var t=/(^\d{3}-?\d{2}-?\d{4}$)/;if(t.test(C))return!1}return!0},_y=function(C){return!!C&&C.nodeType===3},Xs=function(C){var e,t,n,r=(t=(e=C==null?void 0:C.tagName)===null||e===void 0?void 0:e.toLowerCase)===null||t===void 0?void 0:t.call(e),i=C instanceof HTMLElement?((n=C.getAttribute("contenteditable"))===null||n===void 0?void 0:n.toLowerCase())==="true":!1;return!ky.includes(r)&&!i},Qt=function(C){var e="";return Xs(C)&&C.childNodes&&C.childNodes.length&&C.childNodes.forEach(function(t){var n="";_y(t)?t.textContent&&(n=t.textContent):n=Qt(t),e+=n.split(/(\s+)/).filter(Ys).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}),e},CM=function(C,e){var t,n,r="";try{return r=gy(C,{className:function(Z){return Z!==ke},maxNumberOfTries:1e3}),r}catch(Z){if(e){var i=Z;e.warn("Failed to get selector with finder, use fallback strategy instead: ".concat(i.toString()))}}var a=(n=(t=C==null?void 0:C.tagName)===null||t===void 0?void 0:t.toLowerCase)===null||n===void 0?void 0:n.call(t);a&&(r=a);var l=C.getAttribute("id"),s=C.getAttribute("class");if(l)r="#".concat(l);else if(s){var M=s.split(" ").filter(function(Z){return Z!==ke}).join(".");M&&(r="".concat(r,".").concat(M))}return r},Hy=function(C,e){return!e||!e.length?!0:e.some(function(t){return typeof t=="string"?C===t:C.match(t)})},Py=function(C,e){return C.getAttributeNames().reduce(function(t,n){if(n.startsWith(e)){var r=n.replace(e,""),i=C.getAttribute(n);r&&(t[r]=i||"")}return t},{})},Ty=function(C){return C==null||typeof C=="object"&&Object.keys(C).length===0||typeof C=="string"&&C.trim().length===0},eM=function(C){return Object.keys(C).reduce(function(e,t){var n=C[t];return Ty(n)||(e[t]=n),e},{})},tM=function(C){var e=C.parentElement;if(!e)return"";var t;try{t=e.querySelector(":scope>span,h1,h2,h3,h4,h5,h6")}catch{t=null}if(t){var n=t.textContent||"";return Ys(n)?n:""}return tM(e)},Kt=function(C,e){return C?e.some(function(t){var n;return(n=C==null?void 0:C.matches)===null||n===void 0?void 0:n.call(C,t)})?C:Kt(C==null?void 0:C.parentElement,e):null},Ry=function(C,e){var t,n,r;if(!C)return{};var i=(r=(n=C==null?void 0:C.tagName)===null||n===void 0?void 0:n.toLowerCase)===null||r===void 0?void 0:r.call(n),a=CM(C,e),l=(t={},t[ps]=i,t[ms]=Qt(C),t[gs]=a,t[vs]=window.location.href.split("?")[0],t);return eM(l)},Iy=function(C){return new Promise(function(e,t){var n;try{var r=document.createElement("script");r.type="text/javascript",r.async=!0,r.src=C,r.addEventListener("load",function(){e({status:!0})},{once:!0}),r.addEventListener("error",function(){t({status:!1,message:"Failed to load the script ".concat(C)})}),(n=document.head)===null||n===void 0||n.appendChild(r)}catch(i){t(i)}})};function Ay(){return"".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9))}var Gt=function(C){return!(C.event.target===null||!C.closestTrackedAncestor)},Ny=function(){function C(e){var t=e===void 0?{}:e,n=t.origin,r=n===void 0?Q5:n,i=this;this.endpoint=Q5,this.requestCallbacks={},this.onSelect=function(a){i.notify({action:"element-selected",data:a})},this.onTrack=function(a,l){a==="selector-mode-changed"?i.notify({action:"track-selector-mode-changed",data:l}):a==="selector-moved"&&i.notify({action:"track-selector-moved",data:l})},this.endpoint=r}return C.prototype.notify=function(e){var t,n,r,i;(n=(t=this.logger)===null||t===void 0?void 0:t.debug)===null||n===void 0||n.call(t,"Message sent: ",JSON.stringify(e)),(i=(r=window.opener)===null||r===void 0?void 0:r.postMessage)===null||i===void 0||i.call(r,e,this.endpoint)},C.prototype.sendRequest=function(e,t,n){var r=this;n===void 0&&(n={timeout:15e3});var i=Ay(),a={id:i,action:e,args:t},l=new Promise(function(s,M){r.requestCallbacks[i]={resolve:s,reject:M},r.notify(a),(n==null?void 0:n.timeout)>0&&setTimeout(function(){M(new Error("".concat(e," timed out (id: ").concat(i,")"))),delete r.requestCallbacks[i]},n.timeout)});return l},C.prototype.handleResponse=function(e){var t;if(!this.requestCallbacks[e.id]){(t=this.logger)===null||t===void 0||t.warn("No callback found for request id: ".concat(e.id));return}this.requestCallbacks[e.id].resolve(e.responseData),delete this.requestCallbacks[e.id]},C.prototype.setup=function(e){var t=this,n=e===void 0?{}:e,r=n.logger,i=n.endpoint,a=n.isElementSelectable,l=n.cssSelectorAllowlist,s=n.actionClickAllowlist;this.logger=r,i&&this.endpoint===Q5&&(this.endpoint=i);var M=null;window.addEventListener("message",function(Z){var u,c,f,p,h;if((c=(u=t.logger)===null||u===void 0?void 0:u.debug)===null||c===void 0||c.call(u,"Message received: ",JSON.stringify(Z)),t.endpoint===Z.origin){var v=Z==null?void 0:Z.data,d=v==null?void 0:v.action;if(d)if("id"in v)(p=(f=t.logger)===null||f===void 0?void 0:f.debug)===null||p===void 0||p.call(f,"Received Response to previous request: ",JSON.stringify(Z)),t.handleResponse(v);else if(d==="ping")t.notify({action:"pong"});else if(d==="initialize-visual-tagging-selector"){var L=v==null?void 0:v.data;Iy(yv).then(function(){var m;M=(m=window==null?void 0:window.amplitudeVisualTaggingSelector)===null||m===void 0?void 0:m.call(window,{getEventTagProps:Ry,isElementSelectable:function(g){return a?a((L==null?void 0:L.actionType)||"click",g):!0},onTrack:t.onTrack,onSelect:t.onSelect,visualHighlightClass:ke,messenger:t,cssSelectorAllowlist:l,actionClickAllowlist:s}),t.notify({action:"selector-loaded"})}).catch(function(){var m;(m=t.logger)===null||m===void 0||m.warn("Failed to initialize visual tagging selector")})}else d==="close-visual-tagging-selector"&&((h=M==null?void 0:M.close)===null||h===void 0||h.call(M))}}),this.notify({action:"page-loaded"})},C}(),Dy=["id","class","style","value","onclick","onchange","oninput","onblur","onsubmit","onfocus","onkeydown","onkeyup","onkeypress","data-reactid","data-react-checksum","data-reactroot"],Oy=["type"],Fy=["svg","path","g"],jy=["password","hidden"],Uy=128,By=1024;function zy(C){var e,t,n,r,i,a;if(C===null)return null;var l=String(C.tagName).toLowerCase(),s={tag:l},M=Array.from((r=(n=C.parentElement)===null||n===void 0?void 0:n.children)!==null&&r!==void 0?r:[]);M.length&&(s.index=M.indexOf(C),s.indexOfType=M.filter(function(g){return g.tagName===C.tagName}).indexOf(C));var Z=(a=(i=C.previousElementSibling)===null||i===void 0?void 0:i.tagName)===null||a===void 0?void 0:a.toLowerCase();Z&&(s.prevSib=String(Z));var u=C.getAttribute("id");u&&(s.id=String(u));var c=Array.from(C.classList);c.length&&(s.classes=c);var f={},p=Array.from(C.attributes),h=p.filter(function(g){return!Dy.includes(g.name)}),v=!Xs(C);if(!jy.includes(String(C.getAttribute("type")))&&!Fy.includes(l))try{for(var d=Q1(h),L=d.next();!L.done;L=d.next()){var m=L.value;v&&!Oy.includes(m.name)||(f[m.name]=String(m.value).substring(0,Uy))}}catch(g){e={error:g}}finally{try{L&&!L.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}return Object.keys(f).length&&(s.attrs=f),s}function Wy(C){var e=[];if(!C)return e;e.push(C);for(var t=C.parentElement;t&&t.tagName!=="HTML";)e.push(t),t=t.parentElement;return e}var $y=function(C){var e=[];if(!C)return[];var t=Wy(C);return e=Qy(t.map(function(n){return zy(n)}),By),e};function Qy(C,e){for(var t=0,n=0;ne)return C.slice(0,n)}return C}function K5(C,e){e===void 0&&(e=!1);try{if(C==null)return e?"None":null;if(typeof C=="string")return e?(C=C.replace(/\\/g,"\\\\").replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r"),C.includes('"')?"'".concat(C,"'"):C.includes("'")?'"'.concat(C.replace(/'/g,"\\'"),'"'):"'".concat(C,"'")):C;if(typeof C=="boolean")return C?"True":"False";if(Array.isArray(C)){var t=C.map(function(i){return K5(i,!0)});return"[".concat(t.join(", "),"]")}else if(typeof C=="object"){var n=Object.entries(C).filter(function(i){var a=l1(i,1),l=a[0];return l!=null}).map(function(i){var a=l1(i,2),l=a[0],s=a[1];return"".concat(String(K5(l,!0)),": ").concat(String(K5(s,!0)))}),r="{".concat(n.join(", "),"}");return r.includes("\\'")&&(r=r.replace(/'/g,"'").replace(/'/g,"\\'")),r}return C.toString()}catch{return null}}var Ky=5;function Gy(C){var e=C.amplitude,t=C.allObservables,n=C.options,r=C.shouldTrackEvent,i=t.clickObservable,a=i.pipe(py(),g8(function(Z){var u=l1(Z,2),c=u[0],f=u[1],p=c.event.target!==f.event.target,h=Math.abs(f.event.screenX-c.event.screenX)<=20&&Math.abs(f.event.screenY-c.event.screenY)<=20;return p&&!h})),l=i.pipe(Ly(n.debounceTime),S3(function(){return"timeout"})),s=$s(a,l),M=i.pipe(hy(0),g8(Gt),g8(function(Z){return r("click",Z.closestTrackedAncestor)}),cy(s));return M.subscribe(function(Z){var u,c,f=(Z.length>=Ky,be);try{for(var p=Q1(Z),h=p.next();!h.done;h=p.next()){var v=h.value;e==null||e.track(f,v.targetElementProperties,{time:v.timestamp})}}catch(d){u={error:d}}finally{try{h&&!h.done&&(c=p.return)&&c.call(p)}finally{if(u)throw u.error}}})}function qy(C){var e=C.amplitude,t=C.allObservables,n=C.getEventProperties,r=C.shouldTrackEvent,i=t.changeObservable,a=i.pipe(g8(Gt),g8(function(l){return r("change",l.closestTrackedAncestor)}));return a.subscribe(function(l){e==null||e.track(av,n("change",l.closestTrackedAncestor))})}function Jy(C){var e=C.amplitude,t=C.allObservables,n=C.options,r=C.getEventProperties,i=C.shouldTrackEvent,a=C.shouldTrackActionClick,l=t.clickObservable,s=t.mutationObservable,M=t.navigateObservable,Z=l.pipe(g8(function(p){return!i("click",p.closestTrackedAncestor)}),S3(function(p){var h=Kt(p.event.target,n.actionClickAllowlist);return p.closestTrackedAncestor=h,p.closestTrackedAncestor!==null&&(p.targetElementProperties=r(p.type,p.closestTrackedAncestor)),p}),g8(Gt),g8(function(p){return a("click",p.closestTrackedAncestor)})),u=[s];M&&u.push(M);var c=$s.apply(void 0,$1([],l1(u),!1)),f=Z.pipe(my(function(p){return c.pipe(Te(1),Yv({first:500,with:function(){return zt}}),S3(function(){return p}))}));return f.subscribe(function(p){e==null||e.track(be,r("click",p.closestTrackedAncestor),{time:p.timestamp})})}var k4;(function(C){C.ClickObservable="clickObservable",C.ChangeObservable="changeObservable",C.NavigateObservable="navigateObservable",C.MutationObservable="mutationObservable"})(k4||(k4={}));function Yy(C){return C.type==="click"||C.type==="change"}var Xy=function(C){var e,t,n;C===void 0&&(C={});var r=C.dataAttributePrefix,i=r===void 0?fm:r,a=C.visualTaggingOptions,l=a===void 0?{enabled:!0,messenger:new Ny}:a;C.cssSelectorAllowlist=(e=C.cssSelectorAllowlist)!==null&&e!==void 0?e:dm,C.actionClickAllowlist=(t=C.actionClickAllowlist)!==null&&t!==void 0?t:hm,C.debounceTime=(n=C.debounceTime)!==null&&n!==void 0?n:0;var s=iv,M="enrichment",Z=[],u=void 0,c=function(){var L,m=G6(document,"click",{capture:!0}).pipe(S3(function(b){return p(b,"click")})),g=G6(document,"change",{capture:!0}).pipe(S3(function(b){return p(b,"change")})),V;window.navigation&&(V=G6(window.navigation,"navigate").pipe(S3(function(b){return p(b,"navigate")})));var k=new W2(function(b){var y=new MutationObserver(function(H){b.next(H)});return y.observe(document.body,{childList:!0,attributes:!0,characterData:!0,subtree:!0}),function(){return y.disconnect()}}).pipe(S3(function(b){return p(b,"mutation")}));return L={},L[k4.ClickObservable]=m,L[k4.ChangeObservable]=g,L[k4.NavigateObservable]=V,L[k4.MutationObservable]=k,L},f=function(L,m){var g,V,k,b=(k=(V=m==null?void 0:m.tagName)===null||V===void 0?void 0:V.toLowerCase)===null||k===void 0?void 0:k.call(V),y=typeof m.getBoundingClientRect=="function"?m.getBoundingClientRect():{left:null,top:null},H=m.getAttribute("aria-label"),I=Py(m,i),F=tM(m),G=CM(m,u),J=(g={},g[ov]=m.getAttribute("id")||"",g[lv]=m.getAttribute("class"),g[sv]=$y(m),g[ps]=b,g[ms]=Qt(m),g[Zv]=y.left==null?null:Math.round(y.left),g[uv]=y.top==null?null:Math.round(y.top),g[cv]=H,g[Lv]=I,g[gs]=G,g[dv]=F,g[vs]=window.location.href.split("?")[0],g[fv]=typeof document<"u"&&document.title||"",g[hv]=window.innerHeight,g[pv]=window.innerWidth,g);return b==="a"&&L==="click"&&m instanceof HTMLAnchorElement&&(J[Mv]=m.href),eM(J)},p=function(L,m){var g={event:L,timestamp:Date.now(),type:m};if(Yy(g)&&g.event.target!==null){var V=Kt(g.event.target,C.cssSelectorAllowlist);return V&&(g.closestTrackedAncestor=V,g.targetElementProperties=f(g.type,V)),g}return g},h=function(L,m){return j(void 0,void 0,void 0,function(){var g,V,k,b,y,H,I,F,G,J;return O(this,function(X){return u=L.loggerProvider,typeof document>"u"?[2]:(g=sC(C,C.cssSelectorAllowlist),V=sC(C,C.actionClickAllowlist),k=c(),b=Gy({allObservables:k,options:C,amplitude:m,shouldTrackEvent:g}),Z.push(b),y=qy({allObservables:k,getEventProperties:f,amplitude:m,shouldTrackEvent:g}),Z.push(y),H=Jy({allObservables:k,options:C,getEventProperties:f,amplitude:m,shouldTrackEvent:g,shouldTrackActionClick:V}),Z.push(H),(G=L==null?void 0:L.loggerProvider)===null||G===void 0||G.log("".concat(s," has been successfully added.")),window.opener&&l.enabled&&(I=C.cssSelectorAllowlist,F=C.actionClickAllowlist,(J=l.messenger)===null||J===void 0||J.setup($($({logger:L==null?void 0:L.loggerProvider},(L==null?void 0:L.serverZone)&&{endpoint:vv[L.serverZone]}),{isElementSelectable:sC(C,$1($1([],l1(I),!1),l1(F),!1)),cssSelectorAllowlist:I,actionClickAllowlist:F}))),[2])})})},v=function(L){return j(void 0,void 0,void 0,function(){return O(this,function(m){return[2,L]})})},d=function(){return j(void 0,void 0,void 0,function(){var L,m,g,V,k;return O(this,function(b){try{for(L=Q1(Z),m=L.next();!m.done;m=L.next())g=m.value,g.unsubscribe()}catch(y){V={error:y}}finally{try{m&&!m.done&&(k=L.return)&&k.call(L)}finally{if(V)throw V.error}}return[2]})})};return{name:s,type:M,setup:h,execute:v,teardown:d}},CE=function(C){z2(e,C);function e(){return C!==null&&C.apply(this,arguments)||this}return e.prototype.init=function(t,n,r){t===void 0&&(t="");var i,a;return arguments.length>2?(i=n,a=r):typeof n=="string"?(i=n,a=void 0):(i=n==null?void 0:n.userId,a=n),x2(this._init($($({},a),{userId:i,apiKey:t})))},e.prototype._init=function(t){var n,r,i;return j(this,void 0,void 0,function(){var a,l,s,M,Z,u,c=this;return O(this,function(f){switch(f.label){case 0:return this.initializing?[2]:(this.initializing=!0,[4,Ig(t.apiKey,t,this)]);case 1:return a=f.sent(),t.fetchRemoteConfig?[4,rv(a)]:[3,4];case 2:return l=f.sent(),[4,l.generateJoinedConfig()];case 3:a=f.sent(),f.label=4;case 4:return[4,C.prototype._init.call(this,a)];case 5:return f.sent(),this.logBrowserOptions(a),us(this.config.defaultTracking)?(s=fg(this.config),this.webAttribution=new qm(s,this.config),[4,this.webAttribution.init()]):[3,7];case 6:f.sent(),f.label=7;case 7:return M=b9(),Z=Number.isNaN(Number(M.ampSessionId))?void 0:Number(M.ampSessionId),this.setSessionId((i=(r=(n=t.sessionId)!==null&&n!==void 0?n:Z)!==null&&r!==void 0?r:this.config.sessionId)!==null&&i!==void 0?i:Date.now()),u=g7(t.instanceName),u.identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),this.config.offline===Lm?[3,9]:[4,this.add(Qg()).promise];case 8:f.sent(),f.label=9;case 9:return[4,this.add(new Rm).promise];case 10:return f.sent(),[4,this.add(new gg).promise];case 11:return f.sent(),[4,this.add(new Mg).promise];case 12:return f.sent(),$g(this.config),ug(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding file download tracking plugin"),[4,this.add(Wg()).promise]):[3,14];case 13:f.sent(),f.label=14;case 14:return cg(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding form interaction plugin"),[4,this.add(zg()).promise]):[3,16];case 15:f.sent(),f.label=16;case 16:return cs(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(Fg(dg(this.config))).promise]):[3,18];case 17:f.sent(),f.label=18;case 18:return Ls(this.config.autocapture)?(this.config.loggerProvider.debug("Adding user interactions plugin (autocapture plugin)"),[4,this.add(Xy(Lg(this.config))).promise]):[3,20];case 19:f.sent(),f.label=20;case 20:return this.initializing=!1,[4,this.runQueuedFunctions("dispatchQ")];case 21:return f.sent(),u.eventBridge.setEventReceiver(function(p){c.track(p.eventType,p.eventProperties)}),[2]}})})},e.prototype.getUserId=function(){var t;return(t=this.config)===null||t===void 0?void 0:t.userId},e.prototype.setUserId=function(t){if(!this.config){this.q.push(this.setUserId.bind(this,t));return}this.config.loggerProvider.debug("function setUserId: ",t),(t!==this.config.userId||t===void 0)&&(this.config.userId=t,lg(t,this.config.instanceName))},e.prototype.getDeviceId=function(){var t;return(t=this.config)===null||t===void 0?void 0:t.deviceId},e.prototype.setDeviceId=function(t){if(!this.config){this.q.push(this.setDeviceId.bind(this,t));return}this.config.loggerProvider.debug("function setDeviceId: ",t),this.config.deviceId=t,sg(t,this.config.instanceName)},e.prototype.reset=function(){this.setDeviceId(u6()),this.setUserId(void 0)},e.prototype.getSessionId=function(){var t;return(t=this.config)===null||t===void 0?void 0:t.sessionId},e.prototype.setSessionId=function(t){var n,r=[];if(!this.config)return this.q.push(this.setSessionId.bind(this,t)),x2(Promise.resolve());if(t===this.config.sessionId)return x2(Promise.resolve());this.config.loggerProvider.debug("function setSessionId: ",t);var i=this.getSessionId(),a=this.config.lastEventTime,l=(n=this.config.lastEventId)!==null&&n!==void 0?n:-1;this.config.sessionId=t,this.config.lastEventTime=void 0,this.config.pageCounter=0,wi(this.config.defaultTracking)&&(i&&a&&r.push(this.track(Vi,void 0,{device_id:this.previousSessionDeviceId,event_id:++l,session_id:i,time:a+1,user_id:this.previousSessionUserId}).promise),this.config.lastEventTime=this.config.sessionId);var s=this.trackCampaignEventIfNeeded(++l,r);return wi(this.config.defaultTracking)&&r.push(this.track(Si,void 0,{event_id:s?++l:l,session_id:this.config.sessionId,time:this.config.lastEventTime}).promise),this.previousSessionDeviceId=this.config.deviceId,this.previousSessionUserId=this.config.userId,x2(Promise.all(r))},e.prototype.extendSession=function(){if(!this.config){this.q.push(this.extendSession.bind(this));return}this.config.lastEventTime=Date.now()},e.prototype.setTransport=function(t){if(!this.config){this.q.push(this.setTransport.bind(this,t));return}this.config.transportProvider=hs(t)},e.prototype.identify=function(t,n){if(eC(t)){var r=t._q;t._q=[],t=CC(new V9,r)}return n!=null&&n.user_id&&this.setUserId(n.user_id),n!=null&&n.device_id&&this.setDeviceId(n.device_id),C.prototype.identify.call(this,t,n)},e.prototype.groupIdentify=function(t,n,r,i){if(eC(r)){var a=r._q;r._q=[],r=CC(new V9,a)}return C.prototype.groupIdentify.call(this,t,n,r,i)},e.prototype.revenue=function(t,n){if(eC(t)){var r=t._q;t._q=[],t=CC(new km,r)}return C.prototype.revenue.call(this,t,n)},e.prototype.trackCampaignEventIfNeeded=function(t,n){if(!this.webAttribution||!this.webAttribution.shouldTrackNewCampaign)return!1;var r=this.webAttribution.generateCampaignEvent(t);return n?n.push(this.track(r).promise):this.track(r),this.config.loggerProvider.log("Tracking attribution."),!0},e.prototype.process=function(t){return j(this,void 0,void 0,function(){var n,r,i;return O(this,function(a){return n=Date.now(),r=Zs(this.config.sessionTimeout,this.config.lastEventTime),i=this.webAttribution&&this.webAttribution.shouldSetSessionIdOnNewCampaign(),t.event_type!==Si&&t.event_type!==Vi&&(!t.session_id||t.session_id===this.getSessionId())&&(r||i?(this.setSessionId(n),i&&this.config.loggerProvider.log("Created a new session for new campaign.")):r||this.trackCampaignEventIfNeeded()),[2,C.prototype.process.call(this,t)]})})},e.prototype.logBrowserOptions=function(t){try{var n=$($({},t),{apiKey:t.apiKey.substring(0,10)+"********"});this.config.loggerProvider.debug("Initialized Amplitude with BrowserConfig:",JSON.stringify(n))}catch(r){this.config.loggerProvider.error("Error logging browser config",r)}},e}(bm),eE=function(){var C=new CE;return{init:z1(C.init.bind(C),"init",U1(C),B1(C,["config"])),add:z1(C.add.bind(C),"add",U1(C),B1(C,["config.apiKey","timeline.plugins"])),remove:z1(C.remove.bind(C),"remove",U1(C),B1(C,["config.apiKey","timeline.plugins"])),track:z1(C.track.bind(C),"track",U1(C),B1(C,["config.apiKey","timeline.queue.length"])),logEvent:z1(C.logEvent.bind(C),"logEvent",U1(C),B1(C,["config.apiKey","timeline.queue.length"])),identify:z1(C.identify.bind(C),"identify",U1(C),B1(C,["config.apiKey","timeline.queue.length"])),groupIdentify:z1(C.groupIdentify.bind(C),"groupIdentify",U1(C),B1(C,["config.apiKey","timeline.queue.length"])),setGroup:z1(C.setGroup.bind(C),"setGroup",U1(C),B1(C,["config.apiKey","timeline.queue.length"])),revenue:z1(C.revenue.bind(C),"revenue",U1(C),B1(C,["config.apiKey","timeline.queue.length"])),flush:z1(C.flush.bind(C),"flush",U1(C),B1(C,["config.apiKey","timeline.queue.length"])),getUserId:z1(C.getUserId.bind(C),"getUserId",U1(C),B1(C,["config","config.userId"])),setUserId:z1(C.setUserId.bind(C),"setUserId",U1(C),B1(C,["config","config.userId"])),getDeviceId:z1(C.getDeviceId.bind(C),"getDeviceId",U1(C),B1(C,["config","config.deviceId"])),setDeviceId:z1(C.setDeviceId.bind(C),"setDeviceId",U1(C),B1(C,["config","config.deviceId"])),reset:z1(C.reset.bind(C),"reset",U1(C),B1(C,["config","config.userId","config.deviceId"])),getSessionId:z1(C.getSessionId.bind(C),"getSessionId",U1(C),B1(C,["config"])),setSessionId:z1(C.setSessionId.bind(C),"setSessionId",U1(C),B1(C,["config"])),extendSession:z1(C.extendSession.bind(C),"extendSession",U1(C),B1(C,["config"])),setOptOut:z1(C.setOptOut.bind(C),"setOptOut",U1(C),B1(C,["config"])),setTransport:z1(C.setTransport.bind(C),"setTransport",U1(C),B1(C,["config"]))}};const K1=eE();K1.add;K1.extendSession;K1.flush;K1.getDeviceId;K1.getSessionId;K1.getUserId;K1.groupIdentify;K1.identify;var tE=K1.init;K1.logEvent;K1.remove;K1.reset;K1.revenue;K1.setDeviceId;K1.setGroup;K1.setOptOut;K1.setSessionId;K1.setTransport;K1.setUserId;var nE=K1.track;const rE="f27dd5a1fb291278cefb5c13a7875f88";tE(rE);const O2=(C,e=void 0)=>{nE(C,e)},B7=({className:C,contentClassName:e,children:t,bottom:n})=>(Ot(),E.jsxs("div",{className:F1("Page relative max-w-[640px] mx-auto min-h-[100vh] flex flex-col justify-between text-center",C),children:[E.jsx("div",{className:F1("flex-grow flex flex-col justify-between",e),children:t}),n&&E.jsx("div",{className:"mt-5 sticky bottom-0",children:n})]})),iE=C=>o.createElement("svg",{width:26,height:26,viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",...C},o.createElement("path",{d:"M4.99037 25.7194C4.40711 25.2648 4.29274 24.4992 4.61296 23.5063L6.93458 16.2929L1.01046 11.8549C0.198469 11.2448 -0.1675 10.5509 0.0726669 9.82122C0.312834 9.10347 0.976152 8.75656 1.97113 8.75656H9.24475L11.452 1.55513C11.7608 0.538313 12.2754 0 13.0074 0C13.7393 0 14.2425 0.538313 14.5513 1.55513L16.77 8.75656H24.0207C25.0386 8.75656 25.6905 9.10347 25.9306 9.82122C26.1594 10.5509 25.8163 11.2448 24.9928 11.8549L19.0687 16.2929L21.3903 23.5063C21.7106 24.4992 21.5962 25.2648 21.0129 25.7194C20.4182 26.1979 19.6977 26.0424 18.8743 25.4203L13.0074 20.9105L7.129 25.4203C6.30557 26.0424 5.58507 26.1979 4.99037 25.7194Z",fill:"currentColor"})),aE=[1,2,3,4,5],oE=({className:C})=>{const[e,t]=o.useState(0),n=r=>{t(r),O2("Rated",{rating:r})};return E.jsxs(E.Fragment,{children:[E.jsx("div",{className:F1("Stars flex items-center justify-around",C),children:aE.map(r=>E.jsx(D1,{wrapperClassName:"w-[36px] h-[26px]",className:"px-[5px]",onClick:()=>{n(r)},children:E.jsx(iE,{className:F1("w-[26px] h-[26px] transition-all",e>=r?"text-main":"text-[#2C2946]")})},`star-${r}`))}),!!e&&E.jsx(lE,{})]})},Re=C=>o.createElement("svg",{width:30,height:30,viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",...C},o.createElement("path",{d:"M15.278 20.3512L15.278 20.3512L15.2816 20.3456L20.6537 12.0517C20.6539 12.0514 20.654 12.0511 20.6542 12.0509C20.8454 11.7576 21.0455 11.3478 21.0455 10.9271C21.0455 9.94365 20.1788 9.33413 19.349 9.33413C18.7229 9.33413 18.24 9.70218 17.9055 10.2178L17.9055 10.2178L17.9012 10.2247L13.6391 17.0355L11.9509 14.9184L11.9509 14.9184L11.948 14.9148C11.7685 14.6939 11.5686 14.5133 11.3327 14.39C11.0927 14.2646 10.8418 14.2124 10.582 14.2124C9.65506 14.2124 8.93145 14.9605 8.93145 15.8744C8.93145 16.3161 9.08543 16.6996 9.37467 17.0611L9.3746 17.0612L9.38056 17.0684L12.1515 20.4027C12.5662 20.9132 13.0659 21.2181 13.7229 21.2181C14.3684 21.2181 14.9196 20.8887 15.278 20.3512ZM15 26.5C8.66061 26.5 3.5 21.3394 3.5 15C3.5 8.64942 8.6603 3.5 15 3.5C21.3509 3.5 26.5 8.64911 26.5 15C26.5 21.3397 21.3506 26.5 15 26.5Z",fill:"currentColor",stroke:"currentColor"})),Di=({className:C,id:e,image:t,title:n,subtitle:r,buttonText:i,link:a,claimable:l,isSuccess:s,bottom:M,onClick:Z,afterClaim:u})=>{const{t:c}=S8(),{openExternal:f}=j7(),[p,h]=o.useState(!1),v=dp(),[d,L]=o.useState(!1),m=async()=>{L(!0);try{await v({taskId:e}),u==null||u()}catch(g){console.error(g)}finally{L(!1)}O2("Points claim pressed")};return E.jsxs("div",{className:F1("Quest flex flex-col gap-5 p-3 bg-[#1C1B2A] rounded-[24px]",C),children:[E.jsxs("div",{className:"flex items-center gap-3",children:[E.jsx("div",{className:"w-[44px] h-[44px] bg-white/10 rounded-[8px] overflow-hidden",children:E.jsx("img",{src:t,className:F1("w-[44px] h-[44px]",s&&"grayscale")})}),E.jsxs("div",{className:"flex-1 flex flex-col gap-1",children:[E.jsx("div",{className:F1("text-[16px] leading-[19px] font-semibold",s&&"line-through"),children:n}),E.jsx("div",{className:"text-[14px] leading-[14px] font-medium text-white/50",children:r})]}),s?E.jsx(Re,{className:"w-[30px] h-[30px] text-main"}):p?E.jsx(D1,{className:"min-w-[72px] p-2 border border-main rounded-[12px] bg-main/10 text-[16px] leading-[19px] font-semibold text-main",onClick:m,disabled:d,children:c("points.claim")}):E.jsx(D1,{className:"min-w-[72px] p-2 border border-main rounded-[12px] bg-main/10 text-[16px] leading-[19px] font-semibold text-main",onClick:Z||(a?()=>{f(a),l&&h(!0),O2("Points link pressed")}:()=>{}),children:i})]}),M&&E.jsx("div",{className:"Quest-bottom pb-[6px] text-white/50 text-[14px] leading-[14px] font-medium",children:M})]})},lE=({className:C})=>(o.useEffect(()=>{const e=document.createElement("script");return e.innerHTML=` + `):"",this.name="UnsubscriptionError",this.errors=t}});function _e(C,e){if(C){var t=C.indexOf(e);0<=t&&C.splice(t,1)}}var u0=function(){function C(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return C.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var l=Q1(a),s=l.next();!s.done;s=l.next()){var M=s.value;M.remove(this)}}catch(h){e={error:h}}finally{try{s&&!s.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}else a.remove(this);var Z=this.initialTeardown;if(g1(Z))try{Z()}catch(h){i=h instanceof aC?h.errors:[h]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var c=Q1(u),f=c.next();!f.done;f=c.next()){var p=f.value;try{Hi(p)}catch(h){i=i??[],h instanceof aC?i=$1($1([],l1(i)),l1(h.errors)):i.push(h)}}}catch(h){n={error:h}}finally{try{f&&!f.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}if(i)throw new aC(i)}},C.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)Hi(e);else{if(e instanceof C){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(e)}},C.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},C.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},C.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&_e(t,e)},C.prototype.remove=function(e){var t=this._finalizers;t&&_e(t,e),e instanceof C&&e._removeParent(this)},C.EMPTY=function(){var e=new C;return e.closed=!0,e}(),C}();u0.EMPTY;function Es(C){return C instanceof u0||C&&"closed"in C&&g1(C.remove)&&g1(C.add)&&g1(C.unsubscribe)}function Hi(C){g1(C)?C():C.unsubscribe()}var ws={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},He={setTimeout:function(C,e){for(var t=[],n=2;n0&&d(r)},void 0,void 0,function(){p!=null&&p.closed||p==null||p.unsubscribe(),h=null})),!v&&d(n!=null?typeof n=="number"?n:+n-s.now():r)})}function Xv(C){throw new Jv(C)}function S3(C,e){return e3(function(t,n){var r=0;t.subscribe(H2(n,function(i){n.next(C.call(e,i,r++))}))})}var Cy=Array.isArray;function ey(C,e){return Cy(e)?C.apply(void 0,$1([],l1(e))):C(e)}function ty(C){return S3(function(e){return ey(C,e)})}function ny(C,e,t,n,r,i,a,l){var s=[],M=0,Z=0,u=!1,c=function(){u&&!s.length&&!M&&e.complete()},f=function(h){return M0&&(n=r[0]),d0(n)}else throw new Error("Selector was not found.")}function vy(C,e){return C.nodeType===Node.DOCUMENT_NODE?C:C===e.root?C.ownerDocument:C}function k5(C,e,t){for(var n=null,r=[],i=C,a=0,l=function(){var M,Z,u=H5(yy(i))||H5.apply(void 0,$1([],l1(Ey(i)),!1))||H5.apply(void 0,$1([],l1(wy(i)),!1))||H5(xy(i))||[Ni()],c=Sy(i);if(e=="all")c&&(u=u.concat(u.filter(lC).map(function(d){return _5(d,c)})));else if(e=="two")u=u.slice(0,1),c&&(u=u.concat(u.filter(lC).map(function(d){return _5(d,c)})));else if(e=="one"){var f=l1(u=u.slice(0,1),1),p=f[0];c&&lC(p)&&(u=[_5(p,c)])}else e=="none"&&(u=[Ni()],c&&(u=[_5(u[0],c)]));try{for(var h=(M=void 0,Q1(u)),v=h.next();!v.done;v=h.next()){var p=v.value;p.level=a}}catch(d){M={error:d}}finally{try{v&&!v.done&&(Z=h.return)&&Z.call(h)}finally{if(M)throw M.error}}if(r.push(u),r.length>=k3.seedMinLength&&(n=Ii(r,t),n))return"break";i=i.parentElement,a++};i;){var s=l();if(s==="break")break}return n||(n=Ii(r,t)),!n&&t?t():n}function Ii(C,e){var t,n,r=C.reduce(function(M,Z){return M*Z.length},1);if(r>k3.threshold)return e?e():null;var i=qs(Gs(C));try{for(var a=Q1(i),l=a.next();!l.done;l=a.next()){var s=l.value;if(Ks(s))return s}}catch(M){t={error:M}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return null}function d0(C){for(var e=C[0],t=e.name,n=1;n ").concat(t):t="".concat(C[n].name," ").concat(t),e=C[n]}return t}function Ai(C){return C.map(function(e){return e.penalty}).reduce(function(e,t){return e+t},0)}function Ks(C){var e=d0(C);switch($t.querySelectorAll(e).length){case 0:throw new Error("Can't select any node with this selector: ".concat(e));case 1:return!0;default:return!1}}function yy(C){var e=C.getAttribute("id");return e&&k3.idName(e)?{name:"#"+CSS.escape(e),penalty:0}:null}function Ey(C){var e=Array.from(C.attributes).filter(function(t){return k3.attr(t.name,t.value)});return e.map(function(t){return{name:"[".concat(CSS.escape(t.name),'="').concat(CSS.escape(t.value),'"]'),penalty:.5}})}function wy(C){var e=Array.from(C.classList).filter(k3.className);return e.map(function(t){return{name:"."+CSS.escape(t),penalty:1}})}function xy(C){var e=C.tagName.toLowerCase();return k3.tagName(e)?{name:e,penalty:2}:null}function Ni(){return{name:"*",penalty:3}}function Sy(C){var e=C.parentNode;if(!e)return null;var t=e.firstChild;if(!t)return null;for(var n=0;t&&(t.nodeType===Node.ELEMENT_NODE&&n++,t!==C);)t=t.nextSibling;return n}function _5(C,e){return{name:C.name+":nth-child(".concat(e,")"),penalty:C.penalty+1}}function lC(C){return C.name!=="html"&&!C.name.startsWith("#")}function H5(){for(var C=[],e=0;e0?t:null}function Vy(C){return C!=null}function Gs(C,e){var t,n,r,i,a,l;return e===void 0&&(e=[]),O(this,function(s){switch(s.label){case 0:if(!(C.length>0))return[3,9];s.label=1;case 1:s.trys.push([1,6,7,8]),t=Q1(C[0]),n=t.next(),s.label=2;case 2:return n.done?[3,5]:(r=n.value,[5,Q1(Gs(C.slice(1,C.length),e.concat(r)))]);case 3:s.sent(),s.label=4;case 4:return n=t.next(),[3,2];case 5:return[3,8];case 6:return i=s.sent(),a={error:i},[3,8];case 7:try{n&&!n.done&&(l=t.return)&&l.call(t)}finally{if(a)throw a.error}return[7];case 8:return[3,11];case 9:return[4,e];case 10:s.sent(),s.label=11;case 11:return[2]}})}function qs(C){return $1([],l1(C),!1).sort(function(e,t){return Ai(e)-Ai(t)})}function Js(C,e,t){var n,r,i;return t===void 0&&(t={counter:0,visited:new Map}),O(this,function(a){switch(a.label){case 0:if(!(C.length>2&&C.length>k3.optimizedMinLength))return[3,5];n=1,a.label=1;case 1:return nk3.maxNumberOfTries?[2]:(t.counter+=1,r=$1([],l1(C),!1),r.splice(n,1),i=d0(r),t.visited.has(i)?[2]:Ks(r)&&by(r,e)?[4,r]:[3,4]):[3,5];case 2:return a.sent(),t.visited.set(i,!0),[5,Q1(Js(r,e,t))];case 3:a.sent(),a.label=4;case 4:return n++,[3,1];case 5:return[2]}})}function by(C,e){return $t.querySelector(d0(C))===e}var ky=["input","select","textarea"],sC=function(C,e){return function(t,n){var r,i,a,l=C.pageUrlAllowlist,s=C.shouldTrackEventResolver,M=(i=(r=n==null?void 0:n.tagName)===null||r===void 0?void 0:r.toLowerCase)===null||i===void 0?void 0:i.call(r);if(!M)return!1;if(s)return s(t,n);if(!Hy(window.location.href,l))return!1;var Z=String(n==null?void 0:n.getAttribute("type"))||"";if(typeof Z=="string")switch(Z.toLowerCase()){case"hidden":return!1;case"password":return!1}if(e){var u=e.some(function(f){var p;return!!(!((p=n==null?void 0:n.matches)===null||p===void 0)&&p.call(n,f))});if(!u)return!1}switch(M){case"input":case"select":case"textarea":return t==="change"||t==="click";default:{var c=(a=window==null?void 0:window.getComputedStyle)===null||a===void 0?void 0:a.call(window,n);return c&&c.getPropertyValue("cursor")==="pointer"&&t==="click"?!0:t==="click"}}}},Ys=function(C){if(C==null)return!1;if(typeof C=="string"){var e=/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/;if(e.test((C||"").replace(/[- ]/g,"")))return!1;var t=/(^\d{3}-?\d{2}-?\d{4}$)/;if(t.test(C))return!1}return!0},_y=function(C){return!!C&&C.nodeType===3},Xs=function(C){var e,t,n,r=(t=(e=C==null?void 0:C.tagName)===null||e===void 0?void 0:e.toLowerCase)===null||t===void 0?void 0:t.call(e),i=C instanceof HTMLElement?((n=C.getAttribute("contenteditable"))===null||n===void 0?void 0:n.toLowerCase())==="true":!1;return!ky.includes(r)&&!i},Qt=function(C){var e="";return Xs(C)&&C.childNodes&&C.childNodes.length&&C.childNodes.forEach(function(t){var n="";_y(t)?t.textContent&&(n=t.textContent):n=Qt(t),e+=n.split(/(\s+)/).filter(Ys).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}),e},CM=function(C,e){var t,n,r="";try{return r=gy(C,{className:function(Z){return Z!==ke},maxNumberOfTries:1e3}),r}catch(Z){if(e){var i=Z;e.warn("Failed to get selector with finder, use fallback strategy instead: ".concat(i.toString()))}}var a=(n=(t=C==null?void 0:C.tagName)===null||t===void 0?void 0:t.toLowerCase)===null||n===void 0?void 0:n.call(t);a&&(r=a);var l=C.getAttribute("id"),s=C.getAttribute("class");if(l)r="#".concat(l);else if(s){var M=s.split(" ").filter(function(Z){return Z!==ke}).join(".");M&&(r="".concat(r,".").concat(M))}return r},Hy=function(C,e){return!e||!e.length?!0:e.some(function(t){return typeof t=="string"?C===t:C.match(t)})},Py=function(C,e){return C.getAttributeNames().reduce(function(t,n){if(n.startsWith(e)){var r=n.replace(e,""),i=C.getAttribute(n);r&&(t[r]=i||"")}return t},{})},Ty=function(C){return C==null||typeof C=="object"&&Object.keys(C).length===0||typeof C=="string"&&C.trim().length===0},eM=function(C){return Object.keys(C).reduce(function(e,t){var n=C[t];return Ty(n)||(e[t]=n),e},{})},tM=function(C){var e=C.parentElement;if(!e)return"";var t;try{t=e.querySelector(":scope>span,h1,h2,h3,h4,h5,h6")}catch{t=null}if(t){var n=t.textContent||"";return Ys(n)?n:""}return tM(e)},Kt=function(C,e){return C?e.some(function(t){var n;return(n=C==null?void 0:C.matches)===null||n===void 0?void 0:n.call(C,t)})?C:Kt(C==null?void 0:C.parentElement,e):null},Ry=function(C,e){var t,n,r;if(!C)return{};var i=(r=(n=C==null?void 0:C.tagName)===null||n===void 0?void 0:n.toLowerCase)===null||r===void 0?void 0:r.call(n),a=CM(C,e),l=(t={},t[ps]=i,t[ms]=Qt(C),t[gs]=a,t[vs]=window.location.href.split("?")[0],t);return eM(l)},Iy=function(C){return new Promise(function(e,t){var n;try{var r=document.createElement("script");r.type="text/javascript",r.async=!0,r.src=C,r.addEventListener("load",function(){e({status:!0})},{once:!0}),r.addEventListener("error",function(){t({status:!1,message:"Failed to load the script ".concat(C)})}),(n=document.head)===null||n===void 0||n.appendChild(r)}catch(i){t(i)}})};function Ay(){return"".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9))}var Gt=function(C){return!(C.event.target===null||!C.closestTrackedAncestor)},Ny=function(){function C(e){var t=e===void 0?{}:e,n=t.origin,r=n===void 0?Q5:n,i=this;this.endpoint=Q5,this.requestCallbacks={},this.onSelect=function(a){i.notify({action:"element-selected",data:a})},this.onTrack=function(a,l){a==="selector-mode-changed"?i.notify({action:"track-selector-mode-changed",data:l}):a==="selector-moved"&&i.notify({action:"track-selector-moved",data:l})},this.endpoint=r}return C.prototype.notify=function(e){var t,n,r,i;(n=(t=this.logger)===null||t===void 0?void 0:t.debug)===null||n===void 0||n.call(t,"Message sent: ",JSON.stringify(e)),(i=(r=window.opener)===null||r===void 0?void 0:r.postMessage)===null||i===void 0||i.call(r,e,this.endpoint)},C.prototype.sendRequest=function(e,t,n){var r=this;n===void 0&&(n={timeout:15e3});var i=Ay(),a={id:i,action:e,args:t},l=new Promise(function(s,M){r.requestCallbacks[i]={resolve:s,reject:M},r.notify(a),(n==null?void 0:n.timeout)>0&&setTimeout(function(){M(new Error("".concat(e," timed out (id: ").concat(i,")"))),delete r.requestCallbacks[i]},n.timeout)});return l},C.prototype.handleResponse=function(e){var t;if(!this.requestCallbacks[e.id]){(t=this.logger)===null||t===void 0||t.warn("No callback found for request id: ".concat(e.id));return}this.requestCallbacks[e.id].resolve(e.responseData),delete this.requestCallbacks[e.id]},C.prototype.setup=function(e){var t=this,n=e===void 0?{}:e,r=n.logger,i=n.endpoint,a=n.isElementSelectable,l=n.cssSelectorAllowlist,s=n.actionClickAllowlist;this.logger=r,i&&this.endpoint===Q5&&(this.endpoint=i);var M=null;window.addEventListener("message",function(Z){var u,c,f,p,h;if((c=(u=t.logger)===null||u===void 0?void 0:u.debug)===null||c===void 0||c.call(u,"Message received: ",JSON.stringify(Z)),t.endpoint===Z.origin){var v=Z==null?void 0:Z.data,d=v==null?void 0:v.action;if(d)if("id"in v)(p=(f=t.logger)===null||f===void 0?void 0:f.debug)===null||p===void 0||p.call(f,"Received Response to previous request: ",JSON.stringify(Z)),t.handleResponse(v);else if(d==="ping")t.notify({action:"pong"});else if(d==="initialize-visual-tagging-selector"){var L=v==null?void 0:v.data;Iy(yv).then(function(){var m;M=(m=window==null?void 0:window.amplitudeVisualTaggingSelector)===null||m===void 0?void 0:m.call(window,{getEventTagProps:Ry,isElementSelectable:function(g){return a?a((L==null?void 0:L.actionType)||"click",g):!0},onTrack:t.onTrack,onSelect:t.onSelect,visualHighlightClass:ke,messenger:t,cssSelectorAllowlist:l,actionClickAllowlist:s}),t.notify({action:"selector-loaded"})}).catch(function(){var m;(m=t.logger)===null||m===void 0||m.warn("Failed to initialize visual tagging selector")})}else d==="close-visual-tagging-selector"&&((h=M==null?void 0:M.close)===null||h===void 0||h.call(M))}}),this.notify({action:"page-loaded"})},C}(),Dy=["id","class","style","value","onclick","onchange","oninput","onblur","onsubmit","onfocus","onkeydown","onkeyup","onkeypress","data-reactid","data-react-checksum","data-reactroot"],Oy=["type"],Fy=["svg","path","g"],jy=["password","hidden"],Uy=128,By=1024;function zy(C){var e,t,n,r,i,a;if(C===null)return null;var l=String(C.tagName).toLowerCase(),s={tag:l},M=Array.from((r=(n=C.parentElement)===null||n===void 0?void 0:n.children)!==null&&r!==void 0?r:[]);M.length&&(s.index=M.indexOf(C),s.indexOfType=M.filter(function(g){return g.tagName===C.tagName}).indexOf(C));var Z=(a=(i=C.previousElementSibling)===null||i===void 0?void 0:i.tagName)===null||a===void 0?void 0:a.toLowerCase();Z&&(s.prevSib=String(Z));var u=C.getAttribute("id");u&&(s.id=String(u));var c=Array.from(C.classList);c.length&&(s.classes=c);var f={},p=Array.from(C.attributes),h=p.filter(function(g){return!Dy.includes(g.name)}),v=!Xs(C);if(!jy.includes(String(C.getAttribute("type")))&&!Fy.includes(l))try{for(var d=Q1(h),L=d.next();!L.done;L=d.next()){var m=L.value;v&&!Oy.includes(m.name)||(f[m.name]=String(m.value).substring(0,Uy))}}catch(g){e={error:g}}finally{try{L&&!L.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}return Object.keys(f).length&&(s.attrs=f),s}function Wy(C){var e=[];if(!C)return e;e.push(C);for(var t=C.parentElement;t&&t.tagName!=="HTML";)e.push(t),t=t.parentElement;return e}var $y=function(C){var e=[];if(!C)return[];var t=Wy(C);return e=Qy(t.map(function(n){return zy(n)}),By),e};function Qy(C,e){for(var t=0,n=0;ne)return C.slice(0,n)}return C}function K5(C,e){e===void 0&&(e=!1);try{if(C==null)return e?"None":null;if(typeof C=="string")return e?(C=C.replace(/\\/g,"\\\\").replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r"),C.includes('"')?"'".concat(C,"'"):C.includes("'")?'"'.concat(C.replace(/'/g,"\\'"),'"'):"'".concat(C,"'")):C;if(typeof C=="boolean")return C?"True":"False";if(Array.isArray(C)){var t=C.map(function(i){return K5(i,!0)});return"[".concat(t.join(", "),"]")}else if(typeof C=="object"){var n=Object.entries(C).filter(function(i){var a=l1(i,1),l=a[0];return l!=null}).map(function(i){var a=l1(i,2),l=a[0],s=a[1];return"".concat(String(K5(l,!0)),": ").concat(String(K5(s,!0)))}),r="{".concat(n.join(", "),"}");return r.includes("\\'")&&(r=r.replace(/'/g,"'").replace(/'/g,"\\'")),r}return C.toString()}catch{return null}}var Ky=5;function Gy(C){var e=C.amplitude,t=C.allObservables,n=C.options,r=C.shouldTrackEvent,i=t.clickObservable,a=i.pipe(py(),g8(function(Z){var u=l1(Z,2),c=u[0],f=u[1],p=c.event.target!==f.event.target,h=Math.abs(f.event.screenX-c.event.screenX)<=20&&Math.abs(f.event.screenY-c.event.screenY)<=20;return p&&!h})),l=i.pipe(Ly(n.debounceTime),S3(function(){return"timeout"})),s=$s(a,l),M=i.pipe(hy(0),g8(Gt),g8(function(Z){return r("click",Z.closestTrackedAncestor)}),cy(s));return M.subscribe(function(Z){var u,c,f=(Z.length>=Ky,be);try{for(var p=Q1(Z),h=p.next();!h.done;h=p.next()){var v=h.value;e==null||e.track(f,v.targetElementProperties,{time:v.timestamp})}}catch(d){u={error:d}}finally{try{h&&!h.done&&(c=p.return)&&c.call(p)}finally{if(u)throw u.error}}})}function qy(C){var e=C.amplitude,t=C.allObservables,n=C.getEventProperties,r=C.shouldTrackEvent,i=t.changeObservable,a=i.pipe(g8(Gt),g8(function(l){return r("change",l.closestTrackedAncestor)}));return a.subscribe(function(l){e==null||e.track(av,n("change",l.closestTrackedAncestor))})}function Jy(C){var e=C.amplitude,t=C.allObservables,n=C.options,r=C.getEventProperties,i=C.shouldTrackEvent,a=C.shouldTrackActionClick,l=t.clickObservable,s=t.mutationObservable,M=t.navigateObservable,Z=l.pipe(g8(function(p){return!i("click",p.closestTrackedAncestor)}),S3(function(p){var h=Kt(p.event.target,n.actionClickAllowlist);return p.closestTrackedAncestor=h,p.closestTrackedAncestor!==null&&(p.targetElementProperties=r(p.type,p.closestTrackedAncestor)),p}),g8(Gt),g8(function(p){return a("click",p.closestTrackedAncestor)})),u=[s];M&&u.push(M);var c=$s.apply(void 0,$1([],l1(u),!1)),f=Z.pipe(my(function(p){return c.pipe(Te(1),Yv({first:500,with:function(){return zt}}),S3(function(){return p}))}));return f.subscribe(function(p){e==null||e.track(be,r("click",p.closestTrackedAncestor),{time:p.timestamp})})}var k4;(function(C){C.ClickObservable="clickObservable",C.ChangeObservable="changeObservable",C.NavigateObservable="navigateObservable",C.MutationObservable="mutationObservable"})(k4||(k4={}));function Yy(C){return C.type==="click"||C.type==="change"}var Xy=function(C){var e,t,n;C===void 0&&(C={});var r=C.dataAttributePrefix,i=r===void 0?fm:r,a=C.visualTaggingOptions,l=a===void 0?{enabled:!0,messenger:new Ny}:a;C.cssSelectorAllowlist=(e=C.cssSelectorAllowlist)!==null&&e!==void 0?e:dm,C.actionClickAllowlist=(t=C.actionClickAllowlist)!==null&&t!==void 0?t:hm,C.debounceTime=(n=C.debounceTime)!==null&&n!==void 0?n:0;var s=iv,M="enrichment",Z=[],u=void 0,c=function(){var L,m=G6(document,"click",{capture:!0}).pipe(S3(function(b){return p(b,"click")})),g=G6(document,"change",{capture:!0}).pipe(S3(function(b){return p(b,"change")})),V;window.navigation&&(V=G6(window.navigation,"navigate").pipe(S3(function(b){return p(b,"navigate")})));var k=new W2(function(b){var y=new MutationObserver(function(H){b.next(H)});return y.observe(document.body,{childList:!0,attributes:!0,characterData:!0,subtree:!0}),function(){return y.disconnect()}}).pipe(S3(function(b){return p(b,"mutation")}));return L={},L[k4.ClickObservable]=m,L[k4.ChangeObservable]=g,L[k4.NavigateObservable]=V,L[k4.MutationObservable]=k,L},f=function(L,m){var g,V,k,b=(k=(V=m==null?void 0:m.tagName)===null||V===void 0?void 0:V.toLowerCase)===null||k===void 0?void 0:k.call(V),y=typeof m.getBoundingClientRect=="function"?m.getBoundingClientRect():{left:null,top:null},H=m.getAttribute("aria-label"),I=Py(m,i),F=tM(m),G=CM(m,u),J=(g={},g[ov]=m.getAttribute("id")||"",g[lv]=m.getAttribute("class"),g[sv]=$y(m),g[ps]=b,g[ms]=Qt(m),g[Zv]=y.left==null?null:Math.round(y.left),g[uv]=y.top==null?null:Math.round(y.top),g[cv]=H,g[Lv]=I,g[gs]=G,g[dv]=F,g[vs]=window.location.href.split("?")[0],g[fv]=typeof document<"u"&&document.title||"",g[hv]=window.innerHeight,g[pv]=window.innerWidth,g);return b==="a"&&L==="click"&&m instanceof HTMLAnchorElement&&(J[Mv]=m.href),eM(J)},p=function(L,m){var g={event:L,timestamp:Date.now(),type:m};if(Yy(g)&&g.event.target!==null){var V=Kt(g.event.target,C.cssSelectorAllowlist);return V&&(g.closestTrackedAncestor=V,g.targetElementProperties=f(g.type,V)),g}return g},h=function(L,m){return j(void 0,void 0,void 0,function(){var g,V,k,b,y,H,I,F,G,J;return O(this,function(X){return u=L.loggerProvider,typeof document>"u"?[2]:(g=sC(C,C.cssSelectorAllowlist),V=sC(C,C.actionClickAllowlist),k=c(),b=Gy({allObservables:k,options:C,amplitude:m,shouldTrackEvent:g}),Z.push(b),y=qy({allObservables:k,getEventProperties:f,amplitude:m,shouldTrackEvent:g}),Z.push(y),H=Jy({allObservables:k,options:C,getEventProperties:f,amplitude:m,shouldTrackEvent:g,shouldTrackActionClick:V}),Z.push(H),(G=L==null?void 0:L.loggerProvider)===null||G===void 0||G.log("".concat(s," has been successfully added.")),window.opener&&l.enabled&&(I=C.cssSelectorAllowlist,F=C.actionClickAllowlist,(J=l.messenger)===null||J===void 0||J.setup($($({logger:L==null?void 0:L.loggerProvider},(L==null?void 0:L.serverZone)&&{endpoint:vv[L.serverZone]}),{isElementSelectable:sC(C,$1($1([],l1(I),!1),l1(F),!1)),cssSelectorAllowlist:I,actionClickAllowlist:F}))),[2])})})},v=function(L){return j(void 0,void 0,void 0,function(){return O(this,function(m){return[2,L]})})},d=function(){return j(void 0,void 0,void 0,function(){var L,m,g,V,k;return O(this,function(b){try{for(L=Q1(Z),m=L.next();!m.done;m=L.next())g=m.value,g.unsubscribe()}catch(y){V={error:y}}finally{try{m&&!m.done&&(k=L.return)&&k.call(L)}finally{if(V)throw V.error}}return[2]})})};return{name:s,type:M,setup:h,execute:v,teardown:d}},CE=function(C){z2(e,C);function e(){return C!==null&&C.apply(this,arguments)||this}return e.prototype.init=function(t,n,r){t===void 0&&(t="");var i,a;return arguments.length>2?(i=n,a=r):typeof n=="string"?(i=n,a=void 0):(i=n==null?void 0:n.userId,a=n),x2(this._init($($({},a),{userId:i,apiKey:t})))},e.prototype._init=function(t){var n,r,i;return j(this,void 0,void 0,function(){var a,l,s,M,Z,u,c=this;return O(this,function(f){switch(f.label){case 0:return this.initializing?[2]:(this.initializing=!0,[4,Ig(t.apiKey,t,this)]);case 1:return a=f.sent(),t.fetchRemoteConfig?[4,rv(a)]:[3,4];case 2:return l=f.sent(),[4,l.generateJoinedConfig()];case 3:a=f.sent(),f.label=4;case 4:return[4,C.prototype._init.call(this,a)];case 5:return f.sent(),this.logBrowserOptions(a),us(this.config.defaultTracking)?(s=fg(this.config),this.webAttribution=new qm(s,this.config),[4,this.webAttribution.init()]):[3,7];case 6:f.sent(),f.label=7;case 7:return M=b9(),Z=Number.isNaN(Number(M.ampSessionId))?void 0:Number(M.ampSessionId),this.setSessionId((i=(r=(n=t.sessionId)!==null&&n!==void 0?n:Z)!==null&&r!==void 0?r:this.config.sessionId)!==null&&i!==void 0?i:Date.now()),u=g7(t.instanceName),u.identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),this.config.offline===Lm?[3,9]:[4,this.add(Qg()).promise];case 8:f.sent(),f.label=9;case 9:return[4,this.add(new Rm).promise];case 10:return f.sent(),[4,this.add(new gg).promise];case 11:return f.sent(),[4,this.add(new Mg).promise];case 12:return f.sent(),$g(this.config),ug(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding file download tracking plugin"),[4,this.add(Wg()).promise]):[3,14];case 13:f.sent(),f.label=14;case 14:return cg(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding form interaction plugin"),[4,this.add(zg()).promise]):[3,16];case 15:f.sent(),f.label=16;case 16:return cs(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(Fg(dg(this.config))).promise]):[3,18];case 17:f.sent(),f.label=18;case 18:return Ls(this.config.autocapture)?(this.config.loggerProvider.debug("Adding user interactions plugin (autocapture plugin)"),[4,this.add(Xy(Lg(this.config))).promise]):[3,20];case 19:f.sent(),f.label=20;case 20:return this.initializing=!1,[4,this.runQueuedFunctions("dispatchQ")];case 21:return f.sent(),u.eventBridge.setEventReceiver(function(p){c.track(p.eventType,p.eventProperties)}),[2]}})})},e.prototype.getUserId=function(){var t;return(t=this.config)===null||t===void 0?void 0:t.userId},e.prototype.setUserId=function(t){if(!this.config){this.q.push(this.setUserId.bind(this,t));return}this.config.loggerProvider.debug("function setUserId: ",t),(t!==this.config.userId||t===void 0)&&(this.config.userId=t,lg(t,this.config.instanceName))},e.prototype.getDeviceId=function(){var t;return(t=this.config)===null||t===void 0?void 0:t.deviceId},e.prototype.setDeviceId=function(t){if(!this.config){this.q.push(this.setDeviceId.bind(this,t));return}this.config.loggerProvider.debug("function setDeviceId: ",t),this.config.deviceId=t,sg(t,this.config.instanceName)},e.prototype.reset=function(){this.setDeviceId(u6()),this.setUserId(void 0)},e.prototype.getSessionId=function(){var t;return(t=this.config)===null||t===void 0?void 0:t.sessionId},e.prototype.setSessionId=function(t){var n,r=[];if(!this.config)return this.q.push(this.setSessionId.bind(this,t)),x2(Promise.resolve());if(t===this.config.sessionId)return x2(Promise.resolve());this.config.loggerProvider.debug("function setSessionId: ",t);var i=this.getSessionId(),a=this.config.lastEventTime,l=(n=this.config.lastEventId)!==null&&n!==void 0?n:-1;this.config.sessionId=t,this.config.lastEventTime=void 0,this.config.pageCounter=0,wi(this.config.defaultTracking)&&(i&&a&&r.push(this.track(Vi,void 0,{device_id:this.previousSessionDeviceId,event_id:++l,session_id:i,time:a+1,user_id:this.previousSessionUserId}).promise),this.config.lastEventTime=this.config.sessionId);var s=this.trackCampaignEventIfNeeded(++l,r);return wi(this.config.defaultTracking)&&r.push(this.track(Si,void 0,{event_id:s?++l:l,session_id:this.config.sessionId,time:this.config.lastEventTime}).promise),this.previousSessionDeviceId=this.config.deviceId,this.previousSessionUserId=this.config.userId,x2(Promise.all(r))},e.prototype.extendSession=function(){if(!this.config){this.q.push(this.extendSession.bind(this));return}this.config.lastEventTime=Date.now()},e.prototype.setTransport=function(t){if(!this.config){this.q.push(this.setTransport.bind(this,t));return}this.config.transportProvider=hs(t)},e.prototype.identify=function(t,n){if(eC(t)){var r=t._q;t._q=[],t=CC(new V9,r)}return n!=null&&n.user_id&&this.setUserId(n.user_id),n!=null&&n.device_id&&this.setDeviceId(n.device_id),C.prototype.identify.call(this,t,n)},e.prototype.groupIdentify=function(t,n,r,i){if(eC(r)){var a=r._q;r._q=[],r=CC(new V9,a)}return C.prototype.groupIdentify.call(this,t,n,r,i)},e.prototype.revenue=function(t,n){if(eC(t)){var r=t._q;t._q=[],t=CC(new km,r)}return C.prototype.revenue.call(this,t,n)},e.prototype.trackCampaignEventIfNeeded=function(t,n){if(!this.webAttribution||!this.webAttribution.shouldTrackNewCampaign)return!1;var r=this.webAttribution.generateCampaignEvent(t);return n?n.push(this.track(r).promise):this.track(r),this.config.loggerProvider.log("Tracking attribution."),!0},e.prototype.process=function(t){return j(this,void 0,void 0,function(){var n,r,i;return O(this,function(a){return n=Date.now(),r=Zs(this.config.sessionTimeout,this.config.lastEventTime),i=this.webAttribution&&this.webAttribution.shouldSetSessionIdOnNewCampaign(),t.event_type!==Si&&t.event_type!==Vi&&(!t.session_id||t.session_id===this.getSessionId())&&(r||i?(this.setSessionId(n),i&&this.config.loggerProvider.log("Created a new session for new campaign.")):r||this.trackCampaignEventIfNeeded()),[2,C.prototype.process.call(this,t)]})})},e.prototype.logBrowserOptions=function(t){try{var n=$($({},t),{apiKey:t.apiKey.substring(0,10)+"********"});this.config.loggerProvider.debug("Initialized Amplitude with BrowserConfig:",JSON.stringify(n))}catch(r){this.config.loggerProvider.error("Error logging browser config",r)}},e}(bm),eE=function(){var C=new CE;return{init:z1(C.init.bind(C),"init",U1(C),B1(C,["config"])),add:z1(C.add.bind(C),"add",U1(C),B1(C,["config.apiKey","timeline.plugins"])),remove:z1(C.remove.bind(C),"remove",U1(C),B1(C,["config.apiKey","timeline.plugins"])),track:z1(C.track.bind(C),"track",U1(C),B1(C,["config.apiKey","timeline.queue.length"])),logEvent:z1(C.logEvent.bind(C),"logEvent",U1(C),B1(C,["config.apiKey","timeline.queue.length"])),identify:z1(C.identify.bind(C),"identify",U1(C),B1(C,["config.apiKey","timeline.queue.length"])),groupIdentify:z1(C.groupIdentify.bind(C),"groupIdentify",U1(C),B1(C,["config.apiKey","timeline.queue.length"])),setGroup:z1(C.setGroup.bind(C),"setGroup",U1(C),B1(C,["config.apiKey","timeline.queue.length"])),revenue:z1(C.revenue.bind(C),"revenue",U1(C),B1(C,["config.apiKey","timeline.queue.length"])),flush:z1(C.flush.bind(C),"flush",U1(C),B1(C,["config.apiKey","timeline.queue.length"])),getUserId:z1(C.getUserId.bind(C),"getUserId",U1(C),B1(C,["config","config.userId"])),setUserId:z1(C.setUserId.bind(C),"setUserId",U1(C),B1(C,["config","config.userId"])),getDeviceId:z1(C.getDeviceId.bind(C),"getDeviceId",U1(C),B1(C,["config","config.deviceId"])),setDeviceId:z1(C.setDeviceId.bind(C),"setDeviceId",U1(C),B1(C,["config","config.deviceId"])),reset:z1(C.reset.bind(C),"reset",U1(C),B1(C,["config","config.userId","config.deviceId"])),getSessionId:z1(C.getSessionId.bind(C),"getSessionId",U1(C),B1(C,["config"])),setSessionId:z1(C.setSessionId.bind(C),"setSessionId",U1(C),B1(C,["config"])),extendSession:z1(C.extendSession.bind(C),"extendSession",U1(C),B1(C,["config"])),setOptOut:z1(C.setOptOut.bind(C),"setOptOut",U1(C),B1(C,["config"])),setTransport:z1(C.setTransport.bind(C),"setTransport",U1(C),B1(C,["config"]))}};const K1=eE();K1.add;K1.extendSession;K1.flush;K1.getDeviceId;K1.getSessionId;K1.getUserId;K1.groupIdentify;K1.identify;var tE=K1.init;K1.logEvent;K1.remove;K1.reset;K1.revenue;K1.setDeviceId;K1.setGroup;K1.setOptOut;K1.setSessionId;K1.setTransport;K1.setUserId;var nE=K1.track;const rE="f27dd5a1fb291278cefb5c13a7875f88";tE(rE);const O2=(C,e=void 0)=>{nE(C,e)},B7=({className:C,contentClassName:e,children:t,bottom:n})=>(Ot(),E.jsxs("div",{className:F1("Page relative max-w-[640px] mx-auto min-h-[100vh] flex flex-col justify-between text-center",C),children:[E.jsx("div",{className:F1("flex-grow flex flex-col justify-between",e),children:t}),n&&E.jsx("div",{className:"mt-5 sticky bottom-0",children:n})]})),iE=C=>o.createElement("svg",{width:26,height:26,viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",...C},o.createElement("path",{d:"M4.99037 25.7194C4.40711 25.2648 4.29274 24.4992 4.61296 23.5063L6.93458 16.2929L1.01046 11.8549C0.198469 11.2448 -0.1675 10.5509 0.0726669 9.82122C0.312834 9.10347 0.976152 8.75656 1.97113 8.75656H9.24475L11.452 1.55513C11.7608 0.538313 12.2754 0 13.0074 0C13.7393 0 14.2425 0.538313 14.5513 1.55513L16.77 8.75656H24.0207C25.0386 8.75656 25.6905 9.10347 25.9306 9.82122C26.1594 10.5509 25.8163 11.2448 24.9928 11.8549L19.0687 16.2929L21.3903 23.5063C21.7106 24.4992 21.5962 25.2648 21.0129 25.7194C20.4182 26.1979 19.6977 26.0424 18.8743 25.4203L13.0074 20.9105L7.129 25.4203C6.30557 26.0424 5.58507 26.1979 4.99037 25.7194Z",fill:"currentColor"})),aE=[1,2,3,4,5],oE=({className:C})=>{const[e,t]=o.useState(0),n=r=>{t(r),O2("Rated",{rating:r})};return E.jsxs(E.Fragment,{children:[E.jsx("div",{className:F1("Stars flex items-center justify-around",C),children:aE.map(r=>E.jsx(D1,{wrapperClassName:"w-[36px] h-[26px]",className:"px-[5px]",onClick:()=>{n(r)},children:E.jsx(iE,{className:F1("w-[26px] h-[26px] transition-all",e>=r?"text-main":"text-[#2C2946]")})},`star-${r}`))}),!!e&&E.jsx(lE,{})]})},Re=C=>o.createElement("svg",{width:30,height:30,viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",...C},o.createElement("path",{d:"M15.278 20.3512L15.278 20.3512L15.2816 20.3456L20.6537 12.0517C20.6539 12.0514 20.654 12.0511 20.6542 12.0509C20.8454 11.7576 21.0455 11.3478 21.0455 10.9271C21.0455 9.94365 20.1788 9.33413 19.349 9.33413C18.7229 9.33413 18.24 9.70218 17.9055 10.2178L17.9055 10.2178L17.9012 10.2247L13.6391 17.0355L11.9509 14.9184L11.9509 14.9184L11.948 14.9148C11.7685 14.6939 11.5686 14.5133 11.3327 14.39C11.0927 14.2646 10.8418 14.2124 10.582 14.2124C9.65506 14.2124 8.93145 14.9605 8.93145 15.8744C8.93145 16.3161 9.08543 16.6996 9.37467 17.0611L9.3746 17.0612L9.38056 17.0684L12.1515 20.4027C12.5662 20.9132 13.0659 21.2181 13.7229 21.2181C14.3684 21.2181 14.9196 20.8887 15.278 20.3512ZM15 26.5C8.66061 26.5 3.5 21.3394 3.5 15C3.5 8.64942 8.6603 3.5 15 3.5C21.3509 3.5 26.5 8.64911 26.5 15C26.5 21.3397 21.3506 26.5 15 26.5Z",fill:"currentColor",stroke:"currentColor"})),Di=({className:C,id:e,image:t,title:n,subtitle:r,buttonText:i,link:a,claimable:l,isSuccess:s,bottom:M,onClick:Z,afterClaim:u})=>{const{t:c}=S8(),{openLink:f}=j7(),[p,h]=o.useState(!1),v=dp(),[d,L]=o.useState(!1),m=async()=>{L(!0);try{await v({taskId:e}),u==null||u()}catch(g){console.error(g)}finally{L(!1)}O2("Points claim pressed")};return E.jsxs("div",{className:F1("Quest flex flex-col gap-5 p-3 bg-[#1C1B2A] rounded-[24px]",C),children:[E.jsxs("div",{className:"flex items-center gap-3",children:[E.jsx("div",{className:"w-[44px] h-[44px] bg-white/10 rounded-[8px] overflow-hidden",children:E.jsx("img",{src:t,className:F1("w-[44px] h-[44px]",s&&"grayscale")})}),E.jsxs("div",{className:"flex-1 flex flex-col gap-1",children:[E.jsx("div",{className:F1("text-[16px] leading-[19px] font-semibold",s&&"line-through"),children:n}),E.jsx("div",{className:"text-[14px] leading-[14px] font-medium text-white/50",children:r})]}),s?E.jsx(Re,{className:"w-[30px] h-[30px] text-main"}):p?E.jsx(D1,{className:"min-w-[72px] p-2 border border-main rounded-[12px] bg-main/10 text-[16px] leading-[19px] font-semibold text-main",onClick:m,disabled:d,children:c("points.claim")}):E.jsx(D1,{className:"min-w-[72px] p-2 border border-main rounded-[12px] bg-main/10 text-[16px] leading-[19px] font-semibold text-main",onClick:Z||(a?()=>{f(a),l&&h(!0),O2("Points link pressed")}:()=>{}),children:i})]}),M&&E.jsx("div",{className:"Quest-bottom pb-[6px] text-white/50 text-[14px] leading-[14px] font-medium",children:M})]})},lE=({className:C})=>(o.useEffect(()=>{const e=document.createElement("script");return e.innerHTML=` (function(h,o,t,j,a,r){ h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)}; h._hjSettings={hjid:5186598,hjsv:6}; @@ -124,4 +124,4 @@ Visit https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-de r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv; a.appendChild(r); })(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv='); - `,document.body.appendChild(e),()=>{document.body.removeChild(e)}},[]),E.jsx("span",{className:F1("Survey",C)})),Oi=({className:C,player:e})=>E.jsx("span",{className:F1("Username",C),children:e!=null&&e.username?`@${e.username}`:(e==null?void 0:e.name)||""}),sE="/durak/assets/find-1acc9ac3.png",ME=()=>{const{t:C}=S8(),{openExternal:e}=j7();return E.jsxs(B7,{bottom:E.jsx(n0,{}),children:[E.jsx("div",{className:"Top"}),E.jsxs("div",{className:"Center py-10 flex flex-col items-center justify-center",children:[E.jsx("img",{className:"w-[294px] h-[232px] grayscale",src:sE}),E.jsx("div",{className:"max-w-[320px] text-[24px] leading-[29px] font-bold",children:C("exploreGroup")}),E.jsx(D1,{theme:"big",wrapperClassName:"mt-10",onClick:()=>{e("https://t.me/durakton_chat")},children:C("joinGroup")})]}),E.jsx("div",{className:"Bottom"})]})},ZE="/durak/assets/deck-f354288b.jpg",uE=C=>o.createElement("svg",{width:16,height:12,viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...C},o.createElement("g",{clipPath:"url(#clip0_57_1370)"},o.createElement("rect",{width:16,height:12,fill:"white"}),o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 0V12H16V0H0Z",fill:"#3D58DB"}),o.createElement("mask",{id:"mask0_57_1370",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:0,y:0,width:16,height:12},o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 0V12H16V0H0Z",fill:"white"})),o.createElement("g",{mask:"url(#mask0_57_1370)"},o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 0V4H16V0H0Z",fill:"#F7FCFF"}),o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 8V12H16V8H0Z",fill:"#C51918"}))),o.createElement("defs",null,o.createElement("clipPath",{id:"clip0_57_1370"},o.createElement("rect",{width:16,height:12,fill:"white"})))),cE=C=>o.createElement("svg",{width:16,height:12,viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...C},o.createElement("g",{clipPath:"url(#clip0_57_1515)"},o.createElement("rect",{width:16,height:12,fill:"white"}),o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 0H16V12H0V0Z",fill:"#E31D1C"}),o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 1V2H16V1H0ZM0 3V4H16V3H0ZM0 6V5H16V6H0ZM0 7V8H16V7H0ZM0 10V9H16V10H0ZM0 12V11H16V12H0Z",fill:"#F7FCFF"}),o.createElement("rect",{width:9,height:7,fill:"#2E42A5"}),o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.04002 2.17378L1.56994 1.80465L1.981 2.10058H1.74826L2.21893 2.51688L2.05996 3.10058H1.81097L1.5692 2.56448L1.36302 3.10058H0.74826L1.21893 3.51688L1.04002 4.17378L1.56994 3.80465L1.981 4.10058H1.74826L2.21893 4.51688L2.05996 5.10058H1.81097L1.5692 4.56448L1.36302 5.10058H0.74826L1.21893 5.51688L1.04002 6.17378L1.56994 5.80465L2.08268 6.17378L1.92326 5.51688L2.33503 5.10058H2.14511L2.56994 4.80465L2.981 5.10058H2.74826L3.21893 5.51688L3.04002 6.17378L3.56994 5.80465L4.08268 6.17378L3.92326 5.51688L4.33503 5.10058H4.14511L4.56994 4.80465L4.981 5.10058H4.74826L5.21893 5.51688L5.04002 6.17378L5.56994 5.80465L6.08268 6.17378L5.92326 5.51688L6.33503 5.10058H6.14511L6.56994 4.80465L6.981 5.10058H6.74826L7.21893 5.51688L7.04002 6.17378L7.56994 5.80465L8.08268 6.17378L7.92326 5.51688L8.33503 5.10058H7.81097L7.5692 4.56448L7.36302 5.10058H7.06491L6.92326 4.51688L7.33503 4.10058H7.1451L7.56994 3.80465L8.08268 4.17378L7.92326 3.51688L8.33503 3.10058H7.81097L7.5692 2.56448L7.36302 3.10058H7.06491L6.92326 2.51688L7.33503 2.10058H7.1451L7.56994 1.80465L8.08268 2.17378L7.92326 1.51688L8.33503 1.10058H7.81097L7.5692 0.564484L7.36302 1.10058H6.74826L7.21893 1.51688L7.05996 2.10058H6.81097L6.5692 1.56448L6.36302 2.10058H6.06491L5.92326 1.51688L6.33503 1.10058H5.81097L5.5692 0.564484L5.36302 1.10058H4.74826L5.21893 1.51688L5.05996 2.10058H4.81097L4.5692 1.56448L4.36302 2.10058H4.06491L3.92326 1.51688L4.33503 1.10058H3.81097L3.5692 0.564484L3.36302 1.10058H2.74826L3.21893 1.51688L3.05996 2.10058H2.81097L2.5692 1.56448L2.36302 2.10058H2.06491L1.92326 1.51688L2.33503 1.10058H1.81097L1.5692 0.564484L1.36302 1.10058H0.74826L1.21893 1.51688L1.04002 2.17378ZM7.05996 4.10058L7.21893 3.51688L6.74826 3.10058H6.981L6.56994 2.80465L6.1451 3.10058H6.33503L5.92326 3.51688L6.06491 4.10058H6.36302L6.5692 3.56448L6.81097 4.10058H7.05996ZM5.981 4.10058L5.56994 3.80465L5.1451 4.10058H5.33503L4.92326 4.51688L5.06491 5.10058H5.36302L5.5692 4.56448L5.81097 5.10058H6.05996L6.21893 4.51688L5.74826 4.10058H5.981ZM4.21893 4.51688L4.05996 5.10058H3.81097L3.5692 4.56448L3.36302 5.10058H3.06491L2.92326 4.51688L3.33503 4.10058H3.1451L3.56994 3.80465L3.981 4.10058H3.74826L4.21893 4.51688ZM4.36302 4.10058H4.06491L3.92326 3.51688L4.33503 3.10058H4.1451L4.56994 2.80465L4.981 3.10058H4.74826L5.21893 3.51688L5.05996 4.10058H4.81097L4.5692 3.56448L4.36302 4.10058ZM3.05996 4.10058L3.21893 3.51688L2.74826 3.10058H2.981L2.56994 2.80465L2.1451 3.10058H2.33503L1.92326 3.51688L2.06491 4.10058H2.36302L2.5692 3.56448L2.81097 4.10058H3.05996ZM6.21893 2.51688L6.05996 3.10058H5.81097L5.5692 2.56448L5.36302 3.10058H5.06491L4.92326 2.51688L5.33503 2.10058H5.1451L5.56994 1.80465L5.981 2.10058H5.74826L6.21893 2.51688ZM3.981 2.10058L3.56994 1.80465L3.1451 2.10058H3.33503L2.92326 2.51688L3.06491 3.10058H3.36302L3.5692 2.56448L3.81097 3.10058H4.05996L4.21893 2.51688L3.74826 2.10058H3.981Z",fill:"#F7FCFF"})),o.createElement("defs",null,o.createElement("clipPath",{id:"clip0_57_1515"},o.createElement("rect",{width:16,height:12,fill:"white"})))),MC=()=>{const{t:C}=S8(),e=e0(),{data:t}=a0(),[n,r]=o.useState(!1),i=cp(),a=async()=>{r(!0);try{const{room_id:l}=await i();l&&(O2("Room created"),e(`/room?roomId=${l}`))}catch(l){console.error(l)}finally{r(!1)}};return E.jsxs(B7,{bottom:E.jsxs(E.Fragment,{children:[E.jsx("div",{className:"mb-[18px]",children:E.jsx(D1,{wrapperClassName:"inline-block",className:"w-[64px] p-3 bg-[#D9D9D91A] rounded-full backdrop-blur-lg",onClick:()=>{A1.changeLanguage(A1.language==="en"?"ru":"en")},children:E.jsxs("div",{className:"flex items-center gap-1",children:[E.jsxs("div",{className:"w-4 h-3 mr-1",children:[A1.language==="ru"&&E.jsx(uE,{}),A1.language==="en"&&E.jsx(cE,{})]}),E.jsx("div",{className:"text-[10px] leading-[12px] uppercase",children:A1.language})]})})}),E.jsx(n0,{})]}),children:[E.jsxs("div",{className:"Top mt-5 flex flex-col items-center gap-1",children:[E.jsx("div",{className:"text-[60px] leading-[60px] font-semibold",children:(t==null?void 0:t.total_points)||0}),E.jsx("div",{className:"text-[16px] leading-[16px] text-text/50",children:C("yourPoints")})]}),E.jsxs("div",{className:"Center px-4",children:[E.jsx("img",{src:ZE,className:"w-[239px] h-[173px] mx-auto"}),E.jsxs("div",{className:"text-[24px] leading-[29px] font-bold",children:[E.jsx("div",{children:C("playEarn")}),E.jsx("div",{className:"text-main",children:C("getAirdrop")})]}),E.jsx(D1,{theme:"big",className:"mt-10 h-[55px]",onClick:a,isBusy:n,children:C("startGame")})]}),E.jsx("div",{className:"Bottom"})]})},LE=C=>o.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...C},o.createElement("path",{d:"M12 19.7142C11.8299 19.7142 11.6831 19.6575 11.5594 19.544C11.4409 19.4357 11.3662 19.2912 11.3352 19.1107C11.2116 18.2544 11.0802 17.5142 10.941 16.89C10.807 16.2659 10.6421 15.7371 10.4463 15.3038C10.2556 14.8654 10.016 14.5017 9.72745 14.2129C9.43887 13.9188 9.07815 13.679 8.64528 13.4933C8.21242 13.3076 7.68937 13.1528 7.07614 13.029C6.46807 12.9001 5.74663 12.7788 4.91181 12.6654C4.7263 12.6447 4.57428 12.5725 4.45576 12.4487C4.34239 12.3249 4.28571 12.1753 4.28571 11.9999C4.28571 11.8245 4.34497 11.675 4.46349 11.5512C4.58201 11.4274 4.73145 11.3526 4.91181 11.3268C5.91668 11.2184 6.7618 11.0895 7.44717 10.9399C8.13254 10.7851 8.69681 10.5737 9.13999 10.3054C9.58831 10.0372 9.94903 9.67868 10.2221 9.22991C10.4953 8.77597 10.7143 8.19566 10.8792 7.48897C11.0441 6.78228 11.1961 5.9131 11.3352 4.88143C11.3662 4.70089 11.4409 4.55646 11.5594 4.44813C11.6831 4.33981 11.8299 4.28564 12 4.28564C12.1649 4.28564 12.3066 4.33981 12.4251 4.44813C12.5488 4.55646 12.6261 4.70089 12.657 4.88143C12.8013 5.9131 12.9559 6.78228 13.1208 7.48897C13.2909 8.1905 13.5124 8.76823 13.7856 9.22217C14.0587 9.67094 14.4168 10.0294 14.86 10.2977C15.3032 10.5659 15.8674 10.7774 16.5528 10.9322C17.2382 11.0817 18.0833 11.2133 19.0882 11.3268C19.2634 11.3526 19.4102 11.4274 19.5288 11.5512C19.6524 11.675 19.7143 11.8245 19.7143 11.9999C19.7143 12.1753 19.6524 12.3249 19.5288 12.4487C19.4102 12.5725 19.2608 12.6447 19.0804 12.6654C18.0807 12.7788 17.2356 12.913 16.5451 13.0677C15.8597 13.2173 15.2929 13.4262 14.8445 13.6944C14.4014 13.9627 14.0432 14.3238 13.7701 14.7777C13.5021 15.2265 13.2831 15.8042 13.1131 16.5109C12.9482 17.2124 12.7962 18.079 12.657 19.1107C12.6313 19.2912 12.5565 19.4357 12.4329 19.544C12.3143 19.6575 12.17 19.7142 12 19.7142Z",fill:"currentColor"})),dE="/durak/assets/pointsLeft-c109612c.png",fE="/durak/assets/pointsRight-5fa88bc5.png",hE="/durak/assets/taskDurak-8a170069.png",pE="/durak/assets/taskMoon-351da501.png",mE="/durak/assets/taskSatoshi-97b475b3.png",gE=()=>{const{t:C}=S8(),{data:e,refetch:t}=a0(),n={background:"linear-gradient(91.1deg, #FFFFFF 0.94%, #999999 117.2%)",backgroundClip:"text",WebkitTextFillColor:"transparent"},[r,i]=o.useState(1),{shareUrl:a,shareLink:l}=Jl({}),{openExternal:s}=j7(),{copy:M,isCopied:Z}=ql(),{isTg:u}=Dt(),c=()=>{console.log(a);try{s(l),u||M(a)}catch{M(a)}O2("Points invite pressed")},{points:f}=Nt();o.useEffect(()=>{r===1&&(O2("Points viewed"),console.log("Points viewed")),r===2&&(O2("Points info viewed"),console.log("Points info viewed"))},[r]);const{data:p,refetch:h}=Lp(),v=()=>{t(),h()};return E.jsx(B7,{bottom:E.jsxs(E.Fragment,{children:[E.jsx("div",{className:"mb-5 flex items-center justify-center",children:E.jsxs("div",{className:"flex items-center justify-center bg-main/10 rounded-[12px] backdrop-blur-lg",children:[E.jsx(D1,{className:F1("min-w-[100px] p-2 rounded-[12px] text-[16px] leading-[19px] font-semibold",r===1?"bg-main text-black":"text-main"),onClick:()=>{i(1)},children:C("points.tasks")}),E.jsx(D1,{className:F1("min-w-[100px] p-2 rounded-[12px] text-[16px] leading-[19px] font-semibold",r===2?"bg-main text-black":"text-main"),onClick:()=>{i(2)},children:C("points.info")})]})}),E.jsx(n0,{})]}),children:E.jsxs("div",{className:"Top px-3",children:[E.jsxs("div",{className:"mt-4 flex items-center justify-between",children:[E.jsx("img",{className:"w-[36px] h-[133px]",src:dE}),E.jsxs("div",{className:"flex flex-col gap-1",children:[E.jsx("div",{className:"text-[48px] leading-[58px] font-bold",children:(e==null?void 0:e.total_points)||0}),E.jsxs("div",{className:"flex items-center text-main font-bold",children:[E.jsx(LE,{className:"w-6 h-6"}),E.jsxs("span",{children:["$DRK ",C("points.points")]})]})]}),E.jsx("img",{className:"w-[36px] h-[133px]",src:fE})]}),r===1&&E.jsxs("div",{className:"text-left",children:[E.jsx("div",{className:"mt-10 ml-[6px] text-[18px] leading-[22px] font-semibold",children:C("points.durakQuests")}),E.jsx("div",{className:"mt-3 flex flex-col gap-3",children:(p||[]).filter(d=>!d.is_partner).map(d=>E.jsx(Di,{id:d.id,image:hE,title:d.name,subtitle:d.description,buttonText:d.id===1&&Z?C("copied"):d.cta,link:d.target_url,claimable:d.claimable,afterClaim:v,isSuccess:d.is_completed,onClick:d.id===1?c:void 0,bottom:d.id===1?E.jsxs("div",{className:"flex flex-col gap-2",children:[E.jsxs("div",{className:"flex items-center justify-between gap-2",children:[E.jsxs("div",{className:"",children:[C("points.pointsEarned"),":"]}),E.jsx("div",{className:"",children:(e==null?void 0:e.ref.points)||0})]}),E.jsxs("div",{className:"flex items-center justify-between gap-2",children:[E.jsxs("div",{className:"",children:[C("points.friendsInvited"),":"]}),E.jsx("div",{className:"",children:(e==null?void 0:e.ref.count)||0})]})]}):void 0},`task-${d.id}`))}),E.jsx("div",{className:"mt-10 ml-[6px] text-[18px] leading-[22px] font-semibold",children:C("points.partnerQuests")}),E.jsx("div",{className:"mt-3 flex flex-col gap-3",children:(p||[]).filter(d=>d.is_partner).map(d=>E.jsx(Di,{id:d.id,image:d.name.toLowerCase().includes(" satoshi")?mE:d.name.toLowerCase().includes(" moon")?pE:d.image_url,title:d.name,subtitle:d.description,buttonText:d.cta,link:d.target_url,claimable:d.claimable,afterClaim:v,isSuccess:d.is_completed},`task-${d.id}`))})]}),r===2&&E.jsxs("div",{className:"text-left",children:[E.jsx("div",{className:"mt-[56px]",children:E.jsxs("div",{className:"flex flex-col gap-1",children:[E.jsx("div",{className:"text-[18px] leading-[22px] font-semibold",children:C("points.aboutPoints")}),E.jsx("div",{className:"text-[20px] leading-[24px]",style:n,children:C("points.aboutPointsText")})]})}),E.jsx("div",{className:"mt-10",children:E.jsxs("div",{className:"flex flex-col gap-1",children:[E.jsx("div",{className:"text-[18px] leading-[22px] font-semibold",children:C("points.howToEarn")}),E.jsxs("div",{className:"flex flex-col gap-3",children:[E.jsxs("div",{className:"flex items-start gap-1",children:[E.jsx(Re,{className:"w-[30px] h-[30px] text-main"}),E.jsx("div",{className:"flex-1 text-[20px] leading-[24px]",style:n,children:C("points.howToEarn1",{winPoints:f.win,gamePoints:f.lose})})]}),E.jsxs("div",{className:"flex items-start gap-1",children:[E.jsx(Re,{className:"w-[30px] h-[30px] text-main"}),E.jsx("div",{className:"flex-1 text-[20px] leading-[24px]",style:n,children:C("points.howToEarn2",{invitePoints:f.invite})})]})]})]})})]})]})})},Fi="/durak/assets/chair-0a6568ca.png",vE="/durak/assets/game-644671c7.png",yE="/durak/assets/win-5a381557.png",EE="/durak/assets/lose-42cdc3d1.png",wE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAYAAACohjseAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAhsSURBVHgB1VtpbBTXHf+9N7OHd31gbhuD1zhQ1qEo1AkWkKZSmiJBE9rYASERKV8SOVGbqhBaqZEqpZ9DoKmqNrR8oGoRrVWjNKElrZSgtoQCrblrEw57fW5ir2/vOTPv5T9r40Ne23sMPn7W253jzc77zf98/zdmsBhbP2pdjJD+VTDlm4JhHWPcC8hCOpUjJRws3kvGIFlQctbKJBoYQ70Azktj8MblSm83LASDBSiv6cnj6sCzCpQXJRMVAM9HOpCyn4Z0nkb1x3YNtW17V4eRITIiWP5B+xpV118DYz+kXSesRQCcnVRU5eiFbxc2I02kRbC85n4et9vf5kLul4ALDxMSAkz83JA4XFfl8SNFpEzwiffbn4PQ32OSFWI2waQPUN66XFn0u5QuS7bjnhqpNLHmo4yz1zG3OC4M/VDd3tL+ZDonRXBzbUexDbGzUjIv5gOYvKpwWXnx+RLfjF1n6vDYqSaPzc7Pk4tfhXkECi0+IcXOuhdKbk/bb7qT5X9u2kBd/kmxajnmIYhkp6bIimvTSHJKgo+d8nsUW/QceTEP5jVYu+C27VerEocSnuigGQYUJXKaHLSHCGJ+N7mKidjf9tTUKEkTFFI5TNdullgYf0SyrJFVHEnEZZKKkt29JA2cwEKEwndfeaH4w/GHJhAsr60vEJrzAlmvBwsSrJ0z49HxMXKiimquN6jTArA7TGmPBlPenkD5wcbm2sZimsQ0kutNaJdzhZUuBUFNYlATyV3AEIoMRsoaXi6Le1X1wXGpsQP0yaXEnGO5S8Uujxs712Rj/SI77vXFsOej9uQulnA53VnVtPWmuRuX4Naa1qyQrrXQ3lLMEXJtHE8WuvCdkmw8scJJM6Ux99DYH0Pl2SQJDiOiKnKlaYtxCYb0SBWZ41LMsvRUzvD4cidJKxtPFbqxyJHYOpoHNdO+kAKchiaepe+TIyrK980mtw35duxYnY3vluZgiVOZsf+9fi31Z8+VF2ESLKtpXSy12HY8ZCwmIs+scaOSSHnzHZPOR3UDXf0RFC1xTzp3PRBBqgyllBUmN9Vu6JsMyEV4CHAoHNtWZmH32hxsLXDBpbIEAwH8fWF0D0SwvjB30nmDOjQPxIYzltSQr0htoxoz9KcUa2pPo9i4xIFvkQfcsy4X2bapo85QREdT5yB0Q8BblAeHbbK6tg3paInbIFJHTDyjqox5rQgNy5wqdpP67Sh2J1TB8dCFQEtXEF0kNYfKUbZ6EX0ntsW7FCLSHR/jWKcKQ5SBpSdBTr+wrSALe9fnYgupoludOUcIEKnmQDAuNVNi3lV5U5IzcaUzYtoT0oGU3KtS3lKUqvjzHAr2EanK0jwUZqtJXROOGfCROg6Etfh+ll2Nk7PN8FD+90UmpVFRqArB3MnKL9fO8ZMty7CD7MuhJHeV+fQ7esPUQhBi+EkuctlRujIHqjI9ubAucac3igxMKMf0a/Zke5evyMJzJTnJdkdwxIkEo/rosTwi90hBLs1sZn5AN7sjZK+ZOAhmV1PR709ahrD/bBt2Ujr1JGUenlxbwn6mfTWTEwkMRiYcX5brxNoVyT+gy/5Q2vY3DMlMA4oihbL7ta5wvHEWoHDgxNNrXNjpyUFRti2uSiaplhEnMh5mAC/MT60Ifi0QQUaQiDHviTudtLkMGWIDhYaDj2bDJoxJ59YszUZBfhZSgamaW041IqInOU1KCNnDqfTvjz/6DNvtngj+0RKc8POc7GztityUyZm42R1FRDMyGhMtL7Ry+qi3akL9n67YhEEudtvJ7hxIB3WfhzIej4Bs4PRx16qSQVvQQNPgmMdsaA/guq+L7DF1R1Fnxr8Mx8PA6rmhyY8t4jcsxcCYFGPkaD7z9+Dv1xsnedTpoAlT5aMWjIf9m9u5cRNS9Fphh2a7RGoaG4ldYsTFm3Hw3K1m3GoNjB6bDp8ROf+QltE46LMPQf0mr395Y48Ev2SVBHujAncG9GEbEGMe0Nx/90o3nv+gZXh2MA1uUHjIdBx0809vf9/bHc+VGOQfrJKg2f7lj8IYR444o7aDjgdI9QJh7D7dhD/d7h8eSAJc7AhlPAamqqfM34oTzNZtZyhjiFolxau9MZqhDxOkdBJ/8Utc7Rs7H6JzP/3Uj4PnOtAdmRw3L/uDmUmP8o1gT9fpUYJ11aX9krEjlrCjFqE65pnWEEI09hM+iRt9ifv99f4Aqt734XrXmAMy7a8nbGR0f6pQnGw7uC0+DRnNeEt+WV+sOFg9LHypwCySRZNIRMzp6KHHl6GiwI3D/+3ERcpB0wZjhgFR2jRS+J2Q0j9yvOE35OZewUIGY+/ce8V76MHuhAmZMOw/oq8OizR11huxa7IJ+Q7GYQLBRrJFCPbqgmI1rpHz/FlDddmEd2kSzjpLjjW8S6HjB1hAICLH71eXTTKvhDWDpvwNB6UQDVbGxofaIK/0wHEoEZfERZG9jNJjbRfFxgVgj8wn7K6q3urELwZNWxjx/LrBwyAu0ea8fI2E6HVK3fYN3+tfmfJdmRkrP55jNzZA8LPU0YP5BCrWSaZs973m9U3XLananylJCiK1pO9fwzwAZV313MZ2PQjm0yGp5WrzKXHufFoy/BZzDcl+seWT/29KhpyJlGv2nl9df0lK9lb8ZYVZhenw+Kst39v4YSpXpbUoUXysvoDqEG+Qhz4wCy8tUGLKTrKY9mPfgc19KV6b2bpZgZmgM+MAleb206616/uMmasuR1Ube6+xemML0oQlC4NFRy5kce6qgqLso1qduVqc7oJqLw3psmDy90HVfWaq2JYKrF35JBQdv7UYYW0Tg/J1shtzac5L9bvVdCdzbdo+clezojRI3x0kpQY6cJfU/WM5FL7V/maFpf9W8CVk0XUxa4Fp4wAAAABJRU5ErkJggg==",xE=()=>{var X1,H3,L6,z7,f3,W7,$7,d6,Q7,K7,G7,q7,W3,$3,f6,o4,t3,$2,h6,b8,J7;const{t:C}=S8(),{setRoomId:e,state:t}=Ft(),n=e0(),{points:r}=Nt(),{send:i}=xp();a0();const a=F7(),s=new URLSearchParams(a.search).get("roomId")||void 0;o.useEffect(()=>{s?e(s):n("/")},[s,n,e]);const{userId:M}=Z6(),Z=M||void 0,u=M?String(M):void 0,c=t==null?void 0:t.status,f=(t==null?void 0:t.players)||{},p=Object.keys(f),v=p.filter(p1=>p1!==u)[0]||null,d=!!v&&f[v]||null,L=Z&&f[Z]||null,m=((X1=d==null?void 0:d.cards)==null?void 0:X1.length)||0,g=((H3=t==null?void 0:t.game)==null?void 0:H3.deck)||0,V=((L6=t==null?void 0:t.game)==null?void 0:L6.trump)||void 0,k=c===2&&((z7=t==null?void 0:t.game)==null?void 0:z7.current_attacker_id)===u,b=c===2&&((f3=t==null?void 0:t.game)==null?void 0:f3.current_defender_id)===u,y=k&&((W7=t==null?void 0:t.game)==null?void 0:W7.status)===10&&!!t.game&&!t.game.has_taken&&!!t.game.table&&t.game.table.length>0,H=b&&(($7=t==null?void 0:t.game)==null?void 0:$7.status)===11&&((d6=t==null?void 0:t.game)==null?void 0:d6.has_taken)===!1,I=k&&((Q7=t==null?void 0:t.game)==null?void 0:Q7.status)===10&&!!((K7=t==null?void 0:t.game)!=null&&K7.has_taken),F=k&&((G7=t==null?void 0:t.game)==null?void 0:G7.status)===10||b&&((q7=t==null?void 0:t.game)==null?void 0:q7.status)===11?"progress":void 0,G=k&&((W3=t==null?void 0:t.game)==null?void 0:W3.status)===11||b&&(($3=t==null?void 0:t.game)==null?void 0:$3.status)===10?"progress":void 0,J=!!u&&((o4=(f6=t==null?void 0:t.game)==null?void 0:f6.rewards)==null?void 0:o4[u])&&t.game.rewards[u].result||void 0,X=!!u&&(($2=(t3=t==null?void 0:t.game)==null?void 0:t3.rewards)==null?void 0:$2[u])&&t.game.rewards[u].points||void 0,f1=!!u&&((b8=(h6=t==null?void 0:t.game)==null?void 0:h6.rewards)==null?void 0:b8[u])&&t.game.rewards[u].invite_points||void 0,{shareUrl:c1,shareLink:G1}=Jl({roomId:s}),{openExternal:A}=j7(),{copy:N,isCopied:T}=ql(),{isTg:r1}=Dt(),s1=()=>{console.log(c1),console.log("roomId",s);try{A(G1),r1||N(c1)}catch{N(c1)}O2("Share room pressed")},x1=()=>{i({type:"player.ready",data:null})},H1=p1=>{i({type:"player.move",data:{action:p1}})},L2=()=>{i({type:"player.leave",data:null})},S1=(L==null?void 0:L.cards)||[],Y1=(p1,l2)=>Array.from({length:Math.ceil(p1.length/l2)},(E2,k8)=>p1.slice(k8*l2,k8*l2+l2)),P2=((J7=t==null?void 0:t.game)==null?void 0:J7.table)||[],V8=Y1(P2,3),y2=({i:p1,n:l2,isReverse:E2})=>`rotate(${l2<2?0:(E2?-1:1)*(-6+2*6*p1/(l2-1))}deg)`,f0=p1=>{console.log("onCardClick",p1),i({type:"player.move",data:{card:p1}})},[h0,c6]=o.useState(!1);return o.useEffect(()=>{c===2&&O2("Game started"),c===100&&O2("Game finished")},[c]),o.useEffect(()=>{p.length>=2&&O2("Two players joined")},[p.length]),E.jsxs(B7,{bottom:E.jsxs("div",{className:"relative h-[154px]",children:[c===2&&E.jsx("div",{className:"absolute bottom-[45px] w-full h-[162px]",children:E.jsx("div",{className:"flex items-center justify-center h-full max-w-[100%] mx-auto px-[60px]",children:S1.map((p1,l2,E2)=>E.jsx("div",{className:"relative w-[40px] h-full",children:E.jsx("div",{className:"absolute top-0 left-[50%] -translate-x-[50%]",children:E.jsx("div",{style:{transform:y2({i:l2,n:E2.length})},children:E.jsx(_8,{className:"h-[162px] w-[116px] hoverable:hover:-translate-y-5 active:-translate-y-5",card:p1,onClick:f0},`my-card-${p1}`)})})}))})}),E.jsxs("div",{className:"absolute h-[90px] bottom-0 left-0 w-full flex items-center justify-between p-5 bg-[#292834] rounded-t-[24px]",children:[!c&&!d&&E.jsx(D1,{theme:"big",onClick:s1,disabled:T,children:C(T?"copied":"shareRoomLink")}),!c&&!!d&&!!L&&E.jsx(E.Fragment,{children:L.ready?E.jsx(D1,{theme:"big",onClick:x1,disabled:!0,children:C("waiting")}):E.jsx(D1,{theme:"big",onClick:x1,children:C("ready")})}),y&&E.jsx(D1,{theme:"big",onClick:()=>{H1("bat")},children:C("bat")}),H&&E.jsx(D1,{theme:"big",onClick:()=>{H1("take")},children:C("take")}),I&&E.jsx(D1,{theme:"big",onClick:()=>{H1("pass")},children:C("pass")}),c===100&&!!d&&!!L&&E.jsx(E.Fragment,{children:L.ready?E.jsx(D1,{theme:"big",onClick:x1,disabled:!0,children:C("waiting")}):E.jsx(D1,{theme:"big",onClick:x1,children:C("playAgain")})}),E.jsxs("div",{className:"absolute bottom-5 right-0 w-[120px] h-[120px]",children:[E.jsx("img",{src:Fi,className:"absolute bottom-2 w-[120px] h-[120px]"}),E.jsx("div",{className:"absolute right-5 bottom-0 max-w-[110px] truncate text-text text-[14px] text-right",children:E.jsx(Oi,{player:L})}),E.jsx(Kr,{className:"!absolute top-[0%] left-[50%] -translate-x-[50%] scale-[85%]",username:(L==null?void 0:L.username)||null,status:F}),!1]})]})]}),children:[E.jsx(hd,{onClick:()=>{c6(!0)}}),E.jsxs("div",{className:"Top z-0 mt-1 flex flex-col items-center justify-center h-[158px]",children:[E.jsxs("div",{className:"z-[1] relative w-[200px] h-[90px] shadow-[0px_0px_30px_30px_#11101D]",children:[E.jsx("img",{src:Fi,className:F1("mx-auto w-[90px] h-[90px]",!d&&"grayscale")}),!d&&E.jsx("div",{className:"absolute top-[85%] left-[50%] -translate-x-[50%] w-full text-[16px] leading-[16px] font-semibold text-text/50",children:C("roomIsEmpty")}),d&&E.jsxs(E.Fragment,{children:[E.jsx("div",{className:"absolute top-[85%] left-[50%] -translate-x-[50%] w-full text-[14px] leading-[14px]",children:E.jsx(Oi,{player:d})}),E.jsx(Kr,{className:"!absolute -top-[10%] left-[50%] -translate-x-[50%] scale-75",username:d.username,status:G}),!1]})]}),E.jsx("div",{className:"h-[70px]",children:c===2&&E.jsx("div",{className:"flex items-center justify-center h-[70px] max-w-[100%] mx-auto",children:[...Array(m)].map((p1,l2,E2)=>E.jsx(_8,{className:"-mx-[10px] h-[60px] w-[40px]",style:{transform:y2({i:l2,n:E2.length,isReverse:!0})}}))})})]}),c===2&&E.jsxs("div",{className:"Side absolute left-0 top-[50%] -translate-y-[50%]",children:[!!g&&E.jsx("div",{className:"absolute -top-[48px] right-[48px] text-white/50 text-[16px] leading-[16px] font-semibold",children:g}),E.jsxs("div",{className:"relative -top-[20px] w-[75px] h-[110px]",children:[g>=1&&V&&E.jsx(_8,{card:V,className:"absolute -left-[30px] top-[50%] -translate-y-[50%] w-[75px] h-[110px] rotate-90"}),g>=2&&E.jsxs("div",{className:"relative -left-[50px] w-[75px] h-[110px]",children:[E.jsx(_8,{className:"absolute inset-0 w-[75px] h-[110px]"}),g>=3&&E.jsx(_8,{className:"absolute inset-0 w-[75px] h-[110px] rotate-6"})]})]})]}),E.jsxs("div",{className:"Center flex items-center justify-center",children:[!c&&!d&&E.jsxs("div",{className:"px-4",children:[E.jsx("div",{className:"-mt-[30px] -mb-[50px]",children:E.jsx("img",{src:vE,className:"mx-auto w-[294px] h-[232px]"})}),E.jsxs("div",{className:"max-w-[470px] mx-auto text-[24px] leading-[29px] font-bold",children:[E.jsx("span",{children:C("sendRoomLink")})," ",E.jsx(D1,{wrapperClassName:"inline-block",onClick:()=>{A("https://t.me/durakton_chat/4")},children:E.jsxs("span",{className:"text-nowrap",children:[E.jsx("img",{src:wE,className:"w-[28px] h-[28px] inline-block"})," ",E.jsx("span",{className:"underline text-main",children:C("ourChat")})]})})," ",E.jsx("span",{children:C("toStart")})]}),E.jsxs("div",{className:"mt-2 text-text/60 text-[16px] leading-[18px] font-medium",children:[E.jsxs("div",{className:"text-main",children:[r.invite," ",C("points_")," ",C("forEveryFren")]}),E.jsxs("div",{className:"text-main",children:[r.win," ",C("points_")," ",C("forEveryWin")]}),E.jsx("div",{})]})]}),!c&&!!d&&E.jsx("div",{className:"px-[82px] text-[24px] leading-[29px] font-bold",children:C("tapReadyToStart")}),c===2&&E.jsx("div",{className:"Groups flex flex-col gap-8",children:V8.map((p1,l2)=>E.jsx("div",{className:"flex items-center justify-center gap-8",children:p1.map((E2,k8)=>E.jsxs("div",{className:"Group relative h-[79px] w-[54px]",children:[E.jsx(_8,{className:F1("absolute left-0 top-0 w-full h-full",E2[1]&&"-rotate-12"),card:E2[0]}),E2[1]&&E.jsx(_8,{className:"absolute left-0 top-0 w-full h-full rotate-12",card:E2[1]})]},`group-${k8}`))},`row-${l2}`))}),c===100&&E.jsxs("div",{className:"flex flex-col items-center",children:[(J==="win"||J==="draw")&&E.jsx("img",{src:yE,className:"w-[148px] h-[163px]"}),J==="lose"&&E.jsx("img",{src:EE,className:"w-[186px] h-[112px]"}),E.jsxs("div",{className:"text-[48px] leading-[48px] font-extrabold",children:[J==="win"&&E.jsx("div",{className:"text-main",children:C("win")}),J==="draw"&&E.jsx("div",{className:"text-[#EBECEA]",children:C("draw")}),J==="lose"&&E.jsx("div",{className:"text-[#DF0000]",children:C("lose")})]}),!!X&&E.jsxs("div",{className:"p-[10px] text-[36px] leading-[36px] font-semibold",style:{textShadow:"-2px -2px #454456, -2px 2px #454456, 2px 2px #454456, 2px -2px #454456"},children:["+",X," ",C("points_")]}),!!f1&&E.jsxs("div",{className:"text-main text-[18px] leading-[21px] font-semibold",children:["+",f1," ",C("pointsForInviting")]}),E.jsxs("div",{className:"mt-6 flex flex-col gap-[10px] p-[10px]",children:[E.jsx(oE,{}),E.jsx("div",{className:"text-[16px] leading-[18px] text-text/60 font-medium",children:C("reviewGameplay")})]})]})]}),E.jsx("div",{className:"Bottom"}),h0&&E.jsxs(Mf,{children:[E.jsxs("div",{className:"mx-auto mb-[50px] max-w-[280px] text-[16px] leading-[18px] font-medium text-text/60",children:[E.jsx("div",{children:C(c===2?"gameWillBeLost":"gameWillBeLost_")}),E.jsx("div",{children:C("areYouSure")})]}),E.jsxs("div",{className:"flex flex-col gap-4",children:[E.jsx(D1,{theme:"big",onClick:()=>{c6(!1)},children:C("stayAndPlay")}),E.jsx(D1,{theme:"big",className:"",onClick:()=>{L2(),c6(!1),e(null),n("/")},children:C(c===2?"leaveAndLose":"leave")})]})]})]})},SE="/durak/assets/watch-1306bab0.png",VE=()=>{const{t:C}=S8(),{openExternal:e}=j7();return E.jsxs(B7,{bottom:E.jsx(n0,{}),children:[E.jsx("div",{className:"Top"}),E.jsxs("div",{className:"Center py-10 px-4 flex flex-col items-center justify-center",children:[E.jsx("img",{className:"w-[210px] h-[166px] grayscale",src:SE}),E.jsx("div",{className:"mt-8 max-w-[400px] text-[24px] leading-[29px] font-bold",children:C("watchRules")}),E.jsx(D1,{theme:"big",wrapperClassName:"mt-10",onClick:()=>{e("https://youtu.be/3JagmUmUJOc")},children:C("watchVideo")})]}),E.jsx("div",{className:"Bottom"})]})},bE=HL([{path:"/",element:E.jsx(MC,{}),errorElement:E.jsx(MC,{})},{path:"*",element:E.jsx(MC,{})},{path:"/find",element:E.jsx(ME,{})},{path:"/points",element:E.jsx(gE,{})},{path:"/rules",element:E.jsx(VE,{})},{path:"/room",element:E.jsx(xE,{})}]),kE=()=>{const C=o.useMemo(()=>new Cc,[]),{isLaunchedFirstTime:e,setIsLauncedFirstTime:t}=rm(),[n,r]=o.useState(!1);return o.useEffect(()=>{n||(r(!0),O2("Session start"))},[n,r]),o.useEffect(()=>{e&&(t(!1),O2("Launch first time"))},[e,t]),E.jsx(ic,{client:C,children:E.jsx(FL,{router:bE})})};ZC.createRoot(document.getElementById("root")).render(E.jsx(Oe.StrictMode,{children:E.jsx(kE,{})})); + `,document.body.appendChild(e),()=>{document.body.removeChild(e)}},[]),E.jsx("span",{className:F1("Survey",C)})),Oi=({className:C,player:e})=>E.jsx("span",{className:F1("Username",C),children:e!=null&&e.username?`@${e.username}`:(e==null?void 0:e.name)||""}),sE="/durak/assets/find-1acc9ac3.png",ME=()=>{const{t:C}=S8(),{openLink:e}=j7();return E.jsxs(B7,{bottom:E.jsx(n0,{}),children:[E.jsx("div",{className:"Top"}),E.jsxs("div",{className:"Center py-10 flex flex-col items-center justify-center",children:[E.jsx("img",{className:"w-[294px] h-[232px] grayscale",src:sE}),E.jsx("div",{className:"max-w-[320px] text-[24px] leading-[29px] font-bold",children:C("exploreGroup")}),E.jsx(D1,{theme:"big",wrapperClassName:"mt-10",onClick:()=>{e("https://t.me/durakton_chat")},children:C("joinGroup")})]}),E.jsx("div",{className:"Bottom"})]})},ZE="/durak/assets/deck-f354288b.jpg",uE=C=>o.createElement("svg",{width:16,height:12,viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...C},o.createElement("g",{clipPath:"url(#clip0_57_1370)"},o.createElement("rect",{width:16,height:12,fill:"white"}),o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 0V12H16V0H0Z",fill:"#3D58DB"}),o.createElement("mask",{id:"mask0_57_1370",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:0,y:0,width:16,height:12},o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 0V12H16V0H0Z",fill:"white"})),o.createElement("g",{mask:"url(#mask0_57_1370)"},o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 0V4H16V0H0Z",fill:"#F7FCFF"}),o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 8V12H16V8H0Z",fill:"#C51918"}))),o.createElement("defs",null,o.createElement("clipPath",{id:"clip0_57_1370"},o.createElement("rect",{width:16,height:12,fill:"white"})))),cE=C=>o.createElement("svg",{width:16,height:12,viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...C},o.createElement("g",{clipPath:"url(#clip0_57_1515)"},o.createElement("rect",{width:16,height:12,fill:"white"}),o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 0H16V12H0V0Z",fill:"#E31D1C"}),o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 1V2H16V1H0ZM0 3V4H16V3H0ZM0 6V5H16V6H0ZM0 7V8H16V7H0ZM0 10V9H16V10H0ZM0 12V11H16V12H0Z",fill:"#F7FCFF"}),o.createElement("rect",{width:9,height:7,fill:"#2E42A5"}),o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.04002 2.17378L1.56994 1.80465L1.981 2.10058H1.74826L2.21893 2.51688L2.05996 3.10058H1.81097L1.5692 2.56448L1.36302 3.10058H0.74826L1.21893 3.51688L1.04002 4.17378L1.56994 3.80465L1.981 4.10058H1.74826L2.21893 4.51688L2.05996 5.10058H1.81097L1.5692 4.56448L1.36302 5.10058H0.74826L1.21893 5.51688L1.04002 6.17378L1.56994 5.80465L2.08268 6.17378L1.92326 5.51688L2.33503 5.10058H2.14511L2.56994 4.80465L2.981 5.10058H2.74826L3.21893 5.51688L3.04002 6.17378L3.56994 5.80465L4.08268 6.17378L3.92326 5.51688L4.33503 5.10058H4.14511L4.56994 4.80465L4.981 5.10058H4.74826L5.21893 5.51688L5.04002 6.17378L5.56994 5.80465L6.08268 6.17378L5.92326 5.51688L6.33503 5.10058H6.14511L6.56994 4.80465L6.981 5.10058H6.74826L7.21893 5.51688L7.04002 6.17378L7.56994 5.80465L8.08268 6.17378L7.92326 5.51688L8.33503 5.10058H7.81097L7.5692 4.56448L7.36302 5.10058H7.06491L6.92326 4.51688L7.33503 4.10058H7.1451L7.56994 3.80465L8.08268 4.17378L7.92326 3.51688L8.33503 3.10058H7.81097L7.5692 2.56448L7.36302 3.10058H7.06491L6.92326 2.51688L7.33503 2.10058H7.1451L7.56994 1.80465L8.08268 2.17378L7.92326 1.51688L8.33503 1.10058H7.81097L7.5692 0.564484L7.36302 1.10058H6.74826L7.21893 1.51688L7.05996 2.10058H6.81097L6.5692 1.56448L6.36302 2.10058H6.06491L5.92326 1.51688L6.33503 1.10058H5.81097L5.5692 0.564484L5.36302 1.10058H4.74826L5.21893 1.51688L5.05996 2.10058H4.81097L4.5692 1.56448L4.36302 2.10058H4.06491L3.92326 1.51688L4.33503 1.10058H3.81097L3.5692 0.564484L3.36302 1.10058H2.74826L3.21893 1.51688L3.05996 2.10058H2.81097L2.5692 1.56448L2.36302 2.10058H2.06491L1.92326 1.51688L2.33503 1.10058H1.81097L1.5692 0.564484L1.36302 1.10058H0.74826L1.21893 1.51688L1.04002 2.17378ZM7.05996 4.10058L7.21893 3.51688L6.74826 3.10058H6.981L6.56994 2.80465L6.1451 3.10058H6.33503L5.92326 3.51688L6.06491 4.10058H6.36302L6.5692 3.56448L6.81097 4.10058H7.05996ZM5.981 4.10058L5.56994 3.80465L5.1451 4.10058H5.33503L4.92326 4.51688L5.06491 5.10058H5.36302L5.5692 4.56448L5.81097 5.10058H6.05996L6.21893 4.51688L5.74826 4.10058H5.981ZM4.21893 4.51688L4.05996 5.10058H3.81097L3.5692 4.56448L3.36302 5.10058H3.06491L2.92326 4.51688L3.33503 4.10058H3.1451L3.56994 3.80465L3.981 4.10058H3.74826L4.21893 4.51688ZM4.36302 4.10058H4.06491L3.92326 3.51688L4.33503 3.10058H4.1451L4.56994 2.80465L4.981 3.10058H4.74826L5.21893 3.51688L5.05996 4.10058H4.81097L4.5692 3.56448L4.36302 4.10058ZM3.05996 4.10058L3.21893 3.51688L2.74826 3.10058H2.981L2.56994 2.80465L2.1451 3.10058H2.33503L1.92326 3.51688L2.06491 4.10058H2.36302L2.5692 3.56448L2.81097 4.10058H3.05996ZM6.21893 2.51688L6.05996 3.10058H5.81097L5.5692 2.56448L5.36302 3.10058H5.06491L4.92326 2.51688L5.33503 2.10058H5.1451L5.56994 1.80465L5.981 2.10058H5.74826L6.21893 2.51688ZM3.981 2.10058L3.56994 1.80465L3.1451 2.10058H3.33503L2.92326 2.51688L3.06491 3.10058H3.36302L3.5692 2.56448L3.81097 3.10058H4.05996L4.21893 2.51688L3.74826 2.10058H3.981Z",fill:"#F7FCFF"})),o.createElement("defs",null,o.createElement("clipPath",{id:"clip0_57_1515"},o.createElement("rect",{width:16,height:12,fill:"white"})))),MC=()=>{const{t:C}=S8(),e=e0(),{data:t}=a0(),[n,r]=o.useState(!1),i=cp(),a=async()=>{r(!0);try{const{room_id:l}=await i();l&&(O2("Room created"),e(`/room?roomId=${l}`))}catch(l){console.error(l)}finally{r(!1)}};return E.jsxs(B7,{bottom:E.jsxs(E.Fragment,{children:[E.jsx("div",{className:"mb-[18px]",children:E.jsx(D1,{wrapperClassName:"inline-block",className:"w-[64px] p-3 bg-[#D9D9D91A] rounded-full backdrop-blur-lg",onClick:()=>{A1.changeLanguage(A1.language==="en"?"ru":"en")},children:E.jsxs("div",{className:"flex items-center gap-1",children:[E.jsxs("div",{className:"w-4 h-3 mr-1",children:[A1.language==="ru"&&E.jsx(uE,{}),A1.language==="en"&&E.jsx(cE,{})]}),E.jsx("div",{className:"text-[10px] leading-[12px] uppercase",children:A1.language})]})})}),E.jsx(n0,{})]}),children:[E.jsxs("div",{className:"Top mt-5 flex flex-col items-center gap-1",children:[E.jsx("div",{className:"text-[60px] leading-[60px] font-semibold",children:(t==null?void 0:t.total_points)||0}),E.jsx("div",{className:"text-[16px] leading-[16px] text-text/50",children:C("yourPoints")})]}),E.jsxs("div",{className:"Center px-4",children:[E.jsx("img",{src:ZE,className:"w-[239px] h-[173px] mx-auto"}),E.jsxs("div",{className:"text-[24px] leading-[29px] font-bold",children:[E.jsx("div",{children:C("playEarn")}),E.jsx("div",{className:"text-main",children:C("getAirdrop")})]}),E.jsx(D1,{theme:"big",className:"mt-10 h-[55px]",onClick:a,isBusy:n,children:C("startGame")})]}),E.jsx("div",{className:"Bottom"})]})},LE=C=>o.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...C},o.createElement("path",{d:"M12 19.7142C11.8299 19.7142 11.6831 19.6575 11.5594 19.544C11.4409 19.4357 11.3662 19.2912 11.3352 19.1107C11.2116 18.2544 11.0802 17.5142 10.941 16.89C10.807 16.2659 10.6421 15.7371 10.4463 15.3038C10.2556 14.8654 10.016 14.5017 9.72745 14.2129C9.43887 13.9188 9.07815 13.679 8.64528 13.4933C8.21242 13.3076 7.68937 13.1528 7.07614 13.029C6.46807 12.9001 5.74663 12.7788 4.91181 12.6654C4.7263 12.6447 4.57428 12.5725 4.45576 12.4487C4.34239 12.3249 4.28571 12.1753 4.28571 11.9999C4.28571 11.8245 4.34497 11.675 4.46349 11.5512C4.58201 11.4274 4.73145 11.3526 4.91181 11.3268C5.91668 11.2184 6.7618 11.0895 7.44717 10.9399C8.13254 10.7851 8.69681 10.5737 9.13999 10.3054C9.58831 10.0372 9.94903 9.67868 10.2221 9.22991C10.4953 8.77597 10.7143 8.19566 10.8792 7.48897C11.0441 6.78228 11.1961 5.9131 11.3352 4.88143C11.3662 4.70089 11.4409 4.55646 11.5594 4.44813C11.6831 4.33981 11.8299 4.28564 12 4.28564C12.1649 4.28564 12.3066 4.33981 12.4251 4.44813C12.5488 4.55646 12.6261 4.70089 12.657 4.88143C12.8013 5.9131 12.9559 6.78228 13.1208 7.48897C13.2909 8.1905 13.5124 8.76823 13.7856 9.22217C14.0587 9.67094 14.4168 10.0294 14.86 10.2977C15.3032 10.5659 15.8674 10.7774 16.5528 10.9322C17.2382 11.0817 18.0833 11.2133 19.0882 11.3268C19.2634 11.3526 19.4102 11.4274 19.5288 11.5512C19.6524 11.675 19.7143 11.8245 19.7143 11.9999C19.7143 12.1753 19.6524 12.3249 19.5288 12.4487C19.4102 12.5725 19.2608 12.6447 19.0804 12.6654C18.0807 12.7788 17.2356 12.913 16.5451 13.0677C15.8597 13.2173 15.2929 13.4262 14.8445 13.6944C14.4014 13.9627 14.0432 14.3238 13.7701 14.7777C13.5021 15.2265 13.2831 15.8042 13.1131 16.5109C12.9482 17.2124 12.7962 18.079 12.657 19.1107C12.6313 19.2912 12.5565 19.4357 12.4329 19.544C12.3143 19.6575 12.17 19.7142 12 19.7142Z",fill:"currentColor"})),dE="/durak/assets/pointsLeft-c109612c.png",fE="/durak/assets/pointsRight-5fa88bc5.png",hE="/durak/assets/taskDurak-8a170069.png",pE="/durak/assets/taskMoon-351da501.png",mE="/durak/assets/taskSatoshi-97b475b3.png",gE=()=>{const{t:C}=S8(),{data:e,refetch:t}=a0(),n={background:"linear-gradient(91.1deg, #FFFFFF 0.95%, #999999 117.2%)",backgroundClip:"text",WebkitTextFillColor:"transparent"},[r,i]=o.useState(1),{shareUrl:a,shareLink:l}=Jl({}),{openLink:s}=j7(),{copy:M,isCopied:Z}=ql(),{isTg:u}=Dt(),c=()=>{console.log(a);try{s(l),u||M(a)}catch{M(a)}O2("Points invite pressed")},{points:f}=Nt();o.useEffect(()=>{r===1&&(O2("Points viewed"),console.log("Points viewed")),r===2&&(O2("Points info viewed"),console.log("Points info viewed"))},[r]);const{data:p,refetch:h}=Lp(),v=()=>{t(),h()};return E.jsx(B7,{bottom:E.jsxs(E.Fragment,{children:[E.jsx("div",{className:"mb-5 flex items-center justify-center",children:E.jsxs("div",{className:"flex items-center justify-center bg-main/10 rounded-[12px] backdrop-blur-lg",children:[E.jsx(D1,{className:F1("min-w-[100px] p-2 rounded-[12px] text-[16px] leading-[19px] font-semibold",r===1?"bg-main text-black":"text-main"),onClick:()=>{i(1)},children:C("points.tasks")}),E.jsx(D1,{className:F1("min-w-[100px] p-2 rounded-[12px] text-[16px] leading-[19px] font-semibold",r===2?"bg-main text-black":"text-main"),onClick:()=>{i(2)},children:C("points.info")})]})}),E.jsx(n0,{})]}),children:E.jsxs("div",{className:"Top px-3",children:[E.jsxs("div",{className:"mt-4 flex items-center justify-between",children:[E.jsx("img",{className:"w-[36px] h-[133px]",src:dE}),E.jsxs("div",{className:"flex flex-col gap-1",children:[E.jsx("div",{className:"text-[48px] leading-[58px] font-bold",children:(e==null?void 0:e.total_points)||0}),E.jsxs("div",{className:"flex items-center text-main font-bold",children:[E.jsx(LE,{className:"w-6 h-6"}),E.jsxs("span",{children:["$DRK ",C("points.points")]})]})]}),E.jsx("img",{className:"w-[36px] h-[133px]",src:fE})]}),r===1&&E.jsxs("div",{className:"text-left",children:[E.jsx("div",{className:"mt-10 ml-[6px] text-[18px] leading-[22px] font-semibold",children:C("points.durakQuests")}),E.jsx("div",{className:"mt-3 flex flex-col gap-3",children:(p||[]).filter(d=>!d.is_partner).map(d=>E.jsx(Di,{id:d.id,image:hE,title:d.name,subtitle:d.description,buttonText:d.id===1&&Z?C("copied"):d.cta,link:d.target_url,claimable:d.claimable,afterClaim:v,isSuccess:d.is_completed,onClick:d.id===1?c:void 0,bottom:d.id===1?E.jsxs("div",{className:"flex flex-col gap-2",children:[E.jsxs("div",{className:"flex items-center justify-between gap-2",children:[E.jsxs("div",{className:"",children:[C("points.pointsEarned"),":"]}),E.jsx("div",{className:"",children:(e==null?void 0:e.ref.points)||0})]}),E.jsxs("div",{className:"flex items-center justify-between gap-2",children:[E.jsxs("div",{className:"",children:[C("points.friendsInvited"),":"]}),E.jsx("div",{className:"",children:(e==null?void 0:e.ref.count)||0})]})]}):void 0},`task-${d.id}`))}),E.jsx("div",{className:"mt-10 ml-[6px] text-[18px] leading-[22px] font-semibold",children:C("points.partnerQuests")}),E.jsx("div",{className:"mt-3 flex flex-col gap-3",children:(p||[]).filter(d=>d.is_partner).map(d=>E.jsx(Di,{id:d.id,image:d.name.toLowerCase().includes(" satoshi")?mE:d.name.toLowerCase().includes(" moon")?pE:d.image_url,title:d.name,subtitle:d.description,buttonText:d.cta,link:d.target_url,claimable:d.claimable,afterClaim:v,isSuccess:d.is_completed},`task-${d.id}`))})]}),r===2&&E.jsxs("div",{className:"text-left",children:[E.jsx("div",{className:"mt-[56px]",children:E.jsxs("div",{className:"flex flex-col gap-1",children:[E.jsx("div",{className:"text-[18px] leading-[22px] font-semibold",children:C("points.aboutPoints")}),E.jsx("div",{className:"text-[20px] leading-[24px]",style:n,children:C("points.aboutPointsText")})]})}),E.jsx("div",{className:"mt-10",children:E.jsxs("div",{className:"flex flex-col gap-1",children:[E.jsx("div",{className:"text-[18px] leading-[22px] font-semibold",children:C("points.howToEarn")}),E.jsxs("div",{className:"flex flex-col gap-3",children:[E.jsxs("div",{className:"flex items-start gap-1",children:[E.jsx(Re,{className:"w-[30px] h-[30px] text-main"}),E.jsx("div",{className:"flex-1 text-[20px] leading-[24px]",style:n,children:C("points.howToEarn1",{winPoints:f.win,gamePoints:f.lose})})]}),E.jsxs("div",{className:"flex items-start gap-1",children:[E.jsx(Re,{className:"w-[30px] h-[30px] text-main"}),E.jsx("div",{className:"flex-1 text-[20px] leading-[24px]",style:n,children:C("points.howToEarn2",{invitePoints:f.invite})})]})]})]})})]})]})})},Fi="/durak/assets/chair-0a6568ca.png",vE="/durak/assets/game-644671c7.png",yE="/durak/assets/win-5a381557.png",EE="/durak/assets/lose-42cdc3d1.png",wE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAYAAACohjseAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAhsSURBVHgB1VtpbBTXHf+9N7OHd31gbhuD1zhQ1qEo1AkWkKZSmiJBE9rYASERKV8SOVGbqhBaqZEqpZ9DoKmqNrR8oGoRrVWjNKElrZSgtoQCrblrEw57fW5ir2/vOTPv5T9r40Ne23sMPn7W253jzc77zf98/zdmsBhbP2pdjJD+VTDlm4JhHWPcC8hCOpUjJRws3kvGIFlQctbKJBoYQ70Azktj8MblSm83LASDBSiv6cnj6sCzCpQXJRMVAM9HOpCyn4Z0nkb1x3YNtW17V4eRITIiWP5B+xpV118DYz+kXSesRQCcnVRU5eiFbxc2I02kRbC85n4et9vf5kLul4ALDxMSAkz83JA4XFfl8SNFpEzwiffbn4PQ32OSFWI2waQPUN66XFn0u5QuS7bjnhqpNLHmo4yz1zG3OC4M/VDd3tL+ZDonRXBzbUexDbGzUjIv5gOYvKpwWXnx+RLfjF1n6vDYqSaPzc7Pk4tfhXkECi0+IcXOuhdKbk/bb7qT5X9u2kBd/kmxajnmIYhkp6bIimvTSHJKgo+d8nsUW/QceTEP5jVYu+C27VerEocSnuigGQYUJXKaHLSHCGJ+N7mKidjf9tTUKEkTFFI5TNdullgYf0SyrJFVHEnEZZKKkt29JA2cwEKEwndfeaH4w/GHJhAsr60vEJrzAlmvBwsSrJ0z49HxMXKiimquN6jTArA7TGmPBlPenkD5wcbm2sZimsQ0kutNaJdzhZUuBUFNYlATyV3AEIoMRsoaXi6Le1X1wXGpsQP0yaXEnGO5S8Uujxs712Rj/SI77vXFsOej9uQulnA53VnVtPWmuRuX4Naa1qyQrrXQ3lLMEXJtHE8WuvCdkmw8scJJM6Ux99DYH0Pl2SQJDiOiKnKlaYtxCYb0SBWZ41LMsvRUzvD4cidJKxtPFbqxyJHYOpoHNdO+kAKchiaepe+TIyrK980mtw35duxYnY3vluZgiVOZsf+9fi31Z8+VF2ESLKtpXSy12HY8ZCwmIs+scaOSSHnzHZPOR3UDXf0RFC1xTzp3PRBBqgyllBUmN9Vu6JsMyEV4CHAoHNtWZmH32hxsLXDBpbIEAwH8fWF0D0SwvjB30nmDOjQPxIYzltSQr0htoxoz9KcUa2pPo9i4xIFvkQfcsy4X2bapo85QREdT5yB0Q8BblAeHbbK6tg3paInbIFJHTDyjqox5rQgNy5wqdpP67Sh2J1TB8dCFQEtXEF0kNYfKUbZ6EX0ntsW7FCLSHR/jWKcKQ5SBpSdBTr+wrSALe9fnYgupoludOUcIEKnmQDAuNVNi3lV5U5IzcaUzYtoT0oGU3KtS3lKUqvjzHAr2EanK0jwUZqtJXROOGfCROg6Etfh+ll2Nk7PN8FD+90UmpVFRqArB3MnKL9fO8ZMty7CD7MuhJHeV+fQ7esPUQhBi+EkuctlRujIHqjI9ubAucac3igxMKMf0a/Zke5evyMJzJTnJdkdwxIkEo/rosTwi90hBLs1sZn5AN7sjZK+ZOAhmV1PR709ahrD/bBt2Ujr1JGUenlxbwn6mfTWTEwkMRiYcX5brxNoVyT+gy/5Q2vY3DMlMA4oihbL7ta5wvHEWoHDgxNNrXNjpyUFRti2uSiaplhEnMh5mAC/MT60Ifi0QQUaQiDHviTudtLkMGWIDhYaDj2bDJoxJ59YszUZBfhZSgamaW041IqInOU1KCNnDqfTvjz/6DNvtngj+0RKc8POc7GztityUyZm42R1FRDMyGhMtL7Ry+qi3akL9n67YhEEudtvJ7hxIB3WfhzIej4Bs4PRx16qSQVvQQNPgmMdsaA/guq+L7DF1R1Fnxr8Mx8PA6rmhyY8t4jcsxcCYFGPkaD7z9+Dv1xsnedTpoAlT5aMWjIf9m9u5cRNS9Fphh2a7RGoaG4ldYsTFm3Hw3K1m3GoNjB6bDp8ROf+QltE46LMPQf0mr395Y48Ev2SVBHujAncG9GEbEGMe0Nx/90o3nv+gZXh2MA1uUHjIdBx0809vf9/bHc+VGOQfrJKg2f7lj8IYR444o7aDjgdI9QJh7D7dhD/d7h8eSAJc7AhlPAamqqfM34oTzNZtZyhjiFolxau9MZqhDxOkdBJ/8Utc7Rs7H6JzP/3Uj4PnOtAdmRw3L/uDmUmP8o1gT9fpUYJ11aX9krEjlrCjFqE65pnWEEI09hM+iRt9ifv99f4Aqt734XrXmAMy7a8nbGR0f6pQnGw7uC0+DRnNeEt+WV+sOFg9LHypwCySRZNIRMzp6KHHl6GiwI3D/+3ERcpB0wZjhgFR2jRS+J2Q0j9yvOE35OZewUIGY+/ce8V76MHuhAmZMOw/oq8OizR11huxa7IJ+Q7GYQLBRrJFCPbqgmI1rpHz/FlDddmEd2kSzjpLjjW8S6HjB1hAICLH71eXTTKvhDWDpvwNB6UQDVbGxofaIK/0wHEoEZfERZG9jNJjbRfFxgVgj8wn7K6q3urELwZNWxjx/LrBwyAu0ea8fI2E6HVK3fYN3+tfmfJdmRkrP55jNzZA8LPU0YP5BCrWSaZs973m9U3XLananylJCiK1pO9fwzwAZV313MZ2PQjm0yGp5WrzKXHufFoy/BZzDcl+seWT/29KhpyJlGv2nl9df0lK9lb8ZYVZhenw+Kst39v4YSpXpbUoUXysvoDqEG+Qhz4wCy8tUGLKTrKY9mPfgc19KV6b2bpZgZmgM+MAleb206616/uMmasuR1Ube6+xemML0oQlC4NFRy5kce6qgqLso1qduVqc7oJqLw3psmDy90HVfWaq2JYKrF35JBQdv7UYYW0Tg/J1shtzac5L9bvVdCdzbdo+clezojRI3x0kpQY6cJfU/WM5FL7V/maFpf9W8CVk0XUxa4Fp4wAAAABJRU5ErkJggg==",xE=()=>{var X1,H3,L6,z7,f3,W7,$7,d6,Q7,K7,G7,q7,W3,$3,f6,o4,t3,$2,h6,b8,J7;const{t:C}=S8(),{setRoomId:e,state:t}=Ft(),n=e0(),{points:r}=Nt(),{send:i}=xp();a0();const a=F7(),s=new URLSearchParams(a.search).get("roomId")||void 0;o.useEffect(()=>{s?e(s):n("/")},[s,n,e]);const{userId:M}=Z6(),Z=M||void 0,u=M?String(M):void 0,c=t==null?void 0:t.status,f=(t==null?void 0:t.players)||{},p=Object.keys(f),v=p.filter(p1=>p1!==u)[0]||null,d=!!v&&f[v]||null,L=Z&&f[Z]||null,m=((X1=d==null?void 0:d.cards)==null?void 0:X1.length)||0,g=((H3=t==null?void 0:t.game)==null?void 0:H3.deck)||0,V=((L6=t==null?void 0:t.game)==null?void 0:L6.trump)||void 0,k=c===2&&((z7=t==null?void 0:t.game)==null?void 0:z7.current_attacker_id)===u,b=c===2&&((f3=t==null?void 0:t.game)==null?void 0:f3.current_defender_id)===u,y=k&&((W7=t==null?void 0:t.game)==null?void 0:W7.status)===10&&!!t.game&&!t.game.has_taken&&!!t.game.table&&t.game.table.length>0,H=b&&(($7=t==null?void 0:t.game)==null?void 0:$7.status)===11&&((d6=t==null?void 0:t.game)==null?void 0:d6.has_taken)===!1,I=k&&((Q7=t==null?void 0:t.game)==null?void 0:Q7.status)===10&&!!((K7=t==null?void 0:t.game)!=null&&K7.has_taken),F=k&&((G7=t==null?void 0:t.game)==null?void 0:G7.status)===10||b&&((q7=t==null?void 0:t.game)==null?void 0:q7.status)===11?"progress":void 0,G=k&&((W3=t==null?void 0:t.game)==null?void 0:W3.status)===11||b&&(($3=t==null?void 0:t.game)==null?void 0:$3.status)===10?"progress":void 0,J=!!u&&((o4=(f6=t==null?void 0:t.game)==null?void 0:f6.rewards)==null?void 0:o4[u])&&t.game.rewards[u].result||void 0,X=!!u&&(($2=(t3=t==null?void 0:t.game)==null?void 0:t3.rewards)==null?void 0:$2[u])&&t.game.rewards[u].points||void 0,f1=!!u&&((b8=(h6=t==null?void 0:t.game)==null?void 0:h6.rewards)==null?void 0:b8[u])&&t.game.rewards[u].invite_points||void 0,{shareUrl:c1,shareLink:G1}=Jl({roomId:s}),{openLink:A}=j7(),{copy:N,isCopied:T}=ql(),{isTg:r1}=Dt(),s1=()=>{console.log(c1),console.log("roomId",s);try{A(G1),r1||N(c1)}catch{N(c1)}O2("Share room pressed")},x1=()=>{i({type:"player.ready",data:null})},H1=p1=>{i({type:"player.move",data:{action:p1}})},L2=()=>{i({type:"player.leave",data:null})},S1=(L==null?void 0:L.cards)||[],Y1=(p1,l2)=>Array.from({length:Math.ceil(p1.length/l2)},(E2,k8)=>p1.slice(k8*l2,k8*l2+l2)),P2=((J7=t==null?void 0:t.game)==null?void 0:J7.table)||[],V8=Y1(P2,3),y2=({i:p1,n:l2,isReverse:E2})=>`rotate(${l2<2?0:(E2?-1:1)*(-6+2*6*p1/(l2-1))}deg)`,f0=p1=>{console.log("onCardClick",p1),i({type:"player.move",data:{card:p1}})},[h0,c6]=o.useState(!1);return o.useEffect(()=>{c===2&&O2("Game started"),c===100&&O2("Game finished")},[c]),o.useEffect(()=>{p.length>=2&&O2("Two players joined")},[p.length]),E.jsxs(B7,{bottom:E.jsxs("div",{className:"relative h-[154px]",children:[c===2&&E.jsx("div",{className:"absolute bottom-[45px] w-full h-[162px]",children:E.jsx("div",{className:"flex items-center justify-center h-full max-w-[100%] mx-auto px-[60px]",children:S1.map((p1,l2,E2)=>E.jsx("div",{className:"relative w-[40px] h-full",children:E.jsx("div",{className:"absolute top-0 left-[50%] -translate-x-[50%]",children:E.jsx("div",{style:{transform:y2({i:l2,n:E2.length})},children:E.jsx(_8,{className:"h-[162px] w-[116px] hoverable:hover:-translate-y-5 active:-translate-y-5",card:p1,onClick:f0},`my-card-${p1}`)})})}))})}),E.jsxs("div",{className:"absolute h-[90px] bottom-0 left-0 w-full flex items-center justify-between p-5 bg-[#292834] rounded-t-[24px]",children:[!c&&!d&&E.jsx(D1,{theme:"big",onClick:s1,disabled:T,children:C(T?"copied":"shareRoomLink")}),!c&&!!d&&!!L&&E.jsx(E.Fragment,{children:L.ready?E.jsx(D1,{theme:"big",onClick:x1,disabled:!0,children:C("waiting")}):E.jsx(D1,{theme:"big",onClick:x1,children:C("ready")})}),y&&E.jsx(D1,{theme:"big",onClick:()=>{H1("bat")},children:C("bat")}),H&&E.jsx(D1,{theme:"big",onClick:()=>{H1("take")},children:C("take")}),I&&E.jsx(D1,{theme:"big",onClick:()=>{H1("pass")},children:C("pass")}),c===100&&!!d&&!!L&&E.jsx(E.Fragment,{children:L.ready?E.jsx(D1,{theme:"big",onClick:x1,disabled:!0,children:C("waiting")}):E.jsx(D1,{theme:"big",onClick:x1,children:C("playAgain")})}),E.jsxs("div",{className:"absolute bottom-5 right-0 w-[120px] h-[120px]",children:[E.jsx("img",{src:Fi,className:"absolute bottom-2 w-[120px] h-[120px]"}),E.jsx("div",{className:"absolute right-5 bottom-0 max-w-[110px] truncate text-text text-[14px] text-right",children:E.jsx(Oi,{player:L})}),E.jsx(Kr,{className:"!absolute top-[0%] left-[50%] -translate-x-[50%] scale-[85%]",username:(L==null?void 0:L.username)||null,status:F}),!1]})]})]}),children:[E.jsx(hd,{onClick:()=>{c6(!0)}}),E.jsxs("div",{className:"Top z-0 mt-1 flex flex-col items-center justify-center h-[158px]",children:[E.jsxs("div",{className:"z-[1] relative w-[200px] h-[90px] shadow-[0px_0px_30px_30px_#11101D]",children:[E.jsx("img",{src:Fi,className:F1("mx-auto w-[90px] h-[90px]",!d&&"grayscale")}),!d&&E.jsx("div",{className:"absolute top-[85%] left-[50%] -translate-x-[50%] w-full text-[16px] leading-[16px] font-semibold text-text/50",children:C("roomIsEmpty")}),d&&E.jsxs(E.Fragment,{children:[E.jsx("div",{className:"absolute top-[85%] left-[50%] -translate-x-[50%] w-full text-[14px] leading-[14px]",children:E.jsx(Oi,{player:d})}),E.jsx(Kr,{className:"!absolute -top-[10%] left-[50%] -translate-x-[50%] scale-75",username:d.username,status:G}),!1]})]}),E.jsx("div",{className:"h-[70px]",children:c===2&&E.jsx("div",{className:"flex items-center justify-center h-[70px] max-w-[100%] mx-auto",children:[...Array(m)].map((p1,l2,E2)=>E.jsx(_8,{className:"-mx-[10px] h-[60px] w-[40px]",style:{transform:y2({i:l2,n:E2.length,isReverse:!0})}}))})})]}),c===2&&E.jsxs("div",{className:"Side absolute left-0 top-[50%] -translate-y-[50%]",children:[!!g&&E.jsx("div",{className:"absolute -top-[48px] right-[48px] text-white/50 text-[16px] leading-[16px] font-semibold",children:g}),E.jsxs("div",{className:"relative -top-[20px] w-[75px] h-[110px]",children:[g>=1&&V&&E.jsx(_8,{card:V,className:"absolute -left-[30px] top-[50%] -translate-y-[50%] w-[75px] h-[110px] rotate-90"}),g>=2&&E.jsxs("div",{className:"relative -left-[50px] w-[75px] h-[110px]",children:[E.jsx(_8,{className:"absolute inset-0 w-[75px] h-[110px]"}),g>=3&&E.jsx(_8,{className:"absolute inset-0 w-[75px] h-[110px] rotate-6"})]})]})]}),E.jsxs("div",{className:"Center flex items-center justify-center",children:[!c&&!d&&E.jsxs("div",{className:"px-4",children:[E.jsx("div",{className:"-mt-[30px] -mb-[50px]",children:E.jsx("img",{src:vE,className:"mx-auto w-[294px] h-[232px]"})}),E.jsxs("div",{className:"max-w-[470px] mx-auto text-[24px] leading-[29px] font-bold",children:[E.jsx("span",{children:C("sendRoomLink")})," ",E.jsx(D1,{wrapperClassName:"inline-block",onClick:()=>{A("https://t.me/durakton_chat/4")},children:E.jsxs("span",{className:"text-nowrap",children:[E.jsx("img",{src:wE,className:"w-[28px] h-[28px] inline-block"})," ",E.jsx("span",{className:"underline text-main",children:C("ourChat")})]})})," ",E.jsx("span",{children:C("toStart")})]}),E.jsxs("div",{className:"mt-2 text-text/60 text-[16px] leading-[18px] font-medium",children:[E.jsxs("div",{className:"text-main",children:[r.invite," ",C("points_")," ",C("forEveryFren")]}),E.jsxs("div",{className:"text-main",children:[r.win," ",C("points_")," ",C("forEveryWin")]}),E.jsx("div",{})]})]}),!c&&!!d&&E.jsx("div",{className:"px-[82px] text-[24px] leading-[29px] font-bold",children:C("tapReadyToStart")}),c===2&&E.jsx("div",{className:"Groups flex flex-col gap-8",children:V8.map((p1,l2)=>E.jsx("div",{className:"flex items-center justify-center gap-8",children:p1.map((E2,k8)=>E.jsxs("div",{className:"Group relative h-[79px] w-[54px]",children:[E.jsx(_8,{className:F1("absolute left-0 top-0 w-full h-full",E2[1]&&"-rotate-12"),card:E2[0]}),E2[1]&&E.jsx(_8,{className:"absolute left-0 top-0 w-full h-full rotate-12",card:E2[1]})]},`group-${k8}`))},`row-${l2}`))}),c===100&&E.jsxs("div",{className:"flex flex-col items-center",children:[(J==="win"||J==="draw")&&E.jsx("img",{src:yE,className:"w-[148px] h-[163px]"}),J==="lose"&&E.jsx("img",{src:EE,className:"w-[186px] h-[112px]"}),E.jsxs("div",{className:"text-[48px] leading-[48px] font-extrabold",children:[J==="win"&&E.jsx("div",{className:"text-main",children:C("win")}),J==="draw"&&E.jsx("div",{className:"text-[#EBECEA]",children:C("draw")}),J==="lose"&&E.jsx("div",{className:"text-[#DF0000]",children:C("lose")})]}),!!X&&E.jsxs("div",{className:"p-[10px] text-[36px] leading-[36px] font-semibold",style:{textShadow:"-2px -2px #454456, -2px 2px #454456, 2px 2px #454456, 2px -2px #454456"},children:["+",X," ",C("points_")]}),!!f1&&E.jsxs("div",{className:"text-main text-[18px] leading-[21px] font-semibold",children:["+",f1," ",C("pointsForInviting")]}),E.jsxs("div",{className:"mt-6 flex flex-col gap-[10px] p-[10px]",children:[E.jsx(oE,{}),E.jsx("div",{className:"text-[16px] leading-[18px] text-text/60 font-medium",children:C("reviewGameplay")})]})]})]}),E.jsx("div",{className:"Bottom"}),h0&&E.jsxs(Mf,{children:[E.jsxs("div",{className:"mx-auto mb-[50px] max-w-[280px] text-[16px] leading-[18px] font-medium text-text/60",children:[E.jsx("div",{children:C(c===2?"gameWillBeLost":"gameWillBeLost_")}),E.jsx("div",{children:C("areYouSure")})]}),E.jsxs("div",{className:"flex flex-col gap-4",children:[E.jsx(D1,{theme:"big",onClick:()=>{c6(!1)},children:C("stayAndPlay")}),E.jsx(D1,{theme:"big",className:"",onClick:()=>{L2(),c6(!1),e(null),n("/")},children:C(c===2?"leaveAndLose":"leave")})]})]})]})},SE="/durak/assets/watch-1306bab0.png",VE=()=>{const{t:C}=S8(),{openLink:e}=j7();return E.jsxs(B7,{bottom:E.jsx(n0,{}),children:[E.jsx("div",{className:"Top"}),E.jsxs("div",{className:"Center py-10 px-4 flex flex-col items-center justify-center",children:[E.jsx("img",{className:"w-[210px] h-[166px] grayscale",src:SE}),E.jsx("div",{className:"mt-8 max-w-[400px] text-[24px] leading-[29px] font-bold",children:C("watchRules")}),E.jsx(D1,{theme:"big",wrapperClassName:"mt-10",onClick:()=>{e("https://youtu.be/3JagmUmUJOc")},children:C("watchVideo")})]}),E.jsx("div",{className:"Bottom"})]})},bE=HL([{path:"/",element:E.jsx(MC,{}),errorElement:E.jsx(MC,{})},{path:"*",element:E.jsx(MC,{})},{path:"/find",element:E.jsx(ME,{})},{path:"/points",element:E.jsx(gE,{})},{path:"/rules",element:E.jsx(VE,{})},{path:"/room",element:E.jsx(xE,{})}]),kE=()=>{const C=o.useMemo(()=>new Cc,[]),{isLaunchedFirstTime:e,setIsLauncedFirstTime:t}=rm(),[n,r]=o.useState(!1);return o.useEffect(()=>{n||(r(!0),O2("Session start"))},[n,r]),o.useEffect(()=>{e&&(t(!1),O2("Launch first time"))},[e,t]),E.jsx(ic,{client:C,children:E.jsx(FL,{router:bE})})};ZC.createRoot(document.getElementById("root")).render(E.jsx(Oe.StrictMode,{children:E.jsx(kE,{})})); diff --git a/index.html b/index.html index aa12dec..70a0ce1 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ Durak Town - +