1"use strict";(self["webpackChunkpeakd"]=self["webpackChunkpeakd"]||[]).push([[9792],{46179:function(e,t,r){r.d(t,{SY:function(){return a},fl:function(){return d},lY:function(){return v},nY:function(){return y},oe:function(){return A},q9:function(){return p},qt:function(){return x},yC:function(){return n}});r(74423),r(44114),r(18111),r(22489),r(20116),r(30531),r(7588),r(61701),r(18237),r(17642),r(58004),r(33853),r(45876),r(32475),r(15024),r(31698);const n="https://decentmemes.com",a=`${n}/widget/`,l=1,o=8,i=1e4,h={burn:"null",sps:"hive.fund",liquid:"reward.app"},c=e=>e&&e.role?Array.isArray(e.role)?e.role.filter(Boolean):String(e.role).split("+").map(e=>e.trim()).filter(Boolean):[],s=e=>c(e).includes("frontend"),u=e=>[...new Set((e||[]).filter(Boolean))],m=e=>(e||[]).filter(e=>e&&!e.hasFrontend),f=e=>{if(!e||!e.account)return null;const t=parseInt(e.weight);return isNaN(t)||t<=0?null:{account:e.account,weight:t,roles:u(c(e)),hasFrontend:s(e)}},d=e=>{var t,r,n,a,l,o;return e&&e.hostedUrl&&e.templateId?{hostedUrl:e.hostedUrl,templateId:e.templateId,templateName:e.templateName||(null===(t=e.template)||void 0===t?void 0:t.name)||null,isOriginalCreator:null!==(r=null!==(n=e.isOriginalCreator)&&void 0!==n?n:null===(a=e.template)||void 0===a?void 0:a.isOriginalCreator)&&void 0!==r?r:null,beneficiaries:{post:Array.isArray(null===(l=e.beneficiaries)||void 0===l?void 0:l.post)?m(e.beneficiaries.post.map(f).filter(Boolean)):[],comment:Array.isArray(null===(o=e.beneficiaries)||void 0===o?void 0:o.comment)?m(e.beneficiaries.comment.map(f).filter(Boolean)):[]}}:null},p=e=>(Array.isArray(e)?e:[]).map(d).filter(Boolean),g=e=>{const t=(Array.isArray(e)?e:[]).map(f).filter(Boolean),r=[];let n=!1;return t.forEach(e=>{const t=r.find(t=>t.account===e.account),a=e.hasFrontend;a&&n?t&&(t.roles=u(t.roles.concat(e.roles)),t.hasFrontend=!0):(t?(t.weight+=e.weight,t.roles=u(t.roles.concat(e.roles)),t.hasFrontend=t.hasFrontend||e.hasFrontend):r.push({...e}),a&&(n=!0))}),r},w=e=>e.sort((e,t)=>e.account.localeCompare(t.account)),M=e=>e.reduce((e,t)=>e+t.weight,0),b=(e,t=o,r=i)=>{const n=Array.from(e),a=()=>{const e=n.map((e,t)=>({...e,index:t})).filter(e=>!e.hasFrontend).sort((e,t)=>e.weight===t.weight?e.account.localeCompare(t.account):e.weight-t.weight);if(e.length>0)return e[0].index;const t=n.map((e,t)=>({...e,index:t})).sort((e,t)=>e.weight===t.weight?e.account.localeCompare(t.account):e.weight-t.weight);return t.length>0?t[0].index:-1};while(n.length>t||M(n)>r){const e=a();if(e<0)break;n.splice(e,1)}return n},y=({existingBeneficiaries:e=[],decentMemesBeneficiaries:t=[],rewardType:r=null})=>{const n=r?h[r]:null,a=n?1:0,l=g([...e||[],...t||[]]),c=b(l,o-a,i),s=Math.max(i-M(c),0),u=Array.from(c);n&&s>0&&u.push({account:n,weight:s,roles:[],hasFrontend:!1});const m=b(u,o,i);return w(m).map(e=>({account:e.account,weight:e.weight}))},v=(e=[],t=[],r=[])=>{const n=(e||[]).map(e=>{if(!e.memeWeight)return{...e};const t={account:e.account,weight:e.weight-e.memeWeight};return e.originalLabel&&(t.label=e.originalLabel),t}).filter(e=>e.weight>0),a=(e||[]).filter(e=>e.memeWeight>0).map(e=>e.account),l=(r||[]).map(e=>e.account),o=(t||[]).filter(e=>a.includes(e.account)||!l.includes(e.account));return o.forEach(e=>{const t=n.find(t=>t.account===e.account);t?(t.originalLabel=t.label||null,t.label="meme",t.weight+=e.weight,t.memeWeight=e.weight):n.push({account:e.account,weight:e.weight,label:"meme",memeWeight:e.weight})}),n},x=e=>e&&e.templateId?{templateId:e.templateId,v:l}:null,A=(e,t)=>{const r=p(e),n=t||"",a=r.filter(e=>n.includes(e.hostedUrl)),l=g(a.flatMap(e=>e.beneficiaries.post)),o=g(a.flatMap(e=>e.beneficiaries.comment));return{hasMemes:a.length>0,templateId:a.length>0?a[0].templateId:null,memes:a,records:r,beneficiaries:{post:l,comment:o}}}},95341:function(e,t,r){r.d(t,{D4:function(){return p},lF:function(){return v}});var n=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","#","$","%","*","+",",","-",".",":",";","=","?","@","[","]","^","_","{","|","}","~"],a=e=>{let t=0;for(let r=0;r<e.length;r++){let a=e[r],l=n.indexOf(a);t=83*t+l}return t},l=(e,t)=>
1{var r="";for(let a=1;a<=t;a++){let l=Math.floor(e)/Math.pow(83,t-a)%83;r+=n[Math.floor(l)]}return r},o=e=>{let t=e/255;return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},i=e=>{let t=Math.max(0,Math.min(1,e));return t<=.0031308?Math.trunc(12.92*t*255+.5):Math.trunc(255*(1.055*Math.pow(t,.4166666666666667)-.055)+.5)},h=e=>e<0?-1:1,c=(e,t)=>h(e)*Math.pow(Math.abs(e),t),s=class extends Error{constructor(e){super(e),this.name="ValidationError",this.message=e}},u=e=>{if(!e||e.length<6)throw new s("The blurhash string must be at least 6 characters");let t=a(e[0]),r=Math.floor(t/9)+1,n=t%9+1;if(e.length!==4+2*n*r)throw new s(`blurhash length mismatch: length is ${e.length} but it should be ${4+2*n*r}`)},m=e=>{let t=e>>16,r=e>>8&255,n=255&e;return[o(t),o(r),o(n)]},f=(e,t)=>{let r=Math.floor(e/361),n=Math.floor(e/19)%19,a=e%19;return[c((r-9)/9,2)*t,c((n-9)/9,2)*t,c((a-9)/9,2)*t]},d=(e,t,r,n)=>{u(e),n|=1;let l=a(e[0]),o=Math.floor(l/9)+1,h=l%9+1,c=(a(e[1])+1)/166,s=new Array(h*o);for(let i=0;i<s.length;i++)if(0===i){let t=a(e.substring(2,6));s[i]=m(t)}else{let t=a(e.substring(4+2*i,6+2*i));s[i]=f(t,c*n)}let d=4*t,p=new Uint8ClampedArray(d*r);for(let a=0;a<r;a++)for(let e=0;e<t;e++){let n=0,l=0,c=0;for(let i=0;i<o;i++)for(let o=0;o<h;o++){let u=Math.cos(Math.PI*e*o/t)*Math.cos(Math.PI*a*i/r),m=s[o+i*h];n+=m[0]*u,l+=m[1]*u,c+=m[2]*u}let u=i(n),m=i(l),f=i(c);p[4*e+0+a*d]=u,p[4*e+1+a*d]=m,p[4*e+2+a*d]=f,p[4*e+3+a*d]=255}return p},p=d,g=4,w=(e,t,r,n)=>{let a=0,l=0,i=0,h=t*g;for(let s=0;s<t;s++){let t=g*s;for(let c=0;c<r;c++){let r=t+c*h,u=n(s,c);a+=u*o(e[r]),l+=u*o(e[r+1]),i+=u*o(e[r+2])}}let c=1/(t*r);return[a*c,l*c,i*c]},M=e=>{let t=i(e[0]),r=i(e[1]),n=i(e[2]);return(t<<16)+(r<<8)+n},b=(e,t)=>{let r=Math.floor(Math.max(0,Math.min(18,Math.floor(9*c(e[0]/t,.5)+9.5)))),n=Math.floor(Math.max(0,Math.min(18,Math.floor(9*c(e[1]/t,.5)+9.5)))),a=Math.floor(Math.max(0,Math.min(18,Math.floor(9*c(e[2]/t,.5)+9.5))));return 19*r*19+19*n+a},y=(e,t,r,n,a)=>{if(n<1||n>9||a<1||a>9)throw new s("BlurHash must have between 1 and 9 components");if(t*r*4!==e.length)throw new s("Width and height must match the pixels array");let o=[];for(let l=0;l<a;l++)for(let a=0;a<n;a++){let n=0==a&&0==l?1:2,i=w(e,t,r,(e,o)=>n*Math.cos(Math.PI*a*e/t)*Math.cos(Math.PI*l*o/r));o.push(i)}let i,h=o[0],c=o.slice(1),u="",m=n-1+9*(a-1);if(u+=l(m,1),c.length>0){let e=Math.max(...c.map(e=>Math.max(...e))),t=Math.floor(Math.max(0,Math.min(82,Math.floor(166*e-.5))));i=(t+1)/166,u+=l(t,1)}else i=1,u+=l(0,1);return u+=l(M(h),4),c.forEach(e=>{u+=l(b(e,i),2)}),u},v=y}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.