Play with Deck 🂠
Policy: b5c4f1...4554
Owner:
Metadata:
{
"name": "Play with Deck 🂠",
"site": "https://ne0.xyz",
"coder": "@0xD9E0 👨🏻💻",
"files": [
{
"src": [
"data:text/html;charset=UTF-8,",
"<html><head><meta charset='utf-8'><meta name='viewport' co",
"ntent='width=device-width, initial-scale=1'><title>Play wi",
"th deck %23onchain</title><style>html,body{height:100%;pad",
"ding:0;margin:0;background-color:%2335654d;color:%23333;fo",
"nt-family:'Arial';user-select:none;}%23co{position:fixed;t",
"op:60%;left:50%;transform:translate3d(-50%, -50%, 0);}%23t",
"b{position:fixed;background:rgba(0,0,0,0.3);top:0;left:0;w",
"idth:100%;border-bottom:2px black solid;text-align:center;",
"}%23tb button{margin:7px 3px;height:30px;font-size:14;padd",
"ing:7px;font-family:arial !important;border-radius:4px !im",
"portant;color:black !important;border:none !important;}.me",
"{position:fixed;top:60px;font-size:8px;text-align:center;w",
"idth:100%;}.c{position:absolute;left:-31px;top:-42px;width",
":62px;height:78px;background-color:%23f6f1e9;border-radius",
":6px;box-shadow:0 1px 1px rgba(0,0,0,0.15);cursor:default;",
"font-size:88px;}.f::before{margin-top:-20px;display:block;",
"}.back::before{content:'🂠';color:blue;margin-top:-20px;dis",
"play:block;border-radius:6px;}.s, .t{color:black;}.h, .d{c",
"olor:red;}.c.s.r1 .f::before{content:'🂡'}.c.s.r2 .f::befor",
"e{content:'🂢'}.c.s.r3 .f::before{content:'🂣'}.c.s.r4 .f::b",
"efore{content:'🂤'}.c.s.r5 .f::before{content:'🂥'}.c.s.r6 .",
"f::before{content:'🂦'}.c.s.r7 .f::before{content:'🂧'}.c.s.",
"r8 .f::before{content:'🂨'}.c.s.r9 .f::before{content:'🂩'}.",
"c.s.r10 .f::before{content:'🂪'}.c.s.r11 .f::before{content",
":'🂫'}.c.s.r12 .f::before{content:'🂭'}.c.s.r13 .f::before{c",
"ontent:'🂮'}.c.h.r1 .f::before{content:'🂱'}.c.h.r2 .f::befo",
"re{content:'🂲'}.c.h.r3 .f::before{content:'🂳'}.c.h.r4 .f::",
"before{content:'🂴'}.c.h.r5 .f::before{content:'🂵'}.c.h.r6 ",
".f::before{content:'🂶'}.c.h.r7 .f::before{content:'🂷'}.c.h",
".r8 .f::before{content:'🂸'}.c.h.r9 .f::before{content:'🂹'}",
".c.h.r10 .f::before{content:'🂺'}.c.h.r11 .f::before{conten",
"t:'🂻'}.c.h.r12 .f::before{content:'🂽'}.c.h.r13 .f::before{",
"content:'🂾'}.c.d.r1 .f::before{content:'🃁'}.c.d.r2 .f::bef",
"ore{content:'🃂'}.c.d.r3 .f::before{content:'🃃'}.c.d.r4 .f:",
":before{content:'🃄'}.c.d.r5 .f::before{content:'🃅'}.c.d.r6",
" .f::before{content:'🃆'}.c.d.r7 .f::before{content:'🃇'}.c.",
"d.r8 .f::before{content:'🃈'}.c.d.r9 .f::before{content:'🃉'",
"}.c.d.r10 .f::before{content:'🃊'}.c.d.r11 .f::before{conte",
"nt:'🃋'}.c.d.r12 .f::before{content:'🃍'}.c.d.r13 .f::before",
"{content:'🃎'}.c.t.r1 .f::before{content:'🃑'}.c.t.r2 .f::be",
"fore{content:'🃒'}.c.t.r3 .f::before{content:'🃓'}.c.t.r4 .f",
"::before{content:'🃔'}.c.t.r5 .f::before{content:'🃕'}.c.t.r",
"6 .f::before{content:'🃖'}.c.t.r7 .f::before{content:'🃗'}.c",
".t.r8 .f::before{content:'🃘'}.c.t.r9 .f::before{content:'🃙",
"'}.c.t.r10 .f::before{content:'🃚'}.c.t.r11 .f::before{cont",
"ent:'🃛'}.c.t.r12 .f::before{content:'🃝'}.c.t.r13 .f::befor",
"e{content:'🃞'}.c.joker.r1 .f::before{content:'🂿'}.c.joker.",
"r2 .f::before{content:'🃏';margin-left:-10px;margin-top:37p",
"x;font-size:82px;}.c.joker.r3 .f::before{content:'🃟'}@medi",
"a (max-width:319px){%23tb{display:none;}}</style></head><b",
"ody><div id='co'></div><div id='tb'></div><script>uu=13;wi",
"=window;dc=document;cE=dc.createElement.bind(dc);function ",
"startWinning(){var n=cE=dc.createElement.bind(dc)('div');n",
".classList.add('d'),n.style[transform]=translate(Math.rand",
"om()*wi.innerWidth-wi.innerWidth/2+'px',Math.random()*wi.i",
"nnerHeight-wi.innerHeight/2+'px'),$co.appendChild(n);for(v",
"ar t=Math.floor(2*Math.random())?'front':'back',e=0;e<55;e",
"++)addWinningc(n,e,t);setTimeout(startWinning,Math.round(1",
"e3*Math.random()))}function addWinningc(n,t,e){var o=D.c(5",
"4-t),i=20*(55-t),t=D.animationFrames,r=D.ease;o.enableFlip",
"ping(),o.sS('front'===e?'front':'back'),o.mount(n),o.$el.s",
"tyle.display='none';t(i,1e3).start(function(){o.x=0,o.y=0,",
"o.$el.style.display=''}).progress(function(n){var t=n,n=r.",
"cubicIn(n);o.x=0+-500*t,o.y=0+500*n,o.$el.style[transform]",
"=translate(o.x+'px',o.y+'px')}).end(function(){o.unmount()",
"})}function pM(n){var t=D.animationFrames,e=D.ease,o=cE=dc",
".createElement.bind(dc)('p');o.classList.add('me'),o.textC",
"ontent=n,dc.body.appendChild(o),o.style[transform]=transla",
"te(wi.innerWidth+'px',0);var i=wi.innerWidth;t(1e3,700).pr",
"ogress(function(n){n=e.cubicInOut(n),o.style[transform]=tr",
"anslate(i-i*n+'px',0)}),t(6e3,700).start(function(){i=wi.i",
"nnerWidth}).progress(function(n){n=e.cubicInOut(n),o.style",
"[transform]=translate(-i*n+'px',0)}).end(function(){dc.bod",
"y.removeChild(o)})}D=function(){function b(n,t){var n=Date",
".now()+n,e={start:n,end:n+t};c.push(e),u||(u=!0,requestAni",
"mationFrame(i));var o={start:function(n){return e.startcb=",
"n,o},progress:function(n){return e.progresscb=n,o},end:fun",
"ction(n){return e.endcb=n,o}};return o}function i(){var n=",
"Date.now();if(c.length){for(var t,e,o=0;o<c.length;o++)n<(",
"e=c[o]).start||(e.started||(e.started=!0,e.startcb&&e.star",
"tcb()),t=(n-e.start)/(e.end-e.start),e.progresscb&&e.progr",
"esscb(t<1?t:1),n>e.end&&(e.endcb&&e.endcb(),c.splice(o--,1",
")));requestAnimationFrame(i)}else u=!1}function l(n){if(vo",
"id 0!==C[n])return C[n];if(void 0!==w[n])return C[n]=n;if(",
"void 0!==w[t=o[i]+e])return C[n]=t}function x(n,t,e){retur",
"n e=e||0,(o=void 0===o?function(){var n=l('transform'),t=c",
"E=dc.createElement.bind(dc)('p');return dc.body.appendChil",
"d(t),t.style[n]='translate3d(1px,1px,1px)',o=null!=(o=t.st",
"yle[n])&&o.length&&'none'!==o,dc.body.removeChild(t),o}():",
"o)?'translate3d('+n+', '+t+', '+e+')':'translate('+n+', '+",
"t+')'}function p(n){return cE=dc.createElement.bind(dc)(n)",
"}function d(n){function t(n){function t(n){s&&('mousemove'",
"===n.type?(i.x=n.clientX,i.y=n.clientY):(i.x=n.touches[0].",
"clientX,i.y=n.touches[0].clientY),g.style[v]=x(Math.round(",
"k.x+i.x-o.x)+'px',Math.round(k.y+i.y-o.y)+'px')+(k.rot?' r",
"otate('+k.rot+'deg)':''))}function e(n){d&&Date.now()-r<20",
"0&&k.sS('front'===k.side?'back':'front'),'mouseup'===n.typ",
"e?(y(wi,'mousemove',t),y(wi,'mouseup',e)):(y(wi,'touchmove",
"',t),y(wi,'touchend',e)),s&&(k.x=k.x+i.x-o.x,k.y=k.y+i.y-o",
".y)}var o={},i={},r=Date.now();n.preventDefault(),'mousedo",
"wn'===n.type?(o.x=i.x=n.clientX,o.y=i.y=n.clientY,m(wi,'mo",
"usemove',t),m(wi,'mouseup',e)):(o.x=i.x=n.touches[0].clien",
"tX,o.y=i.y=n.touches[0].clientY,m(wi,'touchmove',t),m(wi,'",
"touchend',e)),s&&(g.style[v]=x(k.x+'px',k.y+'px')+(k.rot?'",
" rotate('+k.rot+'deg)':''),g.style.zIndex=E++)}var e,o,v=l",
"('transform'),i=n%uu+1,r=n/13|0,u=(52-n)/4,g=p('div'),a=p(",
"'div'),c=p('div'),s=!1,d=!1,k={i:n,r:i,suit:r,pos:n,$el:g,",
"mount:function(n){n.appendChild(g),k.$root=n},unmount:func",
"tion(){k.$root&&k.$root.removeChild(g),k.$root=null},sS:fu",
"nction(n){'front'===n?('back'===k.side&&g.removeChild(c),k",
".side='front',g.appendChild(a),k.setrSuit(k.r,k.suit)):('f",
"ront'===k.side&&g.removeChild(a),k.side='back',g.appendChi",
"ld(c),g.setAttribute('class','c'))}},f=$.modules;for(e in ",
"a.classList.add('f'),c.classList.add('back'),g.style[v]=x(",
"-u+'px',-u+'px'),k.x=-u,k.y=-u,k.z=u,k.rot=0,k.sS('back'),",
"m(g,'mousedown',t),m(g,'touchstart',t),f)o=f[e],o.c&&o.c(k",
");return k.animateTo=function(n){var e,o,i,r,u,a,t=n.delay",
",c=n.duration,s=n.x,d=void 0===s?k.x:s,s=n.y,f=void 0===s?",
"k.y:s,s=n.rot,l=void 0===s?k.rot:s,p=n.ease,m=n.onStart,y=",
"n.onProgress,h=n.onComplete;b(t,c).start(function(){e=k.x|",
"|0,o=k.y||0,i=k.rot||0,m&&m()}).progress(function(n){var t",
"=M[p||'cubicInOut'](n);r=d-e,u=f-o,a=l-i,y&&y(n,t),k.x=e+r",
"*t,k.y=o+u*t,k.rot=i+a*t,g.style[v]=x(k.x+'px',k.y+'px')+(",
"a?'rotate('+k.rot+'deg)':'')}).end(function(){h&&h()})},k.",
"setrSuit=function(n,t){t=0===(t=t)?'s':1===t?'h':2===t?'t'",
":3===t?'d':'joker';g.setAttribute('class','c '+t+' r'+n)},",
"k.setrSuit(i,r),k.enableDragging=function(){s||(s=!0,g.sty",
"le.cursor='move')},k.enableFlipping=function(){d=d||!0},k.",
"disableFlipping=function(){d=d&&!1},k.disableDragging=func",
"tion(){s&&(s=!1,g.style.cursor='')},k}function m(n,t,e){n.",
"addEventListener(t,e)}function y(n,t,e){n.removeEventListe",
"ner(t,e)}function r(){return wi.getComputedStyle(dc.body).",
"getPropertyValue('font-size').slice(0,-2)}function a(n){re",
"turn n*Math.PI/180}function f(n){function i(n){n&&(e.push(",
"n),1===e.length&&function t(){e[0](function(n){if(n)throw ",
"n;(e=e.slice(1)).length&&t()})}())}var r=Array.prototype,e",
"=[];return n.queue=i,n.queued=function(o){return function(",
"){var t=this,e=arguments;i(function(n){o.apply(t,r.concat.",
"apply(n,e))})}},n}function h(n){var o={};return(n=n||{}).o",
"n=function(n,t,e){o[n]||(o[n]=[]),o[n].push({cb:t,ctx:e})}",
",n.one=function(n,t,e){o[n]||(o[n]=[]),o[n].push({cb:t,ctx",
":e,once:!0})},n.off=function(n,t){return n?t?void(o[n]=o[n",
"].filter(function(n){return n.cb!==t})):void(o[n]=[]):void",
"(o={})},n.trigger=function(n){var t=this,e=Array.prototype",
".slice(arguments,1);(o[n]||[]).filter(function(n){return n",
".cb.apply(t,e),!n.once})},n}function $(n){var t,e,o,i=new ",
"Array(n?55:52),r=p('div'),u=h({mount:function(n){(t=n).app",
"endChild(r)},unmount:function(){t.removeChild(r)},cs:i,$el",
":r}),a=$.modules;for(e in f(u),a)o=a[e],o.d&&o.d(u);r.clas",
"sList.add('d');for(var c,s=i.length;s;s--)(c=i[s-1]=d(s-1)",
").sS('back'),c.mount(r);return u}var u,c=[];wi.requestAnim",
"ationFrame||(wi.requestAnimationFrame=function(n){setTimeo",
"ut(n,0)});var o,s,v,g,k,w=cE=dc.createElement.bind(dc)('p'",
").style,C={},E=52,M={linear:function(n){return n},quadIn:f",
"unction(n){return n*n},quadOut:function(n){return n*(2-n)}",
",quadInOut:function(n){return n<.5?2*n*n:(4-2*n)*n-1},cubi",
"cIn:function(n){return n*n*n},cubicOut:function(n){return-",
"-n*n*n+1},cubicInOut:function(n){return n<.5?4*n*n*n:(n-1)",
"*(2*n-2)*(2*n-2)+1},quartIn:function(n){return n*n*n*n},qu",
"artOut:function(n){return 1- --n*n*n*n},quartInOut:functio",
"n(n){return n<.5?8*n*n*n*n:1-8*--n*n*n*n},quintIn:function",
"(n){return n*n*n*n*n},quintOut:function(n){return 1+--n*n*",
"n*n*n},quintInOut:function(n){return n<.5?16*n*n*n*n*n:1+1",
"6*--n*n*n*n*n}},n={d:function(t){t.flip=t.queued(function(",
"n,e){var o=t.cs.filter(function(n){return'front'===n.side}",
").length/t.cs.length;t.cs.forEach(function(n,t){n.sS(e||(.",
"5<o?'back':'front'))}),n()})}},t={d:function(n){n.sort=n.q",
"ueued(function(e,o){var i=n.cs;i.sort(function(n,t){return",
" o?n.i-t.i:t.i-n.i}),i.forEach(function(n,t){n.sort(t,i.le",
"ngth,function(n){n===i.length-1&&e()},o)})})},c:function(u",
"){var a=u.$el;u.sort=function(n,t,e,o){var i=n/4,r=10*n;u.",
"animateTo({delay:r,duration:400,x:-i,y:-150,rot:0,onComple",
"te:function(){a.style.zIndex=n}}),u.animateTo({delay:500+r",
",duration:400,x:-i,y:-i,rot:0,onComplete:function(){e(n)}}",
")}}},e={d:function(n){n.sh=n.queued(function(e){var o=n.cs",
";s=r(),function(n){for(var t,e,o=n.length-1;o;o--)t=Math.r",
"andom()*o|0,e=n[o],n[o]=n[t],n[t]=e}(o),o.forEach(function",
"(n,t){n.pos=t,n.sh(function(n){n===o.length-1&&e()})})})},",
"c:function(r){var u=r.$el;r.sh=function(n){var t,e=r.pos,o",
"=e/4,i=2*e;r.animateTo({delay:i,duration:200,x:(t=40*Math.",
"random()+20,(Math.round(Math.random())?-1:1)*t*s/16),y:-o,",
"rot:0}),r.animateTo({delay:200+i,duration:200,x:-o,y:-o,ro",
"t:0,onStart:function(){u.style.zIndex=e},onComplete:functi",
"on(){n(e)}})}}},D={d:function(t){t.poker=t.queued(function",
"(e){var n=t.cs,o=n.length;v=r(),n.slice(-5).reverse().forE",
"ach(function(t,n){t.poker(n,o,function(n){t.sS('front'),4=",
"==n&&e()})})})},c:function(o){var i=o.$el;o.poker=function",
"(n,t,e){o.animateTo({delay:250*n,duration:250,x:Math.round",
"(70*(n-2.05)*v/16),y:Math.round(-110*v/16),rot:0,onStart:f",
"unction(){i.style.zIndex=t-1+n},onComplete:function(){e(n)",
"}})}}},q={d:function(n){n.intro=n.queued(function(e){var o",
"=n.cs;o.forEach(function(t,n){t.sS('front'),t.intro(n,func",
"tion(n){b(250,0).start(function(){t.sS('back')}),n===o.len",
"gth-1&&e()})})})},c:function(i){var r=l('transform'),u=i.$",
"el;i.intro=function(n,t){var e=500+10*n,o=n/4;u.style[r]=x",
"(-o+'px','-250px'),u.style.opacity=0,i.x=-o,i.y=-250-o,i.r",
"ot=0,i.animateTo({delay:e,duration:1e3,x:-o,y:-o,onStart:f",
"unction(){u.style.zIndex=n},onProgress:function(n){u.style",
".opacity=n},onComplete:function(){u.style.opacity='',t&&t(",
"n)}})}}},I={d:function(n){n.fan=n.queued(function(e){var o",
"=n.cs,i=o.length;g=r(),o.forEach(function(n,t){n.fan(t,i,f",
"unction(n){n===o.length-1&&e()})})})},c:function(r){var u=",
"r.$el;r.fan=function(n,t,e){var o=n/4,i=10*n,t=n/(t-1)*260",
"-130;r.animateTo({delay:i,duration:300,x:-o,y:-o,rot:0}),r",
".animateTo({delay:300+i,duration:300,x:55*Math.cos(a(t-90)",
")*g/16,y:55*Math.sin(a(t-90))*g/16,rot:t,onStart:function(",
"){u.style.zIndex=n},onComplete:function(){e(n)}})}}},S={d:",
"function(n){n.bysuit=n.queued(function(t){var e=n.cs;k=r()",
",e.forEach(function(n){n.bysuit(function(n){n===e.length-1",
"&&t()})})})},c:function(e){var o=e.r,i=e.suit;e.bysuit=fun",
"ction(n){var t=e.i;e.animateTo({delay:10*t,duration:400,x:",
"-Math.round(8*(6.75-o)*k/16),y:-Math.round(92*(1.5-i)*k/16",
"),rot:0,onComplete:function(){n(t)}})}}};return $.animatio",
"nFrames=b,$.ease=M,$.modules={bysuit:S,fan:I,intro:q,poker",
":D,sh:e,sort:t,flip:n},$.c=d,$.prefix=l,$.translate=x,$}()",
";var prefix=D.prefix,transform=prefix('transform'),transla",
"te=D.translate,$co=dc.getElementById('co'),$tb=dc.getEleme",
"ntById('tb'),$sort=cE=dc.createElement.bind(dc)('button'),",
"$sh=cE=dc.createElement.bind(dc)('button'),$bysuit=cE=dc.c",
"reateElement.bind(dc)('button'),$fan=cE=dc.createElement.b",
"ind(dc)('button'),$poker=cE=dc.createElement.bind(dc)('but",
"ton'),$flip=cE=dc.createElement.bind(dc)('button');$sh.tex",
"tContent='Shuffle',$sort.textContent='Sort',$bysuit.textCo",
"ntent='By suit',$fan.textContent='Fan',$poker.textContent=",
"'Deal',$flip.textContent='Flip',$tb.appendChild($flip),$tb",
".appendChild($sh),$tb.appendChild($bysuit),$tb.appendChild",
"($fan),$tb.appendChild($poker),$tb.appendChild($sort),$tb.",
"insertAdjacentHTML('beforeend','');var d=D(),acesClicked=[",
"],kC=[];d.cs.forEach(function(n,e){function t(){var n;if(e",
"%uu==0)acesClicked[e]=!0,4===acesClicked.filter(function(n",
"){return n}).length&&(dc.body.removeChild($tb),d.$el.style",
".display='none',setTimeout(function(){startWinning()},250)",
");else if(e%uu==12){if(kC&&(kC[e]=!0,4===kC.filter(functio",
"n(n){return n}).length)){for(var t=0;t<3;t++)(n=D.c(52+t))",
".mount(d.$el),n.$el.style[transform]='scale(0)',n.sS('fron",
"t'),n.enableDragging(),n.enableFlipping(),d.cs.push(n);d.s",
"ort(!0),kC=!1}}else acesClicked=[],kC=kC&&[]}n.enableDragg",
"ing(),n.enableFlipping(),n.$el.addEventListener('mousedown",
"',t),n.$el.addEventListener('touchstart',t)}),$sh.addEvent",
"Listener('click',function(){d.sh(),d.sh()}),$sort.addEvent",
"Listener('click',function(){d.sort()}),$bysuit.addEventLis",
"tener('click',function(){d.sort(!0),d.bysuit()}),$fan.addE",
"ventListener('click',function(){d.fan()}),$flip.addEventLi",
"stener('click',function(){d.flip()}),$poker.addEventListen",
"er('click',function(){d.queue(function(n){d.cs.forEach(fun",
"ction(n,t){setTimeout(function(){n.sS('back')},7.5*t)}),n(",
")}),d.sh(),d.sh(),d.poker()}),d.mount($co),d.intro(),d.sor",
"t();var randomDelay=1e4+3e4*Math.random();setTimeout(funct",
"ion(){pM('Psst..I want to share a secret with you...')},ra",
"ndomDelay),setTimeout(function(){pM('...try clicking all k",
"ings and nothing in between...')},randomDelay+5e3),setTime",
"out(function(){pM('...have fun ;)')},randomDelay+1e4);</sc",
"ript></body></html>"
],
"mediaType": "text/html"
}
],
"image": [
"data:image/svg+xml;utf8,<svg viewBox='0 0 78 100' xmlns='http://",
"www.w3.org/2000/svg' style='background-color:%23f6f1e9;border-ra",
"dius:6px;'><text y='79' fill='blue' style='font-family:arial;fo",
"nt-size:110;'>🂠</text></svg>"
],
"onchain": "✅",
"collection": "Hold 'em! 🂠"
}








