tiny-essentials 1.20.1 → 1.20.3
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.
- package/README.md +5 -0
- package/dist/v1/TinyBasicsEs.min.js +1 -1
- package/dist/v1/TinyDragger.min.js +1 -1
- package/dist/v1/TinyEssentials.min.js +1 -1
- package/dist/v1/TinyHtml.min.js +1 -1
- package/dist/v1/TinySmartScroller.min.js +1 -1
- package/dist/v1/TinyTextarea.min.js +1 -0
- package/dist/v1/TinyUploadClicker.min.js +1 -1
- package/dist/v1/basics/html.cjs +33 -2
- package/dist/v1/basics/html.d.mts +14 -4
- package/dist/v1/basics/html.mjs +27 -2
- package/dist/v1/basics/index.cjs +2 -0
- package/dist/v1/basics/index.d.mts +3 -1
- package/dist/v1/basics/index.mjs +3 -3
- package/dist/v1/basics/simpleMath.cjs +23 -4
- package/dist/v1/basics/simpleMath.d.mts +18 -4
- package/dist/v1/basics/simpleMath.mjs +22 -4
- package/dist/v1/build/TinyTextarea.cjs +7 -0
- package/dist/v1/build/TinyTextarea.d.mts +3 -0
- package/dist/v1/build/TinyTextarea.mjs +2 -0
- package/dist/v1/index.cjs +4 -0
- package/dist/v1/index.d.mts +4 -1
- package/dist/v1/index.mjs +4 -3
- package/dist/v1/libs/TinyHtml.cjs +210 -4
- package/dist/v1/libs/TinyHtml.d.mts +109 -3
- package/dist/v1/libs/TinyHtml.mjs +184 -4
- package/dist/v1/libs/TinySmartScroller.cjs +87 -0
- package/dist/v1/libs/TinySmartScroller.d.mts +52 -0
- package/dist/v1/libs/TinySmartScroller.mjs +76 -0
- package/dist/v1/libs/TinyTextarea.cjs +230 -0
- package/dist/v1/libs/TinyTextarea.d.mts +128 -0
- package/dist/v1/libs/TinyTextarea.mjs +198 -0
- package/docs/v1/README.md +1 -0
- package/docs/v1/basics/html.md +78 -22
- package/docs/v1/basics/simpleMath.md +22 -4
- package/docs/v1/libs/TinyHtml.md +140 -0
- package/docs/v1/libs/TinySmartScroller.md +4 -4
- package/docs/v1/libs/TinyTextarea.md +156 -0
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see TinyUploadClicker.min.js.LICENSE.txt */
|
|
2
|
-
(()=>{var e={251:(e,t)=>{t.read=function(e,t,r,n,o){var i,s,a=8*o-n-1,l=(1<<a)-1,c=l>>1,u=-7,f=r?o-1:0,p=r?-1:1,h=e[t+f];for(f+=p,i=h&(1<<-u)-1,h>>=-u,u+=a;u>0;i=256*i+e[t+f],f+=p,u-=8);for(s=i&(1<<-u)-1,i>>=-u,u+=n;u>0;s=256*s+e[t+f],f+=p,u-=8);if(0===i)i=1-c;else{if(i===l)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,n),i-=c}return(h?-1:1)*s*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var s,a,l,c=8*i-o-1,u=(1<<c)-1,f=u>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,m=n?1:-1,d=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+f>=1?p/l:p*Math.pow(2,1-f))*l>=2&&(s++,l/=2),s+f>=u?(a=0,s=u):s+f>=1?(a=(t*l-1)*Math.pow(2,o),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;e[r+h]=255&a,h+=m,a/=256,o-=8);for(s=s<<o|a,c+=o;c>0;e[r+h]=255&s,h+=m,s/=256,c-=8);e[r+h-m]|=128*d}},287:(e,t,r)=>{"use strict";var n=r(526),o=r(251),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.hp=l,t.IS=50;var s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|d(e,t),n=a(r),o=n.write(e,t);return o!==r&&(n=n.slice(0,o)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(F(e,Uint8Array)){var t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return p(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(F(e,ArrayBuffer)||e&&F(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(F(e,SharedArrayBuffer)||e&&F(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return l.from(n,t,r);var o=function(e){if(l.isBuffer(e)){var t=0|m(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||j(e.length)?a(0):p(e):"Buffer"===e.type&&Array.isArray(e.data)?p(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return u(e),a(e<0?0:0|m(e))}function p(e){for(var t=e.length<0?0:0|m(e.length),r=a(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function h(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,l.prototype),n}function m(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function d(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||F(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(e).length;default:if(o)return n?-1:D(e).length;t=(""+t).toLowerCase(),o=!0}}function g(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return B(this,t,r);case"utf8":case"utf-8":return L(this,t,r);case"ascii":return x(this,t,r);case"latin1":case"binary":return k(this,t,r);case"base64":return S(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function w(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),j(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,o){var i,s=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){var u=-1;for(i=r;i<a;i++)if(c(e,i)===c(t,-1===u?0:i-u)){if(-1===u&&(u=i),i-u+1===l)return u*s}else-1!==u&&(i-=i-u),u=-1}else for(r+l>a&&(r=a-l),i=r;i>=0;i--){for(var f=!0,p=0;p<l;p++)if(c(e,i+p)!==c(t,p)){f=!1;break}if(f)return i}return-1}function E(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=t.length;n>i/2&&(n=i/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if(j(a))return s;e[r+s]=a}return s}function v(e,t,r,n){return U(D(t,e.length-r),e,r,n)}function T(e,t,r,n){return U(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function A(e,t,r,n){return U(H(t),e,r,n)}function _(e,t,r,n){return U(function(e,t){for(var r,n,o,i=[],s=0;s<e.length&&!((t-=2)<0);++s)n=(r=e.charCodeAt(s))>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function S(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function L(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o<r;){var i,s,a,l,c=e[o],u=null,f=c>239?4:c>223?3:c>191?2:1;if(o+f<=r)switch(f){case 1:c<128&&(u=c);break;case 2:128==(192&(i=e[o+1]))&&(l=(31&c)<<6|63&i)>127&&(u=l);break;case 3:i=e[o+1],s=e[o+2],128==(192&i)&&128==(192&s)&&(l=(15&c)<<12|(63&i)<<6|63&s)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:i=e[o+1],s=e[o+2],a=e[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(l=(15&c)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(u=l)}null===u?(u=65533,f=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),o+=f}return function(e){var t=e.length;if(t<=C)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=C));return r}(n)}l.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),l.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(e,t,r){return c(e,t,r)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array),l.alloc=function(e,t,r){return function(e,t,r){return u(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},l.allocUnsafe=function(e){return f(e)},l.allocUnsafeSlow=function(e){return f(e)},l.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==l.prototype},l.compare=function(e,t){if(F(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),F(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=l.allocUnsafe(t),o=0;for(r=0;r<e.length;++r){var i=e[r];if(F(i,Uint8Array))o+i.length>n.length?l.from(i).copy(n,o):Uint8Array.prototype.set.call(n,i,o);else{if(!l.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,o)}o+=i.length}return n},l.byteLength=d,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},l.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?L(this,0,e):g.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",r=t.IS;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},i&&(l.prototype[i]=l.prototype.inspect),l.prototype.compare=function(e,t,r,n,o){if(F(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),a=Math.min(i,s),c=this.slice(n,o),u=e.slice(t,r),f=0;f<a;++f)if(c[f]!==u[f]){i=c[f],s=u[f];break}return i<s?-1:s<i?1:0},l.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},l.prototype.indexOf=function(e,t,r){return w(this,e,t,r,!0)},l.prototype.lastIndexOf=function(e,t,r){return w(this,e,t,r,!1)},l.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return E(this,e,t,r);case"utf8":case"utf-8":return v(this,e,t,r);case"ascii":case"latin1":case"binary":return T(this,e,t,r);case"base64":return A(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function x(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function k(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function B(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=t;i<r;++i)o+=V[e[i]];return o}function N(e,t,r){for(var n=e.slice(t,r),o="",i=0;i<n.length-1;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function I(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,r,n,o,i){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function W(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function M(e,t,r,n,i){return t=+t,r>>>=0,i||W(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function R(e,t,r,n,i){return t=+t,r>>>=0,i||W(e,0,r,8),o.write(e,t,r,n,52,8),r+8}l.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,l.prototype),n},l.prototype.readUintLE=l.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n},l.prototype.readUintBE=l.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},l.prototype.readInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||I(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(e,t){e>>>=0,t||I(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return e>>>=0,t||I(e,4,this.length),o.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||I(e,4,this.length),o.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||I(e,8,this.length),o.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||I(e,8,this.length),o.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||P(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||P(this,e,t,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);P(this,e,t,r,o-1,-o)}var i=0,s=1,a=0;for(this[t]=255&e;++i<r&&(s*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/s|0)-a&255;return t+r},l.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);P(this,e,t,r,o-1,-o)}var i=r-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s|0)-a&255;return t+r},l.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeFloatLE=function(e,t,r){return M(this,e,t,!0,r)},l.prototype.writeFloatBE=function(e,t,r){return M(this,e,t,!1,r)},l.prototype.writeDoubleLE=function(e,t,r){return R(this,e,t,!0,r)},l.prototype.writeDoubleBE=function(e,t,r){return R(this,e,t,!1,r)},l.prototype.copy=function(e,t,r,n){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var o=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),o},l.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!l.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var o=e.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(e=o)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var s=l.isBuffer(e)?e:l.from(e,n),a=s.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=s[i%a]}return this};var O=/[^+/0-9A-Za-z-_]/g;function D(e,t){var r;t=t||1/0;for(var n=e.length,o=null,i=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function H(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(O,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function U(e,t,r,n){for(var o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function F(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function j(e){return e!=e}var V=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=16*r,o=0;o<16;++o)t[n+o]=e[r]+e[o];return t}()},526:(e,t)=>{"use strict";t.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,i=a(e),s=i[0],l=i[1],c=new o(function(e,t,r){return 3*(t+r)/4-r}(0,s,l)),u=0,f=l>0?s-4:s;for(r=0;r<f;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[u++]=t>>16&255,c[u++]=t>>8&255,c[u++]=255&t;return 2===l&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[u++]=255&t),1===l&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],s=16383,a=0,l=n-o;a<l;a+=s)i.push(c(e,a,a+s>l?l:a+s));return 1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=i[s],n[i.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function c(e,t,r){for(var n,o=[],i=t;i<r;i+=3)n=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(l(n));return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},606:e=>{var t,r,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var a,l=[],c=!1,u=-1;function f(){c&&a&&(c=!1,a.length?l=a.concat(l):u=-1,l.length&&p())}function p(){if(!c){var e=s(f);c=!0;for(var t=l.length;t;){for(a=l,l=[];++u<t;)a&&a[u].run();u=-1,t=l.length}a=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function m(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new h(e,t)),1!==l.length||c||s(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=m,n.addListener=m,n.once=m,n.off=m,n.removeListener=m,n.removeAllListeners=m,n.emit=m,n.prependListener=m,n.prependOnceListener=m,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},975:(e,t,r)=>{"use strict";var n=r(606);function o(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function i(e,t){for(var r,n="",o=0,i=-1,s=0,a=0;a<=e.length;++a){if(a<e.length)r=e.charCodeAt(a);else{if(47===r)break;r=47}if(47===r){if(i===a-1||1===s);else if(i!==a-1&&2===s){if(n.length<2||2!==o||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var l=n.lastIndexOf("/");if(l!==n.length-1){-1===l?(n="",o=0):o=(n=n.slice(0,l)).length-1-n.lastIndexOf("/"),i=a,s=0;continue}}else if(2===n.length||1===n.length){n="",o=0,i=a,s=0;continue}t&&(n.length>0?n+="/..":n="..",o=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),o=a-i-1;i=a,s=0}else 46===r&&-1!==s?++s:s=-1}return n}var s={resolve:function(){for(var e,t="",r=!1,s=arguments.length-1;s>=-1&&!r;s--){var a;s>=0?a=arguments[s]:(void 0===e&&(e=n.cwd()),a=e),o(a),0!==a.length&&(t=a+"/"+t,r=47===a.charCodeAt(0))}return t=i(t,!r),r?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(o(e),0===e.length)return".";var t=47===e.charCodeAt(0),r=47===e.charCodeAt(e.length-1);return 0!==(e=i(e,!t)).length||t||(e="."),e.length>0&&r&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return o(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var r=arguments[t];o(r),r.length>0&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":s.normalize(e)},relative:function(e,t){if(o(e),o(t),e===t)return"";if((e=s.resolve(e))===(t=s.resolve(t)))return"";for(var r=1;r<e.length&&47===e.charCodeAt(r);++r);for(var n=e.length,i=n-r,a=1;a<t.length&&47===t.charCodeAt(a);++a);for(var l=t.length-a,c=i<l?i:l,u=-1,f=0;f<=c;++f){if(f===c){if(l>c){if(47===t.charCodeAt(a+f))return t.slice(a+f+1);if(0===f)return t.slice(a+f)}else i>c&&(47===e.charCodeAt(r+f)?u=f:0===f&&(u=0));break}var p=e.charCodeAt(r+f);if(p!==t.charCodeAt(a+f))break;47===p&&(u=f)}var h="";for(f=r+u+1;f<=n;++f)f!==n&&47!==e.charCodeAt(f)||(0===h.length?h+="..":h+="/..");return h.length>0?h+t.slice(a+u):(a+=u,47===t.charCodeAt(a)&&++a,t.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(o(e),0===e.length)return".";for(var t=e.charCodeAt(0),r=47===t,n=-1,i=!0,s=e.length-1;s>=1;--s)if(47===(t=e.charCodeAt(s))){if(!i){n=s;break}}else i=!1;return-1===n?r?"/":".":r&&1===n?"//":e.slice(0,n)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');o(e);var r,n=0,i=-1,s=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var a=t.length-1,l=-1;for(r=e.length-1;r>=0;--r){var c=e.charCodeAt(r);if(47===c){if(!s){n=r+1;break}}else-1===l&&(s=!1,l=r+1),a>=0&&(c===t.charCodeAt(a)?-1===--a&&(i=r):(a=-1,i=l))}return n===i?i=l:-1===i&&(i=e.length),e.slice(n,i)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!s){n=r+1;break}}else-1===i&&(s=!1,i=r+1);return-1===i?"":e.slice(n,i)},extname:function(e){o(e);for(var t=-1,r=0,n=-1,i=!0,s=0,a=e.length-1;a>=0;--a){var l=e.charCodeAt(a);if(47!==l)-1===n&&(i=!1,n=a+1),46===l?-1===t?t=a:1!==s&&(s=1):-1!==t&&(s=-1);else if(!i){r=a+1;break}}return-1===t||-1===n||0===s||1===s&&t===n-1&&t===r+1?"":e.slice(t,n)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+"/"+n:n}(0,e)},parse:function(e){o(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var r,n=e.charCodeAt(0),i=47===n;i?(t.root="/",r=1):r=0;for(var s=-1,a=0,l=-1,c=!0,u=e.length-1,f=0;u>=r;--u)if(47!==(n=e.charCodeAt(u)))-1===l&&(c=!1,l=u+1),46===n?-1===s?s=u:1!==f&&(f=1):-1!==s&&(f=-1);else if(!c){a=u+1;break}return-1===s||-1===l||0===f||1===f&&s===l-1&&s===a+1?-1!==l&&(t.base=t.name=0===a&&i?e.slice(1,l):e.slice(a,l)):(0===a&&i?(t.name=e.slice(1,s),t.base=e.slice(1,l)):(t.name=e.slice(a,s),t.base=e.slice(a,l)),t.ext=e.slice(s,l)),a>0?t.dir=e.slice(0,a-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};s.posix=s,e.exports=s}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.d(n,{TinyUploadClicker:()=>F});var e={};r.r(e),r.d(e,{areElsCollBottom:()=>c,areElsCollLeft:()=>u,areElsCollPerfBottom:()=>h,areElsCollPerfLeft:()=>m,areElsCollPerfRight:()=>d,areElsCollPerfTop:()=>p,areElsCollRight:()=>f,areElsCollTop:()=>l,areElsColliding:()=>g,areElsPerfColliding:()=>y,getElsCollDetails:()=>S,getElsCollDirDepth:()=>_,getElsCollOverlap:()=>E,getElsCollOverlapPos:()=>v,getElsColliding:()=>w,getElsPerfColliding:()=>b,getElsRelativeCenterOffset:()=>A,getRectCenter:()=>T});var t=r(287);function o(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)&&"[object Object]"===Object.prototype.toString.call(e)}const i="undefined"!=typeof window&&void 0!==window.document,s={items:{},order:[]};function a(e,t){const r=[],n=Array.isArray(e)?e:Object.entries(e);for(const[e,o]of n)if(!s.items.hasOwnProperty(e)){s.items[e]=o;let n="number"==typeof t?t:-1;if(-1===n){const e=s.order.indexOf("object");n=e>-1?e:s.order.length}n=Math.min(Math.max(0,n),s.order.length),s.order.splice(n,0,e),r.push(e)}return r}a([["undefined",e=>void 0===e],["null",e=>null===e],["boolean",e=>"boolean"==typeof e],["number",e=>"number"==typeof e&&!Number.isNaN(e)],["bigint",e=>"bigint"==typeof e],["string",e=>"string"==typeof e],["symbol",e=>"symbol"==typeof e],["function",e=>"function"==typeof e],["array",e=>Array.isArray(e)]]),i||a([["buffer",e=>void 0!==t.hp&&t.hp.isBuffer(e)]]),i&&a([["file",e=>"undefined"!=typeof File&&e instanceof File]]),a([["date",e=>e instanceof Date],["regexp",e=>e instanceof RegExp],["map",e=>e instanceof Map],["set",e=>e instanceof Set],["weakmap",e=>e instanceof WeakMap],["weakset",e=>e instanceof WeakSet],["promise",e=>e instanceof Promise]]),i&&a([["htmlelement",e=>"undefined"!=typeof HTMLElement&&e instanceof HTMLElement]]),a([["object",e=>o(e)]]);const l=(e,t)=>e.bottom<t.top,c=(e,t)=>e.top>t.bottom,u=(e,t)=>e.right<t.left,f=(e,t)=>e.left>t.right,p=(e,t)=>e.bottom<=t.top,h=(e,t)=>e.top>=t.bottom,m=(e,t)=>e.right<=t.left,d=(e,t)=>e.left>=t.right,g=(e,t)=>!(u(e,t)||f(e,t)||l(e,t)||c(e,t)),y=(e,t)=>!(m(e,t)||d(e,t)||p(e,t)||h(e,t)),w=(e,t)=>u(e,t)?"left":f(e,t)?"right":l(e,t)?"top":c(e,t)?"bottom":null,b=(e,t)=>m(e,t)?"left":d(e,t)?"right":p(e,t)?"top":h(e,t)?"bottom":null,E=(e,t)=>({overlapLeft:t.right-e.left,overlapRight:e.right-t.left,overlapTop:t.bottom-e.top,overlapBottom:e.bottom-t.top}),v=({overlapLeft:e=-1,overlapRight:t=-1,overlapTop:r=-1,overlapBottom:n=-1}={})=>({dirX:e<t?"right":"left",dirY:r<n?"bottom":"top"}),T=e=>({x:e.left+e.width/2,y:e.top+e.height/2});function A(e,t){const r=e.left+e.width/2,n=e.top+e.height/2;return{x:t.left+t.width/2-r,y:t.top+t.height/2-n}}function _(e,t){if(!y(e,t))return{inDir:null,dirX:null,dirY:null,depthX:0,depthY:0};const{overlapLeft:r,overlapRight:n,overlapTop:o,overlapBottom:i}=E(e,t),{dirX:s,dirY:a}=v({overlapLeft:r,overlapRight:n,overlapTop:o,overlapBottom:i}),l=Math.min(r,n),c=Math.min(o,i);let u;return u=l<c?s:a,{inDir:u,dirX:s,dirY:a,depthX:l,depthY:c}}function S(e,t){const r=y(e,t),n={in:null,x:null,y:null},o={y:null,x:null},i={top:0,bottom:0,left:0,right:0},{overlapLeft:s,overlapRight:a,overlapTop:l,overlapBottom:c}=E(t,e);i.top=l,i.bottom=c,i.left=s,i.right=a;const u=Object.entries(i).filter(([,e])=>e>0).sort((e,t)=>e[1]-t[1]),{dirX:f,dirY:p}=v({overlapLeft:a,overlapRight:s,overlapTop:c,overlapBottom:l});return n.y=p,n.x=f,i.bottom<0?o.y="bottom":i.top<0&&(o.y="top"),i.left<0?o.x="left":i.right<0&&(o.x="right"),n.in=r?i.top===i.bottom&&i.bottom===i.left&&i.left===i.right?"center":u.length?u[0][0]:"top":null,{dirs:n,depth:i,isNeg:o}}const{areElsColliding:L,areElsPerfColliding:C,areElsCollTop:x,areElsCollBottom:k,areElsCollLeft:B,areElsCollRight:N}=e,I=new WeakMap,P=new WeakMap,W={top:new WeakMap,bottom:new WeakMap,left:new WeakMap,right:new WeakMap};class M{static Utils={...e};static createFrom(e,t){if("string"!=typeof e)throw new TypeError('The "tagName" must be a string.');if(void 0!==t&&"object"!=typeof t)throw new TypeError('The "attrs" must be a object.');const r=M.createElement(e);if("object"==typeof t)for(const e in t)r.setAttr(e,t[e]);return r}static createElement(e,t){if("string"!=typeof e)throw new TypeError("[TinyHtml] createElement(): The tagName must be a string.");if(void 0!==t&&"object"!=typeof t)throw new TypeError("[TinyHtml] createElement(): The ops must be a object.");return new M(document.createElement(e,t))}static createTextNode(e){if("string"!=typeof e)throw new TypeError("[TinyHtml] createTextNode(): The value must be a string.");return new M(document.createTextNode(e))}static createElementFromHTML(e){const t=document.createElement("template");if(!(e=e.trim()).startsWith("<"))return M.createTextNode(e);if(t.innerHTML=e,!(t.content.firstChild instanceof Element))throw new Error("The HTML string must contain a valid HTML element.");return new M(t.content.firstChild)}static query(e,t=document){const r=t.querySelector(e);return r?new M(r):null}querySelector(e){return M.query(e,M._preElem(this,"query"))}static queryAll(e,t=document){return new M(t.querySelectorAll(e))}querySelectorAll(e){return M.queryAll(e,M._preElem(this,"queryAll"))}static getById(e){const t=document.getElementById(e);return t?new M(t):null}static getByClassName(e,t=document){return new M(t.getElementsByClassName(e))}getElementsByClassName(e){return M.getByClassName(e,M._preElem(this,"getByClassName"))}static getByName(e){return new M(document.getElementsByName(e))}static getByTagNameNS(e,t="http://www.w3.org/1999/xhtml",r=document){return new M(r.getElementsByTagNameNS(t,e))}getElementsByTagNameNS(e,t="http://www.w3.org/1999/xhtml"){return M.getByTagNameNS(e,t,M._preElem(this,"getByTagNameNS"))}get(e){if("number"!=typeof e)throw new TypeError("The index must be a number.");if(!this.#e[e])throw new Error(`No element found at index ${e}.`);return this.#e[e]}extract(e){if("number"!=typeof e)throw new TypeError("The index must be a number.");if(!this.#e[e])throw new Error(`Cannot extract: no element exists at index ${e}.`);return new M(this.#e[e])}exists(e){if("number"!=typeof e)throw new TypeError("The index must be a number.");return!!this.#e[e]}getAll(){return[...this.#e]}_getElement(e,t){if(!(this.#e[t]instanceof Element||this.#e[t]instanceof Window||this.#e[t]instanceof Document))throw new Error(`[TinyHtml] Invalid Element in ${e}().`);return this.#e[t]}_getElements(e){if(!this.#e.every(e=>e instanceof Element||e instanceof Window||e instanceof Document))throw new Error(`[TinyHtml] Invalid Element in ${e}().`);return[...this.#e]}static _preElemsTemplate(e,t,r,n){const o=e=>{const o=[];return e.map(e=>(e instanceof M?e._getElements(t):[e]).map(e=>{let i=!1;for(const t of r)if(e instanceof t){i=!0;break}if(!i)throw new Error(`[TinyHtml] Invalid element of the list "${n.join(",")}" in ${t}().`);return o.push(e),e})),o};return Array.isArray(e)?o(e):o([e])}static _preElemTemplate(e,t,r,n,o=!1){const i=e=>{const i=e[0],s=i instanceof M?i._getElements(t):[i];if(s.length>1)throw new Error(`[TinyHtml] Invalid element amount in ${t}() (Received ${s.length}/1).`);let a=!1;for(const e of r)if(s[0]instanceof e){a=!0;break}if(!o||null!==s[0]&&void 0!==s[0]||(s[0]=null,a=!0),!a)throw new Error(`[TinyHtml] Invalid element of the list "${n.join(",")}" in ${t}().`);return s[0]};if(!Array.isArray(e))return i([e]);if(e.length>1)throw new Error(`[TinyHtml] Invalid element amount in ${t}() (Received ${e.length}/1).`);return i(e)}static _preElems(e,t){return M._preElemsTemplate(e,t,[Element],["Element"])}static _preElem(e,t){return M._preElemTemplate(e,t,[Element],["Element"])}static _preNodeElems(e,t){return M._preElemsTemplate(e,t,[Node],["Node"])}static _preNodeElem(e,t){return M._preElemTemplate(e,t,[Node],["Node"])}static _preNodeElemWithNull(e,t){return M._preElemTemplate(e,t,[Node],["Node"],!0)}static _preHtmlElems(e,t){return M._preElemsTemplate(e,t,[HTMLElement],["HTMLElement"])}static _preHtmlElem(e,t){return M._preElemTemplate(e,t,[HTMLElement],["HTMLElement"])}static _preInputElems(e,t){return M._preElemsTemplate(e,t,[HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement,HTMLOptionElement],["HTMLInputElement","HTMLSelectElement","HTMLTextAreaElement","HTMLOptionElement"])}static _preInputElem(e,t){return M._preElemTemplate(e,t,[HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement,HTMLOptionElement],["HTMLInputElement","HTMLSelectElement","HTMLTextAreaElement","HTMLOptionElement"])}static _preEventTargetElems(e,t){return M._preElemsTemplate(e,t,[EventTarget],["EventTarget"])}static _preEventTargetElem(e,t){return M._preElemTemplate(e,t,[EventTarget],["EventTarget"])}static _preElemsAndWindow(e,t){return M._preElemsTemplate(e,t,[Element,Window],["Element","Window"])}static _preElemAndWindow(e,t){return M._preElemTemplate(e,t,[Element,Window],["Element","Window"])}static _preElemsAndWinAndDoc(e,t){return M._preElemsTemplate(e,t,[Element,Window,Document],["Element","Window","Document"]).map(e=>e instanceof Document?e.documentElement:e)}static _preElemAndWinAndDoc(e,t){const r=M._preElemTemplate(e,t,[Element,Window,Document],["Element","Window","Document"]);return r instanceof Document?r.documentElement:r}static _preElemsWithDoc(e,t){return M._preElemsTemplate(e,t,[Element,Document],["Element","Document"])}static _preElemWithDoc(e,t){return M._preElemTemplate(e,t,[Element,Document],["Element","Document"])}static toTinyElm(e){const t=e=>e.map(e=>e instanceof M?e:new M(e));return Array.isArray(e)?t(e):t([e])}static fromTinyElm(e){const t=e=>{const t=[];return e.map(e=>(e instanceof M?e._getElements("fromTinyElm"):[e]).map(e=>t.push(e))),t};return Array.isArray(e)?t(e):t([e])}static winnow(e,t,r,n=!1){if("boolean"!=typeof n)throw new TypeError('The "not" must be a boolean.');if("function"==typeof t)return M._preElems(e,r).filter((e,r)=>!!t.call(e,r,e)!==n);if(t instanceof Element)return M._preElems(e,r).filter(e=>e===t!==n);if(Array.isArray(t)||"string"!=typeof t&&null!=t.length)return M._preElems(e,r).filter(e=>t.includes(e)!==n);let o=t;return n&&(o=`:not(${o})`),M._preElems(e,r).filter(e=>1===e.nodeType&&e.matches(o))}static filter(e,t,r=!1){return r&&(t=`:not(${t})`),M._preElems(e,"filter").filter(e=>1===e.nodeType&&e.matches(t))}static filterOnly(e,t){return M.winnow(e,t,"filterOnly",!1)}static not(e,t){return M.winnow(e,t,"not",!0)}not(e){return M.not(this,e)}static find(e,t){const r=[];for(const n of M._preElems(e,"find"))r.push(...n.querySelectorAll(t));return[...new Set(r)]}find(e){return M.find(this,e)}static is(e,t){return M.winnow(e,t,"is",!1).length>0}is(e){return M.is(this,e)}static has(e,t){const r="string"==typeof t?[...document.querySelectorAll(t)]:M._preElems(t,"has");return M._preElems(e,"has").filter(e=>r.some(t=>e&&e.contains(t)))}has(e){return M.has(this,e).length>0}static closest(e,t,r){const n=[];for(const o of M._preElems(e,"closest")){let e=o;for(;e&&e!==r;){if(1===e.nodeType&&("string"==typeof t?e.matches(t):e===t)){n.push(e);break}e=e.parentElement}}return[...new Set(n)]}closest(e,t){return M.closest(this,e,t)}static isSameDom(e,t){return M._preNodeElem(e,"isSameDom")===M._preNodeElem(t,"isSameDom")}isSameDom(e){return M.isSameDom(this,e)}_data={};static _dataSelector={public:(e,t)=>{const r=M._preElem(t,e);let n=P.get(r);return n||(n={},P.set(r,n)),n},private:(e,t)=>{if(!(t instanceof M))throw new Error(`Element must be a TinyHtml instance to execute ${e}().`);return t._data}};static data(e,t,r=!1){const n=M._dataSelector[r?"private":"public"]("data",e);if(null==t)return{...n};if("string"!=typeof t)throw new TypeError("The key must be a string.");return n.hasOwnProperty(t)?n[t]:void 0}data(e,t){return M.data(this,e,t)}static setData(e,t,r,n=!1){const o=M._dataSelector[n?"private":"public"]("setData",e);if("string"!=typeof t)throw new TypeError("The key must be a string.");return o[t]=r,e}setData(e,t,r=!1){return M.setData(this,e,t,r)}static _getSibling(e,t,r){let n=M._preNodeElemWithNull(e,r);for(;n&&(n=n[t])&&1!==n.nodeType;);return n instanceof Node?n:null}static _getSiblings(e,t){let r=e;const n=[];for(;r;r=r.nextSibling)1===r.nodeType&&r!==t&&n.push(r);return n}static domDir(e,t,r,n="domDir"){if("string"!=typeof t)throw new TypeError('The "direction" must be a string.');let o=M._preNodeElemWithNull(e,n);const i=[];for(;o&&(o=o[t]);)if(1===o.nodeType){if(r&&("string"==typeof r?o.matches(r):o===r))break;i.push(o)}return i}static parent(e){let t=M._preNodeElemWithNull(e,"parent");const r=t?t.parentNode:null;return r&&11!==r.nodeType?r:null}parent(){return M.parent(this)}static parents(e,t){return M.domDir(e,"parentNode",t,"parents")}parents(e){return M.parents(this,e)}static next(e){return M._getSibling(e,"nextSibling","next")}next(){return M.next(this)}static prev(e){return M._getSibling(e,"previousSibling","prev")}prev(){return M.prev(this)}static nextAll(e){return M.domDir(e,"nextSibling",void 0,"nextAll")}nextAll(){return M.nextAll(this)}static prevAll(e){return M.domDir(e,"previousSibling",void 0,"prevAll")}prevAll(){return M.prevAll(this)}static nextUntil(e,t){return M.domDir(e,"nextSibling",t,"nextUtil")}nextUntil(e){return M.nextUntil(this,e)}static prevUntil(e,t){return M.domDir(e,"previousSibling",t,"prevUtil")}prevUntil(e){return M.prevUntil(this,e)}static siblings(e){const t=M._preNodeElemWithNull(e,"siblings");return M._getSiblings(t&&t.parentNode?t.parentNode.firstChild:null,t)}siblings(){return M.siblings(this)}static children(e){const t=M._preNodeElemWithNull(e,"children");return M._getSiblings(t?t.firstChild:null)}children(){return M.children(this)}static contents(e){const t=M._preNodeElemWithNull(e,"contents");return t instanceof HTMLIFrameElement&&null!=t.contentDocument&&Object.getPrototypeOf(t.contentDocument)?[t.contentDocument]:t instanceof HTMLTemplateElement?Array.from((t.content||t).childNodes):t?Array.from(t.childNodes):[]}contents(){return M.contents(this)}static clone(e,t=!0){if("boolean"!=typeof t)throw new TypeError('The "deep" must be a boolean.');return M._preNodeElems(e,"clone").map(e=>e.cloneNode(t))}clone(e){return M.clone(this,e)[0]}static _appendChecker(e,...t){const r=[],n=[...t];for(const t in n)"string"!=typeof n[t]?r.push(M._preNodeElem(n[t],e)):r.push(n[t]);return r}static append(e,...t){return M._preElem(e,"append").append(...M._appendChecker("append",...t)),e}append(...e){return M.append(this,...e)}static prepend(e,...t){return M._preElem(e,"prepend").prepend(...M._appendChecker("prepend",...t)),e}prepend(...e){return M.prepend(this,...e)}static before(e,...t){return M._preElem(e,"before").before(...M._appendChecker("before",...t)),e}before(...e){return M.before(this,...e)}static after(e,...t){return M._preElem(e,"after").after(...M._appendChecker("after",...t)),e}after(...e){return M.after(this,...e)}static replaceWith(e,...t){return M._preElem(e,"replaceWith").replaceWith(...M._appendChecker("replaceWith",...t)),e}replaceWith(...e){return M.replaceWith(this,...e)}static appendTo(e,t){const r=M._preNodeElems(e,"appendTo"),n=M._preNodeElems(t,"appendTo");return n.forEach((e,t)=>{r.forEach(r=>e.appendChild(t===n.length-1?r:r.cloneNode(!0)))}),e}appendTo(e){return M.appendTo(this,e)}static prependTo(e,t){const r=M._preElems(e,"prependTo"),n=M._preElems(t,"prependTo");return n.forEach((e,t)=>{r.slice().reverse().forEach(r=>e.prepend(t===n.length-1?r:r.cloneNode(!0)))}),e}prependTo(e){return M.prependTo(this,e)}static insertBefore(e,t,r=null){const n=M._preNodeElem(e,"insertBefore"),o=M._preNodeElem(t,"insertBefore"),i=M._preNodeElemWithNull(r,"insertBefore");if(!o.parentNode)throw new Error("The target element has no parent node to insert before.");return o.parentNode.insertBefore(n,i||o),e}insertBefore(e,t){return M.insertBefore(this,e,t)}static insertAfter(e,t,r=null){const n=M._preNodeElem(e,"insertAfter"),o=M._preNodeElem(t,"insertBefore"),i=M._preNodeElemWithNull(r,"insertBefore");if(!o.parentNode)throw new Error("The target element has no parent node to insert after.");return o.parentNode.insertBefore(n,i||o.nextSibling),e}insertAfter(e,t){return M.insertAfter(this,e,t)}static replaceAll(e,t){const r=M._preNodeElems(e,"replaceAll"),n=M._preNodeElems(t,"replaceAll");return n.forEach((e,t)=>{const o=e.parentNode;r.forEach(r=>{o&&o.replaceChild(t===n.length-1?r:r.cloneNode(!0),e)})}),e}replaceAll(e){return M.replaceAll(this,e)}#e;constructor(e){if(e instanceof M)throw new Error("[TinyHtml] You are trying to put a TinyHtml inside another TinyHtml in constructor.");const t=e=>{if(!e.every(e=>e instanceof Element||e instanceof Window||e instanceof Document||e instanceof Text))throw new Error("[TinyHtml] Invalid Target in constructor.")};if(Array.isArray(e))t(e),this.#e=e;else if(e instanceof NodeList||e instanceof HTMLCollection){const r=[...e];t(r),this.#e=r}else{const r=[e];t(r),this.#e=r}}static isWindow(e){return null!=e&&e===e.window}static css(e){const t=M._preElem(e,"css");return window.getComputedStyle(t)}css(){return M.css(this)}static cssString(e,t){const r=M._preElem(e,"cssString");if("string"!=typeof t)throw new TypeError("The prop must be a string.");const n=window.getComputedStyle(r)[t];return"string"==typeof n?n:"number"==typeof n?n.toString():null}cssString(e){return M.cssString(this,e)}static cssList(e,t){const r=M._preElem(e,"cssList");if(!Array.isArray(t))throw new TypeError("The prop must be an array of strings.");const n=window.getComputedStyle(r),o={};for(const e of t)void 0!==e&&(o[e]=n.getPropertyValue(e));return o}cssList(e){return M.cssList(this,e)}static cssFloat(e,t){const r=M._preElem(e,"cssFloat");if("string"!=typeof t)throw new TypeError("The prop must be a string.");const n=window.getComputedStyle(r)[t];return parseFloat(n)||0}cssFloat(e){return M.cssFloat(this,e)}static cssFloats(e,t){const r=M._preElem(e,"cssFloats");if(!Array.isArray(t))throw new TypeError("The prop must be an array of strings.");const n=window.getComputedStyle(r),o={};for(const e of t)o[e]=parseFloat(n[e])||0;return o}cssFloats(e){return M.cssFloats(this,e)}static#t={alignContent:"align-content",alignItems:"align-items",alignSelf:"align-self",animationDelay:"animation-delay",animationDirection:"animation-direction",animationDuration:"animation-duration",animationFillMode:"animation-fill-mode",animationIterationCount:"animation-iteration-count",animationName:"animation-name",animationPlayState:"animation-play-state",animationTimingFunction:"animation-timing-function",backfaceVisibility:"backface-visibility",backgroundAttachment:"background-attachment",backgroundBlendMode:"background-blend-mode",backgroundClip:"background-clip",backgroundColor:"background-color",backgroundImage:"background-image",backgroundOrigin:"background-origin",backgroundPosition:"background-position",backgroundRepeat:"background-repeat",backgroundSize:"background-size",borderBottom:"border-bottom",borderBottomColor:"border-bottom-color",borderBottomLeftRadius:"border-bottom-left-radius",borderBottomRightRadius:"border-bottom-right-radius",borderBottomStyle:"border-bottom-style",borderBottomWidth:"border-bottom-width",borderCollapse:"border-collapse",borderColor:"border-color",borderImage:"border-image",borderImageOutset:"border-image-outset",borderImageRepeat:"border-image-repeat",borderImageSlice:"border-image-slice",borderImageSource:"border-image-source",borderImageWidth:"border-image-width",borderLeft:"border-left",borderLeftColor:"border-left-color",borderLeftStyle:"border-left-style",borderLeftWidth:"border-left-width",borderRadius:"border-radius",borderRight:"border-right",borderRightColor:"border-right-color",borderRightStyle:"border-right-style",borderRightWidth:"border-right-width",borderSpacing:"border-spacing",borderStyle:"border-style",borderTop:"border-top",borderTopColor:"border-top-color",borderTopLeftRadius:"border-top-left-radius",borderTopRightRadius:"border-top-right-radius",borderTopStyle:"border-top-style",borderTopWidth:"border-top-width",borderWidth:"border-width",boxDecorationBreak:"box-decoration-break",boxShadow:"box-shadow",boxSizing:"box-sizing",breakAfter:"break-after",breakBefore:"break-before",breakInside:"break-inside",captionSide:"caption-side",caretColor:"caret-color",clipPath:"clip-path",columnCount:"column-count",columnFill:"column-fill",columnGap:"column-gap",columnRule:"column-rule",columnRuleColor:"column-rule-color",columnRuleStyle:"column-rule-style",columnRuleWidth:"column-rule-width",columnSpan:"column-span",columnWidth:"column-width",counterIncrement:"counter-increment",counterReset:"counter-reset",emptyCells:"empty-cells",flexBasis:"flex-basis",flexDirection:"flex-direction",flexFlow:"flex-flow",flexGrow:"flex-grow",flexShrink:"flex-shrink",flexWrap:"flex-wrap",fontFamily:"font-family",fontFeatureSettings:"font-feature-settings",fontKerning:"font-kerning",fontLanguageOverride:"font-language-override",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontSynthesis:"font-synthesis",fontVariant:"font-variant",fontVariantAlternates:"font-variant-alternates",fontVariantCaps:"font-variant-caps",fontVariantEastAsian:"font-variant-east-asian",fontVariantLigatures:"font-variant-ligatures",fontVariantNumeric:"font-variant-numeric",fontVariantPosition:"font-variant-position",fontWeight:"font-weight",gridArea:"grid-area",gridAutoColumns:"grid-auto-columns",gridAutoFlow:"grid-auto-flow",gridAutoRows:"grid-auto-rows",gridColumn:"grid-column",gridColumnEnd:"grid-column-end",gridColumnGap:"grid-column-gap",gridColumnStart:"grid-column-start",gridGap:"grid-gap",gridRow:"grid-row",gridRowEnd:"grid-row-end",gridRowGap:"grid-row-gap",gridRowStart:"grid-row-start",gridTemplate:"grid-template",gridTemplateAreas:"grid-template-areas",gridTemplateColumns:"grid-template-columns",gridTemplateRows:"grid-template-rows",imageRendering:"image-rendering",justifyContent:"justify-content",letterSpacing:"letter-spacing",lineBreak:"line-break",lineHeight:"line-height",listStyle:"list-style",listStyleImage:"list-style-image",listStylePosition:"list-style-position",listStyleType:"list-style-type",marginBottom:"margin-bottom",marginLeft:"margin-left",marginRight:"margin-right",marginTop:"margin-top",maskClip:"mask-clip",maskComposite:"mask-composite",maskImage:"mask-image",maskMode:"mask-mode",maskOrigin:"mask-origin",maskPosition:"mask-position",maskRepeat:"mask-repeat",maskSize:"mask-size",maskType:"mask-type",maxHeight:"max-height",maxWidth:"max-width",minHeight:"min-height",minWidth:"min-width",mixBlendMode:"mix-blend-mode",objectFit:"object-fit",objectPosition:"object-position",offsetAnchor:"offset-anchor",offsetDistance:"offset-distance",offsetPath:"offset-path",offsetRotate:"offset-rotate",outlineColor:"outline-color",outlineOffset:"outline-offset",outlineStyle:"outline-style",outlineWidth:"outline-width",overflowAnchor:"overflow-anchor",overflowWrap:"overflow-wrap",overflowX:"overflow-x",overflowY:"overflow-y",paddingBottom:"padding-bottom",paddingLeft:"padding-left",paddingRight:"padding-right",paddingTop:"padding-top",pageBreakAfter:"page-break-after",pageBreakBefore:"page-break-before",pageBreakInside:"page-break-inside",perspectiveOrigin:"perspective-origin",placeContent:"place-content",placeItems:"place-items",placeSelf:"place-self",pointerEvents:"pointer-events",rowGap:"row-gap",scrollBehavior:"scroll-behavior",scrollMargin:"scroll-margin",scrollMarginBlock:"scroll-margin-block",scrollMarginBlockEnd:"scroll-margin-block-end",scrollMarginBlockStart:"scroll-margin-block-start",scrollMarginBottom:"scroll-margin-bottom",scrollMarginInline:"scroll-margin-inline",scrollMarginInlineEnd:"scroll-margin-inline-end",scrollMarginInlineStart:"scroll-margin-inline-start",scrollMarginLeft:"scroll-margin-left",scrollMarginRight:"scroll-margin-right",scrollMarginTop:"scroll-margin-top",scrollPadding:"scroll-padding",scrollPaddingBlock:"scroll-padding-block",scrollPaddingBlockEnd:"scroll-padding-block-end",scrollPaddingBlockStart:"scroll-padding-block-start",scrollPaddingBottom:"scroll-padding-bottom",scrollPaddingInline:"scroll-padding-inline",scrollPaddingInlineEnd:"scroll-padding-inline-end",scrollPaddingInlineStart:"scroll-padding-inline-start",scrollPaddingLeft:"scroll-padding-left",scrollPaddingRight:"scroll-padding-right",scrollPaddingTop:"scroll-padding-top",scrollSnapAlign:"scroll-snap-align",scrollSnapStop:"scroll-snap-stop",scrollSnapType:"scroll-snap-type",shapeImageThreshold:"shape-image-threshold",shapeMargin:"shape-margin",shapeOutside:"shape-outside",tabSize:"tab-size",tableLayout:"table-layout",textAlign:"text-align",textAlignLast:"text-align-last",textCombineUpright:"text-combine-upright",textDecoration:"text-decoration",textDecorationColor:"text-decoration-color",textDecorationLine:"text-decoration-line",textDecorationStyle:"text-decoration-style",textIndent:"text-indent",textJustify:"text-justify",textOrientation:"text-orientation",textOverflow:"text-overflow",textShadow:"text-shadow",textTransform:"text-transform",transformBox:"transform-box",transformOrigin:"transform-origin",transformStyle:"transform-style",transitionDelay:"transition-delay",transitionDuration:"transition-duration",transitionProperty:"transition-property",transitionTimingFunction:"transition-timing-function",unicodeBidi:"unicode-bidi",userSelect:"user-select",verticalAlign:"vertical-align",whiteSpace:"white-space",willChange:"will-change",wordBreak:"word-break",wordSpacing:"word-spacing",wordWrap:"word-wrap",writingMode:"writing-mode",zIndex:"z-index",WebkitTransform:"-webkit-transform",WebkitTransition:"-webkit-transition",WebkitBoxShadow:"-webkit-box-shadow",MozBoxShadow:"-moz-box-shadow",MozTransform:"-moz-transform",MozTransition:"-moz-transition",msTransform:"-ms-transform",msTransition:"-ms-transition"};static cssPropAliases=new Proxy(M.#t,{set:(e,t,r)=>(e[t]=r,M.cssPropRevAliases[r]=t,!0)});static cssPropRevAliases=Object.fromEntries(Object.entries(M.#t).map(([e,t])=>[t,e]));static toStyleKc(e){return"string"==typeof M.cssPropAliases[e]?M.cssPropAliases[e]:e}static toStyleCc(e){return"string"==typeof M.cssPropRevAliases[e]?M.cssPropRevAliases[e]:e}static setStyle(e,t,r=null){return M._preHtmlElems(e,"setStyle").forEach(e=>{if("object"==typeof t)for(const[r,n]of Object.entries(t))e.style.setProperty(M.toStyleKc(r),"string"==typeof n?n:"number"==typeof n?`${n}px`:String(n));else e.style.setProperty(M.toStyleKc(t),r)}),e}setStyle(e,t){return M.setStyle(this,e,t)}static getStyle(e,t){return M._preHtmlElem(e,"getStyle").style.getPropertyValue(M.toStyleKc(t))}getStyle(e){return M.getStyle(this,e)}static style(e,{camelCase:t=!1,rawAttr:r=!1}={}){if("boolean"!=typeof t)throw new TypeError('"camelCase" must be a boolean. Received: '+typeof t);if("boolean"!=typeof r)throw new TypeError('"rawAttr" must be a boolean. Received: '+typeof r);const n=M._preHtmlElem(e,"style"),o={};if(r){const e=(n.getAttribute("style")||"").split(";");for(const r of e){const[e,n]=r.split(":");if(!e||!n)continue;const i=e.trim(),s=n.trim();o[t?M.toStyleCc(i):i]=s}}else{const e=n.style;for(let r=0;r<e.length;r++){const n=e[r],i=e.getPropertyValue(n);o[t?M.toStyleCc(n):n]=i}}return o}style(e){return M.style(this,e)}static removeStyle(e,t){return M._preHtmlElems(e,"removeStyle").forEach(e=>{if(Array.isArray(t))for(const r of t)e.style.removeProperty(M.toStyleKc(r));else e.style.removeProperty(M.toStyleKc(t))}),e}removeStyle(e){return M.removeStyle(this,e)}static toggleStyle(e,t,r,n){return M._preHtmlElems(e,"toggleStyle").forEach(e=>{const o=M.getStyle(e,t).trim()===M.toStyleKc(r)?n:r;M.setStyle(e,t,o)}),e}toggleStyle(e,t,r){return M.toggleStyle(this,e,t,r)}static clearStyle(e){return M._preElems(e,"clearStyle").forEach(e=>e.removeAttribute("style")),e}clearStyle(){return M.clearStyle(this)}static focus(e){return M._preHtmlElem(e,"focus").focus(),e}focus(){return M.focus(this)}static blur(e){return M._preHtmlElem(e,"blur").blur(),e}blur(){return M.blur(this)}static boolCheck(e){return void 0!==e&&("true"===e||"1"===e||!0===e||"on"===e||"number"==typeof e&&e>0)}static setWinScrollTop(e){if("number"!=typeof e)throw new TypeError("The value must be a number.");M.setScrollTop(window,e)}static setWinScrollLeft(e){if("number"!=typeof e)throw new TypeError("The value must be a number.");M.setScrollLeft(window,e)}static winScrollTop(){return window.scrollY||document.documentElement.scrollTop}static winScrollLeft(){return window.scrollX||document.documentElement.scrollLeft}static winInnerHeight(){return window.innerHeight||document.documentElement.clientHeight}static winInnerWidth(){return window.innerWidth||document.documentElement.clientWidth}static isPageTop(){return 0===window.scrollY}static isPageBottom(){return window.innerHeight+window.scrollY>=document.body.offsetHeight}static getDimension(e,t,r="content"){const n=M._preElemAndWinAndDoc(e,"getDimension");if("string"!=typeof t)throw new TypeError("The type must be a string.");if("string"!=typeof r)throw new TypeError("The extra must be a string.");const o="width"===t?"Width":"Height";if(M.isWindow(n))return"margin"===r?n["inner"+o]:n.document.documentElement["client"+o];const i=n;if(9===i.nodeType){const e=i.documentElement;return Math.max(i.body["scroll"+o],e["scroll"+o],i.body["offset"+o],e["offset"+o],e["client"+o])}let s=i.getBoundingClientRect()[t];function a(e){return"width"===t?M.cssFloat(i,e+"Left")+M.cssFloat(i,e+"Right"):M.cssFloat(i,e+"Top")+M.cssFloat(i,e+"Bottom")}switch(r){case"content":s-=a("padding"),s-=a("border");break;case"padding":s-=a("border");break;case"border":break;case"margin":s+=a("margin")}return s}getDimension(e,t){return M.getDimension(this,e,t)}static setHeight(e,t){const r=M._preHtmlElem(e,"setHeight");if("number"!=typeof t&&"string"!=typeof t)throw new TypeError("The value must be a string or number.");return r.style.height="number"==typeof t?`${t}px`:t,e}setHeight(e){return M.setHeight(this,e)}static setWidth(e,t){const r=M._preHtmlElem(e,"setWidth");if("number"!=typeof t&&"string"!=typeof t)throw new TypeError("The value must be a string or number.");return r.style.width="number"==typeof t?`${t}px`:t,e}setWidth(e){return M.setWidth(this,e)}static height(e){const t=M._preElemAndWinAndDoc(e,"height");return M.getDimension(t,"height","content")}height(){return M.height(this)}static width(e){const t=M._preElemAndWinAndDoc(e,"width");return M.getDimension(t,"width","content")}width(){return M.width(this)}static innerHeight(e){const t=M._preElemAndWinAndDoc(e,"innerHeight");return M.getDimension(t,"height","padding")}innerHeight(){return M.innerHeight(this)}static innerWidth(e){const t=M._preElemAndWinAndDoc(e,"innerWidth");return M.getDimension(t,"width","padding")}innerWidth(){return M.innerWidth(this)}static outerHeight(e,t=!1){if("boolean"!=typeof t)throw new TypeError('The "includeMargin" must be a boolean.');const r=M._preElemAndWinAndDoc(e,"outerHeight");return M.getDimension(r,"height",t?"margin":"border")}outerHeight(e){return M.outerHeight(this,e)}static outerWidth(e,t=!1){if("boolean"!=typeof t)throw new TypeError('The "includeMargin" must be a boolean.');const r=M._preElemAndWinAndDoc(e,"outerWidth");return M.getDimension(r,"width",t?"margin":"border")}outerWidth(e){return M.outerWidth(this,e)}static animate(e,t,r){return M._preElems(e,"animate").forEach(e=>e.animate(t,r)),e}animate(e,t){return M.animate(this,e,t)}static offset(e){const t=M._preElem(e,"offset").getBoundingClientRect(),r=window.scrollY||document.documentElement.scrollTop,n=window.scrollX||document.documentElement.scrollLeft;return{top:t.top+r,left:t.left+n}}offset(){return M.offset(this)}static position(e){const t=M._preHtmlElem(e,"position");let r,n,o={top:0,left:0};if("fixed"===window.getComputedStyle(t).position)n=t.getBoundingClientRect();else{n=M.offset(t),r=t.offsetParent||document.documentElement;const{position:e}=window.getComputedStyle(r);for(;r instanceof HTMLElement&&(r===document.body||r===document.documentElement)&&"static"===e;)r=r.parentNode;if(r instanceof HTMLElement&&r!==t&&1===r.nodeType){const{borderTopWidth:e,borderLeftWidth:t}=M.cssFloats(r,["borderTopWidth","borderLeftWidth"]);o=M.offset(r),o.top+=e,o.left+=t}}return{top:n.top-o.top-M.cssFloat(t,"marginTop"),left:n.left-o.left-M.cssFloat(t,"marginLeft")}}position(){return M.position(this)}static offsetParent(e){let t=M._preHtmlElem(e,"offsetParent").offsetParent;for(;t instanceof HTMLElement&&"static"===window.getComputedStyle(t).position;)t=t.offsetParent;return t instanceof HTMLElement?t:document.documentElement}offsetParent(){return M.offsetParent(this)}static scrollTop(e){const t=M._preElemAndWindow(e,"scrollTop");return M.isWindow(t)?t.pageYOffset:9===t.nodeType?t.defaultView.pageYOffset:t.scrollTop}scrollTop(){return M.scrollTop(this)}static scrollLeft(e){const t=M._preElemAndWindow(e,"scrollLeft");return M.isWindow(t)?t.pageXOffset:9===t.nodeType?t.defaultView.pageXOffset:t.scrollLeft}scrollLeft(){return M.scrollLeft(this)}static easings={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>e*(2-e),easeInOutQuad:e=>e<.5?2*e*e:(4-2*e)*e-1,easeInCubic:e=>e*e*e,easeOutCubic:e=>--e*e*e+1,easeInOutCubic:e=>e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1};static scrollToXY(e,{targetX:t,targetY:r,duration:n,easing:o,onAnimation:i}={}){if(void 0!==t&&"number"!=typeof t)throw new TypeError("`targetX` must be a number if provided.");if(void 0!==r&&"number"!=typeof r)throw new TypeError("`targetY` must be a number if provided.");if(void 0!==n&&"number"!=typeof n)throw new TypeError("`duration` must be a number if provided.");if(void 0!==o&&"string"!=typeof o)throw new TypeError("`easing` must be a string if provided.");if(void 0!==o&&"function"!=typeof M.easings[o])throw new TypeError(`Unknown easing function: "${o}".`);if(void 0!==i&&"function"!=typeof i)throw new TypeError("`onAnimation` must be a function if provided.");const s=(e,t,r,n)=>{if(e instanceof Window)window.scrollTo(t,r);else if(9===e.nodeType)e.defaultView.scrollTo(t,r);else{const n=e instanceof Window?window.scrollX:e.scrollLeft,o=e instanceof Window?window.scrollY:e.scrollTop;n!==t&&(e.scrollLeft=t),o!==r&&(e.scrollTop=r)}"function"==typeof i&&i({x:t,y:r,isComplete:n>=1,time:n})};return M._preElemsAndWindow(e,"scrollToXY").forEach(e=>{const i=e instanceof Window?window.scrollX:e.scrollLeft,a=e instanceof Window?window.scrollY:e.scrollTop,l=t??i,c=r??a,u=l-i,f=c-a,p="string"==typeof o&&M.easings[o]||null;if("number"!=typeof n||"function"!=typeof p)return s(e,l,c,1);const h=performance.now(),m=n??0;requestAnimationFrame(function t(r){if("function"!=typeof p)return;const n=Math.min(1,(r-h)/m),o=p(n);s(e,i+u*o,a+f*o,n),n<1&&requestAnimationFrame(t)})}),e}scrollToXY({targetX:e,targetY:t,duration:r,easing:n,onAnimation:o}={}){return M.scrollToXY(this,{targetX:e,targetY:t,duration:r,easing:n,onAnimation:o})}static setScrollTop(e,t){if("number"!=typeof t)throw new TypeError("ScrollTop value must be a number.");return M.scrollToXY(e,{targetY:t})}setScrollTop(e){return M.setScrollTop(this,e)}static setScrollLeft(e,t){if("number"!=typeof t)throw new TypeError("ScrollLeft value must be a number.");return M.scrollToXY(e,{targetX:t})}setScrollLeft(e){return M.setScrollLeft(this,e)}static borderWidth(e){const t=M._preElem(e,"borderWidth"),{borderLeftWidth:r,borderRightWidth:n,borderTopWidth:o,borderBottomWidth:i}=M.cssFloats(t,["borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"]);return{x:r+n,y:o+i,left:r,right:n,top:o,bottom:i}}borderWidth(){return M.borderWidth(this)}static border(e){const t=M._preElem(e,"border"),{borderLeft:r,borderRight:n,borderTop:o,borderBottom:i}=M.cssFloats(t,["borderLeft","borderRight","borderTop","borderBottom"]);return{x:r+n,y:o+i,left:r,right:n,top:o,bottom:i}}border(){return M.border(this)}static margin(e){const t=M._preElem(e,"margin"),{marginLeft:r,marginRight:n,marginTop:o,marginBottom:i}=M.cssFloats(t,["marginLeft","marginRight","marginTop","marginBottom"]);return{x:r+n,y:o+i,left:r,right:n,top:o,bottom:i}}margin(){return M.margin(this)}static padding(e){const t=M._preElem(e,"padding"),{paddingLeft:r,paddingRight:n,paddingTop:o,paddingBottom:i}=M.cssFloats(t,["paddingLeft","paddingRight","paddingTop","paddingBottom"]);return{x:r+n,y:o+i,left:r,right:n,top:o,bottom:i}}padding(){return M.padding(this)}static addClass(e,...t){return M._preElems(e,"addClass").forEach(e=>e.classList.add(...t)),e}addClass(...e){return M.addClass(this,...e)}static removeClass(e,...t){return M._preElems(e,"removeClass").forEach(e=>e.classList.remove(...t)),e}removeClass(...e){return M.removeClass(this,...e)}static replaceClass(e,t,r){if("string"!=typeof t)throw new TypeError('The "token" parameter must be a string.');if("string"!=typeof r)throw new TypeError('The "newToken" parameter must be a string.');const n=[];return M._preElems(e,"replaceClass").forEach(e=>n.push(e.classList.replace(t,r))),n}replaceClass(e,t){return M.replaceClass(this,e,t)[0]}static classItem(e,t){const r=M._preElem(e,"classItem");if("number"!=typeof t)throw new TypeError('The "index" parameter must be a number.');return r.classList.item(t)}classItem(e){return M.classItem(this,e)}static toggleClass(e,t,r){if("string"!=typeof t)throw new TypeError('The "token" parameter must be a string.');if(void 0!==r&&"boolean"!=typeof r)throw new TypeError('The "force" parameter must be a boolean.');const n=[];return M._preElems(e,"toggleClass").forEach(e=>n.push(e.classList.toggle(t,r))),n}toggleClass(e,t){return M.toggleClass(this,e,t)[0]}static hasClass(e,t){const r=M._preElem(e,"hasClass");if("string"!=typeof t)throw new TypeError('The "token" parameter must be a string.');return r.classList.contains(t)}hasClass(e){return M.hasClass(this,e)}static classLength(e){return M._preElem(e,"classLength").classList.length}classLength(){return M.classLength(this)}static classList(e){return M._preElem(e,"classList").classList.values().toArray()}classList(){return M.classList(this)}static tagName(e){return M._preElem(e,"tagName").tagName}tagName(){return M.tagName(this)}static id(e){return M._preElem(e,"id").id}id(){return M.id(this)}static text(e){return M._preElem(e,"text").textContent}text(){return M.text(this)}static setText(e,t){if("string"!=typeof t)throw new Error("Value is not a valid string.");return M._preElems(e,"setText").forEach(e=>e.textContent=t),e}setText(e){return M.setText(this,e)}static empty(e){return M._preElems(e,"empty").forEach(e=>e.textContent=""),e}empty(){return M.empty(this)}static html(e,t){return M._preElem(e,"html").getHTML(t)}html(e){return M.html(this,e)}static setHtml(e,t){if("string"!=typeof t)throw new Error("Value is not a valid string.");return M._preElems(e,"setHtml").forEach(e=>e.innerHTML=t),e}setHtml(e){return M.setHtml(this,e)}static _valHooks={option:{get:e=>{const t=e.getAttribute("value");return null!=t?t:e.textContent}},select:{get:e=>{const t=e.options,r=e.selectedIndex,n="select-one"===e.type,o=n?r+1:t.length,i=[];let s=r<0?o:n?r:0;for(;s<o;s++){const e=t[s],o=e.parentNode;if((e.selected||s===r)&&!e.disabled&&(!o||!o.disabled||"OPTGROUP"!==o.tagName)){const t=M._valHooks.option.get(e);if(n)return t;i.push(t)}}return i},set:(e,t)=>{const r=e.options,n=Array.isArray(t)?t.map(String):[String(t)];let o=!1;for(let e=0;e<r.length;e++){const t=r[e],i=M._valHooks.option.get(t);"string"==typeof i&&(t.selected=n.includes(i))&&(o=!0)}return o||(e.selectedIndex=-1),n}},radio:{get:e=>e.checked?"on":"off",set(e,t){if("boolean"==typeof t){const r=e.closest("label");return t&&r&&r.querySelectorAll('input[type="radio"]').forEach(t=>{t instanceof HTMLInputElement&&t!==e&&(t.checked=!1)}),e.checked=t,t}}},checkbox:{get:e=>e.checked?"on":"off",set(e,t){if("boolean"==typeof t)return e.checked=t,t}}};static setVal(e,t){return M._preInputElems(e,"setVal").forEach(e=>{if(1!==e.nodeType)return;let r="function"==typeof t?t(e,M.val(e)):t;null==r?r="":"number"==typeof r?r=String(r):Array.isArray(r)&&(r=((e,t)=>{const r=[];for(let n=0;n<e.length;n++)r.push(t(e[n]));return r})(r,e=>null==e?"":String(e)));const n=M._valHooks[e.type]||M._valHooks[e.nodeName.toLowerCase()];if(!n||"function"!=typeof n.set||void 0===n.set(e,r,"value")){if("string"!=typeof r&&"boolean"!=typeof r)throw new Error(`Invalid setValue "${typeof r}" value.`);"string"==typeof r&&(e.value=r)}}),e}setVal(e){return M.setVal(this,e)}static _valTypes={string:e=>e.value,date:e=>e.valueAsDate,number:e=>e.valueAsNumber};static _getValByType(e,t,r){if("string"!=typeof t)throw new TypeError('The "type" must be a string.');if("string"!=typeof r)throw new TypeError('The "where" must be a string.');if(!(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement))throw new Error(`Provided element is not an HTMLInputElement in ${r}().`);if("function"!=typeof M._valTypes[t])throw new Error(`No handler found for type "${t}" in ${r}().`);return M._valTypes[t](e)}static _val(e,t,r){const n=M._preInputElem(e,t),o=M._valHooks[n.type]||M._valHooks[n.nodeName.toLowerCase()];if(o&&"function"==typeof o.get){const e=o.get(n,"value",r);if(void 0!==e)return"string"==typeof e?e.replace(/\r/g,""):e}return M._getValByType(n,r,t)}_val(e,t){return M._val(this,e,t)}static val(e){return M._val(e,"val","string")}val(){return M.val(this)}static valTxt(e){const t=M._val(e,"valTxt","string");if("string"!=typeof t&&null!==t)throw new Error("Value is not a valid string.");return null==t?"":"string"==typeof t?t.replace(/\r/g,""):t}valTxt(){return M.valTxt(this)}static _valArr(e,t,r){const n=M._val(e,t,r);if(!Array.isArray(n))throw new Error(`Value expected an array but got ${typeof n}.`);return n}_valArr(e,t){return M._valArr(this,e,t)}static valArr(e){return M._valArr(e,"valArr","string")}valArr(){return M.valArr(this)}static valNb(e){if(!(M._preInputElem(e,"valNb")instanceof HTMLInputElement))throw new Error("Element must be an input element.");const t=M._val(e,"valNb","number");if(Number.isNaN(t))throw new Error("Value is not a valid number.");return t}valNb(){return M.valNb(this)}static valDate(e){if(!(M._preInputElem(e,"valDate")instanceof HTMLInputElement))throw new Error("Element must be an input element.");const t=M._val(e,"valDate","date");if(!(t instanceof Date))throw new Error("Value is not a valid date.");return t}valDate(){return M.valDate(this)}static valBool(e){const t=M._preInputElem(e,"valBool");if(!(t instanceof HTMLInputElement))throw new Error("Element must be an input element.");return"on"===M.val(t)}valBool(){return M.valBool(this)}static listenForPaste(e,{onFilePaste:t,onTextPaste:r}={}){if(void 0!==t&&"function"!=typeof t)throw new TypeError("onFilePaste must be a function.");if(void 0!==r&&"function"!=typeof r)throw new TypeError("onTextPaste must be a function.");const n=e=>{if(!(e instanceof ClipboardEvent))return;const n=e.clipboardData?.items||[];for(const e of n)if("file"===e.kind){if("function"==typeof t){const r=e.getAsFile();r&&t(e,r)}}else"string"===e.kind&&"function"==typeof r&&e.getAsString(t=>r(e,t))};return M._preElemsWithDoc(e,"listenForPaste").forEach(e=>M.on(e,"paste",n)),n}listenForPaste({onFilePaste:e,onTextPaste:t}={}){return M.listenForPaste(this,{onFilePaste:e,onTextPaste:t})}static hasEventListener(e,t){const r=M._preEventTargetElem(e,"hasEventListener");if(!I.has(r))return!1;const n=I.get(r);return!!(n&&Array.isArray(n[t])&&n[t].length>0)}hasEventListener(e){return M.hasEventListener(this,e)}static hasExactEventListener(e,t,r){const n=M._preEventTargetElem(e,"hasExactEventListener");if("function"!=typeof r)throw new TypeError('The "handler" must be a function.');if(!I.has(n))return!1;const o=I.get(n);return!(!o||!Array.isArray(o[t]))&&o[t].some(e=>e.handler===r)}hasExactEventListener(e,t){return M.hasExactEventListener(this,e,t)}static on(e,t,r,n){if("string"!=typeof t)throw new TypeError("The event name must be a string.");return M._preEventTargetElems(e,"on").forEach(e=>{e.addEventListener(t,r,n),I.has(e)||I.set(e,{});const o=I.get(e);o&&(Array.isArray(o[t])||(o[t]=[]),o[t].push({handler:r,options:n}))}),e}on(e,t,r){return M.on(this,e,t,r)}static once(e,t,r,n={}){if("string"!=typeof t)throw new TypeError("The event name must be a string.");return M._preEventTargetElems(e,"once").forEach(e=>{const o=n=>{M.off(e,t,o),"function"==typeof r&&r(n)};M.on(e,t,o,"boolean"==typeof n?n:{...n,once:!0})}),e}once(e,t,r={}){return M.once(this,e,t,r)}static off(e,t,r,n){if("string"!=typeof t)throw new TypeError("The event name must be a string.");return M._preEventTargetElems(e,"off").forEach(e=>{e.removeEventListener(t,r,n);const o=I.get(e);o&&o[t]&&(o[t]=o[t].filter(e=>e.handler!==r),0===o[t].length&&delete o[t])}),e}off(e,t,r){return M.off(this,e,t,r)}static offAll(e,t){if("string"!=typeof t)throw new TypeError("The event name must be a string.");return M._preEventTargetElems(e,"offAll").forEach(e=>{const r=I.get(e);if(r&&r[t]){for(const n of r[t])e.removeEventListener(t,n.handler,n.options);delete r[t]}}),e}offAll(e){return M.offAll(this,e)}static offAllTypes(e,t=null){if(null!==t&&"function"!=typeof t)throw new TypeError('The "filterFn" must be a function.');return M._preEventTargetElems(e,"offAllTypes").forEach(e=>{const r=I.get(e);if(r){for(const n in r)for(const o of r[n])("function"!=typeof t||t(o.handler,n))&&e.removeEventListener(n,o.handler,o.options);I.delete(e)}}),e}offAllTypes(e=null){return M.offAllTypes(this,e)}static trigger(e,t,r={}){if("string"!=typeof t)throw new TypeError("The event name must be a string.");return M._preEventTargetElems(e,"trigger").forEach(e=>{const n=r instanceof Event||r instanceof CustomEvent?r:new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e.dispatchEvent(n)}),e}trigger(e,t={}){return M.trigger(this,e,t)}static#r={for:"htmlFor",class:"className"};static propFix=new Proxy(M.#r,{set:(e,t,r)=>(e[t]=r,M.attrFix[r]=t,!0)});static attrFix=Object.fromEntries(Object.entries(M.#r).map(([e,t])=>[t,e]));static getPropName(e){return"string"==typeof M.propFix[e]?M.propFix[e]:e}static getAttrName(e){return"string"==typeof M.attrFix[e]?M.attrFix[e]:e}static attr(e,t){if("string"!=typeof t)throw new TypeError('The "name" must be a string.');return M._preElem(e,"attr").getAttribute(M.getAttrName(t))}attr(e){return M.attr(this,e)}static setAttr(e,t,r=null){if("string"!=typeof t)throw new TypeError('The "name" must be a string.');if(null!==r&&"string"!=typeof r)throw new TypeError('The "value" must be a string.');return M._preElems(e,"setAttr").forEach(e=>{null===r?e.removeAttribute(M.getAttrName(t)):e.setAttribute(M.getAttrName(t),r)}),e}setAttr(e,t){return M.setAttr(this,e,t)}static removeAttr(e,t){if("string"!=typeof t)throw new TypeError('The "name" must be a string.');return M._preElems(e,"removeAttr").forEach(e=>e.removeAttribute(M.getAttrName(t))),e}removeAttr(e){return M.removeAttr(this,e)}static hasAttr(e,t){if("string"!=typeof t)throw new TypeError('The "name" must be a string.');return M._preElem(e,"hasAttr").hasAttribute(M.getAttrName(t))}hasAttr(e){return M.hasAttr(this,e)}static hasProp(e,t){if("string"!=typeof t)throw new TypeError('The "name" must be a string.');return!!M._preElem(e,"hasProp")[M.getPropName(t)]}hasProp(e){return M.hasProp(this,e)}static addProp(e,t){if("string"!=typeof t)throw new TypeError('The "name" must be a string.');return M._preElems(e,"addProp").forEach(e=>{e[M.getPropName(t)]=!0}),e}addProp(e){return M.addProp(this,e)}static removeProp(e,t){if("string"!=typeof t)throw new TypeError('The "name" must be a string.');return M._preElems(e,"removeProp").forEach(e=>{e[M.getPropName(t)]=!1}),e}removeProp(e){return M.removeProp(this,e)}static toggleProp(e,t,r){if("string"!=typeof t)throw new TypeError('The "name" must be a string.');if(void 0!==r&&"boolean"!=typeof r)throw new TypeError('The "force" must be a boolean.');M._preElems(e,"toggleProp").forEach(e=>{(void 0===r?!e[M.getPropName(t)]:r)?M.addProp(e,t):M.removeProp(e,t)})}toggleProp(e,t){return M.toggleProp(this,e,t)}static remove(e){return M._preElems(e,"remove").forEach(e=>e.remove()),e}remove(){return M.remove(this)}static index(e,t=null){const r=M._preElem(e,"index");if(!r)return-1;if(!t)return Array.prototype.indexOf.call(r.parentNode?.children||[],r);if(t){const e="string"==typeof t?document.querySelectorAll(t):M._preElems(t,"index");return Array.prototype.indexOf.call(e,r)}return-1}index(e){return M.index(this,e)}static _getCustomRect(e,t){const r={height:0,width:0,x:0,y:0,bottom:0,left:0,right:0,top:0,toJSON:function(){throw new Error("Function not implemented.")}};for(const t in e)"number"==typeof e[t]&&(r[t]=e[t]);if("object"!=typeof t||null===t||Array.isArray(t))throw new Error("extraRect must be a non-null object.");const{height:n=0,width:o=0,top:i=0,bottom:s=0,left:a=0,right:l=0}=t;if("number"!=typeof n)throw new Error("extraRect.height must be a number.");if("number"!=typeof o)throw new Error("extraRect.width must be a number.");if("number"!=typeof i)throw new Error("extraRect.top must be a number.");if("number"!=typeof s)throw new Error("extraRect.bottom must be a number.");if("number"!=typeof a)throw new Error("extraRect.left must be a number.");if("number"!=typeof l)throw new Error("extraRect.right must be a number.");return r.height+=n,r.width+=o,r.top+=i,r.bottom+=s,r.left+=a,r.right+=l,r}static isCollWith(e,t,r={}){const n=M._getCustomRect(M._preElem(e,"isCollWith").getBoundingClientRect(),r),o=M._preElem(t,"isCollWith").getBoundingClientRect();return L(n,o)}isCollWith(e,t){return M.isCollWith(this,e,t)}static isCollPerfWith(e,t,r={}){const n=M._getCustomRect(M._preElem(e,"isCollPerfWith").getBoundingClientRect(),r),o=M._preElem(t,"isCollPerfWith").getBoundingClientRect();return C(n,o)}isCollPerfWith(e,t){return M.isCollPerfWith(this,e,t)}static _isCollWithLock(e,t,r,n,o){const i=W[o];if(e)return i.has(n)||i.set(n,!0),!0;if(i.has(n)){let e=!1;switch(o){case"top":e=x(t,r);break;case"bottom":e=k(t,r);break;case"left":e=B(t,r);break;case"right":e=N(t,r)}return e&&i.delete(n),i.has(n)}return!1}static isCollWithLock(e,t,r,n={}){const o=M._preElem(e,"isCollWithLock"),i=M._preElem(t,"isCollWithLock"),s=M._getCustomRect(o.getBoundingClientRect(),n),a=i.getBoundingClientRect(),l=L(s,a);return M._isCollWithLock(l,s,a,o,r)}isCollWithLock(e,t,r){return M.isCollWithLock(this,e,t,r)}static isCollPerfWithLock(e,t,r,n={}){const o=M._preElem(e,"isCollPerfWithLock"),i=M._preElem(t,"isCollPerfWithLock"),s=M._getCustomRect(o.getBoundingClientRect(),n),a=i.getBoundingClientRect(),l=C(s,a);return M._isCollWithLock(l,s,a,o,r)}isCollPerfWithLock(e,t,r){return M.isCollPerfWithLock(this,e,t,r)}static resetCollLock(e){const t=M._preElem(e,"resetCollLock");let r=!1;for(const e of["top","bottom","left","right"])W[e].has(t)&&(W[e].delete(t),r=!0);return r}resetCollLock(){return M.resetCollLock(this)}static resetCollLockDir(e,t){const r=M._preElem(e,"resetCollLockDir"),n=W[t];return!!n.has(r)&&(n.delete(r),!0)}resetCollLockDir(e){return M.resetCollLockDir(this,e)}static isInViewport(e){const t=M._preElem(e,"isInViewport");if(!t.checkVisibility({contentVisibilityAuto:!1,opacityProperty:!1,visibilityProperty:!1}))return!1;const r=M.offset(t).top,n=r+M.outerHeight(t),o=M.scrollTop(window),i=o+M.height(window);return n>o&&r<i}isInViewport(){return M.isInViewport(this)}static isScrolledIntoView(e){const t=M._preElem(e,"isScrolledIntoView");if(!t.checkVisibility({contentVisibilityAuto:!1,opacityProperty:!1,visibilityProperty:!1}))return!1;const r=M.scrollTop(window),n=r+M.height(window),o=M.offset(t).top;return o+M.height(t)<=n&&o>=r}isScrolledIntoView(){return M.isScrolledIntoView(this)}static isInContainer(e,t){const r=M._preElem(e,"isInContainer"),n=M._preElem(t,"isInContainer");if(!r.checkVisibility({contentVisibilityAuto:!1,opacityProperty:!1,visibilityProperty:!1}))return!1;const o=r.getBoundingClientRect(),i=n.getBoundingClientRect(),s=o.bottom>i.top&&o.top<i.bottom,a=o.right>i.left&&o.left<i.right;return s&&a}isInContainer(e){return M.isInContainer(this,e)}static isFullyInContainer(e,t){const r=M._preElem(e,"isScrolledIntoView"),n=M._preElem(t,"isInContainer");if(!r.checkVisibility({contentVisibilityAuto:!1,opacityProperty:!1,visibilityProperty:!1}))return!1;const o=r.getBoundingClientRect(),i=n.getBoundingClientRect();return o.top>=i.top&&o.bottom<=i.bottom&&o.left>=i.left&&o.right<=i.right}isFullyInContainer(e){return M.isFullyInContainer(this,e)}static hasScroll(e){const t=M._preElem(e,"hasScroll");return{v:t.scrollHeight>t.clientHeight,h:t.scrollWidth>t.clientWidth}}hasScroll(){return M.hasScroll(this)}}r(975);const R=class{#n=new Map;#o=10;#i=!1;setThrowOnMaxListeners(e){if("boolean"!=typeof e)throw new TypeError("setThrowOnMaxListeners(value): value must be a boolean");this.#i=e}getThrowOnMaxListeners(){return this.#i}#s(e,t,{once:r=!1}={}){let n=this.#n.get(e);Array.isArray(n)||(n=[],this.#n.set(e,n)),n.unshift({handler:t,config:{once:r}});const o=this.#o;if(o>0&&n.length>o){const t=`Possible memory leak detected. ${n.length} "${e}" listeners added. Use setMaxListeners() to increase limit.`;if(this.#i)throw new Error(t);console.warn(t)}}prependListener(e,t){if("string"!=typeof e)throw new TypeError("prepend(event, handler): event name must be a string");if("function"!=typeof t)throw new TypeError("prepend(event, handler): handler must be a function");this.#s(e,t)}prependListenerOnce(e,t){if("string"!=typeof e)throw new TypeError("prependOnceListener(event, handler): event name must be a string");if("function"!=typeof t)throw new TypeError("prependOnceListener(event, handler): handler must be a function");const r=(...n)=>{this.off(e,r),t(...n)};return this.#s(e,r,{once:!0}),r}#a(e,t,{once:r=!1}={}){let n=this.#n.get(e);Array.isArray(n)||(n=[],this.#n.set(e,n)),n.push({handler:t,config:{once:r}});const o=this.#o;if(o>0&&n.length>o){const t=`Possible memory leak detected. ${n.length} "${e}" listeners added. Use setMaxListeners() to increase limit.`;if(this.#i)throw new Error(t);console.warn(t)}}on(e,t){if("string"!=typeof e)throw new TypeError("on(event, handler): event name must be a string");if("function"!=typeof t)throw new TypeError("on(event, handler): handler must be a function");return this.#a(e,t)}once(e,t){if("string"!=typeof e)throw new TypeError("The event name must be a string.");if("function"!=typeof t)throw new TypeError("once(event, handler): handler must be a function");const r=n=>{this.off(e,r),"function"==typeof t&&t(n)};return this.#a(e,r,{once:!0}),r}appendListener(e,t){return this.on(e,t)}appendListenerOnce(e,t){return this.once(e,t)}off(e,t){if("string"!=typeof e)throw new TypeError("off(event, handler): event name must be a string");if("function"!=typeof t)throw new TypeError("off(event, handler): handler must be a function");const r=this.#n.get(e);if(!Array.isArray(r))return;const n=r.findIndex(e=>e.handler===t);-1!==n&&r.splice(n,1),0===r.length&&this.#n.delete(e)}offAll(e){if("string"!=typeof e)throw new TypeError("The event name must be a string.");this.#n.delete(e)}offAllTypes(){this.#n.clear()}listenerCount(e){if("string"!=typeof e)throw new TypeError("listenerCount(event): event name must be a string");const t=this.#n.get(e);return Array.isArray(t)?t.length:0}listeners(e){if("string"!=typeof e)throw new TypeError("listeners(event): event name must be a string");const t=this.#n.get(e);return Array.isArray(t)?[...t].filter(e=>!e.config.once).map(e=>e.handler):[]}onceListeners(e){if("string"!=typeof e)throw new TypeError("onceListeners(event): event name must be a string");const t=this.#n.get(e);return Array.isArray(t)?[...t].filter(e=>e.config.once).map(e=>e.handler):[]}allListeners(e){if("string"!=typeof e)throw new TypeError("allListeners(event): event name must be a string");const t=this.#n.get(e);return Array.isArray(t)?[...t].map(e=>e.handler):[]}eventNames(){return[...this.#n.keys()]}emit(e,...t){if("string"!=typeof e)throw new TypeError("emit(event, data): event name must be a string");const r=this.#n.get(e);return!(!Array.isArray(r)||0===r.length||(r.forEach(e=>e.handler(...t)),0))}setMaxListeners(e){if(!Number.isInteger(e)||e<0)throw new TypeError("setMaxListeners(n): n must be a non-negative integer");this.#o=e}getMaxListeners(){return this.#o}},O=new Map,D=new Map,H=new Set(["string","boolean","number","object","array",String,Boolean,Number,Object,Array,BigInt,Symbol]);class U{#l=new R;setThrowOnMaxListeners(e){return this.#l.setThrowOnMaxListeners(e)}getThrowOnMaxListeners(){return this.#l.getThrowOnMaxListeners()}prependListener(e,t){return this.#l.prependListener(e,t)}prependListenerOnce(e,t){return this.#l.prependListenerOnce(e,t)}appendListener(e,t){return this.#l.appendListener(e,t)}appendListenerOnce(e,t){return this.#l.appendListenerOnce(e,t)}on(e,t){return this.#l.on(e,t)}once(e,t){return this.#l.once(e,t)}off(e,t){return this.#l.off(e,t)}offAll(e){return this.#l.offAll(e)}offAllTypes(){return this.#l.offAllTypes()}listenerCount(e){return this.#l.listenerCount(e)}listeners(e){return this.#l.listeners(e)}onceListeners(e){return this.#l.onceListeners(e)}allListeners(e){return this.#l.allListeners(e)}eventNames(){return this.#l.eventNames()}emit(e,...t){return this.#l.emit(e,...t)}setMaxListeners(e){return this.#l.setMaxListeners(e)}getMaxListeners(){return this.#l.getMaxListeners()}static hasJsonType(e){return O.has(e)&&D.has(e)||H.has(e)}static registerJsonType(e,t,r,n=!1){if(H.has(e))throw new Error(`Cannot register type "${e}" because it is frozen.`);O.set(e,t),D.set(e,r),n&&H.add(e)}static deleteJsonType(e){if(H.has(e))throw new Error(`Cannot remove type "${e}" because it is frozen.`);let t=!1;return O.delete(e)&&(t=!0),D.delete(e)&&(t=!0),t}static encodeSpecialJson(e){if(void 0===e)return{__undefined__:!0};if(null===e)return{__null__:!0};for(const[t,r]of O.entries())if("string"!=typeof t&&e instanceof t||typeof e===t)return r(e,U.encodeSpecialJson);if(Array.isArray(e))return e.map(U.encodeSpecialJson);if(o(e)){const t={};for(const r in e)t[r]=U.encodeSpecialJson(e[r]);return t}return e}static decodeSpecialJson(e){const t=o(e);if(t){if(e.__undefined__)return;if(e.__null__)return null}if(Array.isArray(e))return e.map(U.decodeSpecialJson);if(t){for(const[t,r]of D.entries())if(r.check&&r.check(e))return r.decode(e,U.decodeSpecialJson);const t={};for(const r in e)t[r]=U.decodeSpecialJson(e[r]);return t}return e}#c=window.localStorage;#u=null;#f=0;#p=e=>this.emit("storage",e);constructor(e){if(void 0!==e&&"string"!=typeof e)throw new TypeError("TinyLocalStorage: dbName must be a string if provided.");"string"==typeof e&&(this.#u=`LSDB::${e}`),window.addEventListener("storage",this.#p)}#h(e){if("string"==typeof e&&e.startsWith("LSDB::"))throw new Error(`TinyLocalStorage: Key "${e}" may conflict with reserved dbKeys.`)}updateStorageVersion(e,t){if("string"!=typeof this.#u)throw new Error("TinyLocalStorage: Database key is not initialized. Set a valid dbName in the constructor.");if("number"!=typeof e||Number.isNaN(e)||e<1)throw new TypeError("TinyLocalStorage: version must be a positive number.");if("function"!=typeof t)throw new TypeError("TinyLocalStorage: onUpgrade must be a function.");const r=parseInt(localStorage.getItem(this.#u),10)||0;if("number"!=typeof r||Number.isNaN(r)||r<0)throw new TypeError("TinyLocalStorage: saved version in localStorage is not a valid number.");if(e<r)throw new Error(`TinyLocalStorage: Cannot downgrade database version from ${r} to ${e}.`);e>r&&(t(r,e),localStorage.setItem(this.#u,String(e)),this.#f=e)}getDbKey(){return this.#u}getVersion(){return this.#f}setLocalStorage(e){if(!(e instanceof Storage))throw new TypeError("Argument must be a valid instance of Storage.");this.#c=e}localStorageExists(){return this.#c instanceof Storage}#m(e,t){if("string"!=typeof e||!e.length)throw new TypeError("Key must be a non-empty string.");return U.encodeSpecialJson(t)}setJson(e,t){if(this.#h(e),!(o(t)||Array.isArray(t)||t instanceof Map||t instanceof Set))throw new TypeError("The storage value is not a valid JSON-compatible structure.");const r=this.#m(e,t);return this.emit("setJson",e,t),this.#c.setItem(e,JSON.stringify(r))}#d(e,t){if("string"!=typeof e||!e.length)throw new TypeError("Key must be a non-empty string.");const r=this.#c.getItem(e),n={obj:()=>({}),array:()=>[],map:()=>new Map,set:()=>new Set},o="function"==typeof n[t]?n[t]():null;let i;try{i=JSON.parse(r)}catch{return o}return{decoded:U.decodeSpecialJson(i),fallback:o}}getJson(e,t){const{decoded:r,fallback:n}=this.#d(e,t);return r instanceof Map||r instanceof Set||Array.isArray(r)||o(r)?r:n}setDate(e,t){if(this.#h(e),!(t instanceof Date))throw new TypeError("Value must be a Date.");const r=this.#m(e,t);return this.emit("setDate",e,t),this.#c.setItem(e,JSON.stringify(r))}getDate(e){const t=this.#d(e).decoded;return t instanceof Date?t:null}setRegExp(e,t){if(this.#h(e),!(t instanceof RegExp))throw new TypeError("Value must be a RegExp.");const r=this.#m(e,t);return this.emit("setRegExp",e,t),this.#c.setItem(e,JSON.stringify(r))}getRegExp(e){const t=this.#d(e).decoded;return t instanceof RegExp?t:null}setBigInt(e,t){if(this.#h(e),"bigint"!=typeof t)throw new TypeError("Value must be a BigInt.");const r=this.#m(e,t);return this.emit("setBigInt",e,t),this.#c.setItem(e,JSON.stringify(r))}getBigInt(e){const t=this.#d(e).decoded;return"bigint"==typeof t?t:null}setSymbol(e,t){if(this.#h(e),"symbol"!=typeof t)throw new TypeError("Value must be a Symbol.");const r=this.#m(e,t);return this.emit("setSymbol",e,t),this.#c.setItem(e,JSON.stringify(r))}getSymbol(e){const t=this.#d(e).decoded;return"symbol"==typeof t?t:null}getValue(e){return this.#d(e).decoded??null}setItem(e,t){if(this.#h(e),"string"!=typeof e||!e.length)throw new TypeError("Key must be a non-empty string.");return this.emit("setItem",e,t),this.#c.setItem(e,t)}getItem(e){if("string"!=typeof e||!e.length)throw new TypeError("Key must be a non-empty string.");return this.#c.getItem(e)}setString(e,t){if(this.#h(e),"string"!=typeof e||!e.length)throw new TypeError("Key must be a non-empty string.");if("string"!=typeof t)throw new TypeError("Value must be a string.");return this.emit("setString",e,t),this.#c.setItem(e,JSON.stringify({__string__:!0,value:t}))}getString(e){if("string"!=typeof e||!e.length)throw new TypeError("Key must be a non-empty string.");let t=this.#c.getItem(e);try{if(t=JSON.parse(t),!o(t)||!t.__string__||"string"!=typeof t.value)return null;t=t.value}catch{t=null}return"string"==typeof t?t:null}setNumber(e,t){if(this.#h(e),"string"!=typeof e||!e.length)throw new TypeError("Key must be a non-empty string.");if("number"!=typeof t)throw new TypeError("Value must be a number.");return this.emit("setNumber",e,t),this.#c.setItem(e,String(t))}getNumber(e){if("string"!=typeof e||!e.length)throw new TypeError("Key must be a non-empty string.");let t=this.#c.getItem(e);return"number"==typeof t||"string"==typeof t&&t.length>0&&(t=parseFloat(t),!Number.isNaN(t))?t:null}setBool(e,t){if(this.#h(e),"string"!=typeof e||!e.length)throw new TypeError("Key must be a non-empty string.");if("boolean"!=typeof t)throw new TypeError("Value must be a boolean.");return this.emit("setBool",e,t),this.#c.setItem(e,String(t))}getBool(e){if("string"!=typeof e||!e.length)throw new TypeError("Key must be a non-empty string.");const t=this.#c.getItem(e);if("boolean"==typeof t)return t;if("string"==typeof t){if("true"===t)return!0;if("false"===t)return!1}return null}removeItem(e){if("string"!=typeof e||!e.length)throw new TypeError("Key must be a non-empty string.");return this.emit("removeItem",e),this.#c.removeItem(e)}clearLocalStorage(){return this.#c.clear()}destroy(){window.removeEventListener("storage",this.#p),this.#l.offAllTypes()}}U.registerJsonType(Map,(e,t)=>({__map__:!0,data:Array.from(e.entries()).map(([e,r])=>[e,t(r)])}),{check:e=>e.__map__,decode:(e,t)=>new Map(e.data.map(([e,r])=>[e,t(r)]))},!0),U.registerJsonType(Set,(e,t)=>({__set__:!0,data:Array.from(e).map(t)}),{check:e=>e.__set__,decode:(e,t)=>new Set(e.data.map(t))},!0),U.registerJsonType(Date,e=>({__date__:!0,value:e.toISOString()}),{check:e=>e.__date__,decode:e=>new Date(e.value)},!0),U.registerJsonType(RegExp,e=>({__regexp__:!0,source:e.source,flags:e.flags}),{check:e=>e.__regexp__,decode:e=>new RegExp(e.source,e.flags)},!0),U.registerJsonType("bigint",e=>({__bigint__:!0,value:e.toString()}),{check:e=>e.__bigint__,decode:e=>BigInt(e.value)},!0),U.registerJsonType("symbol",e=>({__symbol__:!0,key:Symbol.keyFor(e)??e.description??null}),{check:e=>e.__symbol__,decode:e=>{const t=e.key;return null!=t?Symbol.for(t):Symbol()}},!0),new WeakMap,new WeakMap;const F=class{#g;#y=[];#w=new WeakMap;#b;constructor(e){if(!o(e))throw new TypeError('TinyUploadClicker: "options" must be a valid object.');this.#g={multiple:!1,accept:"",inputAttributes:{},inputStyles:{display:"none"},onClick:null,onFileLoad:null,...e};const{triggers:t}=e;if(!(Array.isArray(t)||"string"==typeof t||t instanceof HTMLElement))throw new TypeError('TinyUploadClicker: "triggers" is required and must be a string, HTMLElement, or an array of them.');const r=(Array.isArray(this.#g.triggers)?this.#g.triggers:[this.#g.triggers]).map(e=>{if("string"==typeof e){const t=document.querySelector(e);if(!t)throw new Error(`TinyUploadClicker: No element found for selector "${e}".`);return t}if(!(e instanceof HTMLElement))throw new TypeError("TinyUploadClicker: All triggers must be either strings (selectors) or HTMLElements.");return e});if(void 0!==e.accept&&"string"!=typeof e.accept&&!Array.isArray(e.accept))throw new TypeError('TinyUploadClicker: "accept" must be a string or an array of strings.');if(void 0!==e.onClick&&"function"!=typeof e.onClick&&null!==e.onClick)throw new TypeError('TinyUploadClicker: "onClick" must be a function or null.');if(void 0!==e.onFileLoad&&"function"!=typeof e.onFileLoad&&null!==e.onFileLoad)throw new TypeError('TinyUploadClicker: "onFileLoad" must be a function or null.');if(void 0!==e.inputAttributes&&!o(e.inputAttributes))throw new TypeError('TinyUploadClicker: "inputAttributes" must be an object.');if(void 0!==e.inputStyles&&!o(e.inputStyles))throw new TypeError('TinyUploadClicker: "inputStyles" must be an object.');this.#b=this.#E.bind(this),this.#y=r,this.#y.forEach(e=>{if(!(e instanceof HTMLElement))return;const t=document.createElement("input");t.type="file",this.#g.multiple&&(t.multiple=!0),"string"==typeof this.#g.accept?t.accept=this.#g.accept:Array.isArray(this.#g.accept)&&(t.accept=this.#g.accept.join(","));const r=this.#g.inputAttributes;if(r&&"object"==typeof r)for(const[e,n]of Object.entries(r))t.setAttribute(e,n);Object.assign(t.style,this.#g.inputStyles||{display:"none"}),t.addEventListener("change",()=>{t.files&&"function"==typeof this.#g.onFileLoad&&this.#g.onFileLoad(t.files,e),t.value=""}),document.body.appendChild(t),this.#w.set(e,t),e.addEventListener("click",this.#b)})}#E(e){const t=e.currentTarget;if(!(t instanceof HTMLElement))return;const r=this.#w.get(t);r&&("function"==typeof this.#g.onClick&&this.#g.onClick(t),r.click())}destroy(){for(const e of this.#y){if(!(e instanceof HTMLElement))return;e.removeEventListener("click",this.#b);const t=this.#w.get(e);t&&t.parentNode&&t.remove(),this.#w.delete(e)}this.#y=[]}}})(),window.TinyUploadClicker=n.TinyUploadClicker})();
|
|
2
|
+
(()=>{var e={251:(e,t)=>{t.read=function(e,t,r,n,o){var i,s,a=8*o-n-1,l=(1<<a)-1,c=l>>1,u=-7,f=r?o-1:0,p=r?-1:1,h=e[t+f];for(f+=p,i=h&(1<<-u)-1,h>>=-u,u+=a;u>0;i=256*i+e[t+f],f+=p,u-=8);for(s=i&(1<<-u)-1,i>>=-u,u+=n;u>0;s=256*s+e[t+f],f+=p,u-=8);if(0===i)i=1-c;else{if(i===l)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,n),i-=c}return(h?-1:1)*s*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var s,a,l,c=8*i-o-1,u=(1<<c)-1,f=u>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,m=n?1:-1,d=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+f>=1?p/l:p*Math.pow(2,1-f))*l>=2&&(s++,l/=2),s+f>=u?(a=0,s=u):s+f>=1?(a=(t*l-1)*Math.pow(2,o),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;e[r+h]=255&a,h+=m,a/=256,o-=8);for(s=s<<o|a,c+=o;c>0;e[r+h]=255&s,h+=m,s/=256,c-=8);e[r+h-m]|=128*d}},287:(e,t,r)=>{"use strict";var n=r(526),o=r(251),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.hp=l,t.IS=50;var s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|d(e,t),n=a(r),o=n.write(e,t);return o!==r&&(n=n.slice(0,o)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(F(e,Uint8Array)){var t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return p(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(F(e,ArrayBuffer)||e&&F(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(F(e,SharedArrayBuffer)||e&&F(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return l.from(n,t,r);var o=function(e){if(l.isBuffer(e)){var t=0|m(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||j(e.length)?a(0):p(e):"Buffer"===e.type&&Array.isArray(e.data)?p(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return u(e),a(e<0?0:0|m(e))}function p(e){for(var t=e.length<0?0:0|m(e.length),r=a(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function h(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,l.prototype),n}function m(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function d(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||F(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return O(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return D(e).length;default:if(o)return n?-1:O(e).length;t=(""+t).toLowerCase(),o=!0}}function g(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return B(this,t,r);case"utf8":case"utf-8":return L(this,t,r);case"ascii":return x(this,t,r);case"latin1":case"binary":return k(this,t,r);case"base64":return S(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function w(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),j(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,o){var i,s=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){var u=-1;for(i=r;i<a;i++)if(c(e,i)===c(t,-1===u?0:i-u)){if(-1===u&&(u=i),i-u+1===l)return u*s}else-1!==u&&(i-=i-u),u=-1}else for(r+l>a&&(r=a-l),i=r;i>=0;i--){for(var f=!0,p=0;p<l;p++)if(c(e,i+p)!==c(t,p)){f=!1;break}if(f)return i}return-1}function E(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=t.length;n>i/2&&(n=i/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if(j(a))return s;e[r+s]=a}return s}function v(e,t,r,n){return U(O(t,e.length-r),e,r,n)}function T(e,t,r,n){return U(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function A(e,t,r,n){return U(D(t),e,r,n)}function _(e,t,r,n){return U(function(e,t){for(var r,n,o,i=[],s=0;s<e.length&&!((t-=2)<0);++s)n=(r=e.charCodeAt(s))>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function S(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function L(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o<r;){var i,s,a,l,c=e[o],u=null,f=c>239?4:c>223?3:c>191?2:1;if(o+f<=r)switch(f){case 1:c<128&&(u=c);break;case 2:128==(192&(i=e[o+1]))&&(l=(31&c)<<6|63&i)>127&&(u=l);break;case 3:i=e[o+1],s=e[o+2],128==(192&i)&&128==(192&s)&&(l=(15&c)<<12|(63&i)<<6|63&s)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:i=e[o+1],s=e[o+2],a=e[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(l=(15&c)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(u=l)}null===u?(u=65533,f=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),o+=f}return function(e){var t=e.length;if(t<=C)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=C));return r}(n)}l.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),l.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(e,t,r){return c(e,t,r)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array),l.alloc=function(e,t,r){return function(e,t,r){return u(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},l.allocUnsafe=function(e){return f(e)},l.allocUnsafeSlow=function(e){return f(e)},l.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==l.prototype},l.compare=function(e,t){if(F(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),F(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=l.allocUnsafe(t),o=0;for(r=0;r<e.length;++r){var i=e[r];if(F(i,Uint8Array))o+i.length>n.length?l.from(i).copy(n,o):Uint8Array.prototype.set.call(n,i,o);else{if(!l.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,o)}o+=i.length}return n},l.byteLength=d,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},l.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?L(this,0,e):g.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",r=t.IS;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},i&&(l.prototype[i]=l.prototype.inspect),l.prototype.compare=function(e,t,r,n,o){if(F(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),a=Math.min(i,s),c=this.slice(n,o),u=e.slice(t,r),f=0;f<a;++f)if(c[f]!==u[f]){i=c[f],s=u[f];break}return i<s?-1:s<i?1:0},l.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},l.prototype.indexOf=function(e,t,r){return w(this,e,t,r,!0)},l.prototype.lastIndexOf=function(e,t,r){return w(this,e,t,r,!1)},l.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return E(this,e,t,r);case"utf8":case"utf-8":return v(this,e,t,r);case"ascii":case"latin1":case"binary":return T(this,e,t,r);case"base64":return A(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function x(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function k(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function B(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=t;i<r;++i)o+=V[e[i]];return o}function N(e,t,r){for(var n=e.slice(t,r),o="",i=0;i<n.length-1;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function I(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,r,n,o,i){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function M(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function W(e,t,r,n,i){return t=+t,r>>>=0,i||M(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function R(e,t,r,n,i){return t=+t,r>>>=0,i||M(e,0,r,8),o.write(e,t,r,n,52,8),r+8}l.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,l.prototype),n},l.prototype.readUintLE=l.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n},l.prototype.readUintBE=l.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},l.prototype.readInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||I(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(e,t){e>>>=0,t||I(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return e>>>=0,t||I(e,4,this.length),o.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||I(e,4,this.length),o.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||I(e,8,this.length),o.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||I(e,8,this.length),o.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||P(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||P(this,e,t,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);P(this,e,t,r,o-1,-o)}var i=0,s=1,a=0;for(this[t]=255&e;++i<r&&(s*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/s|0)-a&255;return t+r},l.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);P(this,e,t,r,o-1,-o)}var i=r-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s|0)-a&255;return t+r},l.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeFloatLE=function(e,t,r){return W(this,e,t,!0,r)},l.prototype.writeFloatBE=function(e,t,r){return W(this,e,t,!1,r)},l.prototype.writeDoubleLE=function(e,t,r){return R(this,e,t,!0,r)},l.prototype.writeDoubleBE=function(e,t,r){return R(this,e,t,!1,r)},l.prototype.copy=function(e,t,r,n){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var o=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),o},l.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!l.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var o=e.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(e=o)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var s=l.isBuffer(e)?e:l.from(e,n),a=s.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=s[i%a]}return this};var H=/[^+/0-9A-Za-z-_]/g;function O(e,t){var r;t=t||1/0;for(var n=e.length,o=null,i=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function D(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function U(e,t,r,n){for(var o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function F(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function j(e){return e!=e}var V=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=16*r,o=0;o<16;++o)t[n+o]=e[r]+e[o];return t}()},526:(e,t)=>{"use strict";t.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,i=a(e),s=i[0],l=i[1],c=new o(function(e,t,r){return 3*(t+r)/4-r}(0,s,l)),u=0,f=l>0?s-4:s;for(r=0;r<f;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[u++]=t>>16&255,c[u++]=t>>8&255,c[u++]=255&t;return 2===l&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[u++]=255&t),1===l&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],s=16383,a=0,l=n-o;a<l;a+=s)i.push(c(e,a,a+s>l?l:a+s));return 1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=i[s],n[i.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function c(e,t,r){for(var n,o=[],i=t;i<r;i+=3)n=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(l(n));return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},606:e=>{var t,r,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var a,l=[],c=!1,u=-1;function f(){c&&a&&(c=!1,a.length?l=a.concat(l):u=-1,l.length&&p())}function p(){if(!c){var e=s(f);c=!0;for(var t=l.length;t;){for(a=l,l=[];++u<t;)a&&a[u].run();u=-1,t=l.length}a=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function m(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new h(e,t)),1!==l.length||c||s(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=m,n.addListener=m,n.once=m,n.off=m,n.removeListener=m,n.removeAllListeners=m,n.emit=m,n.prependListener=m,n.prependOnceListener=m,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},975:(e,t,r)=>{"use strict";var n=r(606);function o(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function i(e,t){for(var r,n="",o=0,i=-1,s=0,a=0;a<=e.length;++a){if(a<e.length)r=e.charCodeAt(a);else{if(47===r)break;r=47}if(47===r){if(i===a-1||1===s);else if(i!==a-1&&2===s){if(n.length<2||2!==o||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var l=n.lastIndexOf("/");if(l!==n.length-1){-1===l?(n="",o=0):o=(n=n.slice(0,l)).length-1-n.lastIndexOf("/"),i=a,s=0;continue}}else if(2===n.length||1===n.length){n="",o=0,i=a,s=0;continue}t&&(n.length>0?n+="/..":n="..",o=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),o=a-i-1;i=a,s=0}else 46===r&&-1!==s?++s:s=-1}return n}var s={resolve:function(){for(var e,t="",r=!1,s=arguments.length-1;s>=-1&&!r;s--){var a;s>=0?a=arguments[s]:(void 0===e&&(e=n.cwd()),a=e),o(a),0!==a.length&&(t=a+"/"+t,r=47===a.charCodeAt(0))}return t=i(t,!r),r?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(o(e),0===e.length)return".";var t=47===e.charCodeAt(0),r=47===e.charCodeAt(e.length-1);return 0!==(e=i(e,!t)).length||t||(e="."),e.length>0&&r&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return o(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var r=arguments[t];o(r),r.length>0&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":s.normalize(e)},relative:function(e,t){if(o(e),o(t),e===t)return"";if((e=s.resolve(e))===(t=s.resolve(t)))return"";for(var r=1;r<e.length&&47===e.charCodeAt(r);++r);for(var n=e.length,i=n-r,a=1;a<t.length&&47===t.charCodeAt(a);++a);for(var l=t.length-a,c=i<l?i:l,u=-1,f=0;f<=c;++f){if(f===c){if(l>c){if(47===t.charCodeAt(a+f))return t.slice(a+f+1);if(0===f)return t.slice(a+f)}else i>c&&(47===e.charCodeAt(r+f)?u=f:0===f&&(u=0));break}var p=e.charCodeAt(r+f);if(p!==t.charCodeAt(a+f))break;47===p&&(u=f)}var h="";for(f=r+u+1;f<=n;++f)f!==n&&47!==e.charCodeAt(f)||(0===h.length?h+="..":h+="/..");return h.length>0?h+t.slice(a+u):(a+=u,47===t.charCodeAt(a)&&++a,t.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(o(e),0===e.length)return".";for(var t=e.charCodeAt(0),r=47===t,n=-1,i=!0,s=e.length-1;s>=1;--s)if(47===(t=e.charCodeAt(s))){if(!i){n=s;break}}else i=!1;return-1===n?r?"/":".":r&&1===n?"//":e.slice(0,n)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');o(e);var r,n=0,i=-1,s=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var a=t.length-1,l=-1;for(r=e.length-1;r>=0;--r){var c=e.charCodeAt(r);if(47===c){if(!s){n=r+1;break}}else-1===l&&(s=!1,l=r+1),a>=0&&(c===t.charCodeAt(a)?-1===--a&&(i=r):(a=-1,i=l))}return n===i?i=l:-1===i&&(i=e.length),e.slice(n,i)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!s){n=r+1;break}}else-1===i&&(s=!1,i=r+1);return-1===i?"":e.slice(n,i)},extname:function(e){o(e);for(var t=-1,r=0,n=-1,i=!0,s=0,a=e.length-1;a>=0;--a){var l=e.charCodeAt(a);if(47!==l)-1===n&&(i=!1,n=a+1),46===l?-1===t?t=a:1!==s&&(s=1):-1!==t&&(s=-1);else if(!i){r=a+1;break}}return-1===t||-1===n||0===s||1===s&&t===n-1&&t===r+1?"":e.slice(t,n)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+"/"+n:n}(0,e)},parse:function(e){o(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var r,n=e.charCodeAt(0),i=47===n;i?(t.root="/",r=1):r=0;for(var s=-1,a=0,l=-1,c=!0,u=e.length-1,f=0;u>=r;--u)if(47!==(n=e.charCodeAt(u)))-1===l&&(c=!1,l=u+1),46===n?-1===s?s=u:1!==f&&(f=1):-1!==s&&(f=-1);else if(!c){a=u+1;break}return-1===s||-1===l||0===f||1===f&&s===l-1&&s===a+1?-1!==l&&(t.base=t.name=0===a&&i?e.slice(1,l):e.slice(a,l)):(0===a&&i?(t.name=e.slice(1,s),t.base=e.slice(1,l)):(t.name=e.slice(a,s),t.base=e.slice(a,l)),t.ext=e.slice(s,l)),a>0?t.dir=e.slice(0,a-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};s.posix=s,e.exports=s}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.d(n,{TinyUploadClicker:()=>F});var e={};r.r(e),r.d(e,{areElsCollBottom:()=>c,areElsCollLeft:()=>u,areElsCollPerfBottom:()=>h,areElsCollPerfLeft:()=>m,areElsCollPerfRight:()=>d,areElsCollPerfTop:()=>p,areElsCollRight:()=>f,areElsCollTop:()=>l,areElsColliding:()=>g,areElsPerfColliding:()=>y,getElsCollDetails:()=>S,getElsCollDirDepth:()=>_,getElsCollOverlap:()=>E,getElsCollOverlapPos:()=>v,getElsColliding:()=>w,getElsPerfColliding:()=>b,getElsRelativeCenterOffset:()=>A,getRectCenter:()=>T});var t=r(287);function o(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)&&"[object Object]"===Object.prototype.toString.call(e)}const i="undefined"!=typeof window&&void 0!==window.document,s={items:{},order:[]};function a(e,t){const r=[],n=Array.isArray(e)?e:Object.entries(e);for(const[e,o]of n)if(!s.items.hasOwnProperty(e)){s.items[e]=o;let n="number"==typeof t?t:-1;if(-1===n){const e=s.order.indexOf("object");n=e>-1?e:s.order.length}n=Math.min(Math.max(0,n),s.order.length),s.order.splice(n,0,e),r.push(e)}return r}a([["undefined",e=>void 0===e],["null",e=>null===e],["boolean",e=>"boolean"==typeof e],["number",e=>"number"==typeof e&&!Number.isNaN(e)],["bigint",e=>"bigint"==typeof e],["string",e=>"string"==typeof e],["symbol",e=>"symbol"==typeof e],["function",e=>"function"==typeof e],["array",e=>Array.isArray(e)]]),i||a([["buffer",e=>void 0!==t.hp&&t.hp.isBuffer(e)]]),i&&a([["file",e=>"undefined"!=typeof File&&e instanceof File]]),a([["date",e=>e instanceof Date],["regexp",e=>e instanceof RegExp],["map",e=>e instanceof Map],["set",e=>e instanceof Set],["weakmap",e=>e instanceof WeakMap],["weakset",e=>e instanceof WeakSet],["promise",e=>e instanceof Promise]]),i&&a([["htmlelement",e=>"undefined"!=typeof HTMLElement&&e instanceof HTMLElement]]),a([["object",e=>o(e)]]);const l=(e,t)=>e.bottom<t.top,c=(e,t)=>e.top>t.bottom,u=(e,t)=>e.right<t.left,f=(e,t)=>e.left>t.right,p=(e,t)=>e.bottom<=t.top,h=(e,t)=>e.top>=t.bottom,m=(e,t)=>e.right<=t.left,d=(e,t)=>e.left>=t.right,g=(e,t)=>!(u(e,t)||f(e,t)||l(e,t)||c(e,t)),y=(e,t)=>!(m(e,t)||d(e,t)||p(e,t)||h(e,t)),w=(e,t)=>u(e,t)?"left":f(e,t)?"right":l(e,t)?"top":c(e,t)?"bottom":null,b=(e,t)=>m(e,t)?"left":d(e,t)?"right":p(e,t)?"top":h(e,t)?"bottom":null,E=(e,t)=>({overlapLeft:t.right-e.left,overlapRight:e.right-t.left,overlapTop:t.bottom-e.top,overlapBottom:e.bottom-t.top}),v=({overlapLeft:e=-1,overlapRight:t=-1,overlapTop:r=-1,overlapBottom:n=-1}={})=>({dirX:e<t?"right":"left",dirY:r<n?"bottom":"top"}),T=e=>({x:e.left+e.width/2,y:e.top+e.height/2});function A(e,t){const r=e.left+e.width/2,n=e.top+e.height/2;return{x:t.left+t.width/2-r,y:t.top+t.height/2-n}}function _(e,t){if(!y(e,t))return{inDir:null,dirX:null,dirY:null,depthX:0,depthY:0};const{overlapLeft:r,overlapRight:n,overlapTop:o,overlapBottom:i}=E(e,t),{dirX:s,dirY:a}=v({overlapLeft:r,overlapRight:n,overlapTop:o,overlapBottom:i}),l=Math.min(r,n),c=Math.min(o,i);let u;return u=l<c?s:a,{inDir:u,dirX:s,dirY:a,depthX:l,depthY:c}}function S(e,t){const r=y(e,t),n={in:null,x:null,y:null},o={y:null,x:null},i={top:0,bottom:0,left:0,right:0},{overlapLeft:s,overlapRight:a,overlapTop:l,overlapBottom:c}=E(t,e);i.top=l,i.bottom=c,i.left=s,i.right=a;const u=Object.entries(i).filter(([,e])=>e>0).sort((e,t)=>e[1]-t[1]),{dirX:f,dirY:p}=v({overlapLeft:a,overlapRight:s,overlapTop:c,overlapBottom:l});return n.y=p,n.x=f,i.bottom<0?o.y="bottom":i.top<0&&(o.y="top"),i.left<0?o.x="left":i.right<0&&(o.x="right"),n.in=r?i.top===i.bottom&&i.bottom===i.left&&i.left===i.right?"center":u.length?u[0][0]:"top":null,{dirs:n,depth:i,isNeg:o}}const{areElsColliding:L,areElsPerfColliding:C,areElsCollTop:x,areElsCollBottom:k,areElsCollLeft:B,areElsCollRight:N}=e,I=new WeakMap,P=new WeakMap,M={top:new WeakMap,bottom:new WeakMap,left:new WeakMap,right:new WeakMap};class W{static Utils={...e};static async fetchHtmlFile(e,t={method:"GET"}){const r=await fetch(e,t),n=r.headers.get("Content-Type")||"";if(!r.ok)throw new Error(`Failed to fetch: ${r.status} ${r.statusText}`);if(!n.includes("text/html"))throw new Error(`Invalid content type: ${n} (expected text/html)`);const o=await r.text();return W.htmlToJson(o)}static async fetchHtmlNodes(e,t){const r=await W.fetchHtmlFile(e,t);return W.jsonToNodes(r)}static async fetchHtmlTinyElems(e,t){const r=await W.fetchHtmlNodes(e,t);return W.toTinyElm(r)}static templateToJson(e){return W.htmlToJson([...e.content.childNodes].map(e=>e instanceof Element?e.getHTML():e instanceof Text?e.textContent:"").join(""))}static templateToNodes(e){const t=[];return[...e.content.cloneNode(!0).childNodes].map(e=>{if(!(e instanceof Element||e instanceof Text||e instanceof Comment))throw new Error(`Expected only Element nodes in <template>, but found: ${e.constructor.name}`);e instanceof Comment||t.push(e)}),t}static templateToTinyElems(e){return W.toTinyElm(W.templateToNodes(e))}static htmlToJson(e){const t=document.createElement("div");t.innerHTML=e.trim();const r=[],n=e=>{if(e instanceof Comment)return null;if(e instanceof Text){const t=e.textContent?.trim();return t||null}if(!(e instanceof Element))return null;const t=e.tagName.toLowerCase(),r={};for(const t of e.attributes)r[W.getPropName(t.name)]=t.value;const o=Array.from(e.childNodes).map(n).filter(Boolean);return o.length>0?[t,r,...o]:[t,r]};for(const e of t.childNodes){const t=n(e);t&&r.push(t)}return t.innerHTML="",r}static jsonToNodes(e){const t=e=>{if("string"==typeof e)return document.createTextNode(e);if(!Array.isArray(e))return document.createTextNode("");const[r,n,...o]=e,i=document.createElement(r);for(const[e,t]of Object.entries(n))i.setAttribute(W.getAttrName(e),t);for(const e of o){const r=t(e);r instanceof Comment||i.appendChild(r)}return i};return e.map(t).filter(e=>!(e instanceof Comment))}static jsonToTinyElems(e){return W.toTinyElm(W.jsonToNodes(e))}static createFrom(e,t){if("string"!=typeof e)throw new TypeError('The "tagName" must be a string.');if(void 0!==t&&"object"!=typeof t)throw new TypeError('The "attrs" must be a object.');const r=W.createElement(e);if("object"==typeof t)for(const e in t)r.setAttr(e,t[e]);return r}static createElement(e,t){if("string"!=typeof e)throw new TypeError("[TinyHtml] createElement(): The tagName must be a string.");if(void 0!==t&&"object"!=typeof t)throw new TypeError("[TinyHtml] createElement(): The ops must be a object.");return new W(document.createElement(e,t))}static createTextNode(e){if("string"!=typeof e)throw new TypeError("[TinyHtml] createTextNode(): The value must be a string.");return new W(document.createTextNode(e))}static createElementFromHTML(e){const t=document.createElement("template");if(!(e=e.trim()).startsWith("<"))return W.createTextNode(e);if(t.innerHTML=e,!(t.content.firstChild instanceof Element))throw new Error("The HTML string must contain a valid HTML element.");return new W(t.content.firstChild)}static query(e,t=document){const r=t.querySelector(e);return r?new W(r):null}querySelector(e){return W.query(e,W._preElem(this,"query"))}static queryAll(e,t=document){return new W(t.querySelectorAll(e))}querySelectorAll(e){return W.queryAll(e,W._preElem(this,"queryAll"))}static getById(e){const t=document.getElementById(e);return t?new W(t):null}static getByClassName(e,t=document){return new W(t.getElementsByClassName(e))}getElementsByClassName(e){return W.getByClassName(e,W._preElem(this,"getByClassName"))}static getByName(e){return new W(document.getElementsByName(e))}static getByTagNameNS(e,t="http://www.w3.org/1999/xhtml",r=document){return new W(r.getElementsByTagNameNS(t,e))}getElementsByTagNameNS(e,t="http://www.w3.org/1999/xhtml"){return W.getByTagNameNS(e,t,W._preElem(this,"getByTagNameNS"))}get(e){if("number"!=typeof e)throw new TypeError("The index must be a number.");if(!this.#e[e])throw new Error(`No element found at index ${e}.`);return this.#e[e]}extract(e){if("number"!=typeof e)throw new TypeError("The index must be a number.");if(!this.#e[e])throw new Error(`Cannot extract: no element exists at index ${e}.`);return new W(this.#e[e])}exists(e){if("number"!=typeof e)throw new TypeError("The index must be a number.");return!!this.#e[e]}getAll(){return[...this.#e]}_getElement(e,t){if(!(this.#e[t]instanceof Element||this.#e[t]instanceof Window||this.#e[t]instanceof Document||this.#e[t]instanceof Text))throw new Error(`[TinyHtml] Invalid Element in ${e}().`);return this.#e[t]}_getElements(e){if(!this.#e.every(e=>e instanceof Element||e instanceof Window||e instanceof Document||e instanceof Text))throw new Error(`[TinyHtml] Invalid Element in ${e}().`);return[...this.#e]}static _preElemsTemplate(e,t,r,n){const o=e=>{const o=[];return e.map(e=>(e instanceof W?e._getElements(t):[e]).map(e=>{let i=!1;for(const t of r)if(e instanceof t){i=!0;break}if(!i)throw new Error(`[TinyHtml] Invalid element of the list "${n.join(",")}" in ${t}().`);return o.push(e),e})),o};return Array.isArray(e)?o(e):o([e])}static _preElemTemplate(e,t,r,n,o=!1){const i=e=>{const i=e[0],s=i instanceof W?i._getElements(t):[i];if(s.length>1)throw new Error(`[TinyHtml] Invalid element amount in ${t}() (Received ${s.length}/1).`);let a=!1;for(const e of r)if(s[0]instanceof e){a=!0;break}if(!o||null!==s[0]&&void 0!==s[0]||(s[0]=null,a=!0),!a)throw new Error(`[TinyHtml] Invalid element of the list "${n.join(",")}" in ${t}().`);return s[0]};if(!Array.isArray(e))return i([e]);if(e.length>1)throw new Error(`[TinyHtml] Invalid element amount in ${t}() (Received ${e.length}/1).`);return i(e)}static _preElems(e,t){return W._preElemsTemplate(e,t,[Element],["Element"])}static _preElem(e,t){return W._preElemTemplate(e,t,[Element],["Element"])}static _preNodeElems(e,t){return W._preElemsTemplate(e,t,[Node],["Node"])}static _preNodeElem(e,t){return W._preElemTemplate(e,t,[Node],["Node"])}static _preNodeElemWithNull(e,t){return W._preElemTemplate(e,t,[Node],["Node"],!0)}static _preHtmlElems(e,t){return W._preElemsTemplate(e,t,[HTMLElement],["HTMLElement"])}static _preHtmlElem(e,t){return W._preElemTemplate(e,t,[HTMLElement],["HTMLElement"])}static _preInputElems(e,t){return W._preElemsTemplate(e,t,[HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement,HTMLOptionElement],["HTMLInputElement","HTMLSelectElement","HTMLTextAreaElement","HTMLOptionElement"])}static _preInputElem(e,t){return W._preElemTemplate(e,t,[HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement,HTMLOptionElement],["HTMLInputElement","HTMLSelectElement","HTMLTextAreaElement","HTMLOptionElement"])}static _preEventTargetElems(e,t){return W._preElemsTemplate(e,t,[EventTarget],["EventTarget"])}static _preEventTargetElem(e,t){return W._preElemTemplate(e,t,[EventTarget],["EventTarget"])}static _preElemsAndWindow(e,t){return W._preElemsTemplate(e,t,[Element,Window],["Element","Window"])}static _preElemAndWindow(e,t){return W._preElemTemplate(e,t,[Element,Window],["Element","Window"])}static _preElemsAndWinAndDoc(e,t){return W._preElemsTemplate(e,t,[Element,Window,Document],["Element","Window","Document"]).map(e=>e instanceof Document?e.documentElement:e)}static _preElemAndWinAndDoc(e,t){const r=W._preElemTemplate(e,t,[Element,Window,Document],["Element","Window","Document"]);return r instanceof Document?r.documentElement:r}static _preElemsWithDoc(e,t){return W._preElemsTemplate(e,t,[Element,Document],["Element","Document"])}static _preElemWithDoc(e,t){return W._preElemTemplate(e,t,[Element,Document],["Element","Document"])}static toTinyElm(e){const t=e=>e.map(e=>e instanceof W?e:new W(e));return Array.isArray(e)?t(e):t([e])}static fromTinyElm(e){const t=e=>{const t=[];return e.map(e=>(e instanceof W?e._getElements("fromTinyElm"):[e]).map(e=>t.push(e))),t};return Array.isArray(e)?t(e):t([e])}static winnow(e,t,r,n=!1){if("boolean"!=typeof n)throw new TypeError('The "not" must be a boolean.');if("function"==typeof t)return W._preElems(e,r).filter((e,r)=>!!t.call(e,r,e)!==n);if(t instanceof Element)return W._preElems(e,r).filter(e=>e===t!==n);if(Array.isArray(t)||"string"!=typeof t&&null!=t.length)return W._preElems(e,r).filter(e=>t.includes(e)!==n);let o=t;return n&&(o=`:not(${o})`),W._preElems(e,r).filter(e=>1===e.nodeType&&e.matches(o))}static filter(e,t,r=!1){return r&&(t=`:not(${t})`),W._preElems(e,"filter").filter(e=>1===e.nodeType&&e.matches(t))}static filterOnly(e,t){return W.winnow(e,t,"filterOnly",!1)}static not(e,t){return W.winnow(e,t,"not",!0)}not(e){return W.not(this,e)}static find(e,t){const r=[];for(const n of W._preElems(e,"find"))r.push(...n.querySelectorAll(t));return[...new Set(r)]}find(e){return W.find(this,e)}static is(e,t){return W.winnow(e,t,"is",!1).length>0}is(e){return W.is(this,e)}static has(e,t){const r="string"==typeof t?[...document.querySelectorAll(t)]:W._preElems(t,"has");return W._preElems(e,"has").filter(e=>r.some(t=>e&&e.contains(t)))}has(e){return W.has(this,e).length>0}static closest(e,t,r){const n=[];for(const o of W._preElems(e,"closest")){let e=o;for(;e&&e!==r;){if(1===e.nodeType&&("string"==typeof t?e.matches(t):e===t)){n.push(e);break}e=e.parentElement}}return[...new Set(n)]}closest(e,t){return W.closest(this,e,t)}static isSameDom(e,t){return W._preNodeElem(e,"isSameDom")===W._preNodeElem(t,"isSameDom")}isSameDom(e){return W.isSameDom(this,e)}_data={};static _dataSelector={public:(e,t)=>{const r=W._preElem(t,e);let n=P.get(r);return n||(n={},P.set(r,n)),n},private:(e,t)=>{if(!(t instanceof W))throw new Error(`Element must be a TinyHtml instance to execute ${e}().`);return t._data}};static data(e,t,r=!1){const n=W._dataSelector[r?"private":"public"]("data",e);if(null==t)return{...n};if("string"!=typeof t)throw new TypeError("The key must be a string.");return n.hasOwnProperty(t)?n[t]:void 0}data(e,t){return W.data(this,e,t)}static setData(e,t,r,n=!1){const o=W._dataSelector[n?"private":"public"]("setData",e);if("string"!=typeof t)throw new TypeError("The key must be a string.");return o[t]=r,e}setData(e,t,r=!1){return W.setData(this,e,t,r)}static _getSibling(e,t,r){let n=W._preNodeElemWithNull(e,r);for(;n&&(n=n[t])&&1!==n.nodeType;);return n instanceof Node?n:null}static _getSiblings(e,t){let r=e;const n=[];for(;r;r=r.nextSibling)1===r.nodeType&&r!==t&&n.push(r);return n}static domDir(e,t,r,n="domDir"){if("string"!=typeof t)throw new TypeError('The "direction" must be a string.');let o=W._preNodeElemWithNull(e,n);const i=[];for(;o&&(o=o[t]);)if(1===o.nodeType){if(r&&("string"==typeof r?o.matches(r):o===r))break;i.push(o)}return i}static parent(e){let t=W._preNodeElemWithNull(e,"parent");const r=t?t.parentNode:null;return r&&11!==r.nodeType?r:null}parent(){return W.parent(this)}static parents(e,t){return W.domDir(e,"parentNode",t,"parents")}parents(e){return W.parents(this,e)}static next(e){return W._getSibling(e,"nextSibling","next")}next(){return W.next(this)}static prev(e){return W._getSibling(e,"previousSibling","prev")}prev(){return W.prev(this)}static nextAll(e){return W.domDir(e,"nextSibling",void 0,"nextAll")}nextAll(){return W.nextAll(this)}static prevAll(e){return W.domDir(e,"previousSibling",void 0,"prevAll")}prevAll(){return W.prevAll(this)}static nextUntil(e,t){return W.domDir(e,"nextSibling",t,"nextUtil")}nextUntil(e){return W.nextUntil(this,e)}static prevUntil(e,t){return W.domDir(e,"previousSibling",t,"prevUtil")}prevUntil(e){return W.prevUntil(this,e)}static siblings(e){const t=W._preNodeElemWithNull(e,"siblings");return W._getSiblings(t&&t.parentNode?t.parentNode.firstChild:null,t)}siblings(){return W.siblings(this)}static children(e){const t=W._preNodeElemWithNull(e,"children");return W._getSiblings(t?t.firstChild:null)}children(){return W.children(this)}static contents(e){const t=W._preNodeElemWithNull(e,"contents");return t instanceof HTMLIFrameElement&&null!=t.contentDocument&&Object.getPrototypeOf(t.contentDocument)?[t.contentDocument]:t instanceof HTMLTemplateElement?Array.from((t.content||t).childNodes):t?Array.from(t.childNodes):[]}contents(){return W.contents(this)}static clone(e,t=!0){if("boolean"!=typeof t)throw new TypeError('The "deep" must be a boolean.');return W._preNodeElems(e,"clone").map(e=>e.cloneNode(t))}clone(e){return W.clone(this,e)[0]}static _appendChecker(e,...t){const r=[],n=[...t];for(const t in n)"string"!=typeof n[t]?r.push(W._preNodeElem(n[t],e)):r.push(n[t]);return r}static append(e,...t){return W._preElem(e,"append").append(...W._appendChecker("append",...t)),e}append(...e){return W.append(this,...e)}static prepend(e,...t){return W._preElem(e,"prepend").prepend(...W._appendChecker("prepend",...t)),e}prepend(...e){return W.prepend(this,...e)}static before(e,...t){return W._preElem(e,"before").before(...W._appendChecker("before",...t)),e}before(...e){return W.before(this,...e)}static after(e,...t){return W._preElem(e,"after").after(...W._appendChecker("after",...t)),e}after(...e){return W.after(this,...e)}static replaceWith(e,...t){return W._preElem(e,"replaceWith").replaceWith(...W._appendChecker("replaceWith",...t)),e}replaceWith(...e){return W.replaceWith(this,...e)}static appendTo(e,t){const r=W._preNodeElems(e,"appendTo"),n=W._preNodeElems(t,"appendTo");return n.forEach((e,t)=>{r.forEach(r=>e.appendChild(t===n.length-1?r:r.cloneNode(!0)))}),e}appendTo(e){return W.appendTo(this,e)}static prependTo(e,t){const r=W._preElems(e,"prependTo"),n=W._preElems(t,"prependTo");return n.forEach((e,t)=>{r.slice().reverse().forEach(r=>e.prepend(t===n.length-1?r:r.cloneNode(!0)))}),e}prependTo(e){return W.prependTo(this,e)}static insertBefore(e,t,r=null){const n=W._preNodeElem(e,"insertBefore"),o=W._preNodeElem(t,"insertBefore"),i=W._preNodeElemWithNull(r,"insertBefore");if(!o.parentNode)throw new Error("The target element has no parent node to insert before.");return o.parentNode.insertBefore(n,i||o),e}insertBefore(e,t){return W.insertBefore(this,e,t)}static insertAfter(e,t,r=null){const n=W._preNodeElem(e,"insertAfter"),o=W._preNodeElem(t,"insertBefore"),i=W._preNodeElemWithNull(r,"insertBefore");if(!o.parentNode)throw new Error("The target element has no parent node to insert after.");return o.parentNode.insertBefore(n,i||o.nextSibling),e}insertAfter(e,t){return W.insertAfter(this,e,t)}static replaceAll(e,t){const r=W._preNodeElems(e,"replaceAll"),n=W._preNodeElems(t,"replaceAll");return n.forEach((e,t)=>{const o=e.parentNode;r.forEach(r=>{o&&o.replaceChild(t===n.length-1?r:r.cloneNode(!0),e)})}),e}replaceAll(e){return W.replaceAll(this,e)}#e;get size(){return this.#e.length}constructor(e){if(e instanceof W)throw new Error("[TinyHtml] You are trying to put a TinyHtml inside another TinyHtml in constructor.");const t=e=>{if(!e.every(e=>e instanceof Element||e instanceof Window||e instanceof Document||e instanceof Text))throw new Error("[TinyHtml] Invalid Target in constructor.")};if(Array.isArray(e))t(e),this.#e=e;else if(e instanceof NodeList||e instanceof HTMLCollection){const r=[...e];t(r),this.#e=r}else{const r=[e];t(r),this.#e=r}}static isWindow(e){return null!=e&&e===e.window}static css(e){const t=W._preElem(e,"css");return window.getComputedStyle(t)}css(){return W.css(this)}static cssString(e,t){const r=W._preElem(e,"cssString");if("string"!=typeof t)throw new TypeError("The prop must be a string.");const n=window.getComputedStyle(r)[t];return"string"==typeof n?n:"number"==typeof n?n.toString():null}cssString(e){return W.cssString(this,e)}static cssList(e,t){const r=W._preElem(e,"cssList");if(!Array.isArray(t))throw new TypeError("The prop must be an array of strings.");const n=window.getComputedStyle(r),o={};for(const e of t)void 0!==e&&(o[e]=n.getPropertyValue(e));return o}cssList(e){return W.cssList(this,e)}static cssFloat(e,t){const r=W._preElem(e,"cssFloat");if("string"!=typeof t)throw new TypeError("The prop must be a string.");const n=window.getComputedStyle(r)[t];return parseFloat(n)||0}cssFloat(e){return W.cssFloat(this,e)}static cssFloats(e,t){const r=W._preElem(e,"cssFloats");if(!Array.isArray(t))throw new TypeError("The prop must be an array of strings.");const n=window.getComputedStyle(r),o={};for(const e of t)o[e]=parseFloat(n[e])||0;return o}cssFloats(e){return W.cssFloats(this,e)}static#t={alignContent:"align-content",alignItems:"align-items",alignSelf:"align-self",animationDelay:"animation-delay",animationDirection:"animation-direction",animationDuration:"animation-duration",animationFillMode:"animation-fill-mode",animationIterationCount:"animation-iteration-count",animationName:"animation-name",animationPlayState:"animation-play-state",animationTimingFunction:"animation-timing-function",backfaceVisibility:"backface-visibility",backgroundAttachment:"background-attachment",backgroundBlendMode:"background-blend-mode",backgroundClip:"background-clip",backgroundColor:"background-color",backgroundImage:"background-image",backgroundOrigin:"background-origin",backgroundPosition:"background-position",backgroundRepeat:"background-repeat",backgroundSize:"background-size",borderBottom:"border-bottom",borderBottomColor:"border-bottom-color",borderBottomLeftRadius:"border-bottom-left-radius",borderBottomRightRadius:"border-bottom-right-radius",borderBottomStyle:"border-bottom-style",borderBottomWidth:"border-bottom-width",borderCollapse:"border-collapse",borderColor:"border-color",borderImage:"border-image",borderImageOutset:"border-image-outset",borderImageRepeat:"border-image-repeat",borderImageSlice:"border-image-slice",borderImageSource:"border-image-source",borderImageWidth:"border-image-width",borderLeft:"border-left",borderLeftColor:"border-left-color",borderLeftStyle:"border-left-style",borderLeftWidth:"border-left-width",borderRadius:"border-radius",borderRight:"border-right",borderRightColor:"border-right-color",borderRightStyle:"border-right-style",borderRightWidth:"border-right-width",borderSpacing:"border-spacing",borderStyle:"border-style",borderTop:"border-top",borderTopColor:"border-top-color",borderTopLeftRadius:"border-top-left-radius",borderTopRightRadius:"border-top-right-radius",borderTopStyle:"border-top-style",borderTopWidth:"border-top-width",borderWidth:"border-width",boxDecorationBreak:"box-decoration-break",boxShadow:"box-shadow",boxSizing:"box-sizing",breakAfter:"break-after",breakBefore:"break-before",breakInside:"break-inside",captionSide:"caption-side",caretColor:"caret-color",clipPath:"clip-path",columnCount:"column-count",columnFill:"column-fill",columnGap:"column-gap",columnRule:"column-rule",columnRuleColor:"column-rule-color",columnRuleStyle:"column-rule-style",columnRuleWidth:"column-rule-width",columnSpan:"column-span",columnWidth:"column-width",counterIncrement:"counter-increment",counterReset:"counter-reset",emptyCells:"empty-cells",flexBasis:"flex-basis",flexDirection:"flex-direction",flexFlow:"flex-flow",flexGrow:"flex-grow",flexShrink:"flex-shrink",flexWrap:"flex-wrap",fontFamily:"font-family",fontFeatureSettings:"font-feature-settings",fontKerning:"font-kerning",fontLanguageOverride:"font-language-override",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontSynthesis:"font-synthesis",fontVariant:"font-variant",fontVariantAlternates:"font-variant-alternates",fontVariantCaps:"font-variant-caps",fontVariantEastAsian:"font-variant-east-asian",fontVariantLigatures:"font-variant-ligatures",fontVariantNumeric:"font-variant-numeric",fontVariantPosition:"font-variant-position",fontWeight:"font-weight",gridArea:"grid-area",gridAutoColumns:"grid-auto-columns",gridAutoFlow:"grid-auto-flow",gridAutoRows:"grid-auto-rows",gridColumn:"grid-column",gridColumnEnd:"grid-column-end",gridColumnGap:"grid-column-gap",gridColumnStart:"grid-column-start",gridGap:"grid-gap",gridRow:"grid-row",gridRowEnd:"grid-row-end",gridRowGap:"grid-row-gap",gridRowStart:"grid-row-start",gridTemplate:"grid-template",gridTemplateAreas:"grid-template-areas",gridTemplateColumns:"grid-template-columns",gridTemplateRows:"grid-template-rows",imageRendering:"image-rendering",justifyContent:"justify-content",letterSpacing:"letter-spacing",lineBreak:"line-break",lineHeight:"line-height",listStyle:"list-style",listStyleImage:"list-style-image",listStylePosition:"list-style-position",listStyleType:"list-style-type",marginBottom:"margin-bottom",marginLeft:"margin-left",marginRight:"margin-right",marginTop:"margin-top",maskClip:"mask-clip",maskComposite:"mask-composite",maskImage:"mask-image",maskMode:"mask-mode",maskOrigin:"mask-origin",maskPosition:"mask-position",maskRepeat:"mask-repeat",maskSize:"mask-size",maskType:"mask-type",maxHeight:"max-height",maxWidth:"max-width",minHeight:"min-height",minWidth:"min-width",mixBlendMode:"mix-blend-mode",objectFit:"object-fit",objectPosition:"object-position",offsetAnchor:"offset-anchor",offsetDistance:"offset-distance",offsetPath:"offset-path",offsetRotate:"offset-rotate",outlineColor:"outline-color",outlineOffset:"outline-offset",outlineStyle:"outline-style",outlineWidth:"outline-width",overflowAnchor:"overflow-anchor",overflowWrap:"overflow-wrap",overflowX:"overflow-x",overflowY:"overflow-y",paddingBottom:"padding-bottom",paddingLeft:"padding-left",paddingRight:"padding-right",paddingTop:"padding-top",pageBreakAfter:"page-break-after",pageBreakBefore:"page-break-before",pageBreakInside:"page-break-inside",perspectiveOrigin:"perspective-origin",placeContent:"place-content",placeItems:"place-items",placeSelf:"place-self",pointerEvents:"pointer-events",rowGap:"row-gap",scrollBehavior:"scroll-behavior",scrollMargin:"scroll-margin",scrollMarginBlock:"scroll-margin-block",scrollMarginBlockEnd:"scroll-margin-block-end",scrollMarginBlockStart:"scroll-margin-block-start",scrollMarginBottom:"scroll-margin-bottom",scrollMarginInline:"scroll-margin-inline",scrollMarginInlineEnd:"scroll-margin-inline-end",scrollMarginInlineStart:"scroll-margin-inline-start",scrollMarginLeft:"scroll-margin-left",scrollMarginRight:"scroll-margin-right",scrollMarginTop:"scroll-margin-top",scrollPadding:"scroll-padding",scrollPaddingBlock:"scroll-padding-block",scrollPaddingBlockEnd:"scroll-padding-block-end",scrollPaddingBlockStart:"scroll-padding-block-start",scrollPaddingBottom:"scroll-padding-bottom",scrollPaddingInline:"scroll-padding-inline",scrollPaddingInlineEnd:"scroll-padding-inline-end",scrollPaddingInlineStart:"scroll-padding-inline-start",scrollPaddingLeft:"scroll-padding-left",scrollPaddingRight:"scroll-padding-right",scrollPaddingTop:"scroll-padding-top",scrollSnapAlign:"scroll-snap-align",scrollSnapStop:"scroll-snap-stop",scrollSnapType:"scroll-snap-type",shapeImageThreshold:"shape-image-threshold",shapeMargin:"shape-margin",shapeOutside:"shape-outside",tabSize:"tab-size",tableLayout:"table-layout",textAlign:"text-align",textAlignLast:"text-align-last",textCombineUpright:"text-combine-upright",textDecoration:"text-decoration",textDecorationColor:"text-decoration-color",textDecorationLine:"text-decoration-line",textDecorationStyle:"text-decoration-style",textIndent:"text-indent",textJustify:"text-justify",textOrientation:"text-orientation",textOverflow:"text-overflow",textShadow:"text-shadow",textTransform:"text-transform",transformBox:"transform-box",transformOrigin:"transform-origin",transformStyle:"transform-style",transitionDelay:"transition-delay",transitionDuration:"transition-duration",transitionProperty:"transition-property",transitionTimingFunction:"transition-timing-function",unicodeBidi:"unicode-bidi",userSelect:"user-select",verticalAlign:"vertical-align",whiteSpace:"white-space",willChange:"will-change",wordBreak:"word-break",wordSpacing:"word-spacing",wordWrap:"word-wrap",writingMode:"writing-mode",zIndex:"z-index",WebkitTransform:"-webkit-transform",WebkitTransition:"-webkit-transition",WebkitBoxShadow:"-webkit-box-shadow",MozBoxShadow:"-moz-box-shadow",MozTransform:"-moz-transform",MozTransition:"-moz-transition",msTransform:"-ms-transform",msTransition:"-ms-transition"};static cssPropAliases=new Proxy(W.#t,{set:(e,t,r)=>(e[t]=r,W.cssPropRevAliases[r]=t,!0)});static cssPropRevAliases=Object.fromEntries(Object.entries(W.#t).map(([e,t])=>[t,e]));static toStyleKc(e){return"string"==typeof W.cssPropAliases[e]?W.cssPropAliases[e]:e}static toStyleCc(e){return"string"==typeof W.cssPropRevAliases[e]?W.cssPropRevAliases[e]:e}static setStyle(e,t,r=null){return W._preHtmlElems(e,"setStyle").forEach(e=>{if("object"==typeof t)for(const[r,n]of Object.entries(t))e.style.setProperty(W.toStyleKc(r),"string"==typeof n?n:"number"==typeof n?`${n}px`:String(n));else e.style.setProperty(W.toStyleKc(t),r)}),e}setStyle(e,t){return W.setStyle(this,e,t)}static getStyle(e,t){return W._preHtmlElem(e,"getStyle").style.getPropertyValue(W.toStyleKc(t))}getStyle(e){return W.getStyle(this,e)}static style(e,{camelCase:t=!1,rawAttr:r=!1}={}){if("boolean"!=typeof t)throw new TypeError('"camelCase" must be a boolean. Received: '+typeof t);if("boolean"!=typeof r)throw new TypeError('"rawAttr" must be a boolean. Received: '+typeof r);const n=W._preHtmlElem(e,"style"),o={};if(r){const e=(n.getAttribute("style")||"").split(";");for(const r of e){const[e,n]=r.split(":");if(!e||!n)continue;const i=e.trim(),s=n.trim();o[t?W.toStyleCc(i):i]=s}}else{const e=n.style;for(let r=0;r<e.length;r++){const n=e[r],i=e.getPropertyValue(n);o[t?W.toStyleCc(n):n]=i}}return o}style(e){return W.style(this,e)}static removeStyle(e,t){return W._preHtmlElems(e,"removeStyle").forEach(e=>{if(Array.isArray(t))for(const r of t)e.style.removeProperty(W.toStyleKc(r));else e.style.removeProperty(W.toStyleKc(t))}),e}removeStyle(e){return W.removeStyle(this,e)}static toggleStyle(e,t,r,n){return W._preHtmlElems(e,"toggleStyle").forEach(e=>{const o=W.getStyle(e,t).trim()===W.toStyleKc(r)?n:r;W.setStyle(e,t,o)}),e}toggleStyle(e,t,r){return W.toggleStyle(this,e,t,r)}static clearStyle(e){return W._preElems(e,"clearStyle").forEach(e=>e.removeAttribute("style")),e}clearStyle(){return W.clearStyle(this)}static focus(e){return W._preHtmlElem(e,"focus").focus(),e}focus(){return W.focus(this)}static blur(e){return W._preHtmlElem(e,"blur").blur(),e}blur(){return W.blur(this)}static boolCheck(e){return void 0!==e&&("true"===e||"1"===e||!0===e||"on"===e||"number"==typeof e&&e>0)}static setWinScrollTop(e){if("number"!=typeof e)throw new TypeError("The value must be a number.");W.setScrollTop(window,e)}static setWinScrollLeft(e){if("number"!=typeof e)throw new TypeError("The value must be a number.");W.setScrollLeft(window,e)}static winScrollTop(){return window.scrollY||document.documentElement.scrollTop}static winScrollLeft(){return window.scrollX||document.documentElement.scrollLeft}static winInnerHeight(){return window.innerHeight||document.documentElement.clientHeight}static winInnerWidth(){return window.innerWidth||document.documentElement.clientWidth}static isPageTop(){return 0===window.scrollY}static isPageBottom(){return window.innerHeight+window.scrollY>=document.body.offsetHeight}static getDimension(e,t,r="content"){const n=W._preElemAndWinAndDoc(e,"getDimension");if("string"!=typeof t)throw new TypeError("The type must be a string.");if("string"!=typeof r)throw new TypeError("The extra must be a string.");const o="width"===t?"Width":"Height";if(W.isWindow(n))return"margin"===r?n["inner"+o]:n.document.documentElement["client"+o];const i=n;if(9===i.nodeType){const e=i.documentElement;return Math.max(i.body["scroll"+o],e["scroll"+o],i.body["offset"+o],e["offset"+o],e["client"+o])}let s=i.getBoundingClientRect()[t];function a(e){return"width"===t?W.cssFloat(i,e+"Left")+W.cssFloat(i,e+"Right"):W.cssFloat(i,e+"Top")+W.cssFloat(i,e+"Bottom")}switch(r){case"content":s-=a("padding"),s-=a("border");break;case"padding":s-=a("border");break;case"border":break;case"margin":s+=a("margin")}return s}getDimension(e,t){return W.getDimension(this,e,t)}static setHeight(e,t){const r=W._preHtmlElem(e,"setHeight");if("number"!=typeof t&&"string"!=typeof t)throw new TypeError("The value must be a string or number.");return r.style.height="number"==typeof t?`${t}px`:t,e}setHeight(e){return W.setHeight(this,e)}static setWidth(e,t){const r=W._preHtmlElem(e,"setWidth");if("number"!=typeof t&&"string"!=typeof t)throw new TypeError("The value must be a string or number.");return r.style.width="number"==typeof t?`${t}px`:t,e}setWidth(e){return W.setWidth(this,e)}static height(e){const t=W._preElemAndWinAndDoc(e,"height");return W.getDimension(t,"height","content")}height(){return W.height(this)}static width(e){const t=W._preElemAndWinAndDoc(e,"width");return W.getDimension(t,"width","content")}width(){return W.width(this)}static innerHeight(e){const t=W._preElemAndWinAndDoc(e,"innerHeight");return W.getDimension(t,"height","padding")}innerHeight(){return W.innerHeight(this)}static innerWidth(e){const t=W._preElemAndWinAndDoc(e,"innerWidth");return W.getDimension(t,"width","padding")}innerWidth(){return W.innerWidth(this)}static outerHeight(e,t=!1){if("boolean"!=typeof t)throw new TypeError('The "includeMargin" must be a boolean.');const r=W._preElemAndWinAndDoc(e,"outerHeight");return W.getDimension(r,"height",t?"margin":"border")}outerHeight(e){return W.outerHeight(this,e)}static outerWidth(e,t=!1){if("boolean"!=typeof t)throw new TypeError('The "includeMargin" must be a boolean.');const r=W._preElemAndWinAndDoc(e,"outerWidth");return W.getDimension(r,"width",t?"margin":"border")}outerWidth(e){return W.outerWidth(this,e)}static animate(e,t,r){return W._preElems(e,"animate").forEach(e=>e.animate(t,r)),e}animate(e,t){return W.animate(this,e,t)}static offset(e){const t=W._preElem(e,"offset").getBoundingClientRect(),r=window.scrollY||document.documentElement.scrollTop,n=window.scrollX||document.documentElement.scrollLeft;return{top:t.top+r,left:t.left+n}}offset(){return W.offset(this)}static position(e){const t=W._preHtmlElem(e,"position");let r,n,o={top:0,left:0};if("fixed"===window.getComputedStyle(t).position)n=t.getBoundingClientRect();else{n=W.offset(t),r=t.offsetParent||document.documentElement;const{position:e}=window.getComputedStyle(r);for(;r instanceof HTMLElement&&(r===document.body||r===document.documentElement)&&"static"===e;)r=r.parentNode;if(r instanceof HTMLElement&&r!==t&&1===r.nodeType){const{borderTopWidth:e,borderLeftWidth:t}=W.cssFloats(r,["borderTopWidth","borderLeftWidth"]);o=W.offset(r),o.top+=e,o.left+=t}}return{top:n.top-o.top-W.cssFloat(t,"marginTop"),left:n.left-o.left-W.cssFloat(t,"marginLeft")}}position(){return W.position(this)}static offsetParent(e){let t=W._preHtmlElem(e,"offsetParent").offsetParent;for(;t instanceof HTMLElement&&"static"===window.getComputedStyle(t).position;)t=t.offsetParent;return t instanceof HTMLElement?t:document.documentElement}offsetParent(){return W.offsetParent(this)}static scrollTop(e){const t=W._preElemAndWindow(e,"scrollTop");return W.isWindow(t)?t.pageYOffset:9===t.nodeType?t.defaultView.pageYOffset:t.scrollTop}scrollTop(){return W.scrollTop(this)}static scrollLeft(e){const t=W._preElemAndWindow(e,"scrollLeft");return W.isWindow(t)?t.pageXOffset:9===t.nodeType?t.defaultView.pageXOffset:t.scrollLeft}scrollLeft(){return W.scrollLeft(this)}static easings={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>e*(2-e),easeInOutQuad:e=>e<.5?2*e*e:(4-2*e)*e-1,easeInCubic:e=>e*e*e,easeOutCubic:e=>--e*e*e+1,easeInOutCubic:e=>e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1};static scrollToXY(e,{targetX:t,targetY:r,duration:n,easing:o,onAnimation:i}={}){if(void 0!==t&&"number"!=typeof t)throw new TypeError("`targetX` must be a number if provided.");if(void 0!==r&&"number"!=typeof r)throw new TypeError("`targetY` must be a number if provided.");if(void 0!==n&&"number"!=typeof n)throw new TypeError("`duration` must be a number if provided.");if(void 0!==o&&"string"!=typeof o)throw new TypeError("`easing` must be a string if provided.");if(void 0!==o&&"function"!=typeof W.easings[o])throw new TypeError(`Unknown easing function: "${o}".`);if(void 0!==i&&"function"!=typeof i)throw new TypeError("`onAnimation` must be a function if provided.");const s=(e,t,r,n)=>{if(e instanceof Window)window.scrollTo(t,r);else if(9===e.nodeType)e.defaultView.scrollTo(t,r);else{const n=e instanceof Window?window.scrollX:e.scrollLeft,o=e instanceof Window?window.scrollY:e.scrollTop;n!==t&&(e.scrollLeft=t),o!==r&&(e.scrollTop=r)}"function"==typeof i&&i({x:t,y:r,isComplete:n>=1,time:n})};return W._preElemsAndWindow(e,"scrollToXY").forEach(e=>{const i=e instanceof Window?window.scrollX:e.scrollLeft,a=e instanceof Window?window.scrollY:e.scrollTop,l=t??i,c=r??a,u=l-i,f=c-a,p="string"==typeof o&&W.easings[o]||null;if("number"!=typeof n||"function"!=typeof p)return s(e,l,c,1);const h=performance.now(),m=n??0;requestAnimationFrame(function t(r){if("function"!=typeof p)return;const n=Math.min(1,(r-h)/m),o=p(n);s(e,i+u*o,a+f*o,n),n<1&&requestAnimationFrame(t)})}),e}scrollToXY({targetX:e,targetY:t,duration:r,easing:n,onAnimation:o}={}){return W.scrollToXY(this,{targetX:e,targetY:t,duration:r,easing:n,onAnimation:o})}static setScrollTop(e,t){if("number"!=typeof t)throw new TypeError("ScrollTop value must be a number.");return W.scrollToXY(e,{targetY:t})}setScrollTop(e){return W.setScrollTop(this,e)}static setScrollLeft(e,t){if("number"!=typeof t)throw new TypeError("ScrollLeft value must be a number.");return W.scrollToXY(e,{targetX:t})}setScrollLeft(e){return W.setScrollLeft(this,e)}static borderWidth(e){const t=W._preElem(e,"borderWidth"),{borderLeftWidth:r,borderRightWidth:n,borderTopWidth:o,borderBottomWidth:i}=W.cssFloats(t,["borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"]);return{x:r+n,y:o+i,left:r,right:n,top:o,bottom:i}}borderWidth(){return W.borderWidth(this)}static border(e){const t=W._preElem(e,"border"),{borderLeft:r,borderRight:n,borderTop:o,borderBottom:i}=W.cssFloats(t,["borderLeft","borderRight","borderTop","borderBottom"]);return{x:r+n,y:o+i,left:r,right:n,top:o,bottom:i}}border(){return W.border(this)}static margin(e){const t=W._preElem(e,"margin"),{marginLeft:r,marginRight:n,marginTop:o,marginBottom:i}=W.cssFloats(t,["marginLeft","marginRight","marginTop","marginBottom"]);return{x:r+n,y:o+i,left:r,right:n,top:o,bottom:i}}margin(){return W.margin(this)}static padding(e){const t=W._preElem(e,"padding"),{paddingLeft:r,paddingRight:n,paddingTop:o,paddingBottom:i}=W.cssFloats(t,["paddingLeft","paddingRight","paddingTop","paddingBottom"]);return{x:r+n,y:o+i,left:r,right:n,top:o,bottom:i}}padding(){return W.padding(this)}static addClass(e,...t){return W._preElems(e,"addClass").forEach(e=>e.classList.add(...t)),e}addClass(...e){return W.addClass(this,...e)}static removeClass(e,...t){return W._preElems(e,"removeClass").forEach(e=>e.classList.remove(...t)),e}removeClass(...e){return W.removeClass(this,...e)}static replaceClass(e,t,r){if("string"!=typeof t)throw new TypeError('The "token" parameter must be a string.');if("string"!=typeof r)throw new TypeError('The "newToken" parameter must be a string.');const n=[];return W._preElems(e,"replaceClass").forEach(e=>n.push(e.classList.replace(t,r))),n}replaceClass(e,t){return W.replaceClass(this,e,t)[0]}static classItem(e,t){const r=W._preElem(e,"classItem");if("number"!=typeof t)throw new TypeError('The "index" parameter must be a number.');return r.classList.item(t)}classItem(e){return W.classItem(this,e)}static toggleClass(e,t,r){if("string"!=typeof t)throw new TypeError('The "token" parameter must be a string.');if(void 0!==r&&"boolean"!=typeof r)throw new TypeError('The "force" parameter must be a boolean.');const n=[];return W._preElems(e,"toggleClass").forEach(e=>n.push(e.classList.toggle(t,r))),n}toggleClass(e,t){return W.toggleClass(this,e,t)[0]}static hasClass(e,t){const r=W._preElem(e,"hasClass");if("string"!=typeof t)throw new TypeError('The "token" parameter must be a string.');return r.classList.contains(t)}hasClass(e){return W.hasClass(this,e)}static classLength(e){return W._preElem(e,"classLength").classList.length}classLength(){return W.classLength(this)}static classList(e){return W._preElem(e,"classList").classList.values().toArray()}classList(){return W.classList(this)}static tagName(e){return W._preElem(e,"tagName").tagName}tagName(){return W.tagName(this)}static id(e){return W._preElem(e,"id").id}id(){return W.id(this)}static text(e){return W._preElem(e,"text").textContent}text(){return W.text(this)}static setText(e,t){if("string"!=typeof t)throw new Error("Value is not a valid string.");return W._preElems(e,"setText").forEach(e=>e.textContent=t),e}setText(e){return W.setText(this,e)}static empty(e){return W._preElems(e,"empty").forEach(e=>e.textContent=""),e}empty(){return W.empty(this)}static html(e,t){return W._preElem(e,"html").getHTML(t)}html(e){return W.html(this,e)}static setHtml(e,t){if("string"!=typeof t)throw new Error("Value is not a valid string.");return W._preElems(e,"setHtml").forEach(e=>e.innerHTML=t),e}setHtml(e){return W.setHtml(this,e)}static _valHooks={option:{get:e=>{const t=e.getAttribute("value");return null!=t?t:e.textContent}},select:{get:e=>{const t=e.options,r=e.selectedIndex,n="select-one"===e.type,o=n?r+1:t.length,i=[];let s=r<0?o:n?r:0;for(;s<o;s++){const e=t[s],o=e.parentNode;if((e.selected||s===r)&&!e.disabled&&(!o||!o.disabled||"OPTGROUP"!==o.tagName)){const t=W._valHooks.option.get(e);if(n)return t;i.push(t)}}return i},set:(e,t)=>{const r=e.options,n=Array.isArray(t)?t.map(String):[String(t)];let o=!1;for(let e=0;e<r.length;e++){const t=r[e],i=W._valHooks.option.get(t);"string"==typeof i&&(t.selected=n.includes(i))&&(o=!0)}return o||(e.selectedIndex=-1),n}},radio:{get:e=>e.checked?"on":"off",set(e,t){if("boolean"==typeof t){const r=e.closest("label");return t&&r&&r.querySelectorAll('input[type="radio"]').forEach(t=>{t instanceof HTMLInputElement&&t!==e&&(t.checked=!1)}),e.checked=t,t}}},checkbox:{get:e=>e.checked?"on":"off",set(e,t){if("boolean"==typeof t)return e.checked=t,t}}};static setVal(e,t){return W._preInputElems(e,"setVal").forEach(e=>{if(1!==e.nodeType)return;let r="function"==typeof t?t(e,W.val(e)):t;null==r?r="":"number"==typeof r?r=String(r):Array.isArray(r)&&(r=((e,t)=>{const r=[];for(let n=0;n<e.length;n++)r.push(t(e[n]));return r})(r,e=>null==e?"":String(e)));const n=W._valHooks[e.type]||W._valHooks[e.nodeName.toLowerCase()];if(!n||"function"!=typeof n.set||void 0===n.set(e,r,"value")){if("string"!=typeof r&&"boolean"!=typeof r)throw new Error(`Invalid setValue "${typeof r}" value.`);"string"==typeof r&&(e.value=r)}}),e}setVal(e){return W.setVal(this,e)}static _valTypes={string:e=>e.value,date:e=>e.valueAsDate,number:e=>e.valueAsNumber};static _getValByType(e,t,r){if("string"!=typeof t)throw new TypeError('The "type" must be a string.');if("string"!=typeof r)throw new TypeError('The "where" must be a string.');if(!(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement))throw new Error(`Provided element is not an HTMLInputElement in ${r}().`);if("function"!=typeof W._valTypes[t])throw new Error(`No handler found for type "${t}" in ${r}().`);return W._valTypes[t](e)}static _val(e,t,r){const n=W._preInputElem(e,t),o=W._valHooks[n.type]||W._valHooks[n.nodeName.toLowerCase()];if(o&&"function"==typeof o.get){const e=o.get(n,"value",r);if(void 0!==e)return"string"==typeof e?e.replace(/\r/g,""):e}return W._getValByType(n,r,t)}_val(e,t){return W._val(this,e,t)}static val(e){return W._val(e,"val","string")}val(){return W.val(this)}static valTxt(e){const t=W._val(e,"valTxt","string");if("string"!=typeof t&&null!==t)throw new Error("Value is not a valid string.");return null==t?"":"string"==typeof t?t.replace(/\r/g,""):t}valTxt(){return W.valTxt(this)}static _valArr(e,t,r){const n=W._val(e,t,r);if(!Array.isArray(n))throw new Error(`Value expected an array but got ${typeof n}.`);return n}_valArr(e,t){return W._valArr(this,e,t)}static valArr(e){return W._valArr(e,"valArr","string")}valArr(){return W.valArr(this)}static valNb(e){if(!(W._preInputElem(e,"valNb")instanceof HTMLInputElement))throw new Error("Element must be an input element.");const t=W._val(e,"valNb","number");if(Number.isNaN(t))throw new Error("Value is not a valid number.");return t}valNb(){return W.valNb(this)}static valDate(e){if(!(W._preInputElem(e,"valDate")instanceof HTMLInputElement))throw new Error("Element must be an input element.");const t=W._val(e,"valDate","date");if(!(t instanceof Date))throw new Error("Value is not a valid date.");return t}valDate(){return W.valDate(this)}static valBool(e){const t=W._preInputElem(e,"valBool");if(!(t instanceof HTMLInputElement))throw new Error("Element must be an input element.");return"on"===W.val(t)}valBool(){return W.valBool(this)}static listenForPaste(e,{onFilePaste:t,onTextPaste:r}={}){if(void 0!==t&&"function"!=typeof t)throw new TypeError("onFilePaste must be a function.");if(void 0!==r&&"function"!=typeof r)throw new TypeError("onTextPaste must be a function.");const n=e=>{if(!(e instanceof ClipboardEvent))return;const n=e.clipboardData?.items||[];for(const e of n)if("file"===e.kind){if("function"==typeof t){const r=e.getAsFile();r&&t(e,r)}}else"string"===e.kind&&"function"==typeof r&&e.getAsString(t=>r(e,t))};return W._preElemsWithDoc(e,"listenForPaste").forEach(e=>W.on(e,"paste",n)),n}listenForPaste({onFilePaste:e,onTextPaste:t}={}){return W.listenForPaste(this,{onFilePaste:e,onTextPaste:t})}static hasEventListener(e,t){const r=W._preEventTargetElem(e,"hasEventListener");if(!I.has(r))return!1;const n=I.get(r);return!!(n&&Array.isArray(n[t])&&n[t].length>0)}hasEventListener(e){return W.hasEventListener(this,e)}static hasExactEventListener(e,t,r){const n=W._preEventTargetElem(e,"hasExactEventListener");if("function"!=typeof r)throw new TypeError('The "handler" must be a function.');if(!I.has(n))return!1;const o=I.get(n);return!(!o||!Array.isArray(o[t]))&&o[t].some(e=>e.handler===r)}hasExactEventListener(e,t){return W.hasExactEventListener(this,e,t)}static on(e,t,r,n){if("string"!=typeof t)throw new TypeError("The event name must be a string.");return W._preEventTargetElems(e,"on").forEach(e=>{e.addEventListener(t,r,n),I.has(e)||I.set(e,{});const o=I.get(e);o&&(Array.isArray(o[t])||(o[t]=[]),o[t].push({handler:r,options:n}))}),e}on(e,t,r){return W.on(this,e,t,r)}static once(e,t,r,n={}){if("string"!=typeof t)throw new TypeError("The event name must be a string.");return W._preEventTargetElems(e,"once").forEach(e=>{const o=n=>{W.off(e,t,o),"function"==typeof r&&r(n)};W.on(e,t,o,"boolean"==typeof n?n:{...n,once:!0})}),e}once(e,t,r={}){return W.once(this,e,t,r)}static off(e,t,r,n){if("string"!=typeof t)throw new TypeError("The event name must be a string.");return W._preEventTargetElems(e,"off").forEach(e=>{e.removeEventListener(t,r,n);const o=I.get(e);o&&o[t]&&(o[t]=o[t].filter(e=>e.handler!==r),0===o[t].length&&delete o[t])}),e}off(e,t,r){return W.off(this,e,t,r)}static offAll(e,t){if("string"!=typeof t)throw new TypeError("The event name must be a string.");return W._preEventTargetElems(e,"offAll").forEach(e=>{const r=I.get(e);if(r&&r[t]){for(const n of r[t])e.removeEventListener(t,n.handler,n.options);delete r[t]}}),e}offAll(e){return W.offAll(this,e)}static offAllTypes(e,t=null){if(null!==t&&"function"!=typeof t)throw new TypeError('The "filterFn" must be a function.');return W._preEventTargetElems(e,"offAllTypes").forEach(e=>{const r=I.get(e);if(r){for(const n in r)for(const o of r[n])("function"!=typeof t||t(o.handler,n))&&e.removeEventListener(n,o.handler,o.options);I.delete(e)}}),e}offAllTypes(e=null){return W.offAllTypes(this,e)}static trigger(e,t,r={}){if("string"!=typeof t)throw new TypeError("The event name must be a string.");return W._preEventTargetElems(e,"trigger").forEach(e=>{const n=r instanceof Event||r instanceof CustomEvent?r:new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e.dispatchEvent(n)}),e}trigger(e,t={}){return W.trigger(this,e,t)}static#r={for:"htmlFor",class:"className"};static propFix=new Proxy(W.#r,{set:(e,t,r)=>(e[t]=r,W.attrFix[r]=t,!0)});static attrFix=Object.fromEntries(Object.entries(W.#r).map(([e,t])=>[t,e]));static getPropName(e){return"string"==typeof W.propFix[e]?W.propFix[e]:e}static getAttrName(e){return"string"==typeof W.attrFix[e]?W.attrFix[e]:e}static attr(e,t){if("string"!=typeof t)throw new TypeError('The "name" must be a string.');return W._preElem(e,"attr").getAttribute(W.getAttrName(t))}attr(e){return W.attr(this,e)}static setAttr(e,t,r=null){if("string"!=typeof t)throw new TypeError('The "name" must be a string.');if(null!==r&&"string"!=typeof r)throw new TypeError('The "value" must be a string.');return W._preElems(e,"setAttr").forEach(e=>{null===r?e.removeAttribute(W.getAttrName(t)):e.setAttribute(W.getAttrName(t),r)}),e}setAttr(e,t){return W.setAttr(this,e,t)}static removeAttr(e,t){if("string"!=typeof t)throw new TypeError('The "name" must be a string.');return W._preElems(e,"removeAttr").forEach(e=>e.removeAttribute(W.getAttrName(t))),e}removeAttr(e){return W.removeAttr(this,e)}static hasAttr(e,t){if("string"!=typeof t)throw new TypeError('The "name" must be a string.');return W._preElem(e,"hasAttr").hasAttribute(W.getAttrName(t))}hasAttr(e){return W.hasAttr(this,e)}static hasProp(e,t){if("string"!=typeof t)throw new TypeError('The "name" must be a string.');return!!W._preElem(e,"hasProp")[W.getPropName(t)]}hasProp(e){return W.hasProp(this,e)}static addProp(e,t){if("string"!=typeof t)throw new TypeError('The "name" must be a string.');return W._preElems(e,"addProp").forEach(e=>{e[W.getPropName(t)]=!0}),e}addProp(e){return W.addProp(this,e)}static removeProp(e,t){if("string"!=typeof t)throw new TypeError('The "name" must be a string.');return W._preElems(e,"removeProp").forEach(e=>{e[W.getPropName(t)]=!1}),e}removeProp(e){return W.removeProp(this,e)}static toggleProp(e,t,r){if("string"!=typeof t)throw new TypeError('The "name" must be a string.');if(void 0!==r&&"boolean"!=typeof r)throw new TypeError('The "force" must be a boolean.');W._preElems(e,"toggleProp").forEach(e=>{(void 0===r?!e[W.getPropName(t)]:r)?W.addProp(e,t):W.removeProp(e,t)})}toggleProp(e,t){return W.toggleProp(this,e,t)}static remove(e){return W._preElems(e,"remove").forEach(e=>e.remove()),e}remove(){return W.remove(this)}static index(e,t=null){const r=W._preElem(e,"index");if(!r)return-1;if(!t)return Array.prototype.indexOf.call(r.parentNode?.children||[],r);if(t){const e="string"==typeof t?document.querySelectorAll(t):W._preElems(t,"index");return Array.prototype.indexOf.call(e,r)}return-1}index(e){return W.index(this,e)}static _getCustomRect(e,t){const r={height:0,width:0,x:0,y:0,bottom:0,left:0,right:0,top:0,toJSON:function(){throw new Error("Function not implemented.")}};for(const t in e)"number"==typeof e[t]&&(r[t]=e[t]);if("object"!=typeof t||null===t||Array.isArray(t))throw new Error("extraRect must be a non-null object.");const{height:n=0,width:o=0,top:i=0,bottom:s=0,left:a=0,right:l=0}=t;if("number"!=typeof n)throw new Error("extraRect.height must be a number.");if("number"!=typeof o)throw new Error("extraRect.width must be a number.");if("number"!=typeof i)throw new Error("extraRect.top must be a number.");if("number"!=typeof s)throw new Error("extraRect.bottom must be a number.");if("number"!=typeof a)throw new Error("extraRect.left must be a number.");if("number"!=typeof l)throw new Error("extraRect.right must be a number.");return r.height+=n,r.width+=o,r.top+=i,r.bottom+=s,r.left+=a,r.right+=l,r}static isCollWith(e,t,r={}){const n=W._getCustomRect(W._preElem(e,"isCollWith").getBoundingClientRect(),r),o=W._preElem(t,"isCollWith").getBoundingClientRect();return L(n,o)}isCollWith(e,t){return W.isCollWith(this,e,t)}static isCollPerfWith(e,t,r={}){const n=W._getCustomRect(W._preElem(e,"isCollPerfWith").getBoundingClientRect(),r),o=W._preElem(t,"isCollPerfWith").getBoundingClientRect();return C(n,o)}isCollPerfWith(e,t){return W.isCollPerfWith(this,e,t)}static _isCollWithLock(e,t,r,n,o){const i=M[o];if(e)return i.has(n)||i.set(n,!0),!0;if(i.has(n)){let e=!1;switch(o){case"top":e=x(t,r);break;case"bottom":e=k(t,r);break;case"left":e=B(t,r);break;case"right":e=N(t,r)}return e&&i.delete(n),i.has(n)}return!1}static isCollWithLock(e,t,r,n={}){const o=W._preElem(e,"isCollWithLock"),i=W._preElem(t,"isCollWithLock"),s=W._getCustomRect(o.getBoundingClientRect(),n),a=i.getBoundingClientRect(),l=L(s,a);return W._isCollWithLock(l,s,a,o,r)}isCollWithLock(e,t,r){return W.isCollWithLock(this,e,t,r)}static isCollPerfWithLock(e,t,r,n={}){const o=W._preElem(e,"isCollPerfWithLock"),i=W._preElem(t,"isCollPerfWithLock"),s=W._getCustomRect(o.getBoundingClientRect(),n),a=i.getBoundingClientRect(),l=C(s,a);return W._isCollWithLock(l,s,a,o,r)}isCollPerfWithLock(e,t,r){return W.isCollPerfWithLock(this,e,t,r)}static resetCollLock(e){const t=W._preElem(e,"resetCollLock");let r=!1;for(const e of["top","bottom","left","right"])M[e].has(t)&&(M[e].delete(t),r=!0);return r}resetCollLock(){return W.resetCollLock(this)}static resetCollLockDir(e,t){const r=W._preElem(e,"resetCollLockDir"),n=M[t];return!!n.has(r)&&(n.delete(r),!0)}resetCollLockDir(e){return W.resetCollLockDir(this,e)}static isInViewport(e){const t=W._preElem(e,"isInViewport");if(!t.checkVisibility({contentVisibilityAuto:!1,opacityProperty:!1,visibilityProperty:!1}))return!1;const r=W.offset(t).top,n=r+W.outerHeight(t),o=W.scrollTop(window),i=o+W.height(window);return n>o&&r<i}isInViewport(){return W.isInViewport(this)}static isScrolledIntoView(e){const t=W._preElem(e,"isScrolledIntoView");if(!t.checkVisibility({contentVisibilityAuto:!1,opacityProperty:!1,visibilityProperty:!1}))return!1;const r=W.scrollTop(window),n=r+W.height(window),o=W.offset(t).top;return o+W.height(t)<=n&&o>=r}isScrolledIntoView(){return W.isScrolledIntoView(this)}static isInContainer(e,t){const r=W._preElem(e,"isInContainer"),n=W._preElem(t,"isInContainer");if(!r.checkVisibility({contentVisibilityAuto:!1,opacityProperty:!1,visibilityProperty:!1}))return!1;const o=r.getBoundingClientRect(),i=n.getBoundingClientRect(),s=o.bottom>i.top&&o.top<i.bottom,a=o.right>i.left&&o.left<i.right;return s&&a}isInContainer(e){return W.isInContainer(this,e)}static isFullyInContainer(e,t){const r=W._preElem(e,"isScrolledIntoView"),n=W._preElem(t,"isInContainer");if(!r.checkVisibility({contentVisibilityAuto:!1,opacityProperty:!1,visibilityProperty:!1}))return!1;const o=r.getBoundingClientRect(),i=n.getBoundingClientRect();return o.top>=i.top&&o.bottom<=i.bottom&&o.left>=i.left&&o.right<=i.right}isFullyInContainer(e){return W.isFullyInContainer(this,e)}static hasScroll(e){const t=W._preElem(e,"hasScroll");return{v:t.scrollHeight>t.clientHeight,h:t.scrollWidth>t.clientWidth}}hasScroll(){return W.hasScroll(this)}}r(975);const R=class{#n=new Map;#o=10;#i=!1;setThrowOnMaxListeners(e){if("boolean"!=typeof e)throw new TypeError("setThrowOnMaxListeners(value): value must be a boolean");this.#i=e}getThrowOnMaxListeners(){return this.#i}#s(e,t,{once:r=!1}={}){let n=this.#n.get(e);Array.isArray(n)||(n=[],this.#n.set(e,n)),n.unshift({handler:t,config:{once:r}});const o=this.#o;if(o>0&&n.length>o){const t=`Possible memory leak detected. ${n.length} "${e}" listeners added. Use setMaxListeners() to increase limit.`;if(this.#i)throw new Error(t);console.warn(t)}}prependListener(e,t){if("string"!=typeof e)throw new TypeError("prepend(event, handler): event name must be a string");if("function"!=typeof t)throw new TypeError("prepend(event, handler): handler must be a function");this.#s(e,t)}prependListenerOnce(e,t){if("string"!=typeof e)throw new TypeError("prependOnceListener(event, handler): event name must be a string");if("function"!=typeof t)throw new TypeError("prependOnceListener(event, handler): handler must be a function");const r=(...n)=>{this.off(e,r),t(...n)};return this.#s(e,r,{once:!0}),r}#a(e,t,{once:r=!1}={}){let n=this.#n.get(e);Array.isArray(n)||(n=[],this.#n.set(e,n)),n.push({handler:t,config:{once:r}});const o=this.#o;if(o>0&&n.length>o){const t=`Possible memory leak detected. ${n.length} "${e}" listeners added. Use setMaxListeners() to increase limit.`;if(this.#i)throw new Error(t);console.warn(t)}}on(e,t){if("string"!=typeof e)throw new TypeError("on(event, handler): event name must be a string");if("function"!=typeof t)throw new TypeError("on(event, handler): handler must be a function");return this.#a(e,t)}once(e,t){if("string"!=typeof e)throw new TypeError("The event name must be a string.");if("function"!=typeof t)throw new TypeError("once(event, handler): handler must be a function");const r=n=>{this.off(e,r),"function"==typeof t&&t(n)};return this.#a(e,r,{once:!0}),r}appendListener(e,t){return this.on(e,t)}appendListenerOnce(e,t){return this.once(e,t)}off(e,t){if("string"!=typeof e)throw new TypeError("off(event, handler): event name must be a string");if("function"!=typeof t)throw new TypeError("off(event, handler): handler must be a function");const r=this.#n.get(e);if(!Array.isArray(r))return;const n=r.findIndex(e=>e.handler===t);-1!==n&&r.splice(n,1),0===r.length&&this.#n.delete(e)}offAll(e){if("string"!=typeof e)throw new TypeError("The event name must be a string.");this.#n.delete(e)}offAllTypes(){this.#n.clear()}listenerCount(e){if("string"!=typeof e)throw new TypeError("listenerCount(event): event name must be a string");const t=this.#n.get(e);return Array.isArray(t)?t.length:0}listeners(e){if("string"!=typeof e)throw new TypeError("listeners(event): event name must be a string");const t=this.#n.get(e);return Array.isArray(t)?[...t].filter(e=>!e.config.once).map(e=>e.handler):[]}onceListeners(e){if("string"!=typeof e)throw new TypeError("onceListeners(event): event name must be a string");const t=this.#n.get(e);return Array.isArray(t)?[...t].filter(e=>e.config.once).map(e=>e.handler):[]}allListeners(e){if("string"!=typeof e)throw new TypeError("allListeners(event): event name must be a string");const t=this.#n.get(e);return Array.isArray(t)?[...t].map(e=>e.handler):[]}eventNames(){return[...this.#n.keys()]}emit(e,...t){if("string"!=typeof e)throw new TypeError("emit(event, data): event name must be a string");const r=this.#n.get(e);return!(!Array.isArray(r)||0===r.length||(r.forEach(e=>e.handler(...t)),0))}setMaxListeners(e){if(!Number.isInteger(e)||e<0)throw new TypeError("setMaxListeners(n): n must be a non-negative integer");this.#o=e}getMaxListeners(){return this.#o}},H=new Map,O=new Map,D=new Set(["string","boolean","number","object","array",String,Boolean,Number,Object,Array,BigInt,Symbol]);class U{#l=new R;setThrowOnMaxListeners(e){return this.#l.setThrowOnMaxListeners(e)}getThrowOnMaxListeners(){return this.#l.getThrowOnMaxListeners()}prependListener(e,t){return this.#l.prependListener(e,t)}prependListenerOnce(e,t){return this.#l.prependListenerOnce(e,t)}appendListener(e,t){return this.#l.appendListener(e,t)}appendListenerOnce(e,t){return this.#l.appendListenerOnce(e,t)}on(e,t){return this.#l.on(e,t)}once(e,t){return this.#l.once(e,t)}off(e,t){return this.#l.off(e,t)}offAll(e){return this.#l.offAll(e)}offAllTypes(){return this.#l.offAllTypes()}listenerCount(e){return this.#l.listenerCount(e)}listeners(e){return this.#l.listeners(e)}onceListeners(e){return this.#l.onceListeners(e)}allListeners(e){return this.#l.allListeners(e)}eventNames(){return this.#l.eventNames()}emit(e,...t){return this.#l.emit(e,...t)}setMaxListeners(e){return this.#l.setMaxListeners(e)}getMaxListeners(){return this.#l.getMaxListeners()}static hasJsonType(e){return H.has(e)&&O.has(e)||D.has(e)}static registerJsonType(e,t,r,n=!1){if(D.has(e))throw new Error(`Cannot register type "${e}" because it is frozen.`);H.set(e,t),O.set(e,r),n&&D.add(e)}static deleteJsonType(e){if(D.has(e))throw new Error(`Cannot remove type "${e}" because it is frozen.`);let t=!1;return H.delete(e)&&(t=!0),O.delete(e)&&(t=!0),t}static encodeSpecialJson(e){if(void 0===e)return{__undefined__:!0};if(null===e)return{__null__:!0};for(const[t,r]of H.entries())if("string"!=typeof t&&e instanceof t||typeof e===t)return r(e,U.encodeSpecialJson);if(Array.isArray(e))return e.map(U.encodeSpecialJson);if(o(e)){const t={};for(const r in e)t[r]=U.encodeSpecialJson(e[r]);return t}return e}static decodeSpecialJson(e){const t=o(e);if(t){if(e.__undefined__)return;if(e.__null__)return null}if(Array.isArray(e))return e.map(U.decodeSpecialJson);if(t){for(const[t,r]of O.entries())if(r.check&&r.check(e))return r.decode(e,U.decodeSpecialJson);const t={};for(const r in e)t[r]=U.decodeSpecialJson(e[r]);return t}return e}#c=window.localStorage;#u=null;#f=0;#p=e=>this.emit("storage",e);constructor(e){if(void 0!==e&&"string"!=typeof e)throw new TypeError("TinyLocalStorage: dbName must be a string if provided.");"string"==typeof e&&(this.#u=`LSDB::${e}`),window.addEventListener("storage",this.#p)}#h(e){if("string"==typeof e&&e.startsWith("LSDB::"))throw new Error(`TinyLocalStorage: Key "${e}" may conflict with reserved dbKeys.`)}updateStorageVersion(e,t){if("string"!=typeof this.#u)throw new Error("TinyLocalStorage: Database key is not initialized. Set a valid dbName in the constructor.");if("number"!=typeof e||Number.isNaN(e)||e<1)throw new TypeError("TinyLocalStorage: version must be a positive number.");if("function"!=typeof t)throw new TypeError("TinyLocalStorage: onUpgrade must be a function.");const r=parseInt(localStorage.getItem(this.#u),10)||0;if("number"!=typeof r||Number.isNaN(r)||r<0)throw new TypeError("TinyLocalStorage: saved version in localStorage is not a valid number.");if(e<r)throw new Error(`TinyLocalStorage: Cannot downgrade database version from ${r} to ${e}.`);e>r&&(t(r,e),localStorage.setItem(this.#u,String(e)),this.#f=e)}getDbKey(){return this.#u}getVersion(){return this.#f}setLocalStorage(e){if(!(e instanceof Storage))throw new TypeError("Argument must be a valid instance of Storage.");this.#c=e}localStorageExists(){return this.#c instanceof Storage}#m(e,t){if("string"!=typeof e||!e.length)throw new TypeError("Key must be a non-empty string.");return U.encodeSpecialJson(t)}setJson(e,t){if(this.#h(e),!(o(t)||Array.isArray(t)||t instanceof Map||t instanceof Set))throw new TypeError("The storage value is not a valid JSON-compatible structure.");const r=this.#m(e,t);return this.emit("setJson",e,t),this.#c.setItem(e,JSON.stringify(r))}#d(e,t){if("string"!=typeof e||!e.length)throw new TypeError("Key must be a non-empty string.");const r=this.#c.getItem(e),n={obj:()=>({}),array:()=>[],map:()=>new Map,set:()=>new Set},o="function"==typeof n[t]?n[t]():null;let i;try{i=JSON.parse(r)}catch{return o}return{decoded:U.decodeSpecialJson(i),fallback:o}}getJson(e,t){const{decoded:r,fallback:n}=this.#d(e,t);return r instanceof Map||r instanceof Set||Array.isArray(r)||o(r)?r:n}setDate(e,t){if(this.#h(e),!(t instanceof Date))throw new TypeError("Value must be a Date.");const r=this.#m(e,t);return this.emit("setDate",e,t),this.#c.setItem(e,JSON.stringify(r))}getDate(e){const t=this.#d(e).decoded;return t instanceof Date?t:null}setRegExp(e,t){if(this.#h(e),!(t instanceof RegExp))throw new TypeError("Value must be a RegExp.");const r=this.#m(e,t);return this.emit("setRegExp",e,t),this.#c.setItem(e,JSON.stringify(r))}getRegExp(e){const t=this.#d(e).decoded;return t instanceof RegExp?t:null}setBigInt(e,t){if(this.#h(e),"bigint"!=typeof t)throw new TypeError("Value must be a BigInt.");const r=this.#m(e,t);return this.emit("setBigInt",e,t),this.#c.setItem(e,JSON.stringify(r))}getBigInt(e){const t=this.#d(e).decoded;return"bigint"==typeof t?t:null}setSymbol(e,t){if(this.#h(e),"symbol"!=typeof t)throw new TypeError("Value must be a Symbol.");const r=this.#m(e,t);return this.emit("setSymbol",e,t),this.#c.setItem(e,JSON.stringify(r))}getSymbol(e){const t=this.#d(e).decoded;return"symbol"==typeof t?t:null}getValue(e){return this.#d(e).decoded??null}setItem(e,t){if(this.#h(e),"string"!=typeof e||!e.length)throw new TypeError("Key must be a non-empty string.");return this.emit("setItem",e,t),this.#c.setItem(e,t)}getItem(e){if("string"!=typeof e||!e.length)throw new TypeError("Key must be a non-empty string.");return this.#c.getItem(e)}setString(e,t){if(this.#h(e),"string"!=typeof e||!e.length)throw new TypeError("Key must be a non-empty string.");if("string"!=typeof t)throw new TypeError("Value must be a string.");return this.emit("setString",e,t),this.#c.setItem(e,JSON.stringify({__string__:!0,value:t}))}getString(e){if("string"!=typeof e||!e.length)throw new TypeError("Key must be a non-empty string.");let t=this.#c.getItem(e);try{if(t=JSON.parse(t),!o(t)||!t.__string__||"string"!=typeof t.value)return null;t=t.value}catch{t=null}return"string"==typeof t?t:null}setNumber(e,t){if(this.#h(e),"string"!=typeof e||!e.length)throw new TypeError("Key must be a non-empty string.");if("number"!=typeof t)throw new TypeError("Value must be a number.");return this.emit("setNumber",e,t),this.#c.setItem(e,String(t))}getNumber(e){if("string"!=typeof e||!e.length)throw new TypeError("Key must be a non-empty string.");let t=this.#c.getItem(e);return"number"==typeof t||"string"==typeof t&&t.length>0&&(t=parseFloat(t),!Number.isNaN(t))?t:null}setBool(e,t){if(this.#h(e),"string"!=typeof e||!e.length)throw new TypeError("Key must be a non-empty string.");if("boolean"!=typeof t)throw new TypeError("Value must be a boolean.");return this.emit("setBool",e,t),this.#c.setItem(e,String(t))}getBool(e){if("string"!=typeof e||!e.length)throw new TypeError("Key must be a non-empty string.");const t=this.#c.getItem(e);if("boolean"==typeof t)return t;if("string"==typeof t){if("true"===t)return!0;if("false"===t)return!1}return null}removeItem(e){if("string"!=typeof e||!e.length)throw new TypeError("Key must be a non-empty string.");return this.emit("removeItem",e),this.#c.removeItem(e)}clearLocalStorage(){return this.#c.clear()}destroy(){window.removeEventListener("storage",this.#p),this.#l.offAllTypes()}}U.registerJsonType(Map,(e,t)=>({__map__:!0,data:Array.from(e.entries()).map(([e,r])=>[e,t(r)])}),{check:e=>e.__map__,decode:(e,t)=>new Map(e.data.map(([e,r])=>[e,t(r)]))},!0),U.registerJsonType(Set,(e,t)=>({__set__:!0,data:Array.from(e).map(t)}),{check:e=>e.__set__,decode:(e,t)=>new Set(e.data.map(t))},!0),U.registerJsonType(Date,e=>({__date__:!0,value:e.toISOString()}),{check:e=>e.__date__,decode:e=>new Date(e.value)},!0),U.registerJsonType(RegExp,e=>({__regexp__:!0,source:e.source,flags:e.flags}),{check:e=>e.__regexp__,decode:e=>new RegExp(e.source,e.flags)},!0),U.registerJsonType("bigint",e=>({__bigint__:!0,value:e.toString()}),{check:e=>e.__bigint__,decode:e=>BigInt(e.value)},!0),U.registerJsonType("symbol",e=>({__symbol__:!0,key:Symbol.keyFor(e)??e.description??null}),{check:e=>e.__symbol__,decode:e=>{const t=e.key;return null!=t?Symbol.for(t):Symbol()}},!0),new WeakMap,new WeakMap;const F=class{#g;#y=[];#w=new WeakMap;#b;constructor(e){if(!o(e))throw new TypeError('TinyUploadClicker: "options" must be a valid object.');this.#g={multiple:!1,accept:"",inputAttributes:{},inputStyles:{display:"none"},onClick:null,onFileLoad:null,...e};const{triggers:t}=e;if(!(Array.isArray(t)||"string"==typeof t||t instanceof HTMLElement))throw new TypeError('TinyUploadClicker: "triggers" is required and must be a string, HTMLElement, or an array of them.');const r=(Array.isArray(this.#g.triggers)?this.#g.triggers:[this.#g.triggers]).map(e=>{if("string"==typeof e){const t=document.querySelector(e);if(!t)throw new Error(`TinyUploadClicker: No element found for selector "${e}".`);return t}if(!(e instanceof HTMLElement))throw new TypeError("TinyUploadClicker: All triggers must be either strings (selectors) or HTMLElements.");return e});if(void 0!==e.accept&&"string"!=typeof e.accept&&!Array.isArray(e.accept))throw new TypeError('TinyUploadClicker: "accept" must be a string or an array of strings.');if(void 0!==e.onClick&&"function"!=typeof e.onClick&&null!==e.onClick)throw new TypeError('TinyUploadClicker: "onClick" must be a function or null.');if(void 0!==e.onFileLoad&&"function"!=typeof e.onFileLoad&&null!==e.onFileLoad)throw new TypeError('TinyUploadClicker: "onFileLoad" must be a function or null.');if(void 0!==e.inputAttributes&&!o(e.inputAttributes))throw new TypeError('TinyUploadClicker: "inputAttributes" must be an object.');if(void 0!==e.inputStyles&&!o(e.inputStyles))throw new TypeError('TinyUploadClicker: "inputStyles" must be an object.');this.#b=this.#E.bind(this),this.#y=r,this.#y.forEach(e=>{if(!(e instanceof HTMLElement))return;const t=document.createElement("input");t.type="file",this.#g.multiple&&(t.multiple=!0),"string"==typeof this.#g.accept?t.accept=this.#g.accept:Array.isArray(this.#g.accept)&&(t.accept=this.#g.accept.join(","));const r=this.#g.inputAttributes;if(r&&"object"==typeof r)for(const[e,n]of Object.entries(r))t.setAttribute(e,n);Object.assign(t.style,this.#g.inputStyles||{display:"none"}),t.addEventListener("change",()=>{t.files&&"function"==typeof this.#g.onFileLoad&&this.#g.onFileLoad(t.files,e),t.value=""}),document.body.appendChild(t),this.#w.set(e,t),e.addEventListener("click",this.#b)})}#E(e){const t=e.currentTarget;if(!(t instanceof HTMLElement))return;const r=this.#w.get(t);r&&("function"==typeof this.#g.onClick&&this.#g.onClick(t),r.click())}destroy(){for(const e of this.#y){if(!(e instanceof HTMLElement))return;e.removeEventListener("click",this.#b);const t=this.#w.get(e);t&&t.parentNode&&t.remove(),this.#w.delete(e)}this.#y=[]}}})(),window.TinyUploadClicker=n.TinyUploadClicker})();
|
package/dist/v1/basics/html.cjs
CHANGED
|
@@ -219,7 +219,7 @@ async function fetchTemplate(
|
|
|
219
219
|
* Loads and parses a JSON from a remote URL using Fetch API.
|
|
220
220
|
*
|
|
221
221
|
* @param {string} url - The full URL to fetch JSON from.
|
|
222
|
-
* @param {
|
|
222
|
+
* @param {FetchTemplateOptions} [options] - Optional settings.
|
|
223
223
|
* @returns {Promise<any[] | Record<string | number | symbol, unknown>>} Parsed JSON object.
|
|
224
224
|
* @throws {Error} Throws if fetch fails, times out, or returns invalid JSON.
|
|
225
225
|
*/
|
|
@@ -246,7 +246,7 @@ async function fetchJson(url, options) {
|
|
|
246
246
|
* Loads a remote file as a Blob using Fetch API.
|
|
247
247
|
*
|
|
248
248
|
* @param {string} url - The full URL to fetch the file from.
|
|
249
|
-
* @param {
|
|
249
|
+
* @param {FetchTemplateOptions} [options] - Optional fetch options.
|
|
250
250
|
* @param {string[]} [allowedMimeTypes] - Optional list of accepted MIME types (e.g., ['image/jpeg']).
|
|
251
251
|
* @returns {Promise<Blob>} - The fetched file as a Blob.
|
|
252
252
|
* @throws {Error} Throws if fetch fails, response is not ok, or MIME type is not allowed.
|
|
@@ -272,6 +272,36 @@ async function fetchBlob(url, allowedMimeTypes, options) {
|
|
|
272
272
|
});
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
+
/**
|
|
276
|
+
* Loads a remote file as a text using Fetch API.
|
|
277
|
+
*
|
|
278
|
+
* @param {string} url - The full URL to fetch the file from.
|
|
279
|
+
* @param {FetchTemplateOptions} [options] - Optional fetch options.
|
|
280
|
+
* @param {string[]} [allowedMimeTypes] - Optional list of accepted MIME types (e.g., ['image/jpeg']).
|
|
281
|
+
* @returns {Promise<string>} - The fetched file as a text.
|
|
282
|
+
* @throws {Error} Throws if fetch fails, response is not ok, or MIME type is not allowed.
|
|
283
|
+
*/
|
|
284
|
+
async function fetchText(url, allowedMimeTypes, options) {
|
|
285
|
+
return new Promise((resolve, reject) => {
|
|
286
|
+
fetchTemplate(url, options)
|
|
287
|
+
.then(async (res) => {
|
|
288
|
+
const contentType = res.headers.get('content-type') || '';
|
|
289
|
+
|
|
290
|
+
if (
|
|
291
|
+
Array.isArray(allowedMimeTypes) &&
|
|
292
|
+
allowedMimeTypes.length > 0 &&
|
|
293
|
+
!allowedMimeTypes.some((type) => contentType.includes(type))
|
|
294
|
+
) {
|
|
295
|
+
throw new Error(`Blocked MIME type: ${contentType}`);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
const data = await res.text();
|
|
299
|
+
return resolve(data);
|
|
300
|
+
})
|
|
301
|
+
.catch(reject);
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
|
|
275
305
|
///////////////////////////////////////////////////////////////////////////////
|
|
276
306
|
|
|
277
307
|
/**
|
|
@@ -406,6 +436,7 @@ function installWindowHiddenScript({
|
|
|
406
436
|
|
|
407
437
|
exports.fetchBlob = fetchBlob;
|
|
408
438
|
exports.fetchJson = fetchJson;
|
|
439
|
+
exports.fetchText = fetchText;
|
|
409
440
|
exports.installWindowHiddenScript = installWindowHiddenScript;
|
|
410
441
|
exports.readBase64Blob = readBase64Blob;
|
|
411
442
|
exports.readFileBlob = readFileBlob;
|