// File: contracts/ArtScript.sol



// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
import "@openzeppelin/contracts/access/Ownable.sol";

contract ArtScript is Ownable {
    string public constant PROJECT_NAME = "Rad Impressions";
    string public constant ARTIST_NAME = "Frank Force";
    string public externalLibraryUsed = "None";
    string public twofivesixLibraryUsed = "None";
    string public constant LICENSE = "NFT License 2.0";
    string public constant ARTSCRIPT =
        "'use strict';function aa(t){return t.canvas.getContext('webgl2',{preserveDrawingBuffer:!0})}function ba(){var t=c;if(!t.R){var a=aa(t);if(!a)throw Error('Could not get WebGL context!');var r='const float rSS=.6,rMR=.1,rA=.001;vec3 getColor(vec3 P,vec3 D);vec2 sD(vec3 p);vec2 rotate(vec2 v,float a){return v*cos(a)+vec2(-v.y,v)*sin(a);}vec3 GN3(vec3 p,int o);void mainImage(out vec4 fragColor,vec2 fragCoord){vec3 total=vec3(0);for(int m=0;m<AA;m++)for(int n=0;n<AA;n++){vec2 offset=vec2(float(m),float(n))/float(AA)-.5,uv=(2.*(fragCoord+offset)-iResolution.xy)/iResolution.y,uvO=uv;float MS=200.;uv=BNW||PAL?floor(uv*MS)/MS:uv;vec3 p=vec3(0,50,0)+(.5-GN3(uv.xyy*W_F+RS,5))*W_S,D=mat3(vec3(1,0,0),vec3(0,0,1),vec3(0,-1,0))*normalize(vec3(uv,1./.3)),color=getColor(p,D),bn=B_N*GN3(color*4.+RS,3);float v=(color.x+color.y+color.z)/3.;vec2 uvb=mod(uv*MS,4.);float bv=QUANT?0.:float(int[](0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5)[int(uvb.x)+int(uvb.y)*4])/16.;const float P=4.;color=GRAY?vec3(v):BNW?vec3(v*1.2-.1>bv?B_C:vec3(0)):PAL||QUANT?floor(color*P+.7+(bv-.5)/P)/P:color;vec3 tb=INV_B?1.-color:BNW?B_C:B_C+.1-.2*GN3(vec3(uvO*1e3,RS),3);float aspect=iResolution.x/iResolution.y;total+=B_S>0.&&(abs(uv.x)>(1.-B_S+bn.x)*aspect|| abs(uv.y)>(1.-(B_S-bn.y)*aspect))?tb:color;}total/=float(AA*AA);fragColor=vec4(INVERT?1.-total:total,1.);}vec3 H(vec3 p){p=dot(p=fract(vec3(.0993,.1011,.1003)*p),33.333+p.yxz)+p;return fract(p.zyx*(p.yxx+p.xxy));}vec3 noise3(vec3 p){const vec2 o=vec2(1,0);vec3 i=floor(p),f=smoothstep(0.,1.,fract(p)),r[8];for(int j=0;j<8;++j){vec3 z=vec3((j&1)==0?0.:1.,(j&2)==0?0.:1.,(j&4)==0?0.:1.);r[j]=H(i+z);}return mix(mix(mix(r[0],r[1],f.x),mix(r[2],r[3],f.x),f.y),mix(mix(r[4],r[5],f.x),mix(r[6],r[7],f.x),f.y),f.z);}vec3 GN3(vec3 p,int o){float f=1.,a=1.,ta=a;vec3 t=vec3(0);for(int i=o;--i>=0;){t+=a*noise3(f*p);ta+=a/=2.;f*=2.1;}return t/ta;}vec2 raycast(vec3 p,vec3 D,bool R){float r=1e4,t=rMR,n=1e9;vec2 e=vec2(1e4);for(int i=R?50:100;rA<n&&--i>0;){vec2 d=sD(p+t*D);if(d.x*e.x*e.x<n*t*t){n=d.x;e=vec2(t,d.y);}t+=d.x*rSS;if(t>r)return vec2(r,-1);}return e;}float getShadow(vec3 p,vec3 D,float S,float R){float L=1e9,s=1.,t=rMR;for(int i=0;rA<s&&++i<100;){float d=sD(p+t*D).x,x=d*d/(2.*L),y=d*d-x*x;if(y>0.&&t-x>0.)s=min(s,sqrt(y)/(t-x)/S);L=d;t+=d*rSS;if(t>R)return smoothstep(0.,1.,s);}return 0.;}float gAO(vec3 p,vec3 normal){float s=.2,c=.3,o=0.;for(int i=0;++i<5;){float d=c*float(i),a=sD(p+d*normal).x;o+=max((d-a)/d,0.);}return max(1.-o*s,0.);}vec3 gDL(vec3 lD,vec3 lC,float lS,vec3 p,vec3 D,vec3 normal,vec3 dC,float sP){float dd=dot(lD,normal);if(dd<0.)return vec3(0);float sa=getShadow(p,lD,lS,1e4);vec3 d=(dd*sa)*lC*dC;if(sP==0.)return d;vec3 r=reflect(D,normal);float sd=pow(max(dot(lD,r),0.),1.+sP);return d+vec3((sd*sa)*lC);}float dBox(vec3 p,vec3 s,float e){vec3 d=abs(p)-s+e;return min(max(d.x,max(d.y,d.z)),0.)+length(max(d,0.))-e;}float dCyl(vec3 p,vec2 s,float e){vec2 d=abs(vec2(length(p.xz), p.y))-s+e;return min(max(d.x,d.y),0.)+length(max(d,0.))-e;}vec3 poWave(vec3 p,vec3 a,float F,float P,float A){p.xz=rotate(p.xz,A);return p+a*sin(p.x*F+P);}vec3 poRepeat(in vec3 p,in vec3 s,in vec3 r){return(p+=s*r/2.)-s*clamp(round(p/s),vec3(0.),r);}vec3 poTwist(vec3 p,float twist,vec3 offset){vec2 v=p.xz+offset.xz;float l=v.x*v.x+v.y*v.y;return vec3(p.y,rotate(p.xz,twist*l*.05)).yxz;}vec2 CU(vec2 d1,vec2 d2){return d1.x<d2.x?d1:d2;}vec2 CS(vec2 d1,vec2 d2){return -d1.x>d2.x?vec2(-d1.x,d1.y):d2;}vec2 CUS(vec2 d1,vec2 d2,float k){float p=clamp(.5+.5*(d2.x-d1.x)/k,0.,1.);return vec2(mix(d2.x,d1.x,p)-k*p*(1.-p),d2.y);}vec2 CSS(vec2 d1,vec2 d2,float k){float p=clamp(.5-.5*(d2.x+d1.x)/k,0.,1.);return vec2(mix(d2.x,-d1.x,p)+k*p*(1.-p),d2.y);}vec3 getNormal(vec3 p){vec3 t=vec3(0);for(int j=0;j<4;++j){vec3 e=rA*(j==3?vec3(1):vec3(j==0?1:-1,j==1?1:-1,j==2?1:-1));t+=e*sD(p+e).x;}return normalize(t);}',o=[];for(var s of t.j)s.C(o);var n=t.canvas;for(var i of(s=n.width,n=n.height,r=`// RAD IMPRESSIONS BY FRANK FORCE\\n// HASH = ${inputData.hash}\\nconst vec3 B_C=${t.borderColor.g()};const bool INVERT=${!!t.Y},QUANT=${!!t.A},PAL=${!!t.l},BNW=${!!t.h},GRAY=${!!t.v},INV_B=${!!t.X};const float W_S=${e(t.T||0)},W_F=${e(t.da||0)},B_S=${e(t.I)},B_N=${e(t.U)},RS=${e(t.ma)};const vec3 iResolution=${h(s,n,1).g()};const int AA=${ia||1};`+r,s=[],t.j))i.K(s);for(i=s.length;i--;){for(var v of(r+=`vec2 group${i}Distance(vec3 p){`,r+='vec3 gp=p;',r+='vec2 distance=vec2(1e9);',(n=s[i]).j))r+=`distance = ${v.u.g(v.g()+', distance')};`;r+=`return vec2(distance.x,${n.Z});}`}r+='vec2 sD(vec3 p){vec3 gp=p;',t.V&&(r+=`vec3 warp=p+${e(t.V)}*vec3(1,0,1)*vec3(.5-noise3(vec3(p.xz,0)*${e(t.ha)}+RS));`,r+='gp=warp;'),r+='vec2 distance=vec2(1e9);';for(const e of t.j)r+=`distance=${e.u.g(e.g()+', distance')};`;for(r=r+'return distance;}vec3 getColor(vec3 P,vec3 D){vec3 pC=vec3(1),fC=vec3(0);for(int rc=0;++rc<=3;){vec2 R=raycast(P,D,rc>1);float hD=R.x;int hmi=int(R.y);'+`vec3 fog=${t.fa.color.g()};`,r+='if(hmi<0){fC+=fog*pC;break;}vec3 p=P+hD*D,dif=vec3(1);float sP=0.,rf=0.,rough=0.,rS=0.;vec3 normal=getNormal(p);switch(hmi){',v=0;v<o.length;++v)r+=`case ${v}:`,r+=o[v].g(),r+='break;';for(l of(r=r+'}normal=normalize(normal+(.5-GN3(p*rS+RS,4))*rough);'+`vec3 color=${t.ea.g()};\\n`,o=0,t.G))l.direction?++o:r+=`color+=${l.g()};\\n`;r=r+'struct Light{vec3 color;vec3 D;float soft;};'+`for(int li=0;li<${o};++li){Light light;`;for(let a=0,o=0;a<t.G.length;++a){var l=t.G[a];l.direction&&(r+=`if(li==${o})light=`,r+='Light(',r+=l.color.g()+', ',r+=l.direction.g()+', ',r+=e(l.pa),r+=');\\n',++o)}o=r+'color+=gDL(light.D,light.color,light.soft,p,D,normal,dif,sP);}color*=gAO(p,normal);const float fs=50.,fd=900.;float fp=smoothstep(0.,1.,(hD-fs)/fd);color*=1.-rf;fC+=pC*mix(color,fog,fp);if(rf==0.)break;P=p;D=reflect(D,normal);pC*=dif*rf*(1.-fp);}return pow(clamp(fC,0.,1.),vec3(1./2.2));}',ja=Date.now(),r=a.ARRAY_BUFFER,a.bindBuffer(r,a.createBuffer()),a.bufferData(r,new Int8Array([-3,1,1,-3,1,1]),a.STATIC_DRAW),a.enableVertexAttribArray(0),a.vertexAttribPointer(0,2,a.BYTE,0,0,0),l=a.createShader(a.VERTEX_SHADER),a.shaderSource(l,'#version 300 es\\nin vec4 p;void main(){gl_Position=p;}'),a.compileShader(l),r=a.createShader(a.FRAGMENT_SHADER),a.shaderSource(r,'#version 300 es\\nprecision highp float;out vec4 OC;'+o+'void main(){mainImage(OC,gl_FragCoord.xy);OC.a=1.;}'),a.compileShader(r),o=a.createProgram(),a.attachShader(o,l),a.attachShader(o,r),a.linkProgram(o),a=o,t.ta=l,t.sa=r,t.R=a}return a=aa(t),t=t.R,r=a&&a.getExtension&&a.getExtension('KHR_parallel_shader_compile'),(t=a&&(!r||a.getProgramParameter(t,r.COMPLETION_STATUS_KHR)))&&ja&&(console.log(`Shader built in ${((Date.now()-ja)/1e3).toFixed(2)} seconds.`),ja=0),t}class ka{constructor(){this.canvas=l,this.j=[],this.G=[]}m(t){this.j.push(t),t.oa=this}}class la{constructor(t,e,a){this.direction=t.normalize(),this.color=e,this.pa=a}}let ma;function n(t){var e=t.aa,a=t.rotation;if(0==a.x&&0==a.y&&0==a.z)e=`(${e}  - ${t.position.g()})`;else{a=t.position.g();var r=t.rotation;const o=na(h(0,1,0),r),s=na(h(0,0,1),r);e=`((${e} - ${a}) * ${r=`mat3(${na(h(1,0,0),r).g()}, ${o.g()}, ${s.g()})`})`}for(const a of t.i)a.ia&&(e=a.g(e));return e}class p{constructor(t=h()){var e=new oa,a=h(),o=void 0;o||(ma||=new r,o=ma),this.aa='p',this.position=t,this.o=o instanceof u?new r(o):o,this.u=e,this.rotation=a,this.i=[]}g(){let t=this.D();for(const e of this.i)e.ra&&(t=e.g(t));return`vec2(${t}, ${this.Z})`}C(t){this.g&&!t.includes(this.o)&&(t.push(this.o),this.o.shape=this),this.Z=t.indexOf(this.o)}K(){}}class pa extends p{constructor(){var t=h(0,1,0);super(),this.ka=t.normalize()}D(){return`dot(${n(this)}, ${this.ka.g()})`}}class qa extends p{constructor(t,e=1){super(t),this.L=e}D(){return`length(${n(this)})-${e(this.L)}`}}class ra extends p{constructor(t,e=h(1)){super(t),this.size=e,this.B=0}D(){return`dBox(${n(this)}, ${this.size.g()}, ${e(this.B)})`}}class sa extends p{constructor(t,e=1,a=1){super(t),this.L=e,this.height=a,this.B=0}D(){return`dCyl(${n(this)}, vec2(${e(this.L)}, ${e(this.height)}), ${e(this.B)})`}}class ta extends p{constructor(){super(),this.j=[],this.aa='gp'}m(t){this.j.push(t)}g(){return`group${this.ga}Distance(${n(this)})`}C(t){for(const e of this.j)e.C(t);super.C(t)}K(t){t.push(this),this.ga=t.indexOf(this);for(const e of this.j)e.K(t)}}class r{constructor(t=new u){this.color=t,this.N=this.M=this.s=0,this.O=50,t=v(x,7,14);let e=1==c.J?.3:.6;c.J&&(this.ja=t,this.$=e)}g(){let t;t='dif='+this.color.g(2)+';',t+='sP='+e(this.s)+';',t+='rf='+e(this.M)+';',t+='rough='+e(this.N)+';',t+='rS='+e(this.O)+';';const a=v(x,1e3);return this.$&&(t+=`dif=clamp(dif+${e(this.$)}*vec3(1.-2.*noise3(vec3(${a}+p.xyz/${e(this.ja)}))),0.01,1.);`),t}}class oa{constructor(t){this.H=t}g(t){return this.H?`CUS(${t}, ${e(this.H)})`:`CU(${t})`}}class ua extends oa{g(t){return this.H?`CSS(${t}, ${e(this.H)})`:`CS(${t})`}}class va{}class wa extends va{constructor(){super(),this.ia=1}g(t){return t}}class xa extends wa{constructor(t=h(10),e){super(),this.size=t,this.na=e}g(t){return`poRepeat(${t}, ${this.size.g()}, ${this.na.g()})`}}class ya extends wa{constructor(t=h(0,1,0),e=1,a=0,r=0){super(),this.amplitude=t,this.frequency=e,this.la=a,this.angle=r}g(t){return`poWave(${t}, ${this.amplitude.g()}, ${e(this.frequency)}, ${e(this.la)}, ${e(this.angle)})`}}class za extends wa{constructor(t=.5,e=h()){super(),this.qa=t,this.offset=e}g(t){return`poTwist(${t}, ${e(this.qa)}, ${this.offset.g()})`}}const y=Math.PI,Aa=t=>0>t?-t:t,Ba=(t,e)=>t<e?t:e,Ca=t=>1>t?1:t,Da=t=>0>t?0:1<t?1:t,e=t=>(t=t.toFixed(3))==(0|t)?(0|t)+'.':t,D=t=>{for(let e=t.length;e;){const a=C(x,e--);[t[e],t[a]]=[t[a],t[e]]}return t},h=(t,e,a)=>null==e&&null==a?new Ea(t,t,t):new Ea(t,e,a);function Fa(t,e){if(!e)return t;const a=Math.cos(e);return e=Math.sin(e),h(t.x*a-t.z*e,t.y,t.x*e+t.z*a)}function na(t,e){var a=-e.z;if(a){var r=Math.cos(a);a=Math.sin(a),t=h(t.x*r-t.y*a,t.x*a+t.y*r,t.z)}return t=Fa(t,-e.y),(r=-e.x)?(e=Math.cos(r),r=Math.sin(r),e=h(t.x,t.y*e-t.z*r,t.y*r+t.z*e)):e=t,e}class Ea{constructor(t=0,e=0,a=0){this.x=t,this.y=e,this.z=a}add(t){return h(this.x+t.x,this.y+t.y,this.z+t.z)}multiply(t){return h(this.x*t.x,this.y*t.y,this.z*t.z)}scale(t){return h(this.x*t,this.y*t,this.z*t)}length(){return(this.x**2+this.y**2+this.z**2)**.5}normalize(t=1){const e=this.length();return e?this.scale(t/e):h(t)}g(){return this.x==this.y&&this.y==this.z?this.x==(0|this.x)?`vec3(${0|this.x})`:`vec3(${e(this.x)})`:`vec3(${e(this.x)}, ${e(this.y)}, ${e(this.z)})`}}const E=(t,e,a)=>new u(t,e,a);function Ga(t,e=1){const a=(t.W%1+1)%1,r=Da(t.F),o=Da(t.P)*Math.min(r,1-r);return h((t=(t,e=(t+12*a)%12)=>r-o*Math.max(Math.min(e-3,9-e,1),-1))(0)**e,t(8)**e,t(4)**e)}class u{constructor(t=0,e=0,a=0){this.W=t,this.P=e,this.F=a}g(t){return Ga(this,t).g()}}function v(t,e=1,a=0){return t.S=!t.S,a+(e-a)*(t=t.S?t.ba():t.ca())}function C(t,e=1,a=0){return 0|v(t,e,a)}function F(t,e){var a=x;return v(a,t,e)*a.sign()}function G(t,e=.5){return v(t)<e}class Ha{constructor(){function t(t){let e=parseInt(t.substr(0,8),16),a=parseInt(t.substr(8,8),16),r=parseInt(t.substr(16,8),16),o=parseInt(t.substr(24,8),16);return function(){e|=0,a|=0,r|=0,o|=0;let t=(e+a|0)+o|0;return o=o+1|0,e=a^a>>>9,a=r+(r<<3)|0,r=r<<21|r>>>11,r=r+t|0,(t>>>0)/4294967296}}this.S=!1,this.ba=new t(inputData.hash.substr(2,32)),this.ca=new t(inputData.hash.substr(34,32));for(let t=0;1e6>t;t+=2)this.ba(),this.ca()}sign(){return G(this)?-1:1}angle(t=1){return v(this,2*y*t)}}let ja;function Ja(t,e=1,a=1,r=0,o=0){var s=c.R,n=t.canvas;const i=n.width,v=n.height;n=h(r*i/e|0,(a-o-1)*v/a|0),e=h((r+1)*i/e|0,(a-o)*v/a|0),t.viewport(n.x,n.y,e.x-n.x,e.y-n.y),t.useProgram(s),t.drawArrays(t.TRIANGLE_FAN,0,3)}let La,ia=2,I=1.3,Ka=0;const Ma=new URL(window.location.href).searchParams,Na=Ma.get('aa'),Oa=Ma.get('scale'),Pa=Ma.get('aspect'),Qa=Ma.get('nofx');Na&&(ia=1*Na),Oa&&(Ka=1*Oa),Pa&&(I=1*Pa),Qa&&(La=1*Qa);const l=document.createElement('canvas');document.body.appendChild(l);const Ra=window.devicePixelRatio||1,Sa=window.innerHeight*Ra,Ta=window.innerWidth*Ra;if(Ka){const t=1024*Ka;l.width=t/I,l.height=t}else Sa/Ta<I?(l.height=Sa,l.width=Sa/I):(l.width=Ta,l.height=Ta*I);const x=new Ha,c=new ka;let L,M,Ua,N,P,Va,Wa,Xa,Ya,Q,Za,$a,T,U,ab,bb,hb,W;function cb(){return G(x)?v(x,-.05,.15):v(x,.45,.65)}function V(t,e=.1){let a,r=99;do{a=cb()}while(Aa(t-a)<e&&r--);return a}function db(){var t=bb=cb();x.sign();var e=E(t,0,v(x,.05)),a=E(t,0,v(x,.9,.95)),r=x.sign();if(T=[],0==N)T.push(E(t,v(x),v(x,.9,1)));else if(1==N)T.push(E(t,v(x,.9,1),v(x,.45,.5))),T.push(a);else if(2==N)T.push(E(t,v(x,.9,1),v(x,.4,.5))),T.push(E(V(t),v(x,.8,1),v(x,.4,.6))),T.push(a);else if(3==N||4==N)r=D([.7+v(x,.2),.8+v(x,.2)]),e=D([.3+v(x,.2),.4+v(x,.2)]),T.push(E(t,v(x,.9,1),v(x,.45,.5))),T.push(E(V(t),r[0],e[0])),T.push(E(V(t,.3),r[1],e[1])),4==N&&T.push(E(V(t),v(x,.7,.9),v(x,.2,.4))),T.push(a);else if(5==N)T.push(E(t,v(x),v(x,.9,1))),T.push(E(V(t),v(x),v(x,.05)));else if(6==N)for(T.push(e),T.push(a),T.push(E(t,v(x,.3),v(x,.6,.8))),t=C(x,3);t--;)T.push(E(cb(),v(x,.2),v(x,.1,.6)));else if(7==N)T.push(E(t,v(x,.9,1),v(x,.5,.6))),T.push(a),T.push(e);else if(8==N)t=D([.5,.55,.45]),T.push(E(0,v(x,.9,1),t[0])),T.push(E(.15,v(x,.9,1),t[1])),T.push(E(.6,v(x,.9,1),t[2])),T.push(e),T.push(a);else if(9==N){let o=C(x,2,5);e=[];for(let t=o;t--;)e[t]=t/o+v(x,.05,.1);for(D(e),T.push(a),a=o;a--;)T.push(E(t+=r*v(x,.02,.06),v(x,.9,1),e[a]))}else 10==N&&T.push(E(t,v(x),v(x,.03,.06)));D(T)}function eb(t,e,a,r=0){for(;e--;){var o=h(v(x,.05,.5),v(x,.05,.5),v(x,.05,.5)),s=h(F(2,6),r-v(x,o.y),F(2,8));const i=a?1:0==e||G(x);var c=Ua;a?c=C(x,1,3):0==c&&(c=C(x,1,4)),a&&(s.y+=99,o.y+=99),(s=1==c?new ra(s,o):2==c?new sa(s,o.x=o.z,o.y):new qa(s,o.x=o.z=o.y)).B=Ba(o.x,o.z)*v(x,.1,1),c=Za+(0>L?x.angle():L*C(x,99)),s.rotation=h(F(.05),c,F(.05)),c=o.multiply(h(v(x,2.5,4),1,v(x,2.5,4)));var n=h(v(x,5,25),0,v(x,5,25));(n=h(n.x/c.x,n.y/c.y,n.z/c.z)).x|=0,n.z|=0,G(x)&&(n.z=1e4),a&&(n.x=n.z=1e4),s.i.push(new xa(c,n)),t.m(s),o=Ba(Ba(o.x,o.y),o.z)*v(x,.2,.5),s.u=i?new ua(o):new oa(o)}}function fb(t,e){return.2>t.F&&(e=4*(1-(t=Da(t.F/.2)))+t*e),e}function gb(){if(ba()){hb&&(hb.style.display='none');var t=0,e=1+l.width*(ia||1)/1024,a=0|e,r=0|e;0==Ka&&2>=ia&&(a=r=1),function e(){Ja(aa(c),a,r,t%a,t/a|0),++t<a*r&&requestAnimationFrame(e)}()}else W&&W(),setTimeout(gb,16)}const X=hb=document.createElement('canvas');X.height=X.width=256,X.style.boxShadow='0vw 0vw 1vw .5vw #fff6',X.style.borderRadius='.5vw',X.style.width='15vw',document.body.appendChild(X);const Y=X.getContext('2d'),ib=new Ha;let Z,jb=1,kb=[],lb=v(ib,254,268)/2,mb=v(ib,254,268)/2,ob=y/4+v(ib,-.2,.2),pb=2*Math.sin(ob),qb=2*Math.cos(ob),rb=t=>0>lb||256<=lb||0>mb||256<=mb?-1:kb[t=(lb/8|0)+32*(mb/8|0)]=1|-!kb[t];W=()=>{for(X.width|=0,Y.fillRect(0,0,256,256),Y.fillStyle='#fff',Z=1024;Z--;)Y.fillRect(Z%32*8,8*(Z/32|0),8*!kb[Z],8);for(Z=jb++/9;0<Z--;)Y.fillRect((lb+=pb*=rb(lb+=pb))-1,(mb+=qb*=rb(mb+=qb))-1,3,3);Y.globalCompositeOperation='difference',Y.textAlign='center',Y.font='32px\\'',Y.fillText('MAKING IMPRESSIONS',128,30,246),Y.fillText('256ART',128,247)},function(){const t=t=>{let e=t.reduce(((t,e)=>t+e[0]),0);e*=v(x);for(const a of t)if(e-=a[0],0>=e)return a[1];return t[0][1]};if(Ua=t([[2,0],[2,1],[1,2],[1,3]]),L=t([[.4,[0,0]],[1.5,[1,y/4]],[2,[2,y/3]],[1,[3,y/2]],[.2,[4,-1]]])[1],M=t([[5,0],[9,1],[13,2],[9,3]]),N=t([[.5,0],[1,1],[1,2],[.9,3],[.6,5],[.7,6],[.8,7],[.6,8],[.9,9],[.05,10]]),3!=N&&4!=N||2!=M||(M=3),8==N&&2==M&&(M=0),10==N&&(M=2),P=t([[1.5,0],[.8,1],[.2,2],[1,3],[.3,4],[.1,5]]),1==P||2==P||5==P){var e=v(x,.5,1);let t=v(x,.05,.1),a=1;2==P?(a=3,e/=3):5==P&&(a=8,e/=8),c.V=a*e*4,c.ha=t/e}e=t([[.05,[0,0,0]],[.5,[1,.06,.07]],[1,[2,.12,.15]],[1,[3,.3,.5]],[.2,[4,.04,0]],[.1,[5,.5,.7]]]),c.I=e[1],c.U=e[2],Va=t([[1,0],[.9,1],[.8,2],[4,3]]),c.l=G(x,.01),c.h=G(x,.005)&&!c.l,c.h&&(M=0),c.A=G(x,.03)&&!c.h&&!c.l,c.v=G(x,.01)&&!c.A&&!c.h&&!c.l,!G(x,.01)||c.v||c.h||c.l||c.A||(e=v(x,1,2),c.T=2*e,c.da=v(x,10,20)/e),Wa=G(x,.02),Xa=G(x,.03)&&!Wa,c.Y=G(x,.05),c.X=G(x,.1)&&c.I&&!c.h&&!c.l&&!c.A&&!c.T&&!c.v,Ya=G(x,.04),c.J=t([[90,0],[8,1],[4,2]]),(c.h||c.v)&&(c.J=0),(c.h||c.l)&&(c.I=.03,c.U=0),db(),console.log('Rad Impressions - By Frank Force 2023'),Za=G(x,.2)?v(x):G(x)?0:y/2,U=9,ab=7,$a=1==T.length?T[0]:T.pop(),c.borderColor=T[C(x,T.length)],0==N&&(c.borderColor=E(0,0,v(x,.1))),10==N&&(c.borderColor=E(0,0,v(x,.8,1))),c.h&&(c.borderColor=E(v(x),1,.9)),c.v&&(c.borderColor.P=0),La&&(c.v=c.da=c.T=c.Y=c.l=c.h=c.A=c.X=0)}(),c.ma=v(x,99),Q=new r($a),Q.M=v(x,.1),Q.N=v(x,.3),Q.O=v(x,50,100),Q.s=v(x,4,8)**2,Q.s=fb($a,Q.s);let sb=x.angle(),tb=v(x,.5,.9);tb*=2*y/2,tb*=x.sign();let ub=0==N||10==N?cb():bb+F(.1),vb=[];const wb=E(V(ub,.2),v(x),v(x,.2,.5));c.fa=new r(wb),c.ea=new u(wb.W,wb.P,.004+.005*wb.F);let Ab,xb=D([.6,10==N?.3:1]);for(let t=0;2>t;++t){let e=xb[t]+F(.1),a=Fa(h(e,1,0),sb),r=v(x,.9,1),o=v(x,.5,.55);1==M&&0<t&&(r=v(x,.2),o+=.2),0==M&&(r=v(x,.3),o+=t?.2:.1),3==M&&(r=v(x,.7,.8),o+=.2);let s=new u(ub,r,o);vb.push(s);var yb=new la(a,s,v(x,.02,.05)),zb=c;zb.G.push(yb),yb.oa=zb,sb+=tb,ub+=F(.7,1)/2}c.m(Ab=new pa),Ab.o=Q;let Bb=C(x,4,9),Cb=v(x,.5,1),Db=v(x,10,40);for(let t=0;t<Bb;++t){let e=x.angle(),a=v(x,.3,1)*Cb,r=v(x,.3,1),o=1+Db*t/Bb;var Eb=new ya(0==t%2?Fa(h(0,0,a/o),x.angle()):h(0,a/o,0),r*o,x.angle(),e);Ab.i.push(Eb);const s=h(F(8),0,F(8)),c=F(.05);Ab.i.push(new za(c,s))}eb(c,ab),function(){let t=[];T.length=Ba(T.length,U);for(var e=T.length,a=0;a<e;++a)t.push({color:T[a],count:1});a=C(x,2,5);for(var o=0;o<U-e;++o)t.length<a?t.push({color:T[C(x,T.length)],count:1}):t[C(x,t.length)].count++;D(t),e=h(F(2),0,F(2)),a=C(x,U),o=C(x,U);const s=C(x,t.length);let n=C(x,U-1);n==a&&++n;let i,l=G(x,.4);var u=Q;for(let y=0,w=0;y<t.length;++y){const $=t[y];var f=$.color;const S=new r(f);if(S.N=v(x,.3),S.O=v(x,50,100),S.M=v(x,.5),S.s=v(x,4,8)**2,S.s=fb(f,S.s),4==P||3==P&&0==y){var p=F(.01,.02);f=h(F(8),0,F(8)),p=new za(p,f)}let T;c.m(f=new ta),c.m(T=new ta),f.u=new ua(.2),f.o=u,T.o=S,p&&(T.i.push(p),f.i.push(p));var d=v(x,.1,.5);u=new oa(d),d=1;for(let t=0;t<$.count;++t,++w){let r,s,c=3==Va?C(x,3):Va;w==o&&(c=Va?0:C(x,1,3)),0==c&&(r=v(x,.1,.5),s=1e3),1==c&&(r=v(x,.3,1),s=v(x,1,3),G(x,.2)&&(s=r=v(x,.5,1.5))),2==c&&(s=r=v(x,.5,1.5)),Xa&&(s/=3,r/=3),Wa||w==a?(s*=v(x,2,3),r*=v(x,2,3)):(G(x,.2)&&(s*=v(x,2,3)),G(x,.2)&&(r*=v(x,2,3))),2==c&&(s=r);var b=Za+(0>L?x.angle():L*C(x,99));const p=h(0,b,0),y=Ya?e:h(F(7),0,F(9));l&&i||(i=v(x,.1,.8));const $=(r<s?r:s)*i,S=h(r,30,s);var g=t=>(t=y.add(h(0,t,0)),(t=2>c?new ra(t,S):new sa(t,S.x=S.z,S.y)).rotation=p,t.B=$,t);b=g(0);var m=v(x,.5,2.5);if(d=d>m?d:m,g=g(m-30),f.m(b),T.m(g),t&&(b.u=u,g.u=u),w!=a){m=S.multiply(h(v(x,2.5,5),1,v(x,2.5,5)));const t=h(C(x,0,.5<r?4:6),0,C(x,1,9));w==n&&(t.x=Ca(t.x),t.z=Ca(t.z)),Xa&&(t.x=t.x?2*t.x:C(x,1,3),t.z=t.z?2*t.z:C(x,1,3)),G(x)&&(t.z=1e3),0==c&&(t.z=0),m=new xa(m,t),b.i.push(m),g.i.push(m)}}u=S,s==y&&eb(T,1,1,d)}}(),W&&W(),requestAnimationFrame((()=>requestAnimationFrame(gb)));";
    string public constant HEAD =
        "<meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1'> <style type='text/css'> html{height: 100%; width: 100%;}body{height: 100%; width: 100%; margin: 0; padding: 0; background-color: rgb(0,0,0);}canvas{display: block; max-width: 100%; max-height: 100%; padding: 0; margin: auto; display: block; position: absolute; top: 0; bottom: 0; left: 0; right: 0; object-fit: contain;}</style>";

    function projectName() external pure returns (string memory) {
        return PROJECT_NAME;
    }

    function artistName() external pure returns (string memory) {
        return ARTIST_NAME;
    }

    function externalLibrary() external view returns (string memory) {
        return externalLibraryUsed;
    }

    function twoFiveSixLibrary() external view returns (string memory) {
        return twofivesixLibraryUsed;
    }

    function license() external pure returns (string memory) {
        return LICENSE;
    }

    function artScript() external pure returns (string memory) {
        return ARTSCRIPT;
    }

    function head() external pure returns (string memory) {
        return HEAD;
    }

    function setExternalLibrary(
        string calldata _externalLibraryUsed
    ) external onlyOwner {
        externalLibraryUsed = _externalLibraryUsed;
    }

    function setTwoFiveSixLibrary(
        string calldata _twoFiveSixLibraryUsed
    ) external onlyOwner {
        twofivesixLibraryUsed = _twoFiveSixLibraryUsed;
    }
}

// File: @openzeppelin/contracts/access/Ownable.sol



// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

// File: @openzeppelin/contracts/utils/Context.sol



// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}