earthnut 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use client";(()=>{"use strict";var t={570:t=>{t.exports=require("a-type-of-js")},705:t=>{t.exports=require("a-js-tools")},713:()=>{function t(e){"@babel/helpers - typeof";return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,r(i.key),i)}}function r(e){var r=function(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,r||"default");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==t(r)?r:r+""}new(function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(){};return Object.setPrototypeOf(e,this),Object.defineProperties(e,{info:{value:function(){},configurable:!1,writable:!1},warn:{value:function(){},configurable:!1,writable:!1},error:{value:function(){},configurable:!1,writable:!1},type:{value:!1,configurable:!1,writable:!1}}),e},(r=[{key:"clear",value:function(){}}])&&e(t.prototype,r),n&&e(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,n}())({name:"earthnut",type:!1})},953:t=>{t.exports=require("react")}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};r.r(n),r.d(n,{useRipples:()=>ie});var i=r(953);const o=require("a-element-inline-style");var a=r(570);function l(t,e,r,n){function i(t,e){var n=r.createShader(t);if(r.shaderSource(n,e),r.compileShader(n),!r.getShaderParameter(n,r.COMPILE_STATUS))throw new Error("compile error: "+r.getShaderInfoLog(n));return n}var o,l={id:r.createProgram(),uniforms:{},locations:{}};if(r.attachShader(l.id,i(r.VERTEX_SHADER,t)),r.attachShader(l.id,i(r.FRAGMENT_SHADER,e)),r.linkProgram(l.id),!r.getProgramParameter(l.id,r.LINK_STATUS))throw new Error("link error: "+r.getProgramInfoLog(l.id));r.useProgram(l.id),r.enableVertexAttribArray(0);for(var s=t+e,u=/uniform (\w+) (\w+)/g;!(0,a.isNull)(o=u.exec(s));){var c=o[2];l.locations[c]=r.getUniformLocation(l.id,c)}return l}function s(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.gl;r.activeTexture(r.TEXTURE0+(e||0)),r.bindTexture(r.TEXTURE_2D,t)}function u(t){return"rgba(0, 0, 0, 0)"===t||"#ffffffff"===t||"transport"===t}function c(t){return"none"===t||""===t}function f(){var t=this,e=function(){return t.initState=!1,null};if(!this.gl)return e();var r=this.gl,n=Object.fromEntries(["OES_texture_float","OES_texture_half_float","OES_texture_float_linear","OES_texture_half_float_linear"].reduce(function(t,e){var n=r.getExtension(e);return n&&t.push([e,n]),t},[]));if(!n.OES_texture_float)return e();var i=[];function o(t,e,r){var i="OES_texture_"+t,o=i+"_linear",a=o in n;return{type:e,linearSupport:a,arrayType:r,extensions:a?[i,o]:[i]}}i.push(o("float",r.FLOAT,Float32Array)),n.OES_texture_half_float&&i.push(o("half_float",n.OES_texture_half_float.HALF_FLOAT_OES,null));var a=r.createTexture(),l=r.createFramebuffer();r.bindFramebuffer(r.FRAMEBUFFER,l),r.bindTexture(r.TEXTURE_2D,a),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE);for(var s=null,u=0;u<i.length;u++)if(r.texImage2D(r.TEXTURE_2D,0,r.RGBA,32,32,0,r.RGBA,i[u].type,null),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,a,0),r.checkFramebufferStatus(r.FRAMEBUFFER)===r.FRAMEBUFFER_COMPLETE){s=i[u];break}return s}function h(t){"@babel/helpers - typeof";return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h(t)}function p(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,m(n.key),n)}}function d(t,e,r){return e&&p(t.prototype,e),r&&p(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function g(t,e,r){return(e=m(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function m(t){var e=function(t,e){if("object"!=h(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==h(e)?e:e+""}var v=d(function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),g(this,"canvas",void 0),g(this,"gl",void 0),g(this,"config",void 0),g(this,"initState",!0),this.canvas=e;var r=e.getContext("webgl");if((0,a.isNull)(r))return this.initState=!1,void(this.config=null);this.gl=r,this.config=Reflect.apply(f,this,[])}),y=r(705),b={imgUrl:null,resolution:360,dropRadius:12,perturbance:.01,interactive:!0,crossOrigin:"no-cors",playingState:!0,accelerating:1,raindropsTimeInterval:3600,idleFluctuations:!0,darkMode:void 0};Object.freeze(b);var E;r(713);function w(t){"@babel/helpers - typeof";return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},w(t)}function R(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,T(n.key),n)}}function T(t){var e=function(t,e){if("object"!=w(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==w(e)?e:e+""}function S(t,e,r){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,r)}function k(t,e,r){return t.set(x(t,e),r),r}function P(t,e){return t.get(x(t,e))}function x(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}function D(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return _(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var O=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r={list:[],diameter:48,radius:0,cells:0};r.diameter%2!=0&&r.diameter++;var n=r.diameter,i=r.list,o=n/2;r.radius=o,r.cells=Math.pow(n,2);for(var a=0;a<n;a++){i[a]=[];for(var l=0;l<n;l++)i[a][l]=[0,0,0,0]}for(var s=0;s<=o;s++)for(var u=function(){var t=i[s][c],r=Math.ceil(Math.sqrt(Math.pow(s,2)+Math.pow(c,2)))<=o,n=e?10:255,a=e?25:190,l=r?e?160:120:e?160:180,u=r?e?230:160:e?250:240,f=function(){return(0,y.getRandomInt)(n,a)};t[0]=f(),t[1]=f(),t[2]=f(),t[3]=(0,y.getRandomInt)(l,u)},c=s;c<=o;c++)u();for(var f=0;f<=o;f++)for(var h=0;h<=f;h++)i[f][h]=i[h][f];for(var p=o;p<n;p++)for(var d=0;d<=o;d++)i[p][d]=i[n-p][d];for(var g=0;g<o;g++)for(var m=o;m<n;m++)i[g][m]=i[g][n-m];for(var v=o;v<n;v++)for(var b=o;b<n;b++)i[v][b]=i[v][n-b];var E=t%n;return r.list=[].concat(D(i.slice(E)),D(i.slice(0,E))),r},A=new(E=new WeakMap,function(){return t=function t(){var e,r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),S(this,E,1),e=this,r="data",n=O(),(r=T(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n},(e=[{key:"build",value:function(t){P(E,this)>100&&k(E,this,0),this.data=O(k(E,this,P(E,this)+4),t)}}])&&R(t.prototype,e),r&&R(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}());function I(t,e){var r=document.createElement("canvas"),n=document.createElement("canvas"),i=r.getContext("2d"),o=n.getContext("2d");return(0,a.isNull)(i)||(0,a.isNull)(o)?r:(r.width=n.width=t||1,r.height=n.height=e||1,i.clearRect(0,0,t,e),o.clearRect(0,0,t,e),i.globalAlpha=1,i.putImageData(function(t,e){Date.now();for(var r=new ImageData(t||1,e||1),n=r.data,i=A.data,o=i.diameter,a=i.list,l=t*o,s=0;s<n.length;s+=4){var u=s/4%l,c=u%t%o,f=Math.floor(u/t),h=a[c][f];n[s]=h[0],n[s+1]=h[1],n[s+2]=h[2],n[s+3]=h[3]}return r}(t,e),0,0),o.fillStyle="#ffffff",o.fillRect(0,0,t,e),o.drawImage(r,0,0,t||1,e||1),o.globalCompositeOperation="source-over",n)}function F(){var t,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=this.fadeData,n=this.options,i=r.backgroundInfo,o=r.toBeList,a=i.width,l=i.height,s=(0,y.getRandomString)({length:8,includeNumbers:!0,includeUppercaseLetters:!0});A.build(null!==(t=n.darkMode)&&void 0!==t?t:r.isDark),o.push({resource:I(a,l),width:a,height:l,kind:"default",tag:s}),e&&r.run()}function U(t,e){var r,n,i=t.imgUrl;return(0,a.isString)(i)&&i||(r=e.backgroundImage,n=/url\(["']?([^"']*)["']?\)/.exec(r),(0,a.isNull)(n)?null:n[1])}function j(t,e){return(0,a.isArray)(t.imgUrl)&&1===t.imgUrl.length&&t.imgUrl[0]||e.backgroundColor}function N(){var t=this.renderData,e=this.fadeData,r=this.options;if((0,a.isNull)(t))return Reflect.apply(F,this,[]);var n=t.originStyle;if(u(n.backgroundColor)&&(!(0,a.isArray)(r.imgUrl)||1!==r.imgUrl.length))return Reflect.apply(F,this,[]);var i=document.createElement("canvas"),o=i.getContext("2d");if((0,a.isNull)(o))return Reflect.apply(F,this,[]);var l=e.backgroundInfo,s=l.width,c=l.height;i.width=s,i.height=c,o.clearRect(0,0,s,c);var f=j(r,n);o.beginPath(),o.fillStyle=f,o.fillRect(0,0,s,c),o.fill(),e.isTransitioning&&!(0,a.isEmptyArray)(e.toBeList)?e.toBeList=[e.toBeList[0]]:e.toBeList=[];var h={resource:i,kind:"background-color",tag:f,width:s,height:c};e.toBeList.push(h),e.run()}function C(){var t=this.fadeData,e=this.renderData,r=this.options;if((0,a.isNull)(e))return Reflect.apply(N,this,[]);var n=e.originStyle;if(!/linear-gradient\(.*\)/.test(n.backgroundImage)&&!(0,a.isArray)(r.imgUrl))return Reflect.apply(N,this,[]);var i=(0,a.isArray)(r.imgUrl)&&r.imgUrl.length>1&&r.imgUrl||n.backgroundImage.replace(/^.*linear-gradient\((.*)\).*$/,"$1").split("),").map(function(t){return(t=t.trim()).endsWith(")")||(t+=")"),t}).filter(function(t){return t.startsWith("rgb")||t.startsWith("#")});if(i.length<2)return Reflect.apply(N,this,[]);var o=document.createElement("canvas"),l=o.getContext("2d");if((0,a.isNull)(l))return Reflect.apply(N,this,[]);var s=t.backgroundInfo,u=s.width,c=s.height;o.width=u,o.height=c,l.fillStyle="#fff",l.fillRect(0,0,u,c);var f=l.createLinearGradient(0,0,0,c);i.forEach(function(t,e){return f.addColorStop(e/(i.length-1),t)}),l.fillStyle=f,l.fillRect(0,0,u,c),t.isTransitioning&&!(0,a.isEmptyArray)(t.toBeList)?t.toBeList=[t.toBeList[0]]:t.toBeList=[],t.toBeList.push({resource:o,kind:"linear-gradient",tag:i.join("_"),width:u,height:c}),t.run()}function L(t){return function(t){if(Array.isArray(t))return B(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return B(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?B(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function B(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function M(){var t=this,e=this.renderData,r=this.options,n=this.fadeData;if((0,a.isNull)(e))Reflect.apply(C,this,[]);else{var i=e.lastUseStyle,o=n.backgroundInfo,l=o.width,s=o.height,u=U(r,i);if(e.imageSource=u,u){var c=function(t,e,r){var n=new Image(e,r);return n.width=e,n.height=r,n.src=t,n}(u,l,s);c.onload=function(){clearTimeout(n.transparentId),n.isTransitioning&&!(0,a.isEmptyArray)(n.toBeList)?n.toBeList=[n.toBeList[0]].concat(L(n.toBeList.slice(1).filter(function(t){return"image"===t.kind&&(Math.abs(t.width-l)>2||Math.abs(t.height-s)>2||t.tag!==u)}))):n.toBeList=[],n.toBeList.push({resource:c,width:l,height:s,kind:"image",tag:u}),n.run()},c.onerror=function(){Reflect.apply(C,t,[])},c.crossOrigin=r.crossOrigin}else Reflect.apply(C,this,[])}}function X(){var t=this.renderData;if(!(0,a.isNull)(t)){var e=t.parentElement;e&&[["background-image","none"],["background-color","transparent"]].forEach(function(t){return e.style.setProperty(t[0],t[1],"important")})}}function W(t){var e=window.getComputedStyle(t),r=t.style;return{inlineBackground:r.background,inlineBackgroundColor:r.backgroundColor,inlineBackgroundImage:r.backgroundImage,backgroundColor:e.backgroundColor,backgroundImage:e.backgroundImage,backgroundSize:e.backgroundSize,backgroundPosition:e.backgroundPosition,backgroundRepeat:e.backgroundRepeat,backgroundClip:e.backgroundClip,backgroundOrigin:e.backgroundOrigin,backgroundAttachment:e.backgroundAttachment,position:e.position,width:parseInt(e.width),height:parseInt(e.height)}}function z(){var t=this.renderData;if(!(0,a.isNull)(t)){var e=t.parentElement,r=t.originStyle;e.style.setProperty("background-image",r.inlineBackgroundImage),e.style.setProperty("background-color",r.inlineBackgroundColor)}}function G(t){"@babel/helpers - typeof";return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(t)}function H(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Y(n.key),n)}}function q(t,e,r){return(e=Y(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Y(t){var e=function(t,e){if("object"!=G(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=G(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==G(e)?e:e+""}var $=function(){return t=function t(e,r,n){var i,o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),q(this,"quad",null),q(this,"lastRaindropsFallTime",0),q(this,"parentElement",void 0),q(this,"mutationObserver",void 0),q(this,"resizeObserver",void 0),q(this,"renderProgram",void 0),q(this,"imageSource",""),q(this,"dropProgram",void 0),q(this,"updateProgram",void 0),q(this,"textures",[]),q(this,"backgroundTexture",[]),q(this,"textureDelta",void 0),q(this,"framebuffers",[]),q(this,"bufferWriteIndex",0),q(this,"bufferReadIndex",1),q(this,"originStyle",void 0),q(this,"lastUseStyle",void 0),q(this,"events",{}),q(this,"animationFrameId",0),this.parentElement=null!==(i=e.parentElement)&&void 0!==i?i:document.body,Reflect.apply(X,n,[]),this.originStyle=this.lastUseStyle=W(this.parentElement),this.mutationObserver=new MutationObserver(function(t){t.forEach(function(t){if(t.target===o.parentElement&&"attributes"===t.type&&n.options.visible){var e=Object.values(o.lastUseStyle),i=W(o.parentElement),l=Object.values(i);if((0,a.isEmptyArray)(y.enArr.difference(e,l)))return;var s=c(i.backgroundImage),f=u(i.backgroundColor);if(s&&f)return;o.lastUseStyle=i,Reflect.apply(r,n,[]),Reflect.apply(X,n,[])}})}),this.mutationObserver.observe(this.parentElement,{subtree:!0,attributes:!0,attributeFilter:["class","style"]}),this.resizeObserver=new ResizeObserver(function(t){t.forEach(function(t){t.target===o.parentElement&&Reflect.apply(r,n,[])})}),this.resizeObserver.observe(this.parentElement)},e=[{key:"destroy",value:function(){if(this.animationFrameId&&window.cancelAnimationFrame(this.animationFrameId),Reflect.apply(z,{renderData:this},[]),this.parentElement&&this.events){var t,e,r,n=this.parentElement,i=this.events;Object.keys(i).forEach(function(t){return n.removeEventListener&&n.removeEventListener(t,i[t])}),n.removeAttribute&&n.removeAttribute("data-ripples"),null===(t=this.mutationObserver)||void 0===t||t.takeRecords(),null===(e=this.mutationObserver)||void 0===e||e.disconnect(),this.mutationObserver=null,null===(r=this.resizeObserver)||void 0===r||r.disconnect(),this.resizeObserver=null}}}],e&&H(t.prototype,e),r&&H(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();function K(){var t=this.renderData,e=this.fadeData;if(!(0,a.isNull)(t)){var r,n,i,o=t.parentElement,l=window.getComputedStyle(o),s=l.backgroundSize,u=l.backgroundAttachment,c=l.backgroundPosition,f=/\s+/.test(r=c)?r.replace(/center/,"50%").replace(/top|left/,"0%").replace(/bottom/,"100%").replace(/\s+/," ").split(" "):V(r)?[r,"50%"]:{center:["50%","50%"],top:["50%","0%"],bottom:["50%","100%"],left:["0%","50%"],right:["100%","50%"]}[r],h={left:0,top:0,width:0,height:0};"fixed"===u?(h.height=window.innerHeight,h.left=window.screenX,h.top=window.screenY,h.width=window.innerWidth):(h.left=0,h.top=0,h.width=o.scrollWidth,h.height=o.scrollHeight);var p=e.backgroundInfo||{width:100,height:100},d=p.width,g=p.height;if("cover"===s){var m=Math.max(h.width/d,h.height/g);n=d*m,i=g*m}else if("contain"===s){var v=Math.min(h.width/d,h.height/g);n=d*v,i=g*v}else{var y=s.split(" ");n=y[0]||"",i=y[1]||n,V(n)?n=h.width*parseFloat(n)/100:"auto"!==n&&(n=parseFloat(n)),V(i)?i=h.height*parseFloat(i)/100:"auto"!==i&&(i=parseFloat(i)),"auto"===n&&"auto"===i?(n=d,i=g):("auto"===n&&(n=d*(Number(i)/g)),"auto"===i&&(i=g*(Number(n)/d)))}var b=f&&f[0]||"0%",E=f&&f[1]||"0%";b=V(b)?(h.left+(h.width-Number(n))*parseFloat(b)/100).toString():(h.left+parseFloat(b)).toString(),E=V(E)?(h.top+(h.height-Number(i))*parseFloat(E)/100).toString():(h.top+parseFloat(E)).toString(),t.renderProgram.uniforms.topLeft=new Float32Array([-Number(b)/n,-Number(E)/i]),t.renderProgram.uniforms.bottomRight=new Float32Array([t.renderProgram.uniforms.topLeft[0]+o.clientWidth/n,t.renderProgram.uniforms.topLeft[1]+o.clientHeight/i]);var w=Math.max(this.canvas.width,this.canvas.height);t.renderProgram.uniforms.containerRatio=new Float32Array([this.canvas.width/w,this.canvas.height/w])}}function V(t){return t.endsWith("%")}function Z(){var t=this.gl,e=this.renderData;(0,a.isNull)(e)||(t.bindBuffer(t.ARRAY_BUFFER,e.quad),t.vertexAttribPointer(0,2,t.FLOAT,!1,0,0),t.drawArrays(t.TRIANGLE_FAN,0,4))}function J(){var t=this.gl,e=this.renderData,r=this.options;if(!(0,a.isNull)(e)){var n=e.textures,i=e.backgroundTexture,o=r.perturbance;t.bindFramebuffer(t.FRAMEBUFFER,null),t.viewport(0,0,this.canvas.width,this.canvas.height),t.enable(t.BLEND),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),t.useProgram(e.renderProgram.id),Reflect.apply(s,this,[i,0]),Reflect.apply(s,this,[n[0],1]),t.uniform1f(e.renderProgram.locations.perturbance,o),t.uniform2fv(e.renderProgram.locations.topLeft,e.renderProgram.uniforms.topLeft),t.uniform2fv(e.renderProgram.locations.bottomRight,e.renderProgram.uniforms.bottomRight),t.uniform2fv(e.renderProgram.locations.containerRatio,e.renderProgram.uniforms.containerRatio),t.uniform1i(e.renderProgram.locations.samplerBackground,0),t.uniform1i(e.renderProgram.locations.samplerRipples,1),Reflect.apply(Z,this,[]),t.disable(t.BLEND)}}function Q(){var t=this.renderData;if(!(0,a.isNull)(t)){var e=t.bufferWriteIndex,r=t.bufferReadIndex;t.bufferWriteIndex=1-e,t.bufferReadIndex=1-r}}function tt(){var t=this.gl,e=this.renderData,r=this.options;if(!(0,a.isNull)(e)){var n=e.updateProgram,i=e.textures,o=e.framebuffers,l=e.bufferWriteIndex,u=e.bufferReadIndex,c=r.resolution;t.viewport(0,0,c,c),t.bindFramebuffer(t.FRAMEBUFFER,o[l]),Reflect.apply(s,this,[i[u]]),t.useProgram(n.id),Reflect.apply(Z,this,[]),Reflect.apply(Q,this,[])}}function et(){var t=this,e=this.renderData,r=this.options,n=this.fadeData;if(!(0,a.isNull)(e)){var i=e.parentElement,o=n.isTransitioning,l=r.running,s=r.idleFluctuations,u=r.lastRunningState,c=getComputedStyle(i);n.backgroundInfo={width:parseInt(c.width),height:parseInt(c.height)},Reflect.apply(K,this,[]),l?(u||(r.lastRunningState=!0,this.show()),s&&this.raindropsFall(),o&&this.fade(),Reflect.apply(tt,this,[]),Reflect.apply(J,this,[])):u&&(r.lastRunningState=!1,this.hide()),e.animationFrameId=requestAnimationFrame(function(){return Reflect.apply(et,t,[])})}}function rt(t,e,r){var n=this.renderData;if(!(0,a.isNull)(n)){var i=n.parentElement,o=window.getComputedStyle(i),l=parseInt(o.borderLeftWidth)||0,s=parseInt(o.borderTopWidth)||0,u=i.getBoundingClientRect(),c=t.clientX-u.left-l,f=t.clientY-u.top-s;this.drop(c,f,e,r)}}function nt(){var t=this,e=this.renderData,r=this.options;if(!(0,a.isNull)(e)){var n=e.parentElement,i=e.events,o=function(n){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];r.visible&&r.running&&r.interactive&&(e.lastRaindropsFallTime=Date.now(),Reflect.apply(rt,t,[n,r.dropRadius*(i?1.5:1),i?.03:.01]))};i.mousemove=function(t){for(var e=r.accelerating;e--;)o(t)},i.touchmove=i.touchstart=function(t){for(var e=t.touches,r=0;r<e.length;r++)o(e[r])},i.mousedown=function(t){return o(t,!0)},Object.keys(i).forEach(function(t){return null==n?void 0:n.addEventListener(t,i[t],{passive:!0})})}}var it="\n attribute vec2 vertex;\n varying vec2 coord;\n void main() {\n coord = vertex * 0.5 + 0.5;\n gl_Position = vec4(vertex, 0.0, 1.0);\n }";function ot(){var t=this.gl,e=this.renderData;if(!(0,a.isNull)(e)){var r=e.textureDelta;e.dropProgram=l(it,"precision highp float;\n\n const float PI = 3.141592653589793;\n uniform sampler2D texture;\n uniform vec2 center;\n uniform float radius;\n uniform float strength;\n\n varying vec2 coord;\n\n void main() {\n vec4 info = texture2D(texture, coord);\n\n float drop = max(0.0, 1.0 - length(center * 0.5 + 0.5 - coord) / radius);\n drop = 0.5 - cos(drop * PI) * 0.5;\n info.r += drop * strength;\n gl_FragColor = info;\n }",t);var n=e.updateProgram=l(it,"\n precision highp float;\n\n uniform sampler2D texture;\n uniform vec2 delta;\n\n varying vec2 coord;\n\n void main() {\n vec4 info = texture2D(texture, coord);\n \n vec2 dx = vec2(delta.x, 0.0);\n vec2 dy = vec2(0.0, delta.y);\n \n float average = (\n texture2D(texture, coord - dx).r +\n texture2D(texture, coord - dy).r +\n texture2D(texture, coord + dx).r +\n texture2D(texture, coord + dy).r\n ) * 0.25;\n \n info.g += (average - info.r) * 2.0;\n info.g *= 0.995;\n info.r += info.g;\n \n gl_FragColor = info;\n }\n ",this.gl);t.uniform2fv(n.locations.delta,r),e.renderProgram=l("\n precision highp float;\n\n attribute vec2 vertex;\n uniform vec2 topLeft;\n uniform vec2 bottomRight;\n uniform vec2 containerRatio;\n varying vec2 ripplesCoord;\n varying vec2 backgroundCoord;\n void main() {\n backgroundCoord = mix(topLeft, bottomRight, vertex * 0.5 + 0.5);\n backgroundCoord.y = 1.0 - backgroundCoord.y;\n ripplesCoord = vec2(vertex.x, -vertex.y) * containerRatio * 0.5 + 0.5;\n gl_Position = vec4(vertex.x, -vertex.y, 0.0, 1.0);\n }\n ","\n precision highp float;\n\n uniform sampler2D samplerBackground;\n uniform sampler2D samplerRipples;\n uniform vec2 delta;\n\n uniform float perturbance;\n varying vec2 ripplesCoord;\n varying vec2 backgroundCoord;\n\n void main() {\n float height = texture2D(samplerRipples, ripplesCoord).r;\n float heightX = texture2D(samplerRipples, vec2(ripplesCoord.x + delta.x, ripplesCoord.y)).r;\n float heightY = texture2D(samplerRipples, vec2(ripplesCoord.x, ripplesCoord.y + delta.y)).r;\n vec3 dx = vec3(delta.x, heightX - height, 0.0);\n vec3 dy = vec3(0.0, heightY - height, delta.y);\n vec2 offset = -normalize(cross(dy, dx)).xz;\n float specular = pow(max(0.0, dot(offset, normalize(vec2(-0.6, 1.0)))), 4.0);\n gl_FragColor = texture2D(samplerBackground, backgroundCoord + offset * perturbance) + specular;\n }",t),t.uniform2fv(e.renderProgram.locations.delta,r)}}function at(){var t=this.gl,e=this.renderData;if(!(0,a.isNull)(e)){var r=e.backgroundTexture=t.createTexture();t.bindTexture(t.TEXTURE_2D,r),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,1),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR)}}function lt(t){var e=this.gl,r=this.renderData,n=this.fadeData;if(!(0,a.isNull)(r)){var i=r.backgroundTexture,o=r.parentElement,l=n.backgroundInfo,s=l.width,u=l.height,c=function(t){return(0,a.isZero)(t&t-1)},f=c(s)&&c(u)?e.REPEAT:e.CLAMP_TO_EDGE;e.bindTexture(e.TEXTURE_2D,i),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,f),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,f),o.dataset.render_img=t.tag,o.dataset.render_width=t.width+"px",o.dataset.render_height=t.height+"px",e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t.resource)}}function st(){var t=this,e=this.renderData,r=this.options,n=this.fadeData;if(!(0,a.isNull)(e)&&this.config){var i=e.textures,o=e.framebuffers,l=r.resolution,s=this.gl,u=1/l;e.textureDelta=new Float32Array([u,u]),this.config.extensions.forEach(function(t){return s.getExtension(t)});for(var c=this.config.arrayType,f=c?new c(l*l*4):null,h=this.config,p=0;p<2;p++){var d=s.createTexture(),g=s.createFramebuffer();s.bindFramebuffer(s.FRAMEBUFFER,g),s.bindTexture(s.TEXTURE_2D,d),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,h.linearSupport?s.LINEAR:s.NEAREST),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MAG_FILTER,h.linearSupport?s.LINEAR:s.NEAREST),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,s.CLAMP_TO_EDGE),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,s.CLAMP_TO_EDGE),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,l,l,0,s.RGBA,h.type,f),s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,d,0),i.push(d),o.push(g)}e.quad=s.createBuffer(),s.bindBuffer(s.ARRAY_BUFFER,e.quad),s.bufferData(s.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,1,1,-1,1]),s.STATIC_DRAW),Reflect.apply(ot,this,[]),Reflect.apply(at,this,[]),Reflect.apply(M,this,[]),s.clearColor(0,0,0,0),s.blendFunc(s.SRC_ALPHA,s.ONE_MINUS_SRC_ALPHA),r.visible=!0,r.running=!0,Reflect.apply(nt,this,[]),Reflect.apply(lt,this,[n.lastDrawImage]),e.animationFrameId=requestAnimationFrame(function(){return Reflect.apply(et,t,[])})}}function ut(){var t=this.renderData,e=this.fadeData;if(!(0,a.isNull)(t)){var r=t.parentElement,n=e.backgroundInfo,i=r.offsetWidth,o=r.offsetHeight;this.canvas.width=n.width=i,this.canvas.height=n.height=o,Reflect.apply(M,this,[])}}function ct(){var t=this.renderData,e=this.fadeData;(0,a.isNull)(t)||(t.destroy(),Object.keys(t).forEach(function(e){return t[e]=null}),this.renderData=null),e.destroy(),Object.keys(e).forEach(function(t){return e[t]=null}),this.fadeData=null,this.gl&&(this.gl=null)}function ft(t,e,r,n){var i=this.renderData,o=this.options,l=this.gl;if(!(0,a.isNull)(i)){var u=i.parentElement,c=i.dropProgram,f=i.textures,h=i.framebuffers,p=i.bufferWriteIndex,d=i.bufferReadIndex,g=o.resolution,m=u.offsetWidth,v=u.offsetHeight,y=Math.max(m,v);r/=y;var b=new Float32Array([(2*t-m)/y,(v-2*e)/y]);l.viewport(0,0,g,g),l.bindFramebuffer(l.FRAMEBUFFER,h[p]),Reflect.apply(s,this,[f[d]]),l.useProgram(c.id),l.uniform2fv(c.locations.center,b),l.uniform1f(c.locations.radius,r),l.uniform1f(c.locations.strength,n),Reflect.apply(Z,this,[]),Reflect.apply(Q,this,[])}}function ht(t){"@babel/helpers - typeof";return ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ht(t)}function pt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,gt(n.key),n)}}function dt(t,e,r){return(e=gt(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function gt(t){var e=function(t,e){if("object"!=ht(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ht(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ht(e)?e:e+""}function mt(t,e,r){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,r)}function vt(t,e){return t.get(bt(t,e))}function yt(t,e,r){return t.set(bt(t,e),r),r}function bt(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}var Et=new WeakMap,wt=new WeakMap,Rt=new WeakMap,Tt=new WeakMap,St=new WeakMap,kt=new WeakMap,Pt=new WeakMap,xt=new WeakMap,Dt=function(){return t=function t(e){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),mt(this,Et,b.accelerating),mt(this,wt,b.interactive),mt(this,Rt,b.resolution),mt(this,Tt,b.perturbance),mt(this,St,b.dropRadius),dt(this,"imgUrl",b.imgUrl),mt(this,kt,b.idleFluctuations),mt(this,Pt,b.raindropsTimeInterval),dt(this,"crossOrigin","no-cors"),dt(this,"visible",!1),dt(this,"running",!1),mt(this,xt,void 0),dt(this,"lastRunningState",!1),this.perturbance=e.perturbance,this.resolution=e.resolution,this.raindropsTimeInterval=e.raindropsTimeInterval,this.accelerating=e.accelerating,this.interactive=e.interactive,this.dropRadius=e.dropRadius,this.imgUrl=e.imgUrl,this.idleFluctuations=e.idleFluctuations,this.running=Boolean(null===(r=e.playingState)||void 0===r||r),this.crossOrigin=e.crossOrigin,this.darkMode=e.darkMode},(e=[{key:"accelerating",get:function(){return vt(Et,this)},set:function(t){t>100||t<2||yt(Et,this,t)}},{key:"interactive",get:function(){return vt(wt,this)},set:function(t){(0,a.isBoolean)(t)&&yt(wt,this,t)}},{key:"resolution",get:function(){return vt(Rt,this)},set:function(t){t<100||t>550||yt(Rt,this,t)}},{key:"perturbance",get:function(){return vt(Tt,this)},set:function(t){t<1e-4||t>1||yt(Tt,this,t)}},{key:"dropRadius",get:function(){return vt(St,this)},set:function(t){!isFinite(t)||t<10||yt(St,this,t)}},{key:"idleFluctuations",get:function(){return vt(kt,this)},set:function(t){(0,a.isBoolean)(t)&&yt(kt,this,t)}},{key:"raindropsTimeInterval",get:function(){return vt(Pt,this)},set:function(t){t<10||t>12e3||yt(Pt,this,t)}},{key:"playingState",get:function(){return this.running},set:function(t){this.running=Boolean(null==t||t)}},{key:"darkMode",get:function(){return vt(xt,this)},set:function(t){yt(xt,this,(0,a.isUndefined)(t)?void 0:Boolean(t))}}])&&pt(t.prototype,e),r&&pt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();function _t(){var t=this.fadeData,e=this.options,r=this.renderData;if((0,a.isNull)(r))return!0;var n=e.imgUrl,i=r.lastUseStyle,o=t.lastDrawImage,l=t.backgroundInfo,s=l.width,u=l.height,c=o.tag,f=o.kind,h=U(e,i),p=o.width===s,d=o.height===u,g=p&&d;if("image"===f&&g&&(0,a.isString)(h)&&h===c)return!0;var m=(0,a.isArray)(n)&&n.join("_")||"";if("linear-gradient"===f&&g&&m===c)return!0;var v=j(e,i);return!("background-color"!==f||!g||c!==v)}function Ot(){var t=this,e=this.options,r=this.fadeData;r.transparentId=setTimeout(function(){if(clearTimeout(r.transparentId),r.isTransitioning)return Reflect.apply(Ot,t,[]);Reflect.apply(_t,t,[])||r.run()},2*e.raindropsTimeInterval)}function At(){var t=this.renderData,e=this.fadeData,r=this.options,n=e.toBeList;if((0,a.isNull)(t))return Reflect.apply(It,this,["还没有准备好,即将退出"]);if((0,a.isEmptyArray)(n))return Reflect.apply(It,this,["由于缺少当前渲染的背景,退出"]);if(0===e.drawProgress&&n.forEach(function(t){}),e.drawProgress>1e3){if(e.lastDrawImage=n.shift(),Reflect.apply(lt,this,[e.lastDrawImage]),(0,a.isEmptyArray)(n)){var i=t.lastUseStyle;((0,a.isNull)(r.imgUrl)||(0,a.isBusinessEmptyString)(r.imgUrl)||(0,a.isZero)(r.imgUrl.length))&&u(i.backgroundColor)&&c(i.backgroundImage)&&Reflect.apply(F,this,[!1])}return Reflect.apply(It,this,["当前执行完毕,开启下次执行"])}var o=e.lastDrawImage,l=e.backgroundInfo;e.drawProgress+=18;var s=document.createElement("canvas"),f=s.getContext("2d");if((0,a.isNull)(f)||(0,a.isNull)(o.resource)||(0,a.isEmptyArray)(n))return Reflect.apply(It,this,"环境值错误");var h=l.width,p=l.height;s.width=h,s.height=p,f.clearRect(0,0,h,p),f.drawImage(o.resource,0,0,h,p),f.globalAlpha=e.drawProgress/1e3,f.drawImage(n[0].resource,0,0,h,p),f.globalAlpha=1;var d={resource:s,width:h,height:p,kind:"mix",tag:"".concat(o.tag," >> ").concat(n[0].tag)};Reflect.apply(lt,this,[d]),n.length>1&&(e.lastDrawImage=d,n.shift(),e.drawProgress=0)}function It(t){this.fadeData.isTransitioning=!1,Reflect.apply(Ot,this,[])}function Ft(t){"@babel/helpers - typeof";return Ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ft(t)}function Ut(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ct(n.key),n)}}function jt(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Nt(t,e,r){return(e=Ct(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ct(t){var e=function(t,e){if("object"!=Ft(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Ft(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Ft(e)?e:e+""}function Lt(t,e){return t.get(Bt(t,e))}function Bt(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}var Mt=new WeakMap,Xt=new WeakSet,Wt=function(){return t=function t(e){var r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),jt(r=this,n=Xt),n.add(r),Nt(this,"backgroundInfo",{width:0,height:0}),Nt(this,"transparentId",setTimeout(Boolean)),Nt(this,"lastDrawImage",void 0),Nt(this,"toBeList",[]),Nt(this,"drawProgress",0),Nt(this,"isTransitioning",!1),function(t,e,r){jt(t,e),e.set(t,r)}(this,Mt,void 0),Nt(this,"isDark",!1);var i,o,l=e.renderData;if((0,a.isNull)(l))i=10,o=10;else{var s=getComputedStyle(l.parentElement);i=parseInt(s.width),o=parseInt(s.height)}this.backgroundInfo={width:i,height:o},this.lastDrawImage={resource:I(i,o),width:i,height:o,kind:"default",tag:""},function(t,e,r){t.set(Bt(t,e),r)}(Mt,this,window.matchMedia("(prefers-color-scheme: dark)")),this.isDark=Lt(Mt,this).matches,Lt(Mt,this).addEventListener("change",Bt(Xt,this,zt));var u=this;Object.defineProperty(Lt(Mt,this),"isDark",{get:function(){return u.isDark},set:function(t){u.isDark=t,Reflect.apply(_t,e,[])||Reflect.apply(F,e,[!0])}})},(e=[{key:"run",value:function(){this.isTransitioning||(this.drawProgress=0,this.isTransitioning=!0)}},{key:"destroy",value:function(){this.transparentId&&clearTimeout(this.transparentId),Lt(Mt,this).removeEventListener("change",Bt(Xt,this,zt))}}])&&Ut(t.prototype,e),r&&Ut(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();function zt(t){this.isDark=t.matches}function Gt(t){"@babel/helpers - typeof";return Gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gt(t)}function Ht(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function qt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ht(Object(r),!0).forEach(function(e){Qt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ht(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Yt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,te(n.key),n)}}function $t(t,e,r){return e=Vt(e),function(t,e){if(e&&("object"==Gt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Kt()?Reflect.construct(e,r||[],Vt(t).constructor):e.apply(t,r))}function Kt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Kt=function(){return!!t})()}function Vt(t){return Vt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Vt(t)}function Zt(t,e){return Zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Zt(t,e)}function Jt(t,e,r){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,r)}function Qt(t,e,r){return(e=te(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function te(t){var e=function(t,e){if("object"!=Gt(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Gt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Gt(e)?e:e+""}function ee(t,e){return t.get(function(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}(t,e))}var re=new WeakMap,ne=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Qt(n=$t(this,e,[t]),"renderData",null),Qt(n,"options",void 0),Qt(n,"fadeData",void 0),Qt(n,"defaults",b),Qt(n,"initialized",!1),Jt(n,re,(0,y.debounce)(ut,{this:n})),Object.defineProperties(n,{defaults:{value:n.defaults,writable:!1,enumerable:!1,configurable:!1}}),n.options=new Dt(qt(qt({},n.defaults),r)),n.renderData=new $(t,n.reloadBackground,n),n.fadeData=new Wt(n),(0,a.isFalse)(n.initState)||(0,a.isNull)(t.parentElement)||(0,a.isNull)(n.config)||(0,a.isNull)(n.gl)?n.initState=!1:(!function(t){var e=t.parentElement;t.width=e.clientWidth,t.height=e.clientHeight,(0,o.setStyle)(t,{position:"absolute",left:0,top:0,right:0,bottom:0,zIndex:-1,pointerEvents:"none"})}(t),Reflect.apply(st,n,[])),window.matchMedia("(prefers-color-scheme: dark)"),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zt(t,e)}(e,t),r=e,(n=[{key:"raindropsFall",value:function(){var t=this.renderData,e=this.options,r=this.fadeData;if(!(0,a.isNull)(t)){var n=r.backgroundInfo,i=t.lastRaindropsFallTime,o=e.raindropsTimeInterval,l=e.dropRadius,s=Date.now();if(!(s-i<o)){t.lastRaindropsFallTime=s;var u=function(t){return(0,y.getRandomInt)(t)},c=n.width,f=n.height;this.drop(u(c),u(f),l,.03)}}}},{key:"drop",value:function(t,e,r,n){Reflect.apply(ft,this,[t,e,r,n])}},{key:"fade",value:function(){Reflect.apply(At,this,[])}},{key:"reloadBackground",value:function(){ee(re,this).call(this)}},{key:"destroy",value:function(){Reflect.apply(ct,this,[])}},{key:"show",value:function(){this.options.visible=!0,this.canvas.style.visibility="visible",Reflect.apply(X,this,[])}},{key:"hide",value:function(){this.options.visible=!1,this.canvas.style.visibility="hidden",Reflect.apply(z,this,[])}},{key:"pause",value:function(){this.options.running=!1}},{key:"play",value:function(){this.options.running=!0}},{key:"changePlayingState",value:function(){var t=this.options;t.running=!t.running}},{key:"set",value:function(t,e){"imgUrl"===t?(this.options.imgUrl=e,Reflect.apply(M,this,[])):"darkMode"===t?(this.options.darkMode=e,Reflect.apply(_t,this,[])||Reflect.apply(F,this,[!0])):this.options[t]=e}}])&&Yt(r.prototype,n),i&&Yt(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,i}(v);function ie(t,e){var r=(0,i.useRef)(null);return(0,i.useEffect)(function(){if(!(0,a.isNull)(t.current))return r.current=new ne(t.current,e&&e.option),function(){var t;return null===(t=r.current)||void 0===t?void 0:t.destroy()}},[]),r}module.exports.earthnut=n})();
1
+ "use client";(()=>{"use strict";var t={570:t=>{t.exports=require("a-type-of-js")},705:t=>{t.exports=require("a-js-tools")},713:()=>{function t(e){"@babel/helpers - typeof";return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,r(i.key),i)}}function r(e){var r=function(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,r||"default");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==t(r)?r:r+""}new(function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(){};return Object.setPrototypeOf(e,this),Object.defineProperties(e,{info:{value:function(){},configurable:!1,writable:!1},warn:{value:function(){},configurable:!1,writable:!1},error:{value:function(){},configurable:!1,writable:!1},type:{value:!1,configurable:!1,writable:!1}}),e},(r=[{key:"clear",value:function(){}}])&&e(t.prototype,r),n&&e(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,n}())({name:"earthnut",type:!1})},953:t=>{t.exports=require("react")}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};r.r(n),r.d(n,{useRipples:()=>ie});var i=r(953);const o=require("a-element-inline-style");var a=r(570);function l(t,e,r,n){function i(t,e){var n=r.createShader(t);if(r.shaderSource(n,e),r.compileShader(n),!r.getShaderParameter(n,r.COMPILE_STATUS))throw new Error("compile error: "+r.getShaderInfoLog(n));return n}var o,l={id:r.createProgram(),uniforms:{},locations:{}};if(r.attachShader(l.id,i(r.VERTEX_SHADER,t)),r.attachShader(l.id,i(r.FRAGMENT_SHADER,e)),r.linkProgram(l.id),!r.getProgramParameter(l.id,r.LINK_STATUS))throw new Error("link error: "+r.getProgramInfoLog(l.id));r.useProgram(l.id),r.enableVertexAttribArray(0);for(var s=t+e,u=/uniform (\w+) (\w+)/g;!(0,a.isNull)(o=u.exec(s));){var c=o[2];l.locations[c]=r.getUniformLocation(l.id,c)}return l}function s(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.gl;r.activeTexture(r.TEXTURE0+(e||0)),r.bindTexture(r.TEXTURE_2D,t)}function u(t){return"rgba(0, 0, 0, 0)"===t||"#ffffffff"===t||"transport"===t}function c(t){return"none"===t||""===t}function f(){var t=this,e=function(){return t.initState=!1,null};if(!this.gl)return e();var r=this.gl,n=Object.fromEntries(["OES_texture_float","OES_texture_half_float","OES_texture_float_linear","OES_texture_half_float_linear"].reduce(function(t,e){var n=r.getExtension(e);return n&&t.push([e,n]),t},[]));if(!n.OES_texture_float)return e();var i=[];function o(t,e,r){var i="OES_texture_"+t,o=i+"_linear",a=o in n;return{type:e,linearSupport:a,arrayType:r,extensions:a?[i,o]:[i]}}i.push(o("float",r.FLOAT,Float32Array)),n.OES_texture_half_float&&i.push(o("half_float",n.OES_texture_half_float.HALF_FLOAT_OES,null));var a=r.createTexture(),l=r.createFramebuffer();r.bindFramebuffer(r.FRAMEBUFFER,l),r.bindTexture(r.TEXTURE_2D,a),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE);for(var s=null,u=0;u<i.length;u++)if(r.texImage2D(r.TEXTURE_2D,0,r.RGBA,32,32,0,r.RGBA,i[u].type,null),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,a,0),r.checkFramebufferStatus(r.FRAMEBUFFER)===r.FRAMEBUFFER_COMPLETE){s=i[u];break}return s}function h(t){"@babel/helpers - typeof";return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h(t)}function p(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,m(n.key),n)}}function d(t,e,r){return e&&p(t.prototype,e),r&&p(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function g(t,e,r){return(e=m(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function m(t){var e=function(t,e){if("object"!=h(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==h(e)?e:e+""}var v=d(function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),g(this,"canvas",void 0),g(this,"gl",void 0),g(this,"config",void 0),g(this,"initState",!0),this.canvas=e;var r=e.getContext("webgl");if((0,a.isNull)(r))return this.initState=!1,void(this.config=null);this.gl=r,this.config=Reflect.apply(f,this,[])}),y=r(705),b={imgUrl:null,resolution:360,dropRadius:12,perturbance:.01,interactive:!0,crossOrigin:"no-cors",playingState:!0,accelerating:1,raindropsTimeInterval:3600,idleFluctuations:!0,darkMode:void 0};Object.freeze(b);var E;r(713);function w(t){"@babel/helpers - typeof";return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},w(t)}function R(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,T(n.key),n)}}function T(t){var e=function(t,e){if("object"!=w(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==w(e)?e:e+""}function S(t,e,r){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,r)}function k(t,e,r){return t.set(x(t,e),r),r}function P(t,e){return t.get(x(t,e))}function x(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}function D(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return _(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var O=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r={list:[],diameter:48,radius:0,cells:0};r.diameter%2!=0&&r.diameter++;var n=r.diameter,i=r.list,o=n/2;r.radius=o,r.cells=Math.pow(n,2);for(var a=0;a<n;a++){i[a]=[];for(var l=0;l<n;l++)i[a][l]=[0,0,0,0]}for(var s=0;s<=o;s++)for(var u=function(){var t=i[s][c],r=Math.ceil(Math.sqrt(Math.pow(s,2)+Math.pow(c,2)))<=o,n=e?10:255,a=e?25:190,l=r?e?160:120:e?160:180,u=r?e?230:160:e?250:240,f=function(){return(0,y.getRandomInt)(n,a)};t[0]=f(),t[1]=f(),t[2]=f(),t[3]=(0,y.getRandomInt)(l,u)},c=s;c<=o;c++)u();for(var f=0;f<=o;f++)for(var h=0;h<=f;h++)i[f][h]=i[h][f];for(var p=o;p<n;p++)for(var d=0;d<=o;d++)i[p][d]=i[n-p][d];for(var g=0;g<o;g++)for(var m=o;m<n;m++)i[g][m]=i[g][n-m];for(var v=o;v<n;v++)for(var b=o;b<n;b++)i[v][b]=i[v][n-b];var E=t%n;return r.list=[].concat(D(i.slice(E)),D(i.slice(0,E))),r},A=new(E=new WeakMap,function(){return t=function t(){var e,r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),S(this,E,1),e=this,r="data",n=O(),(r=T(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n},(e=[{key:"build",value:function(t){P(E,this)>100&&k(E,this,0),this.data=O(k(E,this,P(E,this)+4),t)}}])&&R(t.prototype,e),r&&R(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}());function I(t,e){var r=document.createElement("canvas"),n=document.createElement("canvas"),i=r.getContext("2d"),o=n.getContext("2d");return(0,a.isNull)(i)||(0,a.isNull)(o)?r:(r.width=n.width=t||1,r.height=n.height=e||1,i.clearRect(0,0,t,e),o.clearRect(0,0,t,e),i.globalAlpha=1,i.putImageData(function(t,e){Date.now();for(var r=new ImageData(t||1,e||1),n=r.data,i=A.data,o=i.diameter,a=i.list,l=t*o,s=0;s<n.length;s+=4){var u=s/4%l,c=u%t%o,f=Math.floor(u/t),h=a[c][f];n[s]=h[0],n[s+1]=h[1],n[s+2]=h[2],n[s+3]=h[3]}return r}(t,e),0,0),o.fillStyle="#ffffff",o.fillRect(0,0,t,e),o.drawImage(r,0,0,t||1,e||1),o.globalCompositeOperation="source-over",n)}function F(){var t,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=this.fadeData,n=this.options,i=r.backgroundInfo,o=r.toBeList,a=i.width,l=i.height,s=(0,y.getRandomString)({length:8,includeNumbers:!0,includeUppercaseLetters:!0});A.build(null!==(t=n.darkMode)&&void 0!==t?t:r.isDark),o.push({resource:I(a,l),width:a,height:l,kind:"default",tag:s}),e&&r.run()}function U(t,e){var r,n,i=t.imgUrl;return(0,a.isString)(i)&&i||(r=e.backgroundImage,n=/url\(["']?([^"']*)["']?\)/.exec(r),(0,a.isNull)(n)?null:n[1])}function j(t,e){return(0,a.isArray)(t.imgUrl)&&1===t.imgUrl.length&&t.imgUrl[0]||e.backgroundColor}function N(){var t=this.renderData,e=this.fadeData,r=this.options;if((0,a.isNull)(t))return Reflect.apply(F,this,[]);var n=t.originStyle;if(u(n.backgroundColor)&&(!(0,a.isArray)(r.imgUrl)||1!==r.imgUrl.length))return Reflect.apply(F,this,[]);var i=document.createElement("canvas"),o=i.getContext("2d");if((0,a.isNull)(o))return Reflect.apply(F,this,[]);var l=e.backgroundInfo,s=l.width,c=l.height;i.width=s,i.height=c,o.clearRect(0,0,s,c);var f=j(r,n);o.beginPath(),o.fillStyle=f,o.fillRect(0,0,s,c),o.fill(),e.isTransitioning&&!(0,a.isEmptyArray)(e.toBeList)?e.toBeList=[e.toBeList[0]]:e.toBeList=[];var h={resource:i,kind:"background-color",tag:f,width:s,height:c};e.toBeList.push(h),e.run()}function C(){var t=this.fadeData,e=this.renderData,r=this.options;if((0,a.isNull)(e))return Reflect.apply(N,this,[]);var n=e.originStyle;if(!/linear-gradient\(.*\)/.test(n.backgroundImage)&&!(0,a.isArray)(r.imgUrl))return Reflect.apply(N,this,[]);var i=(0,a.isArray)(r.imgUrl)&&r.imgUrl.length>1&&r.imgUrl||n.backgroundImage.replace(/^.*linear-gradient\((.*)\).*$/,"$1").split("),").map(function(t){return(t=t.trim()).endsWith(")")||(t+=")"),t}).filter(function(t){return t.startsWith("rgb")||t.startsWith("#")});if(i.length<2)return Reflect.apply(N,this,[]);var o=document.createElement("canvas"),l=o.getContext("2d");if((0,a.isNull)(l))return Reflect.apply(N,this,[]);var s=t.backgroundInfo,u=s.width,c=s.height;o.width=u,o.height=c,l.fillStyle="#fff",l.fillRect(0,0,u,c);var f=l.createLinearGradient(0,0,0,c);i.forEach(function(t,e){return f.addColorStop(e/(i.length-1),t)}),l.fillStyle=f,l.fillRect(0,0,u,c),t.isTransitioning&&!(0,a.isEmptyArray)(t.toBeList)?t.toBeList=[t.toBeList[0]]:t.toBeList=[],t.toBeList.push({resource:o,kind:"linear-gradient",tag:i.join("_"),width:u,height:c}),t.run()}function L(t){return function(t){if(Array.isArray(t))return B(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return B(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?B(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function B(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function M(){var t=this,e=this.renderData,r=this.options,n=this.fadeData;if((0,a.isNull)(e))Reflect.apply(C,this,[]);else{var i=e.lastUseStyle,o=n.backgroundInfo,l=o.width,s=o.height,u=U(r,i);if(e.imageSource=u,u){var c=function(t,e,r){var n=new Image(e,r);return n.width=e,n.height=r,n.src=t,n}(u,l,s);c.onload=function(){clearTimeout(n.transparentId),n.isTransitioning&&!(0,a.isEmptyArray)(n.toBeList)?n.toBeList=[n.toBeList[0]].concat(L(n.toBeList.slice(1).filter(function(t){return"image"===t.kind&&(Math.abs(t.width-l)>2||Math.abs(t.height-s)>2||t.tag!==u)}))):n.toBeList=[],n.toBeList.push({resource:c,width:l,height:s,kind:"image",tag:u}),n.run()},c.onerror=function(){Reflect.apply(C,t,[])},c.crossOrigin=r.crossOrigin}else Reflect.apply(C,this,[])}}function X(){var t=this.renderData;if(!(0,a.isNull)(t)){var e=t.parentElement;e&&[["background-image","none"],["background-color","transparent"]].forEach(function(t){return e.style.setProperty(t[0],t[1],"important")})}}function W(t){var e=window.getComputedStyle(t),r=t.style;return{inlineBackground:r.background,inlineBackgroundColor:r.backgroundColor,inlineBackgroundImage:r.backgroundImage,backgroundColor:e.backgroundColor,backgroundImage:e.backgroundImage,backgroundSize:e.backgroundSize,backgroundPosition:e.backgroundPosition,backgroundRepeat:e.backgroundRepeat,backgroundClip:e.backgroundClip,backgroundOrigin:e.backgroundOrigin,backgroundAttachment:e.backgroundAttachment,position:e.position,width:parseInt(e.width),height:parseInt(e.height)}}function z(){var t=this.renderData;if(!(0,a.isNull)(t)){var e=t.parentElement,r=t.originStyle;e.style.setProperty("background-image",r.inlineBackgroundImage),e.style.setProperty("background-color",r.inlineBackgroundColor)}}function G(t){"@babel/helpers - typeof";return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(t)}function H(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Y(n.key),n)}}function q(t,e,r){return(e=Y(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Y(t){var e=function(t,e){if("object"!=G(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=G(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==G(e)?e:e+""}var $=function(){return t=function t(e,r,n){var i,o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),q(this,"quad",null),q(this,"lastRaindropsFallTime",0),q(this,"parentElement",void 0),q(this,"mutationObserver",void 0),q(this,"resizeObserver",void 0),q(this,"renderProgram",void 0),q(this,"imageSource",""),q(this,"dropProgram",void 0),q(this,"updateProgram",void 0),q(this,"textures",[]),q(this,"backgroundTexture",[]),q(this,"textureDelta",void 0),q(this,"framebuffers",[]),q(this,"bufferWriteIndex",0),q(this,"bufferReadIndex",1),q(this,"originStyle",void 0),q(this,"lastUseStyle",void 0),q(this,"events",{}),q(this,"animationFrameId",0),this.parentElement=null!==(i=e.parentElement)&&void 0!==i?i:document.body,Reflect.apply(X,n,[]),this.originStyle=this.lastUseStyle=W(this.parentElement),this.mutationObserver=new MutationObserver(function(t){t.forEach(function(t){if(t.target===o.parentElement&&"attributes"===t.type&&n.options.visible){var e=Object.values(o.lastUseStyle),i=W(o.parentElement),l=Object.values(i);if((0,a.isEmptyArray)(y.enArr.difference(e,l)))return;var s=c(i.backgroundImage),f=u(i.backgroundColor);if(s&&f)return;o.lastUseStyle=i,Reflect.apply(r,n,[]),Reflect.apply(X,n,[])}})}),this.mutationObserver.observe(this.parentElement,{subtree:!0,attributes:!0,attributeFilter:["class","style"]}),this.resizeObserver=new ResizeObserver(function(t){t.forEach(function(t){t.target===o.parentElement&&Reflect.apply(r,n,[])})}),this.resizeObserver.observe(this.parentElement)},e=[{key:"destroy",value:function(){if(this.animationFrameId&&window.cancelAnimationFrame(this.animationFrameId),Reflect.apply(z,{renderData:this},[]),this.parentElement&&this.events){var t,e,r,n=this.parentElement,i=this.events;Object.keys(i).forEach(function(t){return n.removeEventListener&&n.removeEventListener(t,i[t])}),n.removeAttribute&&n.removeAttribute("data-ripples"),null===(t=this.mutationObserver)||void 0===t||t.takeRecords(),null===(e=this.mutationObserver)||void 0===e||e.disconnect(),this.mutationObserver=null,null===(r=this.resizeObserver)||void 0===r||r.disconnect(),this.resizeObserver=null}}}],e&&H(t.prototype,e),r&&H(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();function K(){var t=this.renderData,e=this.fadeData;if(!(0,a.isNull)(t)){var r,n,i,o=t.parentElement,l=window.getComputedStyle(o),s=l.backgroundSize,u=l.backgroundAttachment,c=l.backgroundPosition,f=/\s+/.test(r=c)?r.replace(/center/,"50%").replace(/top|left/,"0%").replace(/bottom/,"100%").replace(/\s+/," ").split(" "):V(r)?[r,"50%"]:{center:["50%","50%"],top:["50%","0%"],bottom:["50%","100%"],left:["0%","50%"],right:["100%","50%"]}[r],h={left:0,top:0,width:0,height:0};"fixed"===u?(h.height=window.innerHeight,h.left=window.screenX,h.top=window.screenY,h.width=window.innerWidth):(h.left=0,h.top=0,h.width=o.scrollWidth,h.height=o.scrollHeight);var p=e.backgroundInfo||{width:100,height:100},d=p.width,g=p.height;if("cover"===s){var m=Math.max(h.width/d,h.height/g);n=d*m,i=g*m}else if("contain"===s){var v=Math.min(h.width/d,h.height/g);n=d*v,i=g*v}else{var y=s.split(" ");n=y[0]||"",i=y[1]||n,V(n)?n=h.width*parseFloat(n)/100:"auto"!==n&&(n=parseFloat(n)),V(i)?i=h.height*parseFloat(i)/100:"auto"!==i&&(i=parseFloat(i)),"auto"===n&&"auto"===i?(n=d,i=g):("auto"===n&&(n=d*(Number(i)/g)),"auto"===i&&(i=g*(Number(n)/d)))}var b=f&&f[0]||"0%",E=f&&f[1]||"0%";b=V(b)?(h.left+(h.width-Number(n))*parseFloat(b)/100).toString():(h.left+parseFloat(b)).toString(),E=V(E)?(h.top+(h.height-Number(i))*parseFloat(E)/100).toString():(h.top+parseFloat(E)).toString(),t.renderProgram.uniforms.topLeft=new Float32Array([-Number(b)/n,-Number(E)/i]),t.renderProgram.uniforms.bottomRight=new Float32Array([t.renderProgram.uniforms.topLeft[0]+o.clientWidth/n,t.renderProgram.uniforms.topLeft[1]+o.clientHeight/i]);var w=Math.max(this.canvas.width,this.canvas.height);t.renderProgram.uniforms.containerRatio=new Float32Array([this.canvas.width/w,this.canvas.height/w])}}function V(t){return t.endsWith("%")}function Z(){var t=this.gl,e=this.renderData;(0,a.isNull)(e)||(t.bindBuffer(t.ARRAY_BUFFER,e.quad),t.vertexAttribPointer(0,2,t.FLOAT,!1,0,0),t.drawArrays(t.TRIANGLE_FAN,0,4))}function J(){var t=this.gl,e=this.renderData,r=this.options;if(!(0,a.isNull)(e)){var n=e.textures,i=e.backgroundTexture,o=r.perturbance;t.bindFramebuffer(t.FRAMEBUFFER,null),t.viewport(0,0,this.canvas.width,this.canvas.height),t.enable(t.BLEND),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),t.useProgram(e.renderProgram.id),Reflect.apply(s,this,[i,0]),Reflect.apply(s,this,[n[0],1]),t.uniform1f(e.renderProgram.locations.perturbance,o),t.uniform2fv(e.renderProgram.locations.topLeft,e.renderProgram.uniforms.topLeft),t.uniform2fv(e.renderProgram.locations.bottomRight,e.renderProgram.uniforms.bottomRight),t.uniform2fv(e.renderProgram.locations.containerRatio,e.renderProgram.uniforms.containerRatio),t.uniform1i(e.renderProgram.locations.samplerBackground,0),t.uniform1i(e.renderProgram.locations.samplerRipples,1),Reflect.apply(Z,this,[]),t.disable(t.BLEND)}}function Q(){var t=this.renderData;if(!(0,a.isNull)(t)){var e=t.bufferWriteIndex,r=t.bufferReadIndex;t.bufferWriteIndex=1-e,t.bufferReadIndex=1-r}}function tt(){var t=this.gl,e=this.renderData,r=this.options;if(!(0,a.isNull)(e)){var n=e.updateProgram,i=e.textures,o=e.framebuffers,l=e.bufferWriteIndex,u=e.bufferReadIndex,c=r.resolution;t.viewport(0,0,c,c),t.bindFramebuffer(t.FRAMEBUFFER,o[l]),Reflect.apply(s,this,[i[u]]),t.useProgram(n.id),Reflect.apply(Z,this,[]),Reflect.apply(Q,this,[])}}function et(){var t=this,e=this.renderData,r=this.options,n=this.fadeData;if(!(0,a.isNull)(e)){var i=e.parentElement,o=n.isTransitioning,l=r.running,s=r.idleFluctuations,u=r.lastRunningState,c=getComputedStyle(i);n.backgroundInfo={width:parseInt(c.width),height:parseInt(c.height)},Reflect.apply(K,this,[]),l?(u||(r.lastRunningState=!0,this.show()),s&&this.raindropsFall(),o&&this.fade(),Reflect.apply(tt,this,[]),Reflect.apply(J,this,[])):u&&(r.lastRunningState=!1,this.hide()),e.animationFrameId=requestAnimationFrame(function(){return Reflect.apply(et,t,[])})}}function rt(t,e,r){var n=this.renderData;if(!(0,a.isNull)(n)){var i=n.parentElement,o=window.getComputedStyle(i),l=parseInt(o.borderLeftWidth)||0,s=parseInt(o.borderTopWidth)||0,u=i.getBoundingClientRect(),c=t.clientX-u.left-l,f=t.clientY-u.top-s;this.drop(c,f,e,r)}}function nt(){var t=this,e=this.renderData,r=this.options;if(!(0,a.isNull)(e)){var n=e.parentElement,i=e.events,o=function(n){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];r.visible&&r.running&&r.interactive&&(e.lastRaindropsFallTime=Date.now(),Reflect.apply(rt,t,[n,r.dropRadius*(i?1.5:1),i?.03:.01]))};i.mousemove=function(t){for(var e=r.accelerating;e--;)o(t)},i.touchmove=i.touchstart=function(t){for(var e=t.touches,r=0;r<e.length;r++)o(e[r])},i.mousedown=function(t){return o(t,!0)},Object.keys(i).forEach(function(t){return null==n?void 0:n.addEventListener(t,i[t],{passive:!0})})}}var it="\n attribute vec2 vertex;\n varying vec2 coord;\n void main() {\n coord = vertex * 0.5 + 0.5;\n gl_Position = vec4(vertex, 0.0, 1.0);\n }";function ot(){var t=this.gl,e=this.renderData;if(!(0,a.isNull)(e)){var r=e.textureDelta;e.dropProgram=l(it,"precision highp float;\n\n const float PI = 3.141592653589793;\n uniform sampler2D texture;\n uniform vec2 center;\n uniform float radius;\n uniform float strength;\n\n varying vec2 coord;\n\n void main() {\n vec4 info = texture2D(texture, coord);\n\n float drop = max(0.0, 1.0 - length(center * 0.5 + 0.5 - coord) / radius);\n drop = 0.5 - cos(drop * PI) * 0.5;\n info.r += drop * strength;\n gl_FragColor = info;\n }",t);var n=e.updateProgram=l(it,"\n precision highp float;\n\n uniform sampler2D texture;\n uniform vec2 delta;\n\n varying vec2 coord;\n\n void main() {\n vec4 info = texture2D(texture, coord);\n \n vec2 dx = vec2(delta.x, 0.0);\n vec2 dy = vec2(0.0, delta.y);\n \n float average = (\n texture2D(texture, coord - dx).r +\n texture2D(texture, coord - dy).r +\n texture2D(texture, coord + dx).r +\n texture2D(texture, coord + dy).r\n ) * 0.25;\n \n info.g += (average - info.r) * 2.0;\n info.g *= 0.995;\n info.r += info.g;\n \n gl_FragColor = info;\n }\n ",this.gl);t.uniform2fv(n.locations.delta,r),e.renderProgram=l("\n precision highp float;\n\n attribute vec2 vertex;\n uniform vec2 topLeft;\n uniform vec2 bottomRight;\n uniform vec2 containerRatio;\n varying vec2 ripplesCoord;\n varying vec2 backgroundCoord;\n void main() {\n backgroundCoord = mix(topLeft, bottomRight, vertex * 0.5 + 0.5);\n backgroundCoord.y = 1.0 - backgroundCoord.y;\n ripplesCoord = vec2(vertex.x, -vertex.y) * containerRatio * 0.5 + 0.5;\n gl_Position = vec4(vertex.x, -vertex.y, 0.0, 1.0);\n }\n ","\n precision highp float;\n\n uniform sampler2D samplerBackground;\n uniform sampler2D samplerRipples;\n uniform vec2 delta;\n\n uniform float perturbance;\n varying vec2 ripplesCoord;\n varying vec2 backgroundCoord;\n\n void main() {\n float height = texture2D(samplerRipples, ripplesCoord).r;\n float heightX = texture2D(samplerRipples, vec2(ripplesCoord.x + delta.x, ripplesCoord.y)).r;\n float heightY = texture2D(samplerRipples, vec2(ripplesCoord.x, ripplesCoord.y + delta.y)).r;\n vec3 dx = vec3(delta.x, heightX - height, 0.0);\n vec3 dy = vec3(0.0, heightY - height, delta.y);\n vec2 offset = -normalize(cross(dy, dx)).xz;\n float specular = pow(max(0.0, dot(offset, normalize(vec2(-0.6, 1.0)))), 4.0);\n gl_FragColor = texture2D(samplerBackground, backgroundCoord + offset * perturbance) + specular;\n }",t),t.uniform2fv(e.renderProgram.locations.delta,r)}}function at(){var t=this.gl,e=this.renderData;if(!(0,a.isNull)(e)){var r=e.backgroundTexture=t.createTexture();t.bindTexture(t.TEXTURE_2D,r),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,1),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR)}}function lt(t){var e=this.gl,r=this.renderData,n=this.fadeData;if(!(0,a.isNull)(r)){var i=r.backgroundTexture,o=r.parentElement,l=n.backgroundInfo,s=l.width,u=l.height,c=function(t){return(0,a.isZero)(t&t-1)},f=c(s)&&c(u)?e.REPEAT:e.CLAMP_TO_EDGE;e.bindTexture(e.TEXTURE_2D,i),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,f),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,f),o.dataset.render_img=t.tag,o.dataset.render_width=t.width+"px",o.dataset.render_height=t.height+"px",e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t.resource)}}function st(){var t=this,e=this.renderData,r=this.options,n=this.fadeData;if(!(0,a.isNull)(e)&&this.config){var i=e.textures,o=e.framebuffers,l=r.resolution,s=this.gl,u=1/l;e.textureDelta=new Float32Array([u,u]),this.config.extensions.forEach(function(t){return s.getExtension(t)});for(var c=this.config.arrayType,f=c?new c(l*l*4):null,h=this.config,p=0;p<2;p++){var d=s.createTexture(),g=s.createFramebuffer();s.bindFramebuffer(s.FRAMEBUFFER,g),s.bindTexture(s.TEXTURE_2D,d),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,h.linearSupport?s.LINEAR:s.NEAREST),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MAG_FILTER,h.linearSupport?s.LINEAR:s.NEAREST),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,s.CLAMP_TO_EDGE),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,s.CLAMP_TO_EDGE),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,l,l,0,s.RGBA,h.type,f),s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,d,0),i.push(d),o.push(g)}e.quad=s.createBuffer(),s.bindBuffer(s.ARRAY_BUFFER,e.quad),s.bufferData(s.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,1,1,-1,1]),s.STATIC_DRAW),Reflect.apply(ot,this,[]),Reflect.apply(at,this,[]),Reflect.apply(M,this,[]),s.clearColor(0,0,0,0),s.blendFunc(s.SRC_ALPHA,s.ONE_MINUS_SRC_ALPHA),r.visible=!0,r.running=!0,Reflect.apply(nt,this,[]),Reflect.apply(lt,this,[n.lastDrawImage]),e.animationFrameId=requestAnimationFrame(function(){return Reflect.apply(et,t,[])})}}function ut(){var t=this.renderData,e=this.fadeData;if(!(0,a.isNull)(t)){var r=t.parentElement,n=e.backgroundInfo,i=r.offsetWidth,o=r.offsetHeight;this.canvas.width=n.width=i,this.canvas.height=n.height=o,Reflect.apply(M,this,[])}}function ct(){var t=this.renderData,e=this.fadeData;(0,a.isNull)(t)||(t.destroy(),Object.keys(t).forEach(function(e){return t[e]=null}),this.renderData=null),e.destroy(),Object.keys(e).forEach(function(t){return e[t]=null}),this.fadeData=null,this.gl&&(this.gl=null)}function ft(t,e,r,n){var i=this.renderData,o=this.options,l=this.gl;if(!(0,a.isNull)(i)){var u=i.parentElement,c=i.dropProgram,f=i.textures,h=i.framebuffers,p=i.bufferWriteIndex,d=i.bufferReadIndex,g=o.resolution,m=u.offsetWidth,v=u.offsetHeight,y=Math.max(m,v);r/=y;var b=new Float32Array([(2*t-m)/y,(v-2*e)/y]);l.viewport(0,0,g,g),l.bindFramebuffer(l.FRAMEBUFFER,h[p]),Reflect.apply(s,this,[f[d]]),l.useProgram(c.id),l.uniform2fv(c.locations.center,b),l.uniform1f(c.locations.radius,r),l.uniform1f(c.locations.strength,n),Reflect.apply(Z,this,[]),Reflect.apply(Q,this,[])}}function ht(t){"@babel/helpers - typeof";return ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ht(t)}function pt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,gt(n.key),n)}}function dt(t,e,r){return(e=gt(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function gt(t){var e=function(t,e){if("object"!=ht(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ht(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ht(e)?e:e+""}function mt(t,e,r){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,r)}function vt(t,e){return t.get(bt(t,e))}function yt(t,e,r){return t.set(bt(t,e),r),r}function bt(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}var Et=new WeakMap,wt=new WeakMap,Rt=new WeakMap,Tt=new WeakMap,St=new WeakMap,kt=new WeakMap,Pt=new WeakMap,xt=new WeakMap,Dt=function(){return t=function t(e){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),mt(this,Et,b.accelerating),mt(this,wt,b.interactive),mt(this,Rt,b.resolution),mt(this,Tt,b.perturbance),mt(this,St,b.dropRadius),dt(this,"imgUrl",b.imgUrl),mt(this,kt,b.idleFluctuations),mt(this,Pt,b.raindropsTimeInterval),dt(this,"crossOrigin","no-cors"),dt(this,"visible",!1),dt(this,"running",!1),mt(this,xt,void 0),dt(this,"lastRunningState",!1),this.perturbance=e.perturbance,this.resolution=e.resolution,this.raindropsTimeInterval=e.raindropsTimeInterval,this.accelerating=e.accelerating,this.interactive=e.interactive,this.dropRadius=e.dropRadius,this.imgUrl=e.imgUrl,this.idleFluctuations=e.idleFluctuations,this.running=Boolean(null===(r=e.playingState)||void 0===r||r),this.crossOrigin=e.crossOrigin,this.darkMode=e.darkMode},(e=[{key:"accelerating",get:function(){return vt(Et,this)},set:function(t){t>100||t<2||yt(Et,this,t)}},{key:"interactive",get:function(){return vt(wt,this)},set:function(t){(0,a.isBoolean)(t)&&yt(wt,this,t)}},{key:"resolution",get:function(){return vt(Rt,this)},set:function(t){t<100||t>550||yt(Rt,this,t)}},{key:"perturbance",get:function(){return vt(Tt,this)},set:function(t){t<1e-4||t>1||yt(Tt,this,t)}},{key:"dropRadius",get:function(){return vt(St,this)},set:function(t){!isFinite(t)||t<10||yt(St,this,t)}},{key:"idleFluctuations",get:function(){return vt(kt,this)},set:function(t){(0,a.isBoolean)(t)&&yt(kt,this,t)}},{key:"raindropsTimeInterval",get:function(){return vt(Pt,this)},set:function(t){t<10||t>12e3||yt(Pt,this,t)}},{key:"playingState",get:function(){return this.running},set:function(t){this.running=Boolean(null==t||t)}},{key:"darkMode",get:function(){return vt(xt,this)},set:function(t){yt(xt,this,(0,a.isUndefined)(t)?void 0:Boolean(t))}}])&&pt(t.prototype,e),r&&pt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();function _t(){var t=this.fadeData,e=this.options,r=this.renderData;if((0,a.isNull)(r))return!0;var n=e.imgUrl,i=r.lastUseStyle,o=t.lastDrawImage,l=t.backgroundInfo,s=l.width,u=l.height,c=o.tag,f=o.kind,h=U(e,i),p=o.width===s,d=o.height===u,g=p&&d;if("image"===f&&g&&(0,a.isString)(h)&&h===c)return!0;var m=(0,a.isArray)(n)&&n.join("_")||"";if("linear-gradient"===f&&g&&m===c)return!0;var v=j(e,i);return!("background-color"!==f||!g||c!==v)}function Ot(){var t=this,e=this.options,r=this.fadeData;r.transparentId=setTimeout(function(){if(clearTimeout(r.transparentId),r.isTransitioning)return Reflect.apply(Ot,t,[]);Reflect.apply(_t,t,[])||r.run()},2*e.raindropsTimeInterval)}function At(){var t=this.renderData,e=this.fadeData,r=this.options,n=e.toBeList;if((0,a.isNull)(t))return Reflect.apply(It,this,["还没有准备好,即将退出"]);if((0,a.isEmptyArray)(n))return Reflect.apply(It,this,["由于缺少当前渲染的背景,退出"]);if(0===e.drawProgress&&n.forEach(function(t){}),e.drawProgress>1e3){if(e.lastDrawImage=n.shift(),Reflect.apply(lt,this,[e.lastDrawImage]),(0,a.isEmptyArray)(n)){var i=t.lastUseStyle;((0,a.isNull)(r.imgUrl)||(0,a.isBusinessEmptyString)(r.imgUrl)||(0,a.isZero)(r.imgUrl.length))&&u(i.backgroundColor)&&c(i.backgroundImage)&&Reflect.apply(F,this,[!1])}return Reflect.apply(It,this,["当前执行完毕,开启下次执行"])}var o=e.lastDrawImage,l=e.backgroundInfo;e.drawProgress+=18;var s=document.createElement("canvas"),f=s.getContext("2d");if((0,a.isNull)(f)||(0,a.isNull)(o.resource)||(0,a.isEmptyArray)(n))return Reflect.apply(It,this,"环境值错误");var h=l.width,p=l.height;s.width=h,s.height=p,f.clearRect(0,0,h,p),f.drawImage(o.resource,0,0,h,p),f.globalAlpha=e.drawProgress/1e3,f.drawImage(n[0].resource,0,0,h,p),f.globalAlpha=1;var d={resource:s,width:h,height:p,kind:"mix",tag:"".concat(o.tag," >> ").concat(n[0].tag)};Reflect.apply(lt,this,[d]),n.length>1&&(e.lastDrawImage=d,n.shift(),e.drawProgress=0)}function It(t){this.fadeData.isTransitioning=!1,Reflect.apply(Ot,this,[])}function Ft(t){"@babel/helpers - typeof";return Ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ft(t)}function Ut(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ct(n.key),n)}}function jt(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Nt(t,e,r){return(e=Ct(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ct(t){var e=function(t,e){if("object"!=Ft(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Ft(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Ft(e)?e:e+""}function Lt(t,e){return t.get(Bt(t,e))}function Bt(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}var Mt=new WeakMap,Xt=new WeakSet,Wt=function(){return t=function t(e){var r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),jt(r=this,n=Xt),n.add(r),Nt(this,"backgroundInfo",{width:0,height:0}),Nt(this,"transparentId",setTimeout(Boolean)),Nt(this,"lastDrawImage",void 0),Nt(this,"toBeList",[]),Nt(this,"drawProgress",0),Nt(this,"isTransitioning",!1),function(t,e,r){jt(t,e),e.set(t,r)}(this,Mt,void 0),Nt(this,"isDark",!1);var i,o,l=e.renderData;if((0,a.isNull)(l))i=10,o=10;else{var s=getComputedStyle(l.parentElement);i=parseInt(s.width),o=parseInt(s.height)}this.backgroundInfo={width:i,height:o},this.lastDrawImage={resource:I(i,o),width:i,height:o,kind:"default",tag:""},function(t,e,r){t.set(Bt(t,e),r)}(Mt,this,window.matchMedia("(prefers-color-scheme: dark)")),this.isDark=Lt(Mt,this).matches,Lt(Mt,this).addEventListener("change",Bt(Xt,this,zt));var u=this;Object.defineProperty(Lt(Mt,this),"isDark",{get:function(){return u.isDark},set:function(t){u.isDark=t,Reflect.apply(_t,e,[])||Reflect.apply(F,e,[!0])}})},(e=[{key:"run",value:function(){this.isTransitioning||(this.drawProgress=0,this.isTransitioning=!0)}},{key:"destroy",value:function(){this.transparentId&&clearTimeout(this.transparentId),Lt(Mt,this).removeEventListener("change",Bt(Xt,this,zt))}}])&&Ut(t.prototype,e),r&&Ut(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();function zt(t){this.isDark=t.matches}function Gt(t){"@babel/helpers - typeof";return Gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gt(t)}function Ht(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function qt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ht(Object(r),!0).forEach(function(e){Qt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ht(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Yt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,te(n.key),n)}}function $t(t,e,r){return e=Vt(e),function(t,e){if(e&&("object"==Gt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Kt()?Reflect.construct(e,r||[],Vt(t).constructor):e.apply(t,r))}function Kt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Kt=function(){return!!t})()}function Vt(t){return Vt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Vt(t)}function Zt(t,e){return Zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Zt(t,e)}function Jt(t,e,r){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,r)}function Qt(t,e,r){return(e=te(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function te(t){var e=function(t,e){if("object"!=Gt(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Gt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Gt(e)?e:e+""}function ee(t,e){return t.get(function(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}(t,e))}var re=new WeakMap,ne=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Qt(n=$t(this,e,[t]),"renderData",null),Qt(n,"options",void 0),Qt(n,"fadeData",void 0),Qt(n,"defaults",b),Qt(n,"initialized",!1),Jt(n,re,(0,y.debounce)(ut,{this:n})),Object.defineProperties(n,{defaults:{value:n.defaults,writable:!1,enumerable:!1,configurable:!1}}),n.options=new Dt(qt(qt({},n.defaults),r)),n.renderData=new $(t,n.reloadBackground,n),n.fadeData=new Wt(n),(0,a.isFalse)(n.initState)||(0,a.isNull)(t.parentElement)||(0,a.isNull)(n.config)||(0,a.isNull)(n.gl)?n.initState=!1:(!function(t){var e=t.parentElement;t.width=e.clientWidth,t.height=e.clientHeight,(0,o.setStyle)(t,{position:"absolute",left:0,top:0,right:0,bottom:0,zIndex:-1,pointerEvents:"none"})}(t),Reflect.apply(st,n,[])),window.matchMedia("(prefers-color-scheme: dark)"),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zt(t,e)}(e,t),r=e,(n=[{key:"raindropsFall",value:function(){var t=this.renderData,e=this.options,r=this.fadeData;if(!(0,a.isNull)(t)){var n=r.backgroundInfo,i=t.lastRaindropsFallTime,o=e.raindropsTimeInterval,l=e.dropRadius,s=Date.now();if(!(s-i<o)){t.lastRaindropsFallTime=s;var u=function(t){return(0,y.getRandomInt)(t)},c=n.width,f=n.height;this.drop(u(c),u(f),l,.03)}}}},{key:"drop",value:function(t,e,r,n){Reflect.apply(ft,this,[t,e,r,n])}},{key:"fade",value:function(){Reflect.apply(At,this,[])}},{key:"reloadBackground",value:function(){ee(re,this).call(this)}},{key:"destroy",value:function(){Reflect.apply(ct,this,[])}},{key:"show",value:function(){this.options.visible=!0,this.canvas.style.visibility="visible",Reflect.apply(X,this,[])}},{key:"hide",value:function(){this.options.visible=!1,this.canvas.style.visibility="hidden",Reflect.apply(z,this,[])}},{key:"pause",value:function(){this.options.running=!1}},{key:"play",value:function(){this.options.running=!0}},{key:"changePlayingState",value:function(){var t=this.options;t.running=!t.running}},{key:"set",value:function(t,e){"imgUrl"===t?(this.options.imgUrl=e,Reflect.apply(M,this,[])):"darkMode"===t?(this.options.darkMode=e,Reflect.apply(_t,this,[])||Reflect.apply(F,this,[!0])):this.options[t]=e}}])&&Yt(r.prototype,n),i&&Yt(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,i}(v);function ie(t,e){var r=(0,i.useRef)(null);return(0,i.useEffect)(function(){if(!(0,a.isNull)(t.current))return r.current=new ne(t.current,e),function(){var t;return null===(t=r.current)||void 0===t?void 0:t.destroy()}},[]),r}module.exports.earthnut=n})();
@@ -1 +1 @@
1
- "use client";import*as t from"a-js-tools";import*as e from"a-type-of-js";import*as r from"react";import{setStyle as n}from"a-element-inline-style";var i={161:(e,r,n)=>{e.exports=(t=>{var e={};return n.d(e,t),e})({debounce:()=>t.debounce,enArr:()=>t.enArr,getRandomInt:()=>t.getRandomInt,getRandomString:()=>t.getRandomString})},362:(t,r,n)=>{t.exports=(t=>{var e={};return n.d(e,t),e})({isArray:()=>e.isArray,isBoolean:()=>e.isBoolean,isBusinessEmptyString:()=>e.isBusinessEmptyString,isEmptyArray:()=>e.isEmptyArray,isFalse:()=>e.isFalse,isNull:()=>e.isNull,isString:()=>e.isString,isUndefined:()=>e.isUndefined,isZero:()=>e.isZero})},649:(t,e,n)=>{t.exports=(t=>{var e={};return n.d(e,t),e})({useEffect:()=>r.useEffect,useRef:()=>r.useRef})},713:()=>{function t(e){"@babel/helpers - typeof";return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,r(i.key),i)}}function r(e){var r=function(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,r||"default");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==t(r)?r:r+""}new(function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(){};return Object.setPrototypeOf(e,this),Object.defineProperties(e,{info:{value:function(){},configurable:!1,writable:!1},warn:{value:function(){},configurable:!1,writable:!1},error:{value:function(){},configurable:!1,writable:!1},type:{value:!1,configurable:!1,writable:!1}}),e},(r=[{key:"clear",value:function(){}}])&&e(t.prototype,r),n&&e(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,n}())({name:"earthnut",type:!1})}},o={};function a(t){var e=o[t];if(void 0!==e)return e.exports;var r=o[t]={exports:{}};return i[t](r,r.exports,a),r.exports}a.d=(t,e)=>{for(var r in e)a.o(e,r)&&!a.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var s={};a.d(s,{n:()=>se});var l=a(649),u=a(362);function f(t,e,r,n){function i(t,e){var n=r.createShader(t);if(r.shaderSource(n,e),r.compileShader(n),!r.getShaderParameter(n,r.COMPILE_STATUS))throw new Error("compile error: "+r.getShaderInfoLog(n));return n}var o,a={id:r.createProgram(),uniforms:{},locations:{}};if(r.attachShader(a.id,i(r.VERTEX_SHADER,t)),r.attachShader(a.id,i(r.FRAGMENT_SHADER,e)),r.linkProgram(a.id),!r.getProgramParameter(a.id,r.LINK_STATUS))throw new Error("link error: "+r.getProgramInfoLog(a.id));r.useProgram(a.id),r.enableVertexAttribArray(0);for(var s=t+e,l=/uniform (\w+) (\w+)/g;!(0,u.isNull)(o=l.exec(s));){var f=o[2];a.locations[f]=r.getUniformLocation(a.id,f)}return a}function c(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.gl;r.activeTexture(r.TEXTURE0+(e||0)),r.bindTexture(r.TEXTURE_2D,t)}function h(t){return"rgba(0, 0, 0, 0)"===t||"#ffffffff"===t||"transport"===t}function p(t){return"none"===t||""===t}function d(){var t=this,e=function(){return t.initState=!1,null};if(!this.gl)return e();var r=this.gl,n=Object.fromEntries(["OES_texture_float","OES_texture_half_float","OES_texture_float_linear","OES_texture_half_float_linear"].reduce(function(t,e){var n=r.getExtension(e);return n&&t.push([e,n]),t},[]));if(!n.OES_texture_float)return e();var i=[];function o(t,e,r){var i="OES_texture_"+t,o=i+"_linear",a=o in n;return{type:e,linearSupport:a,arrayType:r,extensions:a?[i,o]:[i]}}i.push(o("float",r.FLOAT,Float32Array)),n.OES_texture_half_float&&i.push(o("half_float",n.OES_texture_half_float.HALF_FLOAT_OES,null));var a=r.createTexture(),s=r.createFramebuffer();r.bindFramebuffer(r.FRAMEBUFFER,s),r.bindTexture(r.TEXTURE_2D,a),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE);for(var l=null,u=0;u<i.length;u++)if(r.texImage2D(r.TEXTURE_2D,0,r.RGBA,32,32,0,r.RGBA,i[u].type,null),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,a,0),r.checkFramebufferStatus(r.FRAMEBUFFER)===r.FRAMEBUFFER_COMPLETE){l=i[u];break}return l}function g(t){"@babel/helpers - typeof";return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(t)}function m(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,b(n.key),n)}}function v(t,e,r){return e&&m(t.prototype,e),r&&m(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function y(t,e,r){return(e=b(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function b(t){var e=function(t,e){if("object"!=g(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=g(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==g(e)?e:e+""}var E=v(function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),y(this,"canvas",void 0),y(this,"gl",void 0),y(this,"config",void 0),y(this,"initState",!0),this.canvas=e;var r=e.getContext("webgl");if((0,u.isNull)(r))return this.initState=!1,void(this.config=null);this.gl=r,this.config=Reflect.apply(d,this,[])}),w=a(161),R={imgUrl:null,resolution:360,dropRadius:12,perturbance:.01,interactive:!0,crossOrigin:"no-cors",playingState:!0,accelerating:1,raindropsTimeInterval:3600,idleFluctuations:!0,darkMode:void 0};Object.freeze(R);var T;a(713);function S(t){"@babel/helpers - typeof";return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},S(t)}function k(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,P(n.key),n)}}function P(t){var e=function(t,e){if("object"!=S(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=S(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==S(e)?e:e+""}function x(t,e,r){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,r)}function D(t,e,r){return t.set(A(t,e),r),r}function _(t,e){return t.get(A(t,e))}function A(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}function O(t){return function(t){if(Array.isArray(t))return I(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return I(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?I(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var F=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r={list:[],diameter:48,radius:0,cells:0};r.diameter%2!=0&&r.diameter++;var n=r.diameter,i=r.list,o=n/2;r.radius=o,r.cells=Math.pow(n,2);for(var a=0;a<n;a++){i[a]=[];for(var s=0;s<n;s++)i[a][s]=[0,0,0,0]}for(var l=0;l<=o;l++)for(var u=function(){var t=i[l][f],r=Math.ceil(Math.sqrt(Math.pow(l,2)+Math.pow(f,2)))<=o,n=e?10:255,a=e?25:190,s=r?e?160:120:e?160:180,u=r?e?230:160:e?250:240,c=function(){return(0,w.getRandomInt)(n,a)};t[0]=c(),t[1]=c(),t[2]=c(),t[3]=(0,w.getRandomInt)(s,u)},f=l;f<=o;f++)u();for(var c=0;c<=o;c++)for(var h=0;h<=c;h++)i[c][h]=i[h][c];for(var p=o;p<n;p++)for(var d=0;d<=o;d++)i[p][d]=i[n-p][d];for(var g=0;g<o;g++)for(var m=o;m<n;m++)i[g][m]=i[g][n-m];for(var v=o;v<n;v++)for(var y=o;y<n;y++)i[v][y]=i[v][n-y];var b=t%n;return r.list=[].concat(O(i.slice(b)),O(i.slice(0,b))),r},U=new(T=new WeakMap,function(){return t=function t(){var e,r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),x(this,T,1),e=this,r="data",n=F(),(r=P(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n},(e=[{key:"build",value:function(t){_(T,this)>100&&D(T,this,0),this.data=F(D(T,this,_(T,this)+4),t)}}])&&k(t.prototype,e),r&&k(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}());function j(t,e){var r=document.createElement("canvas"),n=document.createElement("canvas"),i=r.getContext("2d"),o=n.getContext("2d");return(0,u.isNull)(i)||(0,u.isNull)(o)?r:(r.width=n.width=t||1,r.height=n.height=e||1,i.clearRect(0,0,t,e),o.clearRect(0,0,t,e),i.globalAlpha=1,i.putImageData(function(t,e){Date.now();for(var r=new ImageData(t||1,e||1),n=r.data,i=U.data,o=i.diameter,a=i.list,s=t*o,l=0;l<n.length;l+=4){var u=l/4%s,f=u%t%o,c=Math.floor(u/t),h=a[f][c];n[l]=h[0],n[l+1]=h[1],n[l+2]=h[2],n[l+3]=h[3]}return r}(t,e),0,0),o.fillStyle="#ffffff",o.fillRect(0,0,t,e),o.drawImage(r,0,0,t||1,e||1),o.globalCompositeOperation="source-over",n)}function N(){var t,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=this.fadeData,n=this.options,i=r.backgroundInfo,o=r.toBeList,a=i.width,s=i.height,l=(0,w.getRandomString)({length:8,includeNumbers:!0,includeUppercaseLetters:!0});U.build(null!==(t=n.darkMode)&&void 0!==t?t:r.isDark),o.push({resource:j(a,s),width:a,height:s,kind:"default",tag:l}),e&&r.run()}function B(t,e){var r,n,i=t.imgUrl;return(0,u.isString)(i)&&i||(r=e.backgroundImage,n=/url\(["']?([^"']*)["']?\)/.exec(r),(0,u.isNull)(n)?null:n[1])}function C(t,e){return(0,u.isArray)(t.imgUrl)&&1===t.imgUrl.length&&t.imgUrl[0]||e.backgroundColor}function L(){var t=this.renderData,e=this.fadeData,r=this.options;if((0,u.isNull)(t))return Reflect.apply(N,this,[]);var n=t.originStyle;if(h(n.backgroundColor)&&(!(0,u.isArray)(r.imgUrl)||1!==r.imgUrl.length))return Reflect.apply(N,this,[]);var i=document.createElement("canvas"),o=i.getContext("2d");if((0,u.isNull)(o))return Reflect.apply(N,this,[]);var a=e.backgroundInfo,s=a.width,l=a.height;i.width=s,i.height=l,o.clearRect(0,0,s,l);var f=C(r,n);o.beginPath(),o.fillStyle=f,o.fillRect(0,0,s,l),o.fill(),e.isTransitioning&&!(0,u.isEmptyArray)(e.toBeList)?e.toBeList=[e.toBeList[0]]:e.toBeList=[];var c={resource:i,kind:"background-color",tag:f,width:s,height:l};e.toBeList.push(c),e.run()}function M(){var t=this.fadeData,e=this.renderData,r=this.options;if((0,u.isNull)(e))return Reflect.apply(L,this,[]);var n=e.originStyle;if(!/linear-gradient\(.*\)/.test(n.backgroundImage)&&!(0,u.isArray)(r.imgUrl))return Reflect.apply(L,this,[]);var i=(0,u.isArray)(r.imgUrl)&&r.imgUrl.length>1&&r.imgUrl||n.backgroundImage.replace(/^.*linear-gradient\((.*)\).*$/,"$1").split("),").map(function(t){return(t=t.trim()).endsWith(")")||(t+=")"),t}).filter(function(t){return t.startsWith("rgb")||t.startsWith("#")});if(i.length<2)return Reflect.apply(L,this,[]);var o=document.createElement("canvas"),a=o.getContext("2d");if((0,u.isNull)(a))return Reflect.apply(L,this,[]);var s=t.backgroundInfo,l=s.width,f=s.height;o.width=l,o.height=f,a.fillStyle="#fff",a.fillRect(0,0,l,f);var c=a.createLinearGradient(0,0,0,f);i.forEach(function(t,e){return c.addColorStop(e/(i.length-1),t)}),a.fillStyle=c,a.fillRect(0,0,l,f),t.isTransitioning&&!(0,u.isEmptyArray)(t.toBeList)?t.toBeList=[t.toBeList[0]]:t.toBeList=[],t.toBeList.push({resource:o,kind:"linear-gradient",tag:i.join("_"),width:l,height:f}),t.run()}function X(t){return function(t){if(Array.isArray(t))return W(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return W(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?W(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function W(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function z(){var t=this,e=this.renderData,r=this.options,n=this.fadeData;if((0,u.isNull)(e))Reflect.apply(M,this,[]);else{var i=e.lastUseStyle,o=n.backgroundInfo,a=o.width,s=o.height,l=B(r,i);if(e.imageSource=l,l){var f=function(t,e,r){var n=new Image(e,r);return n.width=e,n.height=r,n.src=t,n}(l,a,s);f.onload=function(){clearTimeout(n.transparentId),n.isTransitioning&&!(0,u.isEmptyArray)(n.toBeList)?n.toBeList=[n.toBeList[0]].concat(X(n.toBeList.slice(1).filter(function(t){return"image"===t.kind&&(Math.abs(t.width-a)>2||Math.abs(t.height-s)>2||t.tag!==l)}))):n.toBeList=[],n.toBeList.push({resource:f,width:a,height:s,kind:"image",tag:l}),n.run()},f.onerror=function(){Reflect.apply(M,t,[])},f.crossOrigin=r.crossOrigin}else Reflect.apply(M,this,[])}}function G(){var t=this.renderData;if(!(0,u.isNull)(t)){var e=t.parentElement;e&&[["background-image","none"],["background-color","transparent"]].forEach(function(t){return e.style.setProperty(t[0],t[1],"important")})}}function H(t){var e=window.getComputedStyle(t),r=t.style;return{inlineBackground:r.background,inlineBackgroundColor:r.backgroundColor,inlineBackgroundImage:r.backgroundImage,backgroundColor:e.backgroundColor,backgroundImage:e.backgroundImage,backgroundSize:e.backgroundSize,backgroundPosition:e.backgroundPosition,backgroundRepeat:e.backgroundRepeat,backgroundClip:e.backgroundClip,backgroundOrigin:e.backgroundOrigin,backgroundAttachment:e.backgroundAttachment,position:e.position,width:parseInt(e.width),height:parseInt(e.height)}}function Y(){var t=this.renderData;if(!(0,u.isNull)(t)){var e=t.parentElement,r=t.originStyle;e.style.setProperty("background-image",r.inlineBackgroundImage),e.style.setProperty("background-color",r.inlineBackgroundColor)}}function q(t){"@babel/helpers - typeof";return q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},q(t)}function Z(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,K(n.key),n)}}function $(t,e,r){return(e=K(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function K(t){var e=function(t,e){if("object"!=q(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=q(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==q(e)?e:e+""}var V=function(){return t=function t(e,r,n){var i,o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),$(this,"quad",null),$(this,"lastRaindropsFallTime",0),$(this,"parentElement",void 0),$(this,"mutationObserver",void 0),$(this,"resizeObserver",void 0),$(this,"renderProgram",void 0),$(this,"imageSource",""),$(this,"dropProgram",void 0),$(this,"updateProgram",void 0),$(this,"textures",[]),$(this,"backgroundTexture",[]),$(this,"textureDelta",void 0),$(this,"framebuffers",[]),$(this,"bufferWriteIndex",0),$(this,"bufferReadIndex",1),$(this,"originStyle",void 0),$(this,"lastUseStyle",void 0),$(this,"events",{}),$(this,"animationFrameId",0),this.parentElement=null!==(i=e.parentElement)&&void 0!==i?i:document.body,Reflect.apply(G,n,[]),this.originStyle=this.lastUseStyle=H(this.parentElement),this.mutationObserver=new MutationObserver(function(t){t.forEach(function(t){if(t.target===o.parentElement&&"attributes"===t.type&&n.options.visible){var e=Object.values(o.lastUseStyle),i=H(o.parentElement),a=Object.values(i);if((0,u.isEmptyArray)(w.enArr.difference(e,a)))return;var s=p(i.backgroundImage),l=h(i.backgroundColor);if(s&&l)return;o.lastUseStyle=i,Reflect.apply(r,n,[]),Reflect.apply(G,n,[])}})}),this.mutationObserver.observe(this.parentElement,{subtree:!0,attributes:!0,attributeFilter:["class","style"]}),this.resizeObserver=new ResizeObserver(function(t){t.forEach(function(t){t.target===o.parentElement&&Reflect.apply(r,n,[])})}),this.resizeObserver.observe(this.parentElement)},e=[{key:"destroy",value:function(){if(this.animationFrameId&&window.cancelAnimationFrame(this.animationFrameId),Reflect.apply(Y,{renderData:this},[]),this.parentElement&&this.events){var t,e,r,n=this.parentElement,i=this.events;Object.keys(i).forEach(function(t){return n.removeEventListener&&n.removeEventListener(t,i[t])}),n.removeAttribute&&n.removeAttribute("data-ripples"),null===(t=this.mutationObserver)||void 0===t||t.takeRecords(),null===(e=this.mutationObserver)||void 0===e||e.disconnect(),this.mutationObserver=null,null===(r=this.resizeObserver)||void 0===r||r.disconnect(),this.resizeObserver=null}}}],e&&Z(t.prototype,e),r&&Z(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();function J(){var t=this.renderData,e=this.fadeData;if(!(0,u.isNull)(t)){var r,n,i,o=t.parentElement,a=window.getComputedStyle(o),s=a.backgroundSize,l=a.backgroundAttachment,f=a.backgroundPosition,c=/\s+/.test(r=f)?r.replace(/center/,"50%").replace(/top|left/,"0%").replace(/bottom/,"100%").replace(/\s+/," ").split(" "):Q(r)?[r,"50%"]:{center:["50%","50%"],top:["50%","0%"],bottom:["50%","100%"],left:["0%","50%"],right:["100%","50%"]}[r],h={left:0,top:0,width:0,height:0};"fixed"===l?(h.height=window.innerHeight,h.left=window.screenX,h.top=window.screenY,h.width=window.innerWidth):(h.left=0,h.top=0,h.width=o.scrollWidth,h.height=o.scrollHeight);var p=e.backgroundInfo||{width:100,height:100},d=p.width,g=p.height;if("cover"===s){var m=Math.max(h.width/d,h.height/g);n=d*m,i=g*m}else if("contain"===s){var v=Math.min(h.width/d,h.height/g);n=d*v,i=g*v}else{var y=s.split(" ");n=y[0]||"",i=y[1]||n,Q(n)?n=h.width*parseFloat(n)/100:"auto"!==n&&(n=parseFloat(n)),Q(i)?i=h.height*parseFloat(i)/100:"auto"!==i&&(i=parseFloat(i)),"auto"===n&&"auto"===i?(n=d,i=g):("auto"===n&&(n=d*(Number(i)/g)),"auto"===i&&(i=g*(Number(n)/d)))}var b=c&&c[0]||"0%",E=c&&c[1]||"0%";b=Q(b)?(h.left+(h.width-Number(n))*parseFloat(b)/100).toString():(h.left+parseFloat(b)).toString(),E=Q(E)?(h.top+(h.height-Number(i))*parseFloat(E)/100).toString():(h.top+parseFloat(E)).toString(),t.renderProgram.uniforms.topLeft=new Float32Array([-Number(b)/n,-Number(E)/i]),t.renderProgram.uniforms.bottomRight=new Float32Array([t.renderProgram.uniforms.topLeft[0]+o.clientWidth/n,t.renderProgram.uniforms.topLeft[1]+o.clientHeight/i]);var w=Math.max(this.canvas.width,this.canvas.height);t.renderProgram.uniforms.containerRatio=new Float32Array([this.canvas.width/w,this.canvas.height/w])}}function Q(t){return t.endsWith("%")}function tt(){var t=this.gl,e=this.renderData;(0,u.isNull)(e)||(t.bindBuffer(t.ARRAY_BUFFER,e.quad),t.vertexAttribPointer(0,2,t.FLOAT,!1,0,0),t.drawArrays(t.TRIANGLE_FAN,0,4))}function et(){var t=this.gl,e=this.renderData,r=this.options;if(!(0,u.isNull)(e)){var n=e.textures,i=e.backgroundTexture,o=r.perturbance;t.bindFramebuffer(t.FRAMEBUFFER,null),t.viewport(0,0,this.canvas.width,this.canvas.height),t.enable(t.BLEND),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),t.useProgram(e.renderProgram.id),Reflect.apply(c,this,[i,0]),Reflect.apply(c,this,[n[0],1]),t.uniform1f(e.renderProgram.locations.perturbance,o),t.uniform2fv(e.renderProgram.locations.topLeft,e.renderProgram.uniforms.topLeft),t.uniform2fv(e.renderProgram.locations.bottomRight,e.renderProgram.uniforms.bottomRight),t.uniform2fv(e.renderProgram.locations.containerRatio,e.renderProgram.uniforms.containerRatio),t.uniform1i(e.renderProgram.locations.samplerBackground,0),t.uniform1i(e.renderProgram.locations.samplerRipples,1),Reflect.apply(tt,this,[]),t.disable(t.BLEND)}}function rt(){var t=this.renderData;if(!(0,u.isNull)(t)){var e=t.bufferWriteIndex,r=t.bufferReadIndex;t.bufferWriteIndex=1-e,t.bufferReadIndex=1-r}}function nt(){var t=this.gl,e=this.renderData,r=this.options;if(!(0,u.isNull)(e)){var n=e.updateProgram,i=e.textures,o=e.framebuffers,a=e.bufferWriteIndex,s=e.bufferReadIndex,l=r.resolution;t.viewport(0,0,l,l),t.bindFramebuffer(t.FRAMEBUFFER,o[a]),Reflect.apply(c,this,[i[s]]),t.useProgram(n.id),Reflect.apply(tt,this,[]),Reflect.apply(rt,this,[])}}function it(){var t=this,e=this.renderData,r=this.options,n=this.fadeData;if(!(0,u.isNull)(e)){var i=e.parentElement,o=n.isTransitioning,a=r.running,s=r.idleFluctuations,l=r.lastRunningState,f=getComputedStyle(i);n.backgroundInfo={width:parseInt(f.width),height:parseInt(f.height)},Reflect.apply(J,this,[]),a?(l||(r.lastRunningState=!0,this.show()),s&&this.raindropsFall(),o&&this.fade(),Reflect.apply(nt,this,[]),Reflect.apply(et,this,[])):l&&(r.lastRunningState=!1,this.hide()),e.animationFrameId=requestAnimationFrame(function(){return Reflect.apply(it,t,[])})}}function ot(t,e,r){var n=this.renderData;if(!(0,u.isNull)(n)){var i=n.parentElement,o=window.getComputedStyle(i),a=parseInt(o.borderLeftWidth)||0,s=parseInt(o.borderTopWidth)||0,l=i.getBoundingClientRect(),f=t.clientX-l.left-a,c=t.clientY-l.top-s;this.drop(f,c,e,r)}}function at(){var t=this,e=this.renderData,r=this.options;if(!(0,u.isNull)(e)){var n=e.parentElement,i=e.events,o=function(n){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];r.visible&&r.running&&r.interactive&&(e.lastRaindropsFallTime=Date.now(),Reflect.apply(ot,t,[n,r.dropRadius*(i?1.5:1),i?.03:.01]))};i.mousemove=function(t){for(var e=r.accelerating;e--;)o(t)},i.touchmove=i.touchstart=function(t){for(var e=t.touches,r=0;r<e.length;r++)o(e[r])},i.mousedown=function(t){return o(t,!0)},Object.keys(i).forEach(function(t){return null==n?void 0:n.addEventListener(t,i[t],{passive:!0})})}}var st="\n attribute vec2 vertex;\n varying vec2 coord;\n void main() {\n coord = vertex * 0.5 + 0.5;\n gl_Position = vec4(vertex, 0.0, 1.0);\n }";function lt(){var t=this.gl,e=this.renderData;if(!(0,u.isNull)(e)){var r=e.textureDelta;e.dropProgram=f(st,"precision highp float;\n\n const float PI = 3.141592653589793;\n uniform sampler2D texture;\n uniform vec2 center;\n uniform float radius;\n uniform float strength;\n\n varying vec2 coord;\n\n void main() {\n vec4 info = texture2D(texture, coord);\n\n float drop = max(0.0, 1.0 - length(center * 0.5 + 0.5 - coord) / radius);\n drop = 0.5 - cos(drop * PI) * 0.5;\n info.r += drop * strength;\n gl_FragColor = info;\n }",t);var n=e.updateProgram=f(st,"\n precision highp float;\n\n uniform sampler2D texture;\n uniform vec2 delta;\n\n varying vec2 coord;\n\n void main() {\n vec4 info = texture2D(texture, coord);\n \n vec2 dx = vec2(delta.x, 0.0);\n vec2 dy = vec2(0.0, delta.y);\n \n float average = (\n texture2D(texture, coord - dx).r +\n texture2D(texture, coord - dy).r +\n texture2D(texture, coord + dx).r +\n texture2D(texture, coord + dy).r\n ) * 0.25;\n \n info.g += (average - info.r) * 2.0;\n info.g *= 0.995;\n info.r += info.g;\n \n gl_FragColor = info;\n }\n ",this.gl);t.uniform2fv(n.locations.delta,r),e.renderProgram=f("\n precision highp float;\n\n attribute vec2 vertex;\n uniform vec2 topLeft;\n uniform vec2 bottomRight;\n uniform vec2 containerRatio;\n varying vec2 ripplesCoord;\n varying vec2 backgroundCoord;\n void main() {\n backgroundCoord = mix(topLeft, bottomRight, vertex * 0.5 + 0.5);\n backgroundCoord.y = 1.0 - backgroundCoord.y;\n ripplesCoord = vec2(vertex.x, -vertex.y) * containerRatio * 0.5 + 0.5;\n gl_Position = vec4(vertex.x, -vertex.y, 0.0, 1.0);\n }\n ","\n precision highp float;\n\n uniform sampler2D samplerBackground;\n uniform sampler2D samplerRipples;\n uniform vec2 delta;\n\n uniform float perturbance;\n varying vec2 ripplesCoord;\n varying vec2 backgroundCoord;\n\n void main() {\n float height = texture2D(samplerRipples, ripplesCoord).r;\n float heightX = texture2D(samplerRipples, vec2(ripplesCoord.x + delta.x, ripplesCoord.y)).r;\n float heightY = texture2D(samplerRipples, vec2(ripplesCoord.x, ripplesCoord.y + delta.y)).r;\n vec3 dx = vec3(delta.x, heightX - height, 0.0);\n vec3 dy = vec3(0.0, heightY - height, delta.y);\n vec2 offset = -normalize(cross(dy, dx)).xz;\n float specular = pow(max(0.0, dot(offset, normalize(vec2(-0.6, 1.0)))), 4.0);\n gl_FragColor = texture2D(samplerBackground, backgroundCoord + offset * perturbance) + specular;\n }",t),t.uniform2fv(e.renderProgram.locations.delta,r)}}function ut(){var t=this.gl,e=this.renderData;if(!(0,u.isNull)(e)){var r=e.backgroundTexture=t.createTexture();t.bindTexture(t.TEXTURE_2D,r),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,1),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR)}}function ft(t){var e=this.gl,r=this.renderData,n=this.fadeData;if(!(0,u.isNull)(r)){var i=r.backgroundTexture,o=r.parentElement,a=n.backgroundInfo,s=a.width,l=a.height,f=function(t){return(0,u.isZero)(t&t-1)},c=f(s)&&f(l)?e.REPEAT:e.CLAMP_TO_EDGE;e.bindTexture(e.TEXTURE_2D,i),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,c),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,c),o.dataset.render_img=t.tag,o.dataset.render_width=t.width+"px",o.dataset.render_height=t.height+"px",e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t.resource)}}function ct(){var t=this,e=this.renderData,r=this.options,n=this.fadeData;if(!(0,u.isNull)(e)&&this.config){var i=e.textures,o=e.framebuffers,a=r.resolution,s=this.gl,l=1/a;e.textureDelta=new Float32Array([l,l]),this.config.extensions.forEach(function(t){return s.getExtension(t)});for(var f=this.config.arrayType,c=f?new f(a*a*4):null,h=this.config,p=0;p<2;p++){var d=s.createTexture(),g=s.createFramebuffer();s.bindFramebuffer(s.FRAMEBUFFER,g),s.bindTexture(s.TEXTURE_2D,d),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,h.linearSupport?s.LINEAR:s.NEAREST),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MAG_FILTER,h.linearSupport?s.LINEAR:s.NEAREST),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,s.CLAMP_TO_EDGE),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,s.CLAMP_TO_EDGE),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,a,a,0,s.RGBA,h.type,c),s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,d,0),i.push(d),o.push(g)}e.quad=s.createBuffer(),s.bindBuffer(s.ARRAY_BUFFER,e.quad),s.bufferData(s.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,1,1,-1,1]),s.STATIC_DRAW),Reflect.apply(lt,this,[]),Reflect.apply(ut,this,[]),Reflect.apply(z,this,[]),s.clearColor(0,0,0,0),s.blendFunc(s.SRC_ALPHA,s.ONE_MINUS_SRC_ALPHA),r.visible=!0,r.running=!0,Reflect.apply(at,this,[]),Reflect.apply(ft,this,[n.lastDrawImage]),e.animationFrameId=requestAnimationFrame(function(){return Reflect.apply(it,t,[])})}}function ht(){var t=this.renderData,e=this.fadeData;if(!(0,u.isNull)(t)){var r=t.parentElement,n=e.backgroundInfo,i=r.offsetWidth,o=r.offsetHeight;this.canvas.width=n.width=i,this.canvas.height=n.height=o,Reflect.apply(z,this,[])}}function pt(){var t=this.renderData,e=this.fadeData;(0,u.isNull)(t)||(t.destroy(),Object.keys(t).forEach(function(e){return t[e]=null}),this.renderData=null),e.destroy(),Object.keys(e).forEach(function(t){return e[t]=null}),this.fadeData=null,this.gl&&(this.gl=null)}function dt(t,e,r,n){var i=this.renderData,o=this.options,a=this.gl;if(!(0,u.isNull)(i)){var s=i.parentElement,l=i.dropProgram,f=i.textures,h=i.framebuffers,p=i.bufferWriteIndex,d=i.bufferReadIndex,g=o.resolution,m=s.offsetWidth,v=s.offsetHeight,y=Math.max(m,v);r/=y;var b=new Float32Array([(2*t-m)/y,(v-2*e)/y]);a.viewport(0,0,g,g),a.bindFramebuffer(a.FRAMEBUFFER,h[p]),Reflect.apply(c,this,[f[d]]),a.useProgram(l.id),a.uniform2fv(l.locations.center,b),a.uniform1f(l.locations.radius,r),a.uniform1f(l.locations.strength,n),Reflect.apply(tt,this,[]),Reflect.apply(rt,this,[])}}function gt(t){"@babel/helpers - typeof";return gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gt(t)}function mt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,yt(n.key),n)}}function vt(t,e,r){return(e=yt(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yt(t){var e=function(t,e){if("object"!=gt(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=gt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==gt(e)?e:e+""}function bt(t,e,r){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,r)}function Et(t,e){return t.get(Rt(t,e))}function wt(t,e,r){return t.set(Rt(t,e),r),r}function Rt(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}var Tt=new WeakMap,St=new WeakMap,kt=new WeakMap,Pt=new WeakMap,xt=new WeakMap,Dt=new WeakMap,_t=new WeakMap,At=new WeakMap,Ot=function(){return t=function t(e){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),bt(this,Tt,R.accelerating),bt(this,St,R.interactive),bt(this,kt,R.resolution),bt(this,Pt,R.perturbance),bt(this,xt,R.dropRadius),vt(this,"imgUrl",R.imgUrl),bt(this,Dt,R.idleFluctuations),bt(this,_t,R.raindropsTimeInterval),vt(this,"crossOrigin","no-cors"),vt(this,"visible",!1),vt(this,"running",!1),bt(this,At,void 0),vt(this,"lastRunningState",!1),this.perturbance=e.perturbance,this.resolution=e.resolution,this.raindropsTimeInterval=e.raindropsTimeInterval,this.accelerating=e.accelerating,this.interactive=e.interactive,this.dropRadius=e.dropRadius,this.imgUrl=e.imgUrl,this.idleFluctuations=e.idleFluctuations,this.running=Boolean(null===(r=e.playingState)||void 0===r||r),this.crossOrigin=e.crossOrigin,this.darkMode=e.darkMode},(e=[{key:"accelerating",get:function(){return Et(Tt,this)},set:function(t){t>100||t<2||wt(Tt,this,t)}},{key:"interactive",get:function(){return Et(St,this)},set:function(t){(0,u.isBoolean)(t)&&wt(St,this,t)}},{key:"resolution",get:function(){return Et(kt,this)},set:function(t){t<100||t>550||wt(kt,this,t)}},{key:"perturbance",get:function(){return Et(Pt,this)},set:function(t){t<1e-4||t>1||wt(Pt,this,t)}},{key:"dropRadius",get:function(){return Et(xt,this)},set:function(t){!isFinite(t)||t<10||wt(xt,this,t)}},{key:"idleFluctuations",get:function(){return Et(Dt,this)},set:function(t){(0,u.isBoolean)(t)&&wt(Dt,this,t)}},{key:"raindropsTimeInterval",get:function(){return Et(_t,this)},set:function(t){t<10||t>12e3||wt(_t,this,t)}},{key:"playingState",get:function(){return this.running},set:function(t){this.running=Boolean(null==t||t)}},{key:"darkMode",get:function(){return Et(At,this)},set:function(t){wt(At,this,(0,u.isUndefined)(t)?void 0:Boolean(t))}}])&&mt(t.prototype,e),r&&mt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();function It(){var t=this.fadeData,e=this.options,r=this.renderData;if((0,u.isNull)(r))return!0;var n=e.imgUrl,i=r.lastUseStyle,o=t.lastDrawImage,a=t.backgroundInfo,s=a.width,l=a.height,f=o.tag,c=o.kind,h=B(e,i),p=o.width===s,d=o.height===l,g=p&&d;if("image"===c&&g&&(0,u.isString)(h)&&h===f)return!0;var m=(0,u.isArray)(n)&&n.join("_")||"";if("linear-gradient"===c&&g&&m===f)return!0;var v=C(e,i);return!("background-color"!==c||!g||f!==v)}function Ft(){var t=this,e=this.options,r=this.fadeData;r.transparentId=setTimeout(function(){if(clearTimeout(r.transparentId),r.isTransitioning)return Reflect.apply(Ft,t,[]);Reflect.apply(It,t,[])||r.run()},2*e.raindropsTimeInterval)}function Ut(){var t=this.renderData,e=this.fadeData,r=this.options,n=e.toBeList;if((0,u.isNull)(t))return Reflect.apply(jt,this,["还没有准备好,即将退出"]);if((0,u.isEmptyArray)(n))return Reflect.apply(jt,this,["由于缺少当前渲染的背景,退出"]);if(0===e.drawProgress&&n.forEach(function(t){}),e.drawProgress>1e3){if(e.lastDrawImage=n.shift(),Reflect.apply(ft,this,[e.lastDrawImage]),(0,u.isEmptyArray)(n)){var i=t.lastUseStyle;((0,u.isNull)(r.imgUrl)||(0,u.isBusinessEmptyString)(r.imgUrl)||(0,u.isZero)(r.imgUrl.length))&&h(i.backgroundColor)&&p(i.backgroundImage)&&Reflect.apply(N,this,[!1])}return Reflect.apply(jt,this,["当前执行完毕,开启下次执行"])}var o=e.lastDrawImage,a=e.backgroundInfo;e.drawProgress+=18;var s=document.createElement("canvas"),l=s.getContext("2d");if((0,u.isNull)(l)||(0,u.isNull)(o.resource)||(0,u.isEmptyArray)(n))return Reflect.apply(jt,this,"环境值错误");var f=a.width,c=a.height;s.width=f,s.height=c,l.clearRect(0,0,f,c),l.drawImage(o.resource,0,0,f,c),l.globalAlpha=e.drawProgress/1e3,l.drawImage(n[0].resource,0,0,f,c),l.globalAlpha=1;var d={resource:s,width:f,height:c,kind:"mix",tag:"".concat(o.tag," >> ").concat(n[0].tag)};Reflect.apply(ft,this,[d]),n.length>1&&(e.lastDrawImage=d,n.shift(),e.drawProgress=0)}function jt(t){this.fadeData.isTransitioning=!1,Reflect.apply(Ft,this,[])}function Nt(t){"@babel/helpers - typeof";return Nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nt(t)}function Bt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Mt(n.key),n)}}function Ct(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Lt(t,e,r){return(e=Mt(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Mt(t){var e=function(t,e){if("object"!=Nt(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Nt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Nt(e)?e:e+""}function Xt(t,e){return t.get(Wt(t,e))}function Wt(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}var zt=new WeakMap,Gt=new WeakSet,Ht=function(){return t=function t(e){var r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Ct(r=this,n=Gt),n.add(r),Lt(this,"backgroundInfo",{width:0,height:0}),Lt(this,"transparentId",setTimeout(Boolean)),Lt(this,"lastDrawImage",void 0),Lt(this,"toBeList",[]),Lt(this,"drawProgress",0),Lt(this,"isTransitioning",!1),function(t,e,r){Ct(t,e),e.set(t,r)}(this,zt,void 0),Lt(this,"isDark",!1);var i,o,a=e.renderData;if((0,u.isNull)(a))i=10,o=10;else{var s=getComputedStyle(a.parentElement);i=parseInt(s.width),o=parseInt(s.height)}this.backgroundInfo={width:i,height:o},this.lastDrawImage={resource:j(i,o),width:i,height:o,kind:"default",tag:""},function(t,e,r){t.set(Wt(t,e),r)}(zt,this,window.matchMedia("(prefers-color-scheme: dark)")),this.isDark=Xt(zt,this).matches,Xt(zt,this).addEventListener("change",Wt(Gt,this,Yt));var l=this;Object.defineProperty(Xt(zt,this),"isDark",{get:function(){return l.isDark},set:function(t){l.isDark=t,Reflect.apply(It,e,[])||Reflect.apply(N,e,[!0])}})},(e=[{key:"run",value:function(){this.isTransitioning||(this.drawProgress=0,this.isTransitioning=!0)}},{key:"destroy",value:function(){this.transparentId&&clearTimeout(this.transparentId),Xt(zt,this).removeEventListener("change",Wt(Gt,this,Yt))}}])&&Bt(t.prototype,e),r&&Bt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();function Yt(t){this.isDark=t.matches}function qt(t){"@babel/helpers - typeof";return qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qt(t)}function Zt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function $t(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Zt(Object(r),!0).forEach(function(e){re(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Zt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Kt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ne(n.key),n)}}function Vt(t,e,r){return e=Qt(e),function(t,e){if(e&&("object"==qt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Jt()?Reflect.construct(e,r||[],Qt(t).constructor):e.apply(t,r))}function Jt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Jt=function(){return!!t})()}function Qt(t){return Qt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Qt(t)}function te(t,e){return te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},te(t,e)}function ee(t,e,r){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,r)}function re(t,e,r){return(e=ne(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ne(t){var e=function(t,e){if("object"!=qt(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=qt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==qt(e)?e:e+""}function ie(t,e){return t.get(function(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}(t,e))}var oe=new WeakMap,ae=function(){function t(e,r){var i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),re(i=Vt(this,t,[e]),"renderData",null),re(i,"options",void 0),re(i,"fadeData",void 0),re(i,"defaults",R),re(i,"initialized",!1),ee(i,oe,(0,w.debounce)(ht,{this:i})),Object.defineProperties(i,{defaults:{value:i.defaults,writable:!1,enumerable:!1,configurable:!1}}),i.options=new Ot($t($t({},i.defaults),r)),i.renderData=new V(e,i.reloadBackground,i),i.fadeData=new Ht(i),(0,u.isFalse)(i.initState)||(0,u.isNull)(e.parentElement)||(0,u.isNull)(i.config)||(0,u.isNull)(i.gl)?i.initState=!1:(!function(t){var e=t.parentElement;t.width=e.clientWidth,t.height=e.clientHeight,n(t,{position:"absolute",left:0,top:0,right:0,bottom:0,zIndex:-1,pointerEvents:"none"})}(e),Reflect.apply(ct,i,[])),window.matchMedia("(prefers-color-scheme: dark)"),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&te(t,e)}(t,E),e=t,(r=[{key:"raindropsFall",value:function(){var t=this.renderData,e=this.options,r=this.fadeData;if(!(0,u.isNull)(t)){var n=r.backgroundInfo,i=t.lastRaindropsFallTime,o=e.raindropsTimeInterval,a=e.dropRadius,s=Date.now();if(!(s-i<o)){t.lastRaindropsFallTime=s;var l=function(t){return(0,w.getRandomInt)(t)},f=n.width,c=n.height;this.drop(l(f),l(c),a,.03)}}}},{key:"drop",value:function(t,e,r,n){Reflect.apply(dt,this,[t,e,r,n])}},{key:"fade",value:function(){Reflect.apply(Ut,this,[])}},{key:"reloadBackground",value:function(){ie(oe,this).call(this)}},{key:"destroy",value:function(){Reflect.apply(pt,this,[])}},{key:"show",value:function(){this.options.visible=!0,this.canvas.style.visibility="visible",Reflect.apply(G,this,[])}},{key:"hide",value:function(){this.options.visible=!1,this.canvas.style.visibility="hidden",Reflect.apply(Y,this,[])}},{key:"pause",value:function(){this.options.running=!1}},{key:"play",value:function(){this.options.running=!0}},{key:"changePlayingState",value:function(){var t=this.options;t.running=!t.running}},{key:"set",value:function(t,e){"imgUrl"===t?(this.options.imgUrl=e,Reflect.apply(z,this,[])):"darkMode"===t?(this.options.darkMode=e,Reflect.apply(It,this,[])||Reflect.apply(N,this,[!0])):this.options[t]=e}}])&&Kt(e.prototype,r),i&&Kt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,i}();function se(t,e){var r=(0,l.useRef)(null);return(0,l.useEffect)(function(){if(!(0,u.isNull)(t.current))return r.current=new ae(t.current,e&&e.option),function(){var t;return null===(t=r.current)||void 0===t?void 0:t.destroy()}},[]),r}const le=s.n;export{le as useRipples};
1
+ "use client";import*as t from"a-js-tools";import*as e from"a-type-of-js";import*as r from"react";import{setStyle as n}from"a-element-inline-style";var i={161:(e,r,n)=>{e.exports=(t=>{var e={};return n.d(e,t),e})({debounce:()=>t.debounce,enArr:()=>t.enArr,getRandomInt:()=>t.getRandomInt,getRandomString:()=>t.getRandomString})},362:(t,r,n)=>{t.exports=(t=>{var e={};return n.d(e,t),e})({isArray:()=>e.isArray,isBoolean:()=>e.isBoolean,isBusinessEmptyString:()=>e.isBusinessEmptyString,isEmptyArray:()=>e.isEmptyArray,isFalse:()=>e.isFalse,isNull:()=>e.isNull,isString:()=>e.isString,isUndefined:()=>e.isUndefined,isZero:()=>e.isZero})},649:(t,e,n)=>{t.exports=(t=>{var e={};return n.d(e,t),e})({useEffect:()=>r.useEffect,useRef:()=>r.useRef})},713:()=>{function t(e){"@babel/helpers - typeof";return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,r(i.key),i)}}function r(e){var r=function(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,r||"default");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==t(r)?r:r+""}new(function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(){};return Object.setPrototypeOf(e,this),Object.defineProperties(e,{info:{value:function(){},configurable:!1,writable:!1},warn:{value:function(){},configurable:!1,writable:!1},error:{value:function(){},configurable:!1,writable:!1},type:{value:!1,configurable:!1,writable:!1}}),e},(r=[{key:"clear",value:function(){}}])&&e(t.prototype,r),n&&e(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,n}())({name:"earthnut",type:!1})}},o={};function a(t){var e=o[t];if(void 0!==e)return e.exports;var r=o[t]={exports:{}};return i[t](r,r.exports,a),r.exports}a.d=(t,e)=>{for(var r in e)a.o(e,r)&&!a.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var s={};a.d(s,{n:()=>se});var l=a(649),u=a(362);function f(t,e,r,n){function i(t,e){var n=r.createShader(t);if(r.shaderSource(n,e),r.compileShader(n),!r.getShaderParameter(n,r.COMPILE_STATUS))throw new Error("compile error: "+r.getShaderInfoLog(n));return n}var o,a={id:r.createProgram(),uniforms:{},locations:{}};if(r.attachShader(a.id,i(r.VERTEX_SHADER,t)),r.attachShader(a.id,i(r.FRAGMENT_SHADER,e)),r.linkProgram(a.id),!r.getProgramParameter(a.id,r.LINK_STATUS))throw new Error("link error: "+r.getProgramInfoLog(a.id));r.useProgram(a.id),r.enableVertexAttribArray(0);for(var s=t+e,l=/uniform (\w+) (\w+)/g;!(0,u.isNull)(o=l.exec(s));){var f=o[2];a.locations[f]=r.getUniformLocation(a.id,f)}return a}function c(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.gl;r.activeTexture(r.TEXTURE0+(e||0)),r.bindTexture(r.TEXTURE_2D,t)}function h(t){return"rgba(0, 0, 0, 0)"===t||"#ffffffff"===t||"transport"===t}function p(t){return"none"===t||""===t}function d(){var t=this,e=function(){return t.initState=!1,null};if(!this.gl)return e();var r=this.gl,n=Object.fromEntries(["OES_texture_float","OES_texture_half_float","OES_texture_float_linear","OES_texture_half_float_linear"].reduce(function(t,e){var n=r.getExtension(e);return n&&t.push([e,n]),t},[]));if(!n.OES_texture_float)return e();var i=[];function o(t,e,r){var i="OES_texture_"+t,o=i+"_linear",a=o in n;return{type:e,linearSupport:a,arrayType:r,extensions:a?[i,o]:[i]}}i.push(o("float",r.FLOAT,Float32Array)),n.OES_texture_half_float&&i.push(o("half_float",n.OES_texture_half_float.HALF_FLOAT_OES,null));var a=r.createTexture(),s=r.createFramebuffer();r.bindFramebuffer(r.FRAMEBUFFER,s),r.bindTexture(r.TEXTURE_2D,a),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE);for(var l=null,u=0;u<i.length;u++)if(r.texImage2D(r.TEXTURE_2D,0,r.RGBA,32,32,0,r.RGBA,i[u].type,null),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,a,0),r.checkFramebufferStatus(r.FRAMEBUFFER)===r.FRAMEBUFFER_COMPLETE){l=i[u];break}return l}function g(t){"@babel/helpers - typeof";return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(t)}function m(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,b(n.key),n)}}function v(t,e,r){return e&&m(t.prototype,e),r&&m(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function y(t,e,r){return(e=b(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function b(t){var e=function(t,e){if("object"!=g(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=g(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==g(e)?e:e+""}var E=v(function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),y(this,"canvas",void 0),y(this,"gl",void 0),y(this,"config",void 0),y(this,"initState",!0),this.canvas=e;var r=e.getContext("webgl");if((0,u.isNull)(r))return this.initState=!1,void(this.config=null);this.gl=r,this.config=Reflect.apply(d,this,[])}),w=a(161),R={imgUrl:null,resolution:360,dropRadius:12,perturbance:.01,interactive:!0,crossOrigin:"no-cors",playingState:!0,accelerating:1,raindropsTimeInterval:3600,idleFluctuations:!0,darkMode:void 0};Object.freeze(R);var T;a(713);function S(t){"@babel/helpers - typeof";return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},S(t)}function k(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,P(n.key),n)}}function P(t){var e=function(t,e){if("object"!=S(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=S(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==S(e)?e:e+""}function x(t,e,r){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,r)}function D(t,e,r){return t.set(A(t,e),r),r}function _(t,e){return t.get(A(t,e))}function A(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}function O(t){return function(t){if(Array.isArray(t))return I(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return I(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?I(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var F=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r={list:[],diameter:48,radius:0,cells:0};r.diameter%2!=0&&r.diameter++;var n=r.diameter,i=r.list,o=n/2;r.radius=o,r.cells=Math.pow(n,2);for(var a=0;a<n;a++){i[a]=[];for(var s=0;s<n;s++)i[a][s]=[0,0,0,0]}for(var l=0;l<=o;l++)for(var u=function(){var t=i[l][f],r=Math.ceil(Math.sqrt(Math.pow(l,2)+Math.pow(f,2)))<=o,n=e?10:255,a=e?25:190,s=r?e?160:120:e?160:180,u=r?e?230:160:e?250:240,c=function(){return(0,w.getRandomInt)(n,a)};t[0]=c(),t[1]=c(),t[2]=c(),t[3]=(0,w.getRandomInt)(s,u)},f=l;f<=o;f++)u();for(var c=0;c<=o;c++)for(var h=0;h<=c;h++)i[c][h]=i[h][c];for(var p=o;p<n;p++)for(var d=0;d<=o;d++)i[p][d]=i[n-p][d];for(var g=0;g<o;g++)for(var m=o;m<n;m++)i[g][m]=i[g][n-m];for(var v=o;v<n;v++)for(var y=o;y<n;y++)i[v][y]=i[v][n-y];var b=t%n;return r.list=[].concat(O(i.slice(b)),O(i.slice(0,b))),r},U=new(T=new WeakMap,function(){return t=function t(){var e,r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),x(this,T,1),e=this,r="data",n=F(),(r=P(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n},(e=[{key:"build",value:function(t){_(T,this)>100&&D(T,this,0),this.data=F(D(T,this,_(T,this)+4),t)}}])&&k(t.prototype,e),r&&k(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}());function j(t,e){var r=document.createElement("canvas"),n=document.createElement("canvas"),i=r.getContext("2d"),o=n.getContext("2d");return(0,u.isNull)(i)||(0,u.isNull)(o)?r:(r.width=n.width=t||1,r.height=n.height=e||1,i.clearRect(0,0,t,e),o.clearRect(0,0,t,e),i.globalAlpha=1,i.putImageData(function(t,e){Date.now();for(var r=new ImageData(t||1,e||1),n=r.data,i=U.data,o=i.diameter,a=i.list,s=t*o,l=0;l<n.length;l+=4){var u=l/4%s,f=u%t%o,c=Math.floor(u/t),h=a[f][c];n[l]=h[0],n[l+1]=h[1],n[l+2]=h[2],n[l+3]=h[3]}return r}(t,e),0,0),o.fillStyle="#ffffff",o.fillRect(0,0,t,e),o.drawImage(r,0,0,t||1,e||1),o.globalCompositeOperation="source-over",n)}function N(){var t,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=this.fadeData,n=this.options,i=r.backgroundInfo,o=r.toBeList,a=i.width,s=i.height,l=(0,w.getRandomString)({length:8,includeNumbers:!0,includeUppercaseLetters:!0});U.build(null!==(t=n.darkMode)&&void 0!==t?t:r.isDark),o.push({resource:j(a,s),width:a,height:s,kind:"default",tag:l}),e&&r.run()}function B(t,e){var r,n,i=t.imgUrl;return(0,u.isString)(i)&&i||(r=e.backgroundImage,n=/url\(["']?([^"']*)["']?\)/.exec(r),(0,u.isNull)(n)?null:n[1])}function C(t,e){return(0,u.isArray)(t.imgUrl)&&1===t.imgUrl.length&&t.imgUrl[0]||e.backgroundColor}function L(){var t=this.renderData,e=this.fadeData,r=this.options;if((0,u.isNull)(t))return Reflect.apply(N,this,[]);var n=t.originStyle;if(h(n.backgroundColor)&&(!(0,u.isArray)(r.imgUrl)||1!==r.imgUrl.length))return Reflect.apply(N,this,[]);var i=document.createElement("canvas"),o=i.getContext("2d");if((0,u.isNull)(o))return Reflect.apply(N,this,[]);var a=e.backgroundInfo,s=a.width,l=a.height;i.width=s,i.height=l,o.clearRect(0,0,s,l);var f=C(r,n);o.beginPath(),o.fillStyle=f,o.fillRect(0,0,s,l),o.fill(),e.isTransitioning&&!(0,u.isEmptyArray)(e.toBeList)?e.toBeList=[e.toBeList[0]]:e.toBeList=[];var c={resource:i,kind:"background-color",tag:f,width:s,height:l};e.toBeList.push(c),e.run()}function M(){var t=this.fadeData,e=this.renderData,r=this.options;if((0,u.isNull)(e))return Reflect.apply(L,this,[]);var n=e.originStyle;if(!/linear-gradient\(.*\)/.test(n.backgroundImage)&&!(0,u.isArray)(r.imgUrl))return Reflect.apply(L,this,[]);var i=(0,u.isArray)(r.imgUrl)&&r.imgUrl.length>1&&r.imgUrl||n.backgroundImage.replace(/^.*linear-gradient\((.*)\).*$/,"$1").split("),").map(function(t){return(t=t.trim()).endsWith(")")||(t+=")"),t}).filter(function(t){return t.startsWith("rgb")||t.startsWith("#")});if(i.length<2)return Reflect.apply(L,this,[]);var o=document.createElement("canvas"),a=o.getContext("2d");if((0,u.isNull)(a))return Reflect.apply(L,this,[]);var s=t.backgroundInfo,l=s.width,f=s.height;o.width=l,o.height=f,a.fillStyle="#fff",a.fillRect(0,0,l,f);var c=a.createLinearGradient(0,0,0,f);i.forEach(function(t,e){return c.addColorStop(e/(i.length-1),t)}),a.fillStyle=c,a.fillRect(0,0,l,f),t.isTransitioning&&!(0,u.isEmptyArray)(t.toBeList)?t.toBeList=[t.toBeList[0]]:t.toBeList=[],t.toBeList.push({resource:o,kind:"linear-gradient",tag:i.join("_"),width:l,height:f}),t.run()}function X(t){return function(t){if(Array.isArray(t))return W(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return W(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?W(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function W(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function z(){var t=this,e=this.renderData,r=this.options,n=this.fadeData;if((0,u.isNull)(e))Reflect.apply(M,this,[]);else{var i=e.lastUseStyle,o=n.backgroundInfo,a=o.width,s=o.height,l=B(r,i);if(e.imageSource=l,l){var f=function(t,e,r){var n=new Image(e,r);return n.width=e,n.height=r,n.src=t,n}(l,a,s);f.onload=function(){clearTimeout(n.transparentId),n.isTransitioning&&!(0,u.isEmptyArray)(n.toBeList)?n.toBeList=[n.toBeList[0]].concat(X(n.toBeList.slice(1).filter(function(t){return"image"===t.kind&&(Math.abs(t.width-a)>2||Math.abs(t.height-s)>2||t.tag!==l)}))):n.toBeList=[],n.toBeList.push({resource:f,width:a,height:s,kind:"image",tag:l}),n.run()},f.onerror=function(){Reflect.apply(M,t,[])},f.crossOrigin=r.crossOrigin}else Reflect.apply(M,this,[])}}function G(){var t=this.renderData;if(!(0,u.isNull)(t)){var e=t.parentElement;e&&[["background-image","none"],["background-color","transparent"]].forEach(function(t){return e.style.setProperty(t[0],t[1],"important")})}}function H(t){var e=window.getComputedStyle(t),r=t.style;return{inlineBackground:r.background,inlineBackgroundColor:r.backgroundColor,inlineBackgroundImage:r.backgroundImage,backgroundColor:e.backgroundColor,backgroundImage:e.backgroundImage,backgroundSize:e.backgroundSize,backgroundPosition:e.backgroundPosition,backgroundRepeat:e.backgroundRepeat,backgroundClip:e.backgroundClip,backgroundOrigin:e.backgroundOrigin,backgroundAttachment:e.backgroundAttachment,position:e.position,width:parseInt(e.width),height:parseInt(e.height)}}function Y(){var t=this.renderData;if(!(0,u.isNull)(t)){var e=t.parentElement,r=t.originStyle;e.style.setProperty("background-image",r.inlineBackgroundImage),e.style.setProperty("background-color",r.inlineBackgroundColor)}}function q(t){"@babel/helpers - typeof";return q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},q(t)}function Z(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,K(n.key),n)}}function $(t,e,r){return(e=K(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function K(t){var e=function(t,e){if("object"!=q(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=q(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==q(e)?e:e+""}var V=function(){return t=function t(e,r,n){var i,o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),$(this,"quad",null),$(this,"lastRaindropsFallTime",0),$(this,"parentElement",void 0),$(this,"mutationObserver",void 0),$(this,"resizeObserver",void 0),$(this,"renderProgram",void 0),$(this,"imageSource",""),$(this,"dropProgram",void 0),$(this,"updateProgram",void 0),$(this,"textures",[]),$(this,"backgroundTexture",[]),$(this,"textureDelta",void 0),$(this,"framebuffers",[]),$(this,"bufferWriteIndex",0),$(this,"bufferReadIndex",1),$(this,"originStyle",void 0),$(this,"lastUseStyle",void 0),$(this,"events",{}),$(this,"animationFrameId",0),this.parentElement=null!==(i=e.parentElement)&&void 0!==i?i:document.body,Reflect.apply(G,n,[]),this.originStyle=this.lastUseStyle=H(this.parentElement),this.mutationObserver=new MutationObserver(function(t){t.forEach(function(t){if(t.target===o.parentElement&&"attributes"===t.type&&n.options.visible){var e=Object.values(o.lastUseStyle),i=H(o.parentElement),a=Object.values(i);if((0,u.isEmptyArray)(w.enArr.difference(e,a)))return;var s=p(i.backgroundImage),l=h(i.backgroundColor);if(s&&l)return;o.lastUseStyle=i,Reflect.apply(r,n,[]),Reflect.apply(G,n,[])}})}),this.mutationObserver.observe(this.parentElement,{subtree:!0,attributes:!0,attributeFilter:["class","style"]}),this.resizeObserver=new ResizeObserver(function(t){t.forEach(function(t){t.target===o.parentElement&&Reflect.apply(r,n,[])})}),this.resizeObserver.observe(this.parentElement)},e=[{key:"destroy",value:function(){if(this.animationFrameId&&window.cancelAnimationFrame(this.animationFrameId),Reflect.apply(Y,{renderData:this},[]),this.parentElement&&this.events){var t,e,r,n=this.parentElement,i=this.events;Object.keys(i).forEach(function(t){return n.removeEventListener&&n.removeEventListener(t,i[t])}),n.removeAttribute&&n.removeAttribute("data-ripples"),null===(t=this.mutationObserver)||void 0===t||t.takeRecords(),null===(e=this.mutationObserver)||void 0===e||e.disconnect(),this.mutationObserver=null,null===(r=this.resizeObserver)||void 0===r||r.disconnect(),this.resizeObserver=null}}}],e&&Z(t.prototype,e),r&&Z(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();function J(){var t=this.renderData,e=this.fadeData;if(!(0,u.isNull)(t)){var r,n,i,o=t.parentElement,a=window.getComputedStyle(o),s=a.backgroundSize,l=a.backgroundAttachment,f=a.backgroundPosition,c=/\s+/.test(r=f)?r.replace(/center/,"50%").replace(/top|left/,"0%").replace(/bottom/,"100%").replace(/\s+/," ").split(" "):Q(r)?[r,"50%"]:{center:["50%","50%"],top:["50%","0%"],bottom:["50%","100%"],left:["0%","50%"],right:["100%","50%"]}[r],h={left:0,top:0,width:0,height:0};"fixed"===l?(h.height=window.innerHeight,h.left=window.screenX,h.top=window.screenY,h.width=window.innerWidth):(h.left=0,h.top=0,h.width=o.scrollWidth,h.height=o.scrollHeight);var p=e.backgroundInfo||{width:100,height:100},d=p.width,g=p.height;if("cover"===s){var m=Math.max(h.width/d,h.height/g);n=d*m,i=g*m}else if("contain"===s){var v=Math.min(h.width/d,h.height/g);n=d*v,i=g*v}else{var y=s.split(" ");n=y[0]||"",i=y[1]||n,Q(n)?n=h.width*parseFloat(n)/100:"auto"!==n&&(n=parseFloat(n)),Q(i)?i=h.height*parseFloat(i)/100:"auto"!==i&&(i=parseFloat(i)),"auto"===n&&"auto"===i?(n=d,i=g):("auto"===n&&(n=d*(Number(i)/g)),"auto"===i&&(i=g*(Number(n)/d)))}var b=c&&c[0]||"0%",E=c&&c[1]||"0%";b=Q(b)?(h.left+(h.width-Number(n))*parseFloat(b)/100).toString():(h.left+parseFloat(b)).toString(),E=Q(E)?(h.top+(h.height-Number(i))*parseFloat(E)/100).toString():(h.top+parseFloat(E)).toString(),t.renderProgram.uniforms.topLeft=new Float32Array([-Number(b)/n,-Number(E)/i]),t.renderProgram.uniforms.bottomRight=new Float32Array([t.renderProgram.uniforms.topLeft[0]+o.clientWidth/n,t.renderProgram.uniforms.topLeft[1]+o.clientHeight/i]);var w=Math.max(this.canvas.width,this.canvas.height);t.renderProgram.uniforms.containerRatio=new Float32Array([this.canvas.width/w,this.canvas.height/w])}}function Q(t){return t.endsWith("%")}function tt(){var t=this.gl,e=this.renderData;(0,u.isNull)(e)||(t.bindBuffer(t.ARRAY_BUFFER,e.quad),t.vertexAttribPointer(0,2,t.FLOAT,!1,0,0),t.drawArrays(t.TRIANGLE_FAN,0,4))}function et(){var t=this.gl,e=this.renderData,r=this.options;if(!(0,u.isNull)(e)){var n=e.textures,i=e.backgroundTexture,o=r.perturbance;t.bindFramebuffer(t.FRAMEBUFFER,null),t.viewport(0,0,this.canvas.width,this.canvas.height),t.enable(t.BLEND),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),t.useProgram(e.renderProgram.id),Reflect.apply(c,this,[i,0]),Reflect.apply(c,this,[n[0],1]),t.uniform1f(e.renderProgram.locations.perturbance,o),t.uniform2fv(e.renderProgram.locations.topLeft,e.renderProgram.uniforms.topLeft),t.uniform2fv(e.renderProgram.locations.bottomRight,e.renderProgram.uniforms.bottomRight),t.uniform2fv(e.renderProgram.locations.containerRatio,e.renderProgram.uniforms.containerRatio),t.uniform1i(e.renderProgram.locations.samplerBackground,0),t.uniform1i(e.renderProgram.locations.samplerRipples,1),Reflect.apply(tt,this,[]),t.disable(t.BLEND)}}function rt(){var t=this.renderData;if(!(0,u.isNull)(t)){var e=t.bufferWriteIndex,r=t.bufferReadIndex;t.bufferWriteIndex=1-e,t.bufferReadIndex=1-r}}function nt(){var t=this.gl,e=this.renderData,r=this.options;if(!(0,u.isNull)(e)){var n=e.updateProgram,i=e.textures,o=e.framebuffers,a=e.bufferWriteIndex,s=e.bufferReadIndex,l=r.resolution;t.viewport(0,0,l,l),t.bindFramebuffer(t.FRAMEBUFFER,o[a]),Reflect.apply(c,this,[i[s]]),t.useProgram(n.id),Reflect.apply(tt,this,[]),Reflect.apply(rt,this,[])}}function it(){var t=this,e=this.renderData,r=this.options,n=this.fadeData;if(!(0,u.isNull)(e)){var i=e.parentElement,o=n.isTransitioning,a=r.running,s=r.idleFluctuations,l=r.lastRunningState,f=getComputedStyle(i);n.backgroundInfo={width:parseInt(f.width),height:parseInt(f.height)},Reflect.apply(J,this,[]),a?(l||(r.lastRunningState=!0,this.show()),s&&this.raindropsFall(),o&&this.fade(),Reflect.apply(nt,this,[]),Reflect.apply(et,this,[])):l&&(r.lastRunningState=!1,this.hide()),e.animationFrameId=requestAnimationFrame(function(){return Reflect.apply(it,t,[])})}}function ot(t,e,r){var n=this.renderData;if(!(0,u.isNull)(n)){var i=n.parentElement,o=window.getComputedStyle(i),a=parseInt(o.borderLeftWidth)||0,s=parseInt(o.borderTopWidth)||0,l=i.getBoundingClientRect(),f=t.clientX-l.left-a,c=t.clientY-l.top-s;this.drop(f,c,e,r)}}function at(){var t=this,e=this.renderData,r=this.options;if(!(0,u.isNull)(e)){var n=e.parentElement,i=e.events,o=function(n){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];r.visible&&r.running&&r.interactive&&(e.lastRaindropsFallTime=Date.now(),Reflect.apply(ot,t,[n,r.dropRadius*(i?1.5:1),i?.03:.01]))};i.mousemove=function(t){for(var e=r.accelerating;e--;)o(t)},i.touchmove=i.touchstart=function(t){for(var e=t.touches,r=0;r<e.length;r++)o(e[r])},i.mousedown=function(t){return o(t,!0)},Object.keys(i).forEach(function(t){return null==n?void 0:n.addEventListener(t,i[t],{passive:!0})})}}var st="\n attribute vec2 vertex;\n varying vec2 coord;\n void main() {\n coord = vertex * 0.5 + 0.5;\n gl_Position = vec4(vertex, 0.0, 1.0);\n }";function lt(){var t=this.gl,e=this.renderData;if(!(0,u.isNull)(e)){var r=e.textureDelta;e.dropProgram=f(st,"precision highp float;\n\n const float PI = 3.141592653589793;\n uniform sampler2D texture;\n uniform vec2 center;\n uniform float radius;\n uniform float strength;\n\n varying vec2 coord;\n\n void main() {\n vec4 info = texture2D(texture, coord);\n\n float drop = max(0.0, 1.0 - length(center * 0.5 + 0.5 - coord) / radius);\n drop = 0.5 - cos(drop * PI) * 0.5;\n info.r += drop * strength;\n gl_FragColor = info;\n }",t);var n=e.updateProgram=f(st,"\n precision highp float;\n\n uniform sampler2D texture;\n uniform vec2 delta;\n\n varying vec2 coord;\n\n void main() {\n vec4 info = texture2D(texture, coord);\n \n vec2 dx = vec2(delta.x, 0.0);\n vec2 dy = vec2(0.0, delta.y);\n \n float average = (\n texture2D(texture, coord - dx).r +\n texture2D(texture, coord - dy).r +\n texture2D(texture, coord + dx).r +\n texture2D(texture, coord + dy).r\n ) * 0.25;\n \n info.g += (average - info.r) * 2.0;\n info.g *= 0.995;\n info.r += info.g;\n \n gl_FragColor = info;\n }\n ",this.gl);t.uniform2fv(n.locations.delta,r),e.renderProgram=f("\n precision highp float;\n\n attribute vec2 vertex;\n uniform vec2 topLeft;\n uniform vec2 bottomRight;\n uniform vec2 containerRatio;\n varying vec2 ripplesCoord;\n varying vec2 backgroundCoord;\n void main() {\n backgroundCoord = mix(topLeft, bottomRight, vertex * 0.5 + 0.5);\n backgroundCoord.y = 1.0 - backgroundCoord.y;\n ripplesCoord = vec2(vertex.x, -vertex.y) * containerRatio * 0.5 + 0.5;\n gl_Position = vec4(vertex.x, -vertex.y, 0.0, 1.0);\n }\n ","\n precision highp float;\n\n uniform sampler2D samplerBackground;\n uniform sampler2D samplerRipples;\n uniform vec2 delta;\n\n uniform float perturbance;\n varying vec2 ripplesCoord;\n varying vec2 backgroundCoord;\n\n void main() {\n float height = texture2D(samplerRipples, ripplesCoord).r;\n float heightX = texture2D(samplerRipples, vec2(ripplesCoord.x + delta.x, ripplesCoord.y)).r;\n float heightY = texture2D(samplerRipples, vec2(ripplesCoord.x, ripplesCoord.y + delta.y)).r;\n vec3 dx = vec3(delta.x, heightX - height, 0.0);\n vec3 dy = vec3(0.0, heightY - height, delta.y);\n vec2 offset = -normalize(cross(dy, dx)).xz;\n float specular = pow(max(0.0, dot(offset, normalize(vec2(-0.6, 1.0)))), 4.0);\n gl_FragColor = texture2D(samplerBackground, backgroundCoord + offset * perturbance) + specular;\n }",t),t.uniform2fv(e.renderProgram.locations.delta,r)}}function ut(){var t=this.gl,e=this.renderData;if(!(0,u.isNull)(e)){var r=e.backgroundTexture=t.createTexture();t.bindTexture(t.TEXTURE_2D,r),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,1),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR)}}function ft(t){var e=this.gl,r=this.renderData,n=this.fadeData;if(!(0,u.isNull)(r)){var i=r.backgroundTexture,o=r.parentElement,a=n.backgroundInfo,s=a.width,l=a.height,f=function(t){return(0,u.isZero)(t&t-1)},c=f(s)&&f(l)?e.REPEAT:e.CLAMP_TO_EDGE;e.bindTexture(e.TEXTURE_2D,i),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,c),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,c),o.dataset.render_img=t.tag,o.dataset.render_width=t.width+"px",o.dataset.render_height=t.height+"px",e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t.resource)}}function ct(){var t=this,e=this.renderData,r=this.options,n=this.fadeData;if(!(0,u.isNull)(e)&&this.config){var i=e.textures,o=e.framebuffers,a=r.resolution,s=this.gl,l=1/a;e.textureDelta=new Float32Array([l,l]),this.config.extensions.forEach(function(t){return s.getExtension(t)});for(var f=this.config.arrayType,c=f?new f(a*a*4):null,h=this.config,p=0;p<2;p++){var d=s.createTexture(),g=s.createFramebuffer();s.bindFramebuffer(s.FRAMEBUFFER,g),s.bindTexture(s.TEXTURE_2D,d),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,h.linearSupport?s.LINEAR:s.NEAREST),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MAG_FILTER,h.linearSupport?s.LINEAR:s.NEAREST),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,s.CLAMP_TO_EDGE),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,s.CLAMP_TO_EDGE),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,a,a,0,s.RGBA,h.type,c),s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,d,0),i.push(d),o.push(g)}e.quad=s.createBuffer(),s.bindBuffer(s.ARRAY_BUFFER,e.quad),s.bufferData(s.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,1,1,-1,1]),s.STATIC_DRAW),Reflect.apply(lt,this,[]),Reflect.apply(ut,this,[]),Reflect.apply(z,this,[]),s.clearColor(0,0,0,0),s.blendFunc(s.SRC_ALPHA,s.ONE_MINUS_SRC_ALPHA),r.visible=!0,r.running=!0,Reflect.apply(at,this,[]),Reflect.apply(ft,this,[n.lastDrawImage]),e.animationFrameId=requestAnimationFrame(function(){return Reflect.apply(it,t,[])})}}function ht(){var t=this.renderData,e=this.fadeData;if(!(0,u.isNull)(t)){var r=t.parentElement,n=e.backgroundInfo,i=r.offsetWidth,o=r.offsetHeight;this.canvas.width=n.width=i,this.canvas.height=n.height=o,Reflect.apply(z,this,[])}}function pt(){var t=this.renderData,e=this.fadeData;(0,u.isNull)(t)||(t.destroy(),Object.keys(t).forEach(function(e){return t[e]=null}),this.renderData=null),e.destroy(),Object.keys(e).forEach(function(t){return e[t]=null}),this.fadeData=null,this.gl&&(this.gl=null)}function dt(t,e,r,n){var i=this.renderData,o=this.options,a=this.gl;if(!(0,u.isNull)(i)){var s=i.parentElement,l=i.dropProgram,f=i.textures,h=i.framebuffers,p=i.bufferWriteIndex,d=i.bufferReadIndex,g=o.resolution,m=s.offsetWidth,v=s.offsetHeight,y=Math.max(m,v);r/=y;var b=new Float32Array([(2*t-m)/y,(v-2*e)/y]);a.viewport(0,0,g,g),a.bindFramebuffer(a.FRAMEBUFFER,h[p]),Reflect.apply(c,this,[f[d]]),a.useProgram(l.id),a.uniform2fv(l.locations.center,b),a.uniform1f(l.locations.radius,r),a.uniform1f(l.locations.strength,n),Reflect.apply(tt,this,[]),Reflect.apply(rt,this,[])}}function gt(t){"@babel/helpers - typeof";return gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gt(t)}function mt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,yt(n.key),n)}}function vt(t,e,r){return(e=yt(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yt(t){var e=function(t,e){if("object"!=gt(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=gt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==gt(e)?e:e+""}function bt(t,e,r){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,r)}function Et(t,e){return t.get(Rt(t,e))}function wt(t,e,r){return t.set(Rt(t,e),r),r}function Rt(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}var Tt=new WeakMap,St=new WeakMap,kt=new WeakMap,Pt=new WeakMap,xt=new WeakMap,Dt=new WeakMap,_t=new WeakMap,At=new WeakMap,Ot=function(){return t=function t(e){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),bt(this,Tt,R.accelerating),bt(this,St,R.interactive),bt(this,kt,R.resolution),bt(this,Pt,R.perturbance),bt(this,xt,R.dropRadius),vt(this,"imgUrl",R.imgUrl),bt(this,Dt,R.idleFluctuations),bt(this,_t,R.raindropsTimeInterval),vt(this,"crossOrigin","no-cors"),vt(this,"visible",!1),vt(this,"running",!1),bt(this,At,void 0),vt(this,"lastRunningState",!1),this.perturbance=e.perturbance,this.resolution=e.resolution,this.raindropsTimeInterval=e.raindropsTimeInterval,this.accelerating=e.accelerating,this.interactive=e.interactive,this.dropRadius=e.dropRadius,this.imgUrl=e.imgUrl,this.idleFluctuations=e.idleFluctuations,this.running=Boolean(null===(r=e.playingState)||void 0===r||r),this.crossOrigin=e.crossOrigin,this.darkMode=e.darkMode},(e=[{key:"accelerating",get:function(){return Et(Tt,this)},set:function(t){t>100||t<2||wt(Tt,this,t)}},{key:"interactive",get:function(){return Et(St,this)},set:function(t){(0,u.isBoolean)(t)&&wt(St,this,t)}},{key:"resolution",get:function(){return Et(kt,this)},set:function(t){t<100||t>550||wt(kt,this,t)}},{key:"perturbance",get:function(){return Et(Pt,this)},set:function(t){t<1e-4||t>1||wt(Pt,this,t)}},{key:"dropRadius",get:function(){return Et(xt,this)},set:function(t){!isFinite(t)||t<10||wt(xt,this,t)}},{key:"idleFluctuations",get:function(){return Et(Dt,this)},set:function(t){(0,u.isBoolean)(t)&&wt(Dt,this,t)}},{key:"raindropsTimeInterval",get:function(){return Et(_t,this)},set:function(t){t<10||t>12e3||wt(_t,this,t)}},{key:"playingState",get:function(){return this.running},set:function(t){this.running=Boolean(null==t||t)}},{key:"darkMode",get:function(){return Et(At,this)},set:function(t){wt(At,this,(0,u.isUndefined)(t)?void 0:Boolean(t))}}])&&mt(t.prototype,e),r&&mt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();function It(){var t=this.fadeData,e=this.options,r=this.renderData;if((0,u.isNull)(r))return!0;var n=e.imgUrl,i=r.lastUseStyle,o=t.lastDrawImage,a=t.backgroundInfo,s=a.width,l=a.height,f=o.tag,c=o.kind,h=B(e,i),p=o.width===s,d=o.height===l,g=p&&d;if("image"===c&&g&&(0,u.isString)(h)&&h===f)return!0;var m=(0,u.isArray)(n)&&n.join("_")||"";if("linear-gradient"===c&&g&&m===f)return!0;var v=C(e,i);return!("background-color"!==c||!g||f!==v)}function Ft(){var t=this,e=this.options,r=this.fadeData;r.transparentId=setTimeout(function(){if(clearTimeout(r.transparentId),r.isTransitioning)return Reflect.apply(Ft,t,[]);Reflect.apply(It,t,[])||r.run()},2*e.raindropsTimeInterval)}function Ut(){var t=this.renderData,e=this.fadeData,r=this.options,n=e.toBeList;if((0,u.isNull)(t))return Reflect.apply(jt,this,["还没有准备好,即将退出"]);if((0,u.isEmptyArray)(n))return Reflect.apply(jt,this,["由于缺少当前渲染的背景,退出"]);if(0===e.drawProgress&&n.forEach(function(t){}),e.drawProgress>1e3){if(e.lastDrawImage=n.shift(),Reflect.apply(ft,this,[e.lastDrawImage]),(0,u.isEmptyArray)(n)){var i=t.lastUseStyle;((0,u.isNull)(r.imgUrl)||(0,u.isBusinessEmptyString)(r.imgUrl)||(0,u.isZero)(r.imgUrl.length))&&h(i.backgroundColor)&&p(i.backgroundImage)&&Reflect.apply(N,this,[!1])}return Reflect.apply(jt,this,["当前执行完毕,开启下次执行"])}var o=e.lastDrawImage,a=e.backgroundInfo;e.drawProgress+=18;var s=document.createElement("canvas"),l=s.getContext("2d");if((0,u.isNull)(l)||(0,u.isNull)(o.resource)||(0,u.isEmptyArray)(n))return Reflect.apply(jt,this,"环境值错误");var f=a.width,c=a.height;s.width=f,s.height=c,l.clearRect(0,0,f,c),l.drawImage(o.resource,0,0,f,c),l.globalAlpha=e.drawProgress/1e3,l.drawImage(n[0].resource,0,0,f,c),l.globalAlpha=1;var d={resource:s,width:f,height:c,kind:"mix",tag:"".concat(o.tag," >> ").concat(n[0].tag)};Reflect.apply(ft,this,[d]),n.length>1&&(e.lastDrawImage=d,n.shift(),e.drawProgress=0)}function jt(t){this.fadeData.isTransitioning=!1,Reflect.apply(Ft,this,[])}function Nt(t){"@babel/helpers - typeof";return Nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nt(t)}function Bt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Mt(n.key),n)}}function Ct(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Lt(t,e,r){return(e=Mt(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Mt(t){var e=function(t,e){if("object"!=Nt(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Nt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Nt(e)?e:e+""}function Xt(t,e){return t.get(Wt(t,e))}function Wt(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}var zt=new WeakMap,Gt=new WeakSet,Ht=function(){return t=function t(e){var r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Ct(r=this,n=Gt),n.add(r),Lt(this,"backgroundInfo",{width:0,height:0}),Lt(this,"transparentId",setTimeout(Boolean)),Lt(this,"lastDrawImage",void 0),Lt(this,"toBeList",[]),Lt(this,"drawProgress",0),Lt(this,"isTransitioning",!1),function(t,e,r){Ct(t,e),e.set(t,r)}(this,zt,void 0),Lt(this,"isDark",!1);var i,o,a=e.renderData;if((0,u.isNull)(a))i=10,o=10;else{var s=getComputedStyle(a.parentElement);i=parseInt(s.width),o=parseInt(s.height)}this.backgroundInfo={width:i,height:o},this.lastDrawImage={resource:j(i,o),width:i,height:o,kind:"default",tag:""},function(t,e,r){t.set(Wt(t,e),r)}(zt,this,window.matchMedia("(prefers-color-scheme: dark)")),this.isDark=Xt(zt,this).matches,Xt(zt,this).addEventListener("change",Wt(Gt,this,Yt));var l=this;Object.defineProperty(Xt(zt,this),"isDark",{get:function(){return l.isDark},set:function(t){l.isDark=t,Reflect.apply(It,e,[])||Reflect.apply(N,e,[!0])}})},(e=[{key:"run",value:function(){this.isTransitioning||(this.drawProgress=0,this.isTransitioning=!0)}},{key:"destroy",value:function(){this.transparentId&&clearTimeout(this.transparentId),Xt(zt,this).removeEventListener("change",Wt(Gt,this,Yt))}}])&&Bt(t.prototype,e),r&&Bt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();function Yt(t){this.isDark=t.matches}function qt(t){"@babel/helpers - typeof";return qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qt(t)}function Zt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function $t(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Zt(Object(r),!0).forEach(function(e){re(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Zt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Kt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ne(n.key),n)}}function Vt(t,e,r){return e=Qt(e),function(t,e){if(e&&("object"==qt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Jt()?Reflect.construct(e,r||[],Qt(t).constructor):e.apply(t,r))}function Jt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Jt=function(){return!!t})()}function Qt(t){return Qt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Qt(t)}function te(t,e){return te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},te(t,e)}function ee(t,e,r){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,r)}function re(t,e,r){return(e=ne(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ne(t){var e=function(t,e){if("object"!=qt(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=qt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==qt(e)?e:e+""}function ie(t,e){return t.get(function(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}(t,e))}var oe=new WeakMap,ae=function(){function t(e,r){var i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),re(i=Vt(this,t,[e]),"renderData",null),re(i,"options",void 0),re(i,"fadeData",void 0),re(i,"defaults",R),re(i,"initialized",!1),ee(i,oe,(0,w.debounce)(ht,{this:i})),Object.defineProperties(i,{defaults:{value:i.defaults,writable:!1,enumerable:!1,configurable:!1}}),i.options=new Ot($t($t({},i.defaults),r)),i.renderData=new V(e,i.reloadBackground,i),i.fadeData=new Ht(i),(0,u.isFalse)(i.initState)||(0,u.isNull)(e.parentElement)||(0,u.isNull)(i.config)||(0,u.isNull)(i.gl)?i.initState=!1:(!function(t){var e=t.parentElement;t.width=e.clientWidth,t.height=e.clientHeight,n(t,{position:"absolute",left:0,top:0,right:0,bottom:0,zIndex:-1,pointerEvents:"none"})}(e),Reflect.apply(ct,i,[])),window.matchMedia("(prefers-color-scheme: dark)"),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&te(t,e)}(t,E),e=t,(r=[{key:"raindropsFall",value:function(){var t=this.renderData,e=this.options,r=this.fadeData;if(!(0,u.isNull)(t)){var n=r.backgroundInfo,i=t.lastRaindropsFallTime,o=e.raindropsTimeInterval,a=e.dropRadius,s=Date.now();if(!(s-i<o)){t.lastRaindropsFallTime=s;var l=function(t){return(0,w.getRandomInt)(t)},f=n.width,c=n.height;this.drop(l(f),l(c),a,.03)}}}},{key:"drop",value:function(t,e,r,n){Reflect.apply(dt,this,[t,e,r,n])}},{key:"fade",value:function(){Reflect.apply(Ut,this,[])}},{key:"reloadBackground",value:function(){ie(oe,this).call(this)}},{key:"destroy",value:function(){Reflect.apply(pt,this,[])}},{key:"show",value:function(){this.options.visible=!0,this.canvas.style.visibility="visible",Reflect.apply(G,this,[])}},{key:"hide",value:function(){this.options.visible=!1,this.canvas.style.visibility="hidden",Reflect.apply(Y,this,[])}},{key:"pause",value:function(){this.options.running=!1}},{key:"play",value:function(){this.options.running=!0}},{key:"changePlayingState",value:function(){var t=this.options;t.running=!t.running}},{key:"set",value:function(t,e){"imgUrl"===t?(this.options.imgUrl=e,Reflect.apply(z,this,[])):"darkMode"===t?(this.options.darkMode=e,Reflect.apply(It,this,[])||Reflect.apply(N,this,[!0])):this.options[t]=e}}])&&Kt(e.prototype,r),i&&Kt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,i}();function se(t,e){var r=(0,l.useRef)(null);return(0,l.useEffect)(function(){if(!(0,u.isNull)(t.current))return r.current=new ae(t.current,e),function(){var t;return null===(t=r.current)||void 0===t?void 0:t.destroy()}},[]),r}const le=s.n;export{le as useRipples};
@@ -1 +1 @@
1
- "use client";(()=>{"use strict";var e={953:e=>{e.exports=require("react")}},r={};function t(o){var n=r[o];if(void 0!==n)return n.exports;var u=r[o]={exports:{}};return e[o](u,u.exports,t),u.exports}t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.d=(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};t.r(o),t.d(o,{useTimeId:()=>u});var n=t(953);function u(){var e=(0,n.useRef)(void 0);return(0,n.useEffect)(function(){return function(){e.current&&clearTimeout(e.current)}},[]),e}module.exports.earthnut=o})();
1
+ "use client";(()=>{"use strict";var e={953:e=>{e.exports=require("react")}},r={};function t(o){var n=r[o];if(void 0!==n)return n.exports;var u=r[o]={exports:{}};return e[o](u,u.exports,t),u.exports}t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.d=(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};t.r(o),t.d(o,{useTimeId:()=>u});var n=t(953);function u(){var e=(0,n.useRef)(void 0);return(0,n.useEffect)(function(){return function(){return e.current&&clearTimeout(e.current)}},[]),e}module.exports.earthnut=o})();
@@ -1 +1 @@
1
- "use client";import*as e from"react";var r={649:(r,t,o)=>{r.exports=(e=>{var r={};return o.d(r,e),r})({useEffect:()=>e.useEffect,useRef:()=>e.useRef})}},t={};function o(e){var n=t[e];if(void 0!==n)return n.exports;var u=t[e]={exports:{}};return r[e](u,u.exports,o),u.exports}o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var n={};o.d(n,{O:()=>f});var u=o(649);function f(){var e=(0,u.useRef)(void 0);return(0,u.useEffect)(function(){return function(){e.current&&clearTimeout(e.current)}},[]),e}const s=n.O;export{s as useTimeId};
1
+ "use client";import*as e from"react";var r={649:(r,t,o)=>{r.exports=(e=>{var r={};return o.d(r,e),r})({useEffect:()=>e.useEffect,useRef:()=>e.useRef})}},t={};function o(e){var n=t[e];if(void 0!==n)return n.exports;var u=t[e]={exports:{}};return r[e](u,u.exports,o),u.exports}o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var n={};o.d(n,{O:()=>f});var u=o(649);function f(){var e=(0,u.useRef)(void 0);return(0,u.useEffect)(function(){return function(){return e.current&&clearTimeout(e.current)}},[]),e}const s=n.O;export{s as useTimeId};