UNPKG

@ivu-plus/i-utils

Version:

前端模块化 JavaScript 工具库

54 lines 169 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).iUtils={})}(this,(function(t){"use strict";const e={DESC:0,ASC:1,RANDOM:2},r={ROUND:0,ROUND_FLOOR:1},n={CH:/^[\u4E00-\u9FA5]+$/,EN:/^[a-zA-Z]$/,LOWER_CASE:/^[a-z]+$/,UPPER_CASE:/^[A-Z]+$/,CH_NAME:/^[\u4e00-\u9fa5·]{2,16}$/,EN_NAME:/(^[a-zA-Z][a-zA-Z\s]{0,20}[a-zA-Z]$)/,NUMBER:/^([-+])?\d+(\.\d+)?$/,INTEGER:/^(0|[1-9][0-9]*|-[1-9][0-9]*)$/,DECIMAL:/^\d+\.\d+$/,INT_OR_FLOAT:/(^[1-9][0-9]*$)|(^[1-9][0-9]*\.[0-9]{1,2}$)|(^0\.[0-9]{1,2}$)|(^0$)/,MOBILE:/^(?:(?:\+|00)86)?1[1-9]\d{9}$/,PHONE:/^(?:(?:\d{3}-)?\d{8}|^(?:\d{4}-)?\d{7,8})(?:-\d+)?$/,EMAIL:/^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/,ID_CARD:/(^\d{8}(0\d|10|11|12)([0-2]\d|30|31)\d{3}$)|(^\d{6}(18|19|20)\d{2}(0[1-9]|10|11|12)([0-2]\d|30|31)\d{3}(\d|X|x)$)/,ID_CARD15:/(^\d{8}(0\d|10|11|12)([0-2]\d|30|31)\d{3}$)/,ID_CARD18:/(^\d{6}(18|19|20)\d{2}(0[1-9]|10|11|12)([0-2]\d|30|31)\d{3}(\d|X|x)$)/,BANK_CARD:/^[1-9]\d{9,29}$/,POST_CODE:/^(0[1-7]|1[0-356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[0-5]|8[013-6])\d{4}$/,URL:/^(?:(ftp|https?|ftps):\/\/)?((?:\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+(?:[a-zA-Z]{2,6})?)?(?::(\d+))?(?:\/([^\?#]*))?(?:\?([^#]*))?(?:#(.*))?$/,IP:/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,IP6:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,EXTERNAL:/^(http?:|https?:|mailto:|tel:)/,FUNCTION_STR:/(function\([\w,\s]*\)\s*{[\s\S]*})|\(\s*([\w,\s]*)\s*\)\s*=>\s*{[\s\S]*}|(async\s*function\s*\([\w,\s]*\)\s*{[\s\S]*}\)\s*{[\s\S]*})|(async\(\s*([\w,\s]*)\s*\)\s*=>\s*{[\s\S]*})$/},i={AM_PM:{zh:{AM:"上午",PM:"下午"},en:{AM:"AM",PM:"PM"}},WEEK:{zh:{FULL:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],SHORT:["周日","周一","周二","周三","周四","周五","周六"],MINI:["日","一","二","三","四","五","六"]},en:{FULL:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],SHORT:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],MINI:["Su","Mo","Tu","We","Th","Fr","Sa"]}},MONTH:{zh:{FULL:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],SHORT:["一","二","三","四","五","六","七","八","九","十","十一","十二"]},en:{FULL:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORT:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}},QUARTER:{zh:{FULL:["第一季度","第二季度","第三季度","第四季度"],SHORT:["一季度","二季度","三季度","四季度"],MINI:["一","二","三","四"]},en:{FULL:["quarter 1st","quarter 2nd","quarter 3rd","quarter 4th"],SHORT:["Q1th","Q2nd","Q3rd","Q4th"],MINI:["Q1","Q2","Q3","Q4"]}},OVER_TIME:{zh:{YEAR:"年",MONTH:"月",DATE:"日",HOUR:"时",MINUTE:"分",SECOND:"秒",MILLISECOND:"毫秒",DAY:"天",QUARTER:"季度"},en:{YEAR:"year",MONTH:"month",DATE:"date",HOUR:"hour",MINUTE:"minute",SECOND:"second",MILLISECOND:"millisecond",DAY:"day",QUARTER:"quarter"}},PASS_TIME:{zh:{YEAR:"年前",MONTH:"个月前",DAY:"天前",BEFORE_YESTERDAY:"前天",YESTERDAY:"昨天",TODAY:"今天",HOUR:"小时前",MINUTE:"分钟前",JUST:"刚刚"},en:{YEAR:" year ago",MONTH:" month ago",DAY:" day ago",BEFORE_YESTERDAY:"before yesterday",YESTERDAY:" yesterday",TODAY:" today",HOUR:" hour ago",MINUTE:" minute ago",JUST:" just"}},HOLIDAY:{zh:["元旦","春节","清明节","劳动节","端午节","中秋节","国庆节"],en:["New Year‘s Day","Spring Festival","Tomb Sweeping Day","Labor Day","Dragon Boat Festival","Mid-Autumn Day","National Day"]},ZODIAC:{zh:["摩羯座","水瓶座","双鱼座","白羊座","金牛座","双子座","巨蟹座","狮子座","处女座","天秤座","天蝎座","射手座"],en:["Capricorn","Aquarius","Pisces","Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius"]},CHINESE_ZODIAC:{zh:["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"],en:["Rat","Ox","Tiger","Rabbit","Dragon","Snake","Horse","Goat","Monkey","Rooster","Dog","Pig"]},HEAVENLY_STEMS:{zh:["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"],en:["Jia","Yi","Bing","Ding","Wu","Ji","Geng","Xin","Ren","Gui"]},EARTHLY_BRANCHES:{zh:["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"],en:["Zi","Chou","Yin","Mao","Chen","Si","Wu","Wei","Shen","You","Xu","Hai"]}},o={8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"Caps Lock",27:"Escape",32:"Space",33:"Page Up",34:"Page Down",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",42:"Print Screen",45:"Insert",46:"Delete",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",91:"Windows",93:"Right Click",96:"Numpad 0",97:"Numpad 1",98:"Numpad 2",99:"Numpad 3",100:"Numpad 4",101:"Numpad 5",102:"Numpad 6",103:"Numpad 7",104:"Numpad 8",105:"Numpad 9",106:"Numpad *",107:"Numpad +",109:"Numpad -",110:"Numpad .",111:"Numpad /",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Num Lock",145:"Scroll Lock",182:"My Computer",183:"My Calculator",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},s={PROVINCE:{11:"北京",12:"天津",13:"河北",14:"山西",15:"内蒙古",21:"辽宁",22:"吉林",23:"黑龙江",31:"上海",32:"江苏",33:"浙江",34:"安徽",35:"福建",36:"江西",37:"山东",41:"河南",42:"湖北",43:"湖南",44:"广东",45:"广西",46:"海南",50:"重庆",51:"四川",52:"贵州",53:"云南",54:"西藏",61:"陕西",62:"甘肃",63:"青海",64:"宁夏",65:"新疆",71:"台湾",81:"香港",82:"澳门",91:"国外"},SEX:{MAN:"男",WOMAN:"女"}};function a(t){if(t.indexOf("_")>0){let e=t.replace(/\_(\w)/g,(function(t,e){return e.toUpperCase()}));return e.charAt(0).toUpperCase()+e.slice(1)}if(t.indexOf("-")>0){let e=t.replace(/\-(\w)/g,(function(t,e){return e.toUpperCase()}));return e.charAt(0).toUpperCase()+e.slice(1)}return/^[a-z]$/.test(t.charAt(0))&&!(t.indexOf("-")>0||t.indexOf("_")>0)?t.charAt(0).toUpperCase()+t.slice(1):t}function h(t){return Number.isInteger(t)}function u(t){return"String"===Object.prototype.toString.call(t).slice(8,-1)}function f(t){return"Array"===Object.prototype.toString.call(t).slice(8,-1)}function c(t){return"Object"===Object.prototype.toString.call(t).slice(8,-1)}function l(t){return"Date"===Object.prototype.toString.call(t).slice(8,-1)}function p(t){return null==t||"undefined"===t||"null"===t||0===t||!1===t||d(t)}function d(t){return window.isNaN(t)||f(t)||null==t||""===t}function g(t){return null==t||""===t}function y(t){return g(t)||!(Object.keys(t)||t).length}function w(t){return y(t)||/^\s*$/.test(t)}function m(t){return void 0===t}function b(t,e=10){return g(t)?0:Number.parseInt(t,e)}function A(t){return t.reduce((function(t,e){return t+e}))}function v(t=[],e=0,r=void 0){if(e<0)return t;if(0===t.length)t.push(r);else{if(e>t.length-1)return t;t.splice(e,0,r)}return t}function S(t=[],e=0,r=void 0){if(e<0)return t;if(0===t.length)t.push(r);else{if(e>t.length-1)return t;t.splice(e,0,t.splice(e,1,r)[0])}return t}function D(t){let e=Object.create(null);for(let[r,n]of t)e[r]=n;return e}function E(t){let e=new Map;for(let r of Object.keys(t))e.set(r,t[r]);return e}function M(t){let e=t.match(/^(\w+)\[(\d+)]$/);return{propName:e&&e[1]||void 0,propIndex:e?parseInt(e[2],10):void 0,isArray:!!e}}function F(t=new Date){let e=t.getFullYear();return e%100!=0&&e%4==0||e%400==0}function C(t,e=new Date){return t.getTime()-e.getTime()<0}function T(t,e=new Date){return t.getTime()-e.getTime()>0}function B(t,e){return["getFullYear","getMonth","getDate"].every((r=>t[r]()===e[r]()))}function O(t=new Date,e="yyyy-MM-dd"){return z(t,e)}function I(t=new Date){return{year:t.getFullYear(),month:t.getMonth()+1,date:t.getDate(),hours:t.getHours(),minutes:t.getMinutes(),seconds:t.getSeconds(),milliseconds:t.getMilliseconds()}}function _(t=new Date){return[7,1,2,3,4,5,6][t.getDay()]}function R(t=new Date){return t.getDate()}function x(t=new Date){return Math.ceil((t-new Date(t.getFullYear().toString()))/864e5)+1}function N(t=new Date){return new Date(t.getFullYear(),t.getMonth()+1,0).getDate()}function U(t=new Date){return F(t)?366:365}function P(t){let e=0,r=z(t).split("-"),n=Number(r[0]),i=Number(r[1]),o=Number(r[2]),s=new Date,a=s.getFullYear(),h=s.getMonth()+1,u=s.getDate(),f=a-n;if(f>0){let t=h-i;e=0===t?u-o<0?f-1:f:t<0?f-1:f}return e}function k(t=new Date,e=1){return t.setDate(t.getDate()+e),t}function z(t,e="yyyy-MM-dd",r="zh"){if(g(t))return"";if(u(t))t=j(t);else if(l(t));else if(h(t)&&13===String(t).length)t=new Date(t);else{if(!h(t)||10!==String(t).length)return console.error("Not supported date format!"),t;t=new Date(1e3*t)}let n={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours()%12==0?12:t.getHours()%12,"H+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds(),"S+":t.getMilliseconds(),"a+":t.getHours()<12?"am":"pm","A+":t.getHours()<12?"AM":"PM","E+":t.getDay(),"Q+":Math.floor((t.getMonth()+3)/3),S:t.getMilliseconds()},o=new RegExp(/(y+)/g);o.test(e)&&(e=e.replace(o,(function(e,r){return(t.getFullYear()+"").substring(4-r.length)})));let s=new RegExp(/((b+)|(A+))/g);s.test(e)&&(e=e.replace(s,(function(e,n){return n.length>1?t.getHours()<12?i.AM_PM[r].AM:i.AM_PM[r].PM:n===n.toLowerCase()?t.getHours()<12?i.AM_PM.en.AM.toLowerCase():i.AM_PM.en.PM.toLowerCase():t.getHours()<12?i.AM_PM.en.AM:i.AM_PM.en.PM})));let a=new RegExp(/(E+)/g);a.test(e)&&(e=e.replace(a,(function(e,n){return 1===n.length?i.WEEK[r].MINI[t.getDay()]:2===n.length?i.WEEK[r].SHORT[t.getDay()]:i.WEEK[r].FULL[t.getDay()]})));let f=new RegExp(/(Q+)/g);f.test(e)&&(e=e.replace(f,(function(e,n){return 1===n.length?i.QUARTER[r].MINI[Math.floor((t.getMonth()+3)/3)-1]:2===n.length?i.QUARTER[r].SHORT[Math.floor((t.getMonth()+3)/3)-1]:i.QUARTER[r].FULL[Math.floor((t.getMonth()+3)/3)-1]})));for(let t in n){let r=new RegExp("("+t+")");r.test(e)&&(e=e.replace(r,(function(e,r){return 1===r.length?n[t]:2===r.length?("00"+n[t]).substring((""+n[t]).length):("000"+n[t]).substring((""+n[t]).length)})))}return e}function j(t){return g(t)?null:u(t)?new Date(t.replace(/-/g,"/")):h(t)&&13===String(t).length?new Date(t):h(t)&&10===String(t).length?new Date(1e3*t):(console.error("Not supported date format!"),t)}function L(t){return(t=t.toString())[1]?t:"0"+t}function $(t,e){return e?$(e,t%e):t}function H(t,e){return new RegExp(e).test(t)}function q(t,e=Date.now()){return new Promise(((r,n)=>{try{const n=t.type,i=t.size,o=n.split("/")[1];r(new File([t],`${Date.now()}.${o}`,{type:n,size:i,name:`${e}.${o}`,lastModified:Date.now(),lastModifiedDate:new Date}))}catch(t){console.error(t),n(t)}}))}function Y(t){return new Promise(((e,r)=>{const n=new FileReader;n.onload=function(t){e(t.target.result)},n.onerror=function(t){r(t)},n.readAsText(t)}))}function W(t){if(t>255)throw"'"+t+"'' is greater than 255(0xff);";return("0"+Number(t).toString(16)).slice(-2)} /* * [hi-base64]{@link https://github.com/emn178/hi-base64} * * @version 0.3.1 * @author Chen, Yi-Cyuan [emn178@gmail.com] * @copyright Chen, Yi-Cyuan 2014-2023 * @license MIT */ var V="not a UTF-8 string",J="object"==typeof window,K=J?window:{};K.HI_BASE64_NO_WINDOW&&(J=!1);var Z=!J&&"object"==typeof self,Q=!K.HI_BASE64_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;Q?K=global:Z&&(K=self);for(var X="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),G={},tt=0;tt<64;++tt)G[X[tt]]=tt;G["-"]=62,G._=63;var et,rt,nt=function(t){return t.split("=")[0].replace(/[\r\n]/g,"")},it=function(t){for(var e,r,n,i,o=[],s=0,a=(t=nt(t)).length,h=0,u=a>>2<<2;h<u;)e=G[t.charAt(h++)],r=G[t.charAt(h++)],n=G[t.charAt(h++)],i=G[t.charAt(h++)],o[s++]=255&(e<<2|r>>>4),o[s++]=255&(r<<4|n>>>2),o[s++]=255&(n<<6|i);var f=a-u;return 2===f?(e=G[t.charAt(h++)],r=G[t.charAt(h++)],o[s++]=255&(e<<2|r>>>4)):3===f&&(e=G[t.charAt(h++)],r=G[t.charAt(h++)],n=G[t.charAt(h++)],o[s++]=255&(e<<2|r>>>4),o[s++]=255&(r<<4|n>>>2)),o},ot=function(t){for(var e,r,n,i=[],o=t.length,s=0,a=3*parseInt(o/3);s<a;)e=t[s++],r=t[s++],n=t[s++],i.push(X[e>>>2],X[63&(e<<4|r>>>4)],X[63&(r<<2|n>>>6)],X[63&n]);var h=o-a;return 1===h?(e=t[s],i.push(X[e>>>2],X[e<<4&63],"==")):2===h&&(e=t[s++],r=t[s],i.push(X[e>>>2],X[63&(e<<4|r>>>4)],X[r<<2&63],"=")),i.join("")},st=K.btoa,at=K.atob;if(Q){var ht=require("buffer").Buffer;st=function(t){return ht.from(t,"ascii").toString("base64")},ot=et=function(t){return ht.from(t).toString("base64")},at=function(t){return ht.from(t,"base64").toString("ascii")},rt=function(t){return ht.from(t,"base64").toString()}}else st?(et=function(t){for(var e=[],r=0;r<t.length;r++){var n=t.charCodeAt(r);n<128?e.push(String.fromCharCode(n)):n<2048?e.push(String.fromCharCode(192|n>>6),String.fromCharCode(128|63&n)):n<55296||n>=57344?e.push(String.fromCharCode(224|n>>12),String.fromCharCode(128|n>>6&63),String.fromCharCode(128|63&n)):(n=65536+((1023&n)<<10|1023&t.charCodeAt(++r)),e.push(String.fromCharCode(240|n>>18),String.fromCharCode(128|n>>12&63),String.fromCharCode(128|n>>6&63),String.fromCharCode(128|63&n)))}return st(e.join(""))},rt=function(t){var e=at(t.replace(/-/g,"+").replace(/_/g,"/"));if(!/[^\x00-\x7F]/.test(e))return e;for(var r,n,i=[],o=0,s=e.length,a=0;o<s;)if((r=e.charCodeAt(o++))<=127)i.push(String.fromCharCode(r));else{if(r>191&&r<=223)n=31&r,a=1;else if(r<=239)n=15&r,a=2;else{if(!(r<=247))throw new Error(V);n=7&r,a=3}for(var h=0;h<a;++h){if((r=e.charCodeAt(o++))<128||r>191)throw new Error(V);n<<=6,n+=63&r}if(n>=55296&&n<=57343)throw new Error(V);if(n>1114111)throw new Error(V);n<=65535?i.push(String.fromCharCode(n)):(n-=65536,i.push(String.fromCharCode(55296+(n>>10)),String.fromCharCode(56320+(1023&n))))}return i.join("")}):(st=function(t){for(var e,r,n,i=[],o=t.length,s=0,a=3*parseInt(o/3);s<a;)e=t.charCodeAt(s++),r=t.charCodeAt(s++),n=t.charCodeAt(s++),i.push(X[e>>>2],X[63&(e<<4|r>>>4)],X[63&(r<<2|n>>>6)],X[63&n]);var h=o-a;return 1===h?(e=t.charCodeAt(s),i.push(X[e>>>2],X[e<<4&63],"==")):2===h&&(e=t.charCodeAt(s++),r=t.charCodeAt(s),i.push(X[e>>>2],X[63&(e<<4|r>>>4)],X[r<<2&63],"=")),i.join("")},et=function(t){for(var e,r,n,i=[],o=function(t){for(var e=[],r=0;r<t.length;r++){var n=t.charCodeAt(r);n<128?e[e.length]=n:n<2048?(e[e.length]=192|n>>6,e[e.length]=128|63&n):n<55296||n>=57344?(e[e.length]=224|n>>12,e[e.length]=128|n>>6&63,e[e.length]=128|63&n):(n=65536+((1023&n)<<10|1023&t.charCodeAt(++r)),e[e.length]=240|n>>18,e[e.length]=128|n>>12&63,e[e.length]=128|n>>6&63,e[e.length]=128|63&n)}return e}(t),s=o.length,a=0,h=3*parseInt(s/3);a<h;)e=o[a++],r=o[a++],n=o[a++],i.push(X[e>>>2],X[63&(e<<4|r>>>4)],X[63&(r<<2|n>>>6)],X[63&n]);var u=s-h;return 1===u?(e=o[a],i.push(X[e>>>2],X[e<<4&63],"==")):2===u&&(e=o[a++],r=o[a],i.push(X[e>>>2],X[63&(e<<4|r>>>4)],X[r<<2&63],"=")),i.join("")},at=function(t){for(var e,r,n,i,o=[],s=t.length,a=0,h=s>>2<<2;a<h;)e=G[t.charAt(a++)],r=G[t.charAt(a++)],n=G[t.charAt(a++)],i=G[t.charAt(a++)],o.push(String.fromCharCode(255&(e<<2|r>>>4)),String.fromCharCode(255&(r<<4|n>>>2)),String.fromCharCode(255&(n<<6|i)));var u=s-h;return 2===u?(e=G[t.charAt(a++)],r=G[t.charAt(a++)],o.push(String.fromCharCode(255&(e<<2|r>>>4)))):3===u&&(e=G[t.charAt(a++)],r=G[t.charAt(a++)],n=G[t.charAt(a++)],o.push(String.fromCharCode(255&(e<<2|r>>>4)),String.fromCharCode(255&(r<<4|n>>>2)))),o.join("")},rt=function(t){for(var e,r,n=[],i=it(t),o=i.length,s=0,a=0;s<o;)if((e=i[s++])<=127)n.push(String.fromCharCode(e));else{if(e>191&&e<=223)r=31&e,a=1;else if(e<=239)r=15&e,a=2;else{if(!(e<=247))throw new Error(V);r=7&e,a=3}for(var h=0;h<a;++h){if((e=i[s++])<128||e>191)throw new Error(V);r<<=6,r+=63&e}if(r>=55296&&r<=57343)throw new Error(V);if(r>1114111)throw new Error(V);r<=65535?n.push(String.fromCharCode(r)):(r-=65536,n.push(String.fromCharCode(55296+(r>>10)),String.fromCharCode(56320+(1023&r))))}return n.join("")});var ut=function(t,e){var r="string"!=typeof t;return r&&t.constructor===K.ArrayBuffer&&(t=new Uint8Array(t)),r?ot(t):/[^\x00-\x7F]/.test(t)?et(t):st(t)};const ft=et,ct=rt;var lt=Object.freeze({__proto__:null,decode:function(t){return e=nt(e=t),r?at(e):rt(e);var e,r},decodeAsBytes:function(t){return it(t)},encode:function(t){return ut(t)},encodeAsBytes:function(t){return ut(t)},utf8Decode:function(t){return ct(t)},utf8Encode:function(t){return ft(t)}}),pt="object"==typeof window?window:{}; /* * [hi-base32]{@link https://github.com/emn178/hi-base32} * * @version 0.5.0 * @author Chen, Yi-Cyuan [emn178@gmail.com] * @copyright Chen, Yi-Cyuan 2015-2018 * @license MIT */!pt.HI_BASE32_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node&&(pt=global);var dt="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".split(""),gt={A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25,2:26,3:27,4:28,5:29,6:30,7:31},yt=[0,0,0,0,0,0,0,0],wt=function(t,e){e.length>10&&(e="..."+e.substr(-10));var r=new Error("Decoded data is not valid UTF-8. Maybe try base32.decode.asBytes()? Partial data after reading "+t+" bytes: "+e+" <-");throw r.position=t,r},mt=function(t){if(""===t)return[];if(!/^[A-Z2-7=]+$/.test(t))throw new Error("Invalid base32 characters");for(var e,r,n,i,o,s,a,h,u=[],f=0,c=(t=t.replace(/=/g,"")).length,l=0,p=c>>3<<3;l<p;)e=gt[t.charAt(l++)],r=gt[t.charAt(l++)],n=gt[t.charAt(l++)],i=gt[t.charAt(l++)],o=gt[t.charAt(l++)],s=gt[t.charAt(l++)],a=gt[t.charAt(l++)],h=gt[t.charAt(l++)],u[f++]=255&(e<<3|r>>>2),u[f++]=255&(r<<6|n<<1|i>>>4),u[f++]=255&(i<<4|o>>>1),u[f++]=255&(o<<7|s<<2|a>>>3),u[f++]=255&(a<<5|h);var d=c-p;return 2===d?(e=gt[t.charAt(l++)],r=gt[t.charAt(l++)],u[f++]=255&(e<<3|r>>>2)):4===d?(e=gt[t.charAt(l++)],r=gt[t.charAt(l++)],n=gt[t.charAt(l++)],i=gt[t.charAt(l++)],u[f++]=255&(e<<3|r>>>2),u[f++]=255&(r<<6|n<<1|i>>>4)):5===d?(e=gt[t.charAt(l++)],r=gt[t.charAt(l++)],n=gt[t.charAt(l++)],i=gt[t.charAt(l++)],o=gt[t.charAt(l++)],u[f++]=255&(e<<3|r>>>2),u[f++]=255&(r<<6|n<<1|i>>>4),u[f++]=255&(i<<4|o>>>1)):7===d&&(e=gt[t.charAt(l++)],r=gt[t.charAt(l++)],n=gt[t.charAt(l++)],i=gt[t.charAt(l++)],o=gt[t.charAt(l++)],s=gt[t.charAt(l++)],a=gt[t.charAt(l++)],u[f++]=255&(e<<3|r>>>2),u[f++]=255&(r<<6|n<<1|i>>>4),u[f++]=255&(i<<4|o>>>1),u[f++]=255&(o<<7|s<<2|a>>>3)),u},bt=function(t,e){var r="string"!=typeof t;return r&&t.constructor===ArrayBuffer&&(t=new Uint8Array(t)),r?function(t){for(var e,r,n,i,o,s="",a=t.length,h=0,u=5*parseInt(a/5);h<u;)e=t[h++],r=t[h++],n=t[h++],i=t[h++],o=t[h++],s+=dt[e>>>3]+dt[31&(e<<2|r>>>6)]+dt[r>>>1&31]+dt[31&(r<<4|n>>>4)]+dt[31&(n<<1|i>>>7)]+dt[i>>>2&31]+dt[31&(i<<3|o>>>5)]+dt[31&o];var f=a-u;return 1===f?(e=t[h],s+=dt[e>>>3]+dt[e<<2&31]+"======"):2===f?(e=t[h++],r=t[h],s+=dt[e>>>3]+dt[31&(e<<2|r>>>6)]+dt[r>>>1&31]+dt[r<<4&31]+"===="):3===f?(e=t[h++],r=t[h++],n=t[h],s+=dt[e>>>3]+dt[31&(e<<2|r>>>6)]+dt[r>>>1&31]+dt[31&(r<<4|n>>>4)]+dt[n<<1&31]+"==="):4===f&&(e=t[h++],r=t[h++],n=t[h++],i=t[h],s+=dt[e>>>3]+dt[31&(e<<2|r>>>6)]+dt[r>>>1&31]+dt[31&(r<<4|n>>>4)]+dt[31&(n<<1|i>>>7)]+dt[i>>>2&31]+dt[i<<3&31]+"="),s}(t):function(t){var e,r,n,i,o,s,a,h=!1,u="",f=0,c=0,l=t.length;if(""===t)return u;do{for(yt[0]=yt[5],yt[1]=yt[6],yt[2]=yt[7],a=c;f<l&&a<5;++f)(s=t.charCodeAt(f))<128?yt[a++]=s:s<2048?(yt[a++]=192|s>>6,yt[a++]=128|63&s):s<55296||s>=57344?(yt[a++]=224|s>>12,yt[a++]=128|s>>6&63,yt[a++]=128|63&s):(s=65536+((1023&s)<<10|1023&t.charCodeAt(++f)),yt[a++]=240|s>>18,yt[a++]=128|s>>12&63,yt[a++]=128|s>>6&63,yt[a++]=128|63&s);c=a-5,f===l&&++f,f>l&&a<6&&(h=!0),e=yt[0],a>4?(r=yt[1],n=yt[2],i=yt[3],o=yt[4],u+=dt[e>>>3]+dt[31&(e<<2|r>>>6)]+dt[r>>>1&31]+dt[31&(r<<4|n>>>4)]+dt[31&(n<<1|i>>>7)]+dt[i>>>2&31]+dt[31&(i<<3|o>>>5)]+dt[31&o]):1===a?u+=dt[e>>>3]+dt[e<<2&31]+"======":2===a?(r=yt[1],u+=dt[e>>>3]+dt[31&(e<<2|r>>>6)]+dt[r>>>1&31]+dt[r<<4&31]+"===="):3===a?(r=yt[1],n=yt[2],u+=dt[e>>>3]+dt[31&(e<<2|r>>>6)]+dt[r>>>1&31]+dt[31&(r<<4|n>>>4)]+dt[n<<1&31]+"==="):(r=yt[1],n=yt[2],i=yt[3],u+=dt[e>>>3]+dt[31&(e<<2|r>>>6)]+dt[r>>>1&31]+dt[31&(r<<4|n>>>4)]+dt[31&(n<<1|i>>>7)]+dt[i>>>2&31]+dt[i<<3&31]+"=")}while(!h);return u}(t)},At=function(t,e){return function(t){for(var e,r,n="",i=t.length,o=0,s=0;o<i;)if((e=t[o++])<=127)n+=String.fromCharCode(e);else{e>191&&e<=223?(r=31&e,s=1):e<=239?(r=15&e,s=2):e<=247?(r=7&e,s=3):wt(o,n);for(var a=0;a<s;++a)((e=t[o++])<128||e>191)&&wt(o,n),r<<=6,r+=63&e;r>=55296&&r<=57343&&wt(o,n),r>1114111&&wt(o,n),r<=65535?n+=String.fromCharCode(r):(r-=65536,n+=String.fromCharCode(55296+(r>>10)),n+=String.fromCharCode(56320+(1023&r)))}return n}(mt(t))};var vt=Object.freeze({__proto__:null,decode:function(t){return At(t)},decodeAsBytes:function(t){return mt(t)},encode:function(t){return bt(t)},encodeAsBytes:function(t){return bt(t)}}),St="input is invalid type",Dt="object"==typeof window,Et=Dt?window:{}; /** * [js-md5]{@link https://github.com/emn178/js-md5} * * @namespace md5 * @version 0.8.3 * @author Chen, Yi-Cyuan [emn178@gmail.com] * @copyright Chen, Yi-Cyuan 2014-2023 * @license MIT */Et.JS_MD5_NO_WINDOW&&(Dt=!1);var Mt=!Dt&&"object"==typeof self,Ft=!Et.JS_MD5_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;Ft?Et=global:Mt&&(Et=self);var Ct,Tt=!Et.JS_MD5_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,Bt="0123456789abcdef".split(""),Ot=[128,32768,8388608,-2147483648],It=[0,8,16,24],_t=["hex","array","digest","buffer","arrayBuffer","base64"],Rt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),xt=[];if(Tt){var Nt=new ArrayBuffer(68);Ct=new Uint8Array(Nt),xt=new Uint32Array(Nt)}var Ut=Array.isArray;!Et.JS_MD5_NO_NODE_JS&&Ut||(Ut=function(t){return"[object Array]"===Object.prototype.toString.call(t)});var Pt=ArrayBuffer.isView;!Tt||!Et.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&Pt||(Pt=function(t){return"object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});var kt=function(t){var e=typeof t;if("string"===e)return[t,!0];if("object"!==e||null===t)throw new Error(St);if(Tt&&t.constructor===ArrayBuffer)return[new Uint8Array(t),!1];if(!Ut(t)&&!Pt(t))throw new Error(St);return[t,!1]},zt=function(t){return function(e){return new $t(!0).update(e)[t]()}},jt=function(t){var e,r=require("crypto"),n=require("buffer").Buffer;e=n.from&&!Et.JS_MD5_NO_BUFFER_FROM?n.from:function(t){return new n(t)};return function(i){if("string"==typeof i)return r.createHash("md5").update(i,"utf8").digest("hex");if(null==i)throw new Error(St);return i.constructor===ArrayBuffer&&(i=new Uint8Array(i)),Ut(i)||Pt(i)||i.constructor===n?r.createHash("md5").update(e(i)).digest("hex"):t(i)}},Lt=function(t){return function(e,r){return new Ht(e,!0).update(r)[t]()}};function $t(t){if(t)xt[0]=xt[16]=xt[1]=xt[2]=xt[3]=xt[4]=xt[5]=xt[6]=xt[7]=xt[8]=xt[9]=xt[10]=xt[11]=xt[12]=xt[13]=xt[14]=xt[15]=0,this.blocks=xt,this.buffer8=Ct;else if(Tt){var e=new ArrayBuffer(68);this.buffer8=new Uint8Array(e),this.blocks=new Uint32Array(e)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}function Ht(t,e){var r,n=kt(t);if(t=n[0],n[1]){var i,o=[],s=t.length,a=0;for(r=0;r<s;++r)(i=t.charCodeAt(r))<128?o[a++]=i:i<2048?(o[a++]=192|i>>>6,o[a++]=128|63&i):i<55296||i>=57344?(o[a++]=224|i>>>12,o[a++]=128|i>>>6&63,o[a++]=128|63&i):(i=65536+((1023&i)<<10|1023&t.charCodeAt(++r)),o[a++]=240|i>>>18,o[a++]=128|i>>>12&63,o[a++]=128|i>>>6&63,o[a++]=128|63&i);t=o}t.length>64&&(t=new $t(!0).update(t).array());var h=[],u=[];for(r=0;r<64;++r){var f=t[r]||0;h[r]=92^f,u[r]=54^f}$t.call(this,e),this.update(u),this.oKeyPad=h,this.inner=!0,this.sharedMemory=e}$t.prototype.update=function(t){if(this.finalized)throw new Error("finalize already called");var e=kt(t);t=e[0];for(var r,n,i=e[1],o=0,s=t.length,a=this.blocks,h=this.buffer8;o<s;){if(this.hashed&&(this.hashed=!1,a[0]=a[16],a[16]=a[1]=a[2]=a[3]=a[4]=a[5]=a[6]=a[7]=a[8]=a[9]=a[10]=a[11]=a[12]=a[13]=a[14]=a[15]=0),i)if(Tt)for(n=this.start;o<s&&n<64;++o)(r=t.charCodeAt(o))<128?h[n++]=r:r<2048?(h[n++]=192|r>>>6,h[n++]=128|63&r):r<55296||r>=57344?(h[n++]=224|r>>>12,h[n++]=128|r>>>6&63,h[n++]=128|63&r):(r=65536+((1023&r)<<10|1023&t.charCodeAt(++o)),h[n++]=240|r>>>18,h[n++]=128|r>>>12&63,h[n++]=128|r>>>6&63,h[n++]=128|63&r);else for(n=this.start;o<s&&n<64;++o)(r=t.charCodeAt(o))<128?a[n>>>2]|=r<<It[3&n++]:r<2048?(a[n>>>2]|=(192|r>>>6)<<It[3&n++],a[n>>>2]|=(128|63&r)<<It[3&n++]):r<55296||r>=57344?(a[n>>>2]|=(224|r>>>12)<<It[3&n++],a[n>>>2]|=(128|r>>>6&63)<<It[3&n++],a[n>>>2]|=(128|63&r)<<It[3&n++]):(r=65536+((1023&r)<<10|1023&t.charCodeAt(++o)),a[n>>>2]|=(240|r>>>18)<<It[3&n++],a[n>>>2]|=(128|r>>>12&63)<<It[3&n++],a[n>>>2]|=(128|r>>>6&63)<<It[3&n++],a[n>>>2]|=(128|63&r)<<It[3&n++]);else if(Tt)for(n=this.start;o<s&&n<64;++o)h[n++]=t[o];else for(n=this.start;o<s&&n<64;++o)a[n>>>2]|=t[o]<<It[3&n++];this.lastByteIndex=n,this.bytes+=n-this.start,n>=64?(this.start=n-64,this.hash(),this.hashed=!0):this.start=n}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296|0,this.bytes=this.bytes%4294967296),this},$t.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[e>>>2]|=Ot[3&e],e>=56&&(this.hashed||this.hash(),t[0]=t[16],t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.bytes<<3,t[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},$t.prototype.hash=function(){var t,e,r,n,i,o,s=this.blocks;this.first?e=((e=((t=((t=s[0]-680876937)<<7|t>>>25)-271733879|0)^(r=((r=(-271733879^(n=((n=(-1732584194^2004318071&t)+s[1]-117830708)<<12|n>>>20)+t|0)&(-271733879^t))+s[2]-1126478375)<<17|r>>>15)+n|0)&(n^t))+s[3]-1316259209)<<22|e>>>10)+r|0:(t=this.h0,e=this.h1,r=this.h2,e=((e+=((t=((t+=((n=this.h3)^e&(r^n))+s[0]-680876936)<<7|t>>>25)+e|0)^(r=((r+=(e^(n=((n+=(r^t&(e^r))+s[1]-389564586)<<12|n>>>20)+t|0)&(t^e))+s[2]+606105819)<<17|r>>>15)+n|0)&(n^t))+s[3]-1044525330)<<22|e>>>10)+r|0),e=((e+=((t=((t+=(n^e&(r^n))+s[4]-176418897)<<7|t>>>25)+e|0)^(r=((r+=(e^(n=((n+=(r^t&(e^r))+s[5]+1200080426)<<12|n>>>20)+t|0)&(t^e))+s[6]-1473231341)<<17|r>>>15)+n|0)&(n^t))+s[7]-45705983)<<22|e>>>10)+r|0,e=((e+=((t=((t+=(n^e&(r^n))+s[8]+1770035416)<<7|t>>>25)+e|0)^(r=((r+=(e^(n=((n+=(r^t&(e^r))+s[9]-1958414417)<<12|n>>>20)+t|0)&(t^e))+s[10]-42063)<<17|r>>>15)+n|0)&(n^t))+s[11]-1990404162)<<22|e>>>10)+r|0,e=((e+=((t=((t+=(n^e&(r^n))+s[12]+1804603682)<<7|t>>>25)+e|0)^(r=((r+=(e^(n=((n+=(r^t&(e^r))+s[13]-40341101)<<12|n>>>20)+t|0)&(t^e))+s[14]-1502002290)<<17|r>>>15)+n|0)&(n^t))+s[15]+1236535329)<<22|e>>>10)+r|0,e=((e+=((n=((n+=(e^r&((t=((t+=(r^n&(e^r))+s[1]-165796510)<<5|t>>>27)+e|0)^e))+s[6]-1069501632)<<9|n>>>23)+t|0)^t&((r=((r+=(t^e&(n^t))+s[11]+643717713)<<14|r>>>18)+n|0)^n))+s[0]-373897302)<<20|e>>>12)+r|0,e=((e+=((n=((n+=(e^r&((t=((t+=(r^n&(e^r))+s[5]-701558691)<<5|t>>>27)+e|0)^e))+s[10]+38016083)<<9|n>>>23)+t|0)^t&((r=((r+=(t^e&(n^t))+s[15]-660478335)<<14|r>>>18)+n|0)^n))+s[4]-405537848)<<20|e>>>12)+r|0,e=((e+=((n=((n+=(e^r&((t=((t+=(r^n&(e^r))+s[9]+568446438)<<5|t>>>27)+e|0)^e))+s[14]-1019803690)<<9|n>>>23)+t|0)^t&((r=((r+=(t^e&(n^t))+s[3]-187363961)<<14|r>>>18)+n|0)^n))+s[8]+1163531501)<<20|e>>>12)+r|0,e=((e+=((n=((n+=(e^r&((t=((t+=(r^n&(e^r))+s[13]-1444681467)<<5|t>>>27)+e|0)^e))+s[2]-51403784)<<9|n>>>23)+t|0)^t&((r=((r+=(t^e&(n^t))+s[7]+1735328473)<<14|r>>>18)+n|0)^n))+s[12]-1926607734)<<20|e>>>12)+r|0,e=((e+=((o=(n=((n+=((i=e^r)^(t=((t+=(i^n)+s[5]-378558)<<4|t>>>28)+e|0))+s[8]-2022574463)<<11|n>>>21)+t|0)^t)^(r=((r+=(o^e)+s[11]+1839030562)<<16|r>>>16)+n|0))+s[14]-35309556)<<23|e>>>9)+r|0,e=((e+=((o=(n=((n+=((i=e^r)^(t=((t+=(i^n)+s[1]-1530992060)<<4|t>>>28)+e|0))+s[4]+1272893353)<<11|n>>>21)+t|0)^t)^(r=((r+=(o^e)+s[7]-155497632)<<16|r>>>16)+n|0))+s[10]-1094730640)<<23|e>>>9)+r|0,e=((e+=((o=(n=((n+=((i=e^r)^(t=((t+=(i^n)+s[13]+681279174)<<4|t>>>28)+e|0))+s[0]-358537222)<<11|n>>>21)+t|0)^t)^(r=((r+=(o^e)+s[3]-722521979)<<16|r>>>16)+n|0))+s[6]+76029189)<<23|e>>>9)+r|0,e=((e+=((o=(n=((n+=((i=e^r)^(t=((t+=(i^n)+s[9]-640364487)<<4|t>>>28)+e|0))+s[12]-421815835)<<11|n>>>21)+t|0)^t)^(r=((r+=(o^e)+s[15]+530742520)<<16|r>>>16)+n|0))+s[2]-995338651)<<23|e>>>9)+r|0,e=((e+=((n=((n+=(e^((t=((t+=(r^(e|~n))+s[0]-198630844)<<6|t>>>26)+e|0)|~r))+s[7]+1126891415)<<10|n>>>22)+t|0)^((r=((r+=(t^(n|~e))+s[14]-1416354905)<<15|r>>>17)+n|0)|~t))+s[5]-57434055)<<21|e>>>11)+r|0,e=((e+=((n=((n+=(e^((t=((t+=(r^(e|~n))+s[12]+1700485571)<<6|t>>>26)+e|0)|~r))+s[3]-1894986606)<<10|n>>>22)+t|0)^((r=((r+=(t^(n|~e))+s[10]-1051523)<<15|r>>>17)+n|0)|~t))+s[1]-2054922799)<<21|e>>>11)+r|0,e=((e+=((n=((n+=(e^((t=((t+=(r^(e|~n))+s[8]+1873313359)<<6|t>>>26)+e|0)|~r))+s[15]-30611744)<<10|n>>>22)+t|0)^((r=((r+=(t^(n|~e))+s[6]-1560198380)<<15|r>>>17)+n|0)|~t))+s[13]+1309151649)<<21|e>>>11)+r|0,e=((e+=((n=((n+=(e^((t=((t+=(r^(e|~n))+s[4]-145523070)<<6|t>>>26)+e|0)|~r))+s[11]-1120210379)<<10|n>>>22)+t|0)^((r=((r+=(t^(n|~e))+s[2]+718787259)<<15|r>>>17)+n|0)|~t))+s[9]-343485551)<<21|e>>>11)+r|0,this.first?(this.h0=t+1732584193|0,this.h1=e-271733879|0,this.h2=r-1732584194|0,this.h3=n+271733878|0,this.first=!1):(this.h0=this.h0+t|0,this.h1=this.h1+e|0,this.h2=this.h2+r|0,this.h3=this.h3+n|0)},$t.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,r=this.h2,n=this.h3;return Bt[t>>>4&15]+Bt[15&t]+Bt[t>>>12&15]+Bt[t>>>8&15]+Bt[t>>>20&15]+Bt[t>>>16&15]+Bt[t>>>28&15]+Bt[t>>>24&15]+Bt[e>>>4&15]+Bt[15&e]+Bt[e>>>12&15]+Bt[e>>>8&15]+Bt[e>>>20&15]+Bt[e>>>16&15]+Bt[e>>>28&15]+Bt[e>>>24&15]+Bt[r>>>4&15]+Bt[15&r]+Bt[r>>>12&15]+Bt[r>>>8&15]+Bt[r>>>20&15]+Bt[r>>>16&15]+Bt[r>>>28&15]+Bt[r>>>24&15]+Bt[n>>>4&15]+Bt[15&n]+Bt[n>>>12&15]+Bt[n>>>8&15]+Bt[n>>>20&15]+Bt[n>>>16&15]+Bt[n>>>28&15]+Bt[n>>>24&15]},$t.prototype.toString=$t.prototype.hex,$t.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,r=this.h2,n=this.h3;return[255&t,t>>>8&255,t>>>16&255,t>>>24&255,255&e,e>>>8&255,e>>>16&255,e>>>24&255,255&r,r>>>8&255,r>>>16&255,r>>>24&255,255&n,n>>>8&255,n>>>16&255,n>>>24&255]},$t.prototype.array=$t.prototype.digest,$t.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(16),e=new Uint32Array(t);return e[0]=this.h0,e[1]=this.h1,e[2]=this.h2,e[3]=this.h3,t},$t.prototype.buffer=$t.prototype.arrayBuffer,$t.prototype.base64=function(){for(var t,e,r,n="",i=this.array(),o=0;o<15;)t=i[o++],e=i[o++],r=i[o++],n+=Rt[t>>>2]+Rt[63&(t<<4|e>>>4)]+Rt[63&(e<<2|r>>>6)]+Rt[63&r];return t=i[o],n+=Rt[t>>>2]+Rt[t<<4&63]+"=="},Ht.prototype=new $t,Ht.prototype.finalize=function(){if($t.prototype.finalize.call(this),this.inner){this.inner=!1;var t=this.array();$t.call(this,this.sharedMemory),this.update(this.oKeyPad),this.update(t),$t.prototype.finalize.call(this)}};const qt=function(){var t=zt("hex");Ft&&(t=jt(t)),t.create=function(){return new $t},t.update=function(e){return t.create().update(e)};for(var e=0;e<_t.length;++e){var r=_t[e];t[r]=zt(r)}return t}(),Yt=function(){var t=Lt("hex");t.create=function(t){return new Ht(t)},t.update=function(e,r){return t.create(e).update(r)};for(var e=0;e<_t.length;++e){var r=_t[e];t[r]=Lt(r)}return t}(); /* * [js-sha1]{@link https://github.com/emn178/js-sha1} * * @version 0.7.0 * @author Chen, Yi-Cyuan [emn178@gmail.com] * @copyright Chen, Yi-Cyuan 2014-2024 * @license MIT */ var Wt="input is invalid type",Vt="object"==typeof window,Jt=Vt?window:{};Jt.JS_SHA1_NO_WINDOW&&(Vt=!1);var Kt=!Vt&&"object"==typeof self,Zt=!Jt.JS_SHA1_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;Zt?Jt=global:Kt&&(Jt=self);var Qt=!Jt.JS_SHA1_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,Xt="0123456789abcdef".split(""),Gt=[-2147483648,8388608,32768,128],te=[24,16,8,0],ee=["hex","array","digest","arrayBuffer"],re=[],ne=Array.isArray;!Jt.JS_SHA1_NO_NODE_JS&&ne||(ne=function(t){return"[object Array]"===Object.prototype.toString.call(t)});var ie=ArrayBuffer.isView;!Qt||!Jt.JS_SHA1_NO_ARRAY_BUFFER_IS_VIEW&&ie||(ie=function(t){return"object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});var oe=function(t){var e=typeof t;if("string"===e)return[t,!0];if("object"!==e||null===t)throw new Error(Wt);if(Qt&&t.constructor===ArrayBuffer)return[new Uint8Array(t),!1];if(!ne(t)&&!ie(t))throw new Error(Wt);return[t,!1]},se=function(t){return function(e){return new ue(!0).update(e)[t]()}},ae=function(t){var e,r=require("crypto"),n=require("buffer").Buffer;e=n.from&&!Jt.JS_SHA1_NO_BUFFER_FROM?n.from:function(t){return new n(t)};return function(i){if("string"==typeof i)return r.createHash("sha1").update(i,"utf8").digest("hex");if(null==i)throw new Error(Wt);return i.constructor===ArrayBuffer&&(i=new Uint8Array(i)),ne(i)||ie(i)||i.constructor===n?r.createHash("sha1").update(e(i)).digest("hex"):t(i)}},he=function(t){return function(e,r){return new fe(e,!0).update(r)[t]()}};function ue(t){t?(re[0]=re[16]=re[1]=re[2]=re[3]=re[4]=re[5]=re[6]=re[7]=re[8]=re[9]=re[10]=re[11]=re[12]=re[13]=re[14]=re[15]=0,this.blocks=re):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.h0=1732584193,this.h1=4023233417,this.h2=2562383102,this.h3=271733878,this.h4=3285377520,this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}function fe(t,e){var r,n=oe(t);if(t=n[0],n[1]){var i,o=[],s=t.length,a=0;for(r=0;r<s;++r)(i=t.charCodeAt(r))<128?o[a++]=i:i<2048?(o[a++]=192|i>>>6,o[a++]=128|63&i):i<55296||i>=57344?(o[a++]=224|i>>>12,o[a++]=128|i>>>6&63,o[a++]=128|63&i):(i=65536+((1023&i)<<10|1023&t.charCodeAt(++r)),o[a++]=240|i>>>18,o[a++]=128|i>>>12&63,o[a++]=128|i>>>6&63,o[a++]=128|63&i);t=o}t.length>64&&(t=new ue(!0).update(t).array());var h=[],u=[];for(r=0;r<64;++r){var f=t[r]||0;h[r]=92^f,u[r]=54^f}ue.call(this,e),this.update(u),this.oKeyPad=h,this.inner=!0,this.sharedMemory=e}ue.prototype.update=function(t){if(this.finalized)throw new Error("finalize already called");var e=oe(t);t=e[0];for(var r,n,i=e[1],o=0,s=t.length||0,a=this.blocks;o<s;){if(this.hashed&&(this.hashed=!1,a[0]=this.block,this.block=a[16]=a[1]=a[2]=a[3]=a[4]=a[5]=a[6]=a[7]=a[8]=a[9]=a[10]=a[11]=a[12]=a[13]=a[14]=a[15]=0),i)for(n=this.start;o<s&&n<64;++o)(r=t.charCodeAt(o))<128?a[n>>>2]|=r<<te[3&n++]:r<2048?(a[n>>>2]|=(192|r>>>6)<<te[3&n++],a[n>>>2]|=(128|63&r)<<te[3&n++]):r<55296||r>=57344?(a[n>>>2]|=(224|r>>>12)<<te[3&n++],a[n>>>2]|=(128|r>>>6&63)<<te[3&n++],a[n>>>2]|=(128|63&r)<<te[3&n++]):(r=65536+((1023&r)<<10|1023&t.charCodeAt(++o)),a[n>>>2]|=(240|r>>>18)<<te[3&n++],a[n>>>2]|=(128|r>>>12&63)<<te[3&n++],a[n>>>2]|=(128|r>>>6&63)<<te[3&n++],a[n>>>2]|=(128|63&r)<<te[3&n++]);else for(n=this.start;o<s&&n<64;++o)a[n>>>2]|=t[o]<<te[3&n++];this.lastByteIndex=n,this.bytes+=n-this.start,n>=64?(this.block=a[16],this.start=n-64,this.hash(),this.hashed=!0):this.start=n}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296|0,this.bytes=this.bytes%4294967296),this},ue.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[16]=this.block,t[e>>>2]|=Gt[3&e],this.block=t[16],e>=56&&(this.hashed||this.hash(),t[0]=this.block,t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.hBytes<<3|this.bytes>>>29,t[15]=this.bytes<<3,this.hash()}},ue.prototype.hash=function(){var t,e,r=this.h0,n=this.h1,i=this.h2,o=this.h3,s=this.h4,a=this.blocks;for(t=16;t<80;++t)e=a[t-3]^a[t-8]^a[t-14]^a[t-16],a[t]=e<<1|e>>>31;for(t=0;t<20;t+=5)r=(e=(n=(e=(i=(e=(o=(e=(s=(e=r<<5|r>>>27)+(n&i|~n&o)+s+1518500249+a[t]|0)<<5|s>>>27)+(r&(n=n<<30|n>>>2)|~r&i)+o+1518500249+a[t+1]|0)<<5|o>>>27)+(s&(r=r<<30|r>>>2)|~s&n)+i+1518500249+a[t+2]|0)<<5|i>>>27)+(o&(s=s<<30|s>>>2)|~o&r)+n+1518500249+a[t+3]|0)<<5|n>>>27)+(i&(o=o<<30|o>>>2)|~i&s)+r+1518500249+a[t+4]|0,i=i<<30|i>>>2;for(;t<40;t+=5)r=(e=(n=(e=(i=(e=(o=(e=(s=(e=r<<5|r>>>27)+(n^i^o)+s+1859775393+a[t]|0)<<5|s>>>27)+(r^(n=n<<30|n>>>2)^i)+o+1859775393+a[t+1]|0)<<5|o>>>27)+(s^(r=r<<30|r>>>2)^n)+i+1859775393+a[t+2]|0)<<5|i>>>27)+(o^(s=s<<30|s>>>2)^r)+n+1859775393+a[t+3]|0)<<5|n>>>27)+(i^(o=o<<30|o>>>2)^s)+r+1859775393+a[t+4]|0,i=i<<30|i>>>2;for(;t<60;t+=5)r=(e=(n=(e=(i=(e=(o=(e=(s=(e=r<<5|r>>>27)+(n&i|n&o|i&o)+s-1894007588+a[t]|0)<<5|s>>>27)+(r&(n=n<<30|n>>>2)|r&i|n&i)+o-1894007588+a[t+1]|0)<<5|o>>>27)+(s&(r=r<<30|r>>>2)|s&n|r&n)+i-1894007588+a[t+2]|0)<<5|i>>>27)+(o&(s=s<<30|s>>>2)|o&r|s&r)+n-1894007588+a[t+3]|0)<<5|n>>>27)+(i&(o=o<<30|o>>>2)|i&s|o&s)+r-1894007588+a[t+4]|0,i=i<<30|i>>>2;for(;t<80;t+=5)r=(e=(n=(e=(i=(e=(o=(e=(s=(e=r<<5|r>>>27)+(n^i^o)+s-899497514+a[t]|0)<<5|s>>>27)+(r^(n=n<<30|n>>>2)^i)+o-899497514+a[t+1]|0)<<5|o>>>27)+(s^(r=r<<30|r>>>2)^n)+i-899497514+a[t+2]|0)<<5|i>>>27)+(o^(s=s<<30|s>>>2)^r)+n-899497514+a[t+3]|0)<<5|n>>>27)+(i^(o=o<<30|o>>>2)^s)+r-899497514+a[t+4]|0,i=i<<30|i>>>2;this.h0=this.h0+r|0,this.h1=this.h1+n|0,this.h2=this.h2+i|0,this.h3=this.h3+o|0,this.h4=this.h4+s|0},ue.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,r=this.h2,n=this.h3,i=this.h4;return Xt[t>>>28&15]+Xt[t>>>24&15]+Xt[t>>>20&15]+Xt[t>>>16&15]+Xt[t>>>12&15]+Xt[t>>>8&15]+Xt[t>>>4&15]+Xt[15&t]+Xt[e>>>28&15]+Xt[e>>>24&15]+Xt[e>>>20&15]+Xt[e>>>16&15]+Xt[e>>>12&15]+Xt[e>>>8&15]+Xt[e>>>4&15]+Xt[15&e]+Xt[r>>>28&15]+Xt[r>>>24&15]+Xt[r>>>20&15]+Xt[r>>>16&15]+Xt[r>>>12&15]+Xt[r>>>8&15]+Xt[r>>>4&15]+Xt[15&r]+Xt[n>>>28&15]+Xt[n>>>24&15]+Xt[n>>>20&15]+Xt[n>>>16&15]+Xt[n>>>12&15]+Xt[n>>>8&15]+Xt[n>>>4&15]+Xt[15&n]+Xt[i>>>28&15]+Xt[i>>>24&15]+Xt[i>>>20&15]+Xt[i>>>16&15]+Xt[i>>>12&15]+Xt[i>>>8&15]+Xt[i>>>4&15]+Xt[15&i]},ue.prototype.toString=ue.prototype.hex,ue.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,r=this.h2,n=this.h3,i=this.h4;return[t>>>24&255,t>>>16&255,t>>>8&255,255&t,e>>>24&255,e>>>16&255,e>>>8&255,255&e,r>>>24&255,r>>>16&255,r>>>8&255,255&r,n>>>24&255,n>>>16&255,n>>>8&255,255&n,i>>>24&255,i>>>16&255,i>>>8&255,255&i]},ue.prototype.array=ue.prototype.digest,ue.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(20),e=new DataView(t);return e.setUint32(0,this.h0),e.setUint32(4,this.h1),e.setUint32(8,this.h2),e.setUint32(12,this.h3),e.setUint32(16,this.h4),t},fe.prototype=new ue,fe.prototype.finalize=function(){if(ue.prototype.finalize.call(this),this.inner){this.inner=!1;var t=this.array();ue.call(this,this.sharedMemory),this.update(this.oKeyPad),this.update(t),ue.prototype.finalize.call(this)}};const ce=function(){var t=se("hex");Zt&&(t=ae(t)),t.create=function(){return new ue},t.update=function(e){return t.create().update(e)};for(var e=0;e<ee.length;++e){var r=ee[e];t[r]=se(r)}return t}(),le=function(){var t=he("hex");t.create=function(t){return new fe(t)},t.update=function(e,r){return t.create(e).update(r)};for(var e=0;e<ee.length;++e){var r=ee[e];t[r]=he(r)}return t}(); /** * [js-sha256]{@link https://github.com/emn178/js-sha256} * * @version 0.11.0 * @author Chen, Yi-Cyuan [emn178@gmail.com] * @copyright Chen, Yi-Cyuan 2014-2024 * @license MIT */ var pe="input is invalid type",de="object"==typeof window,ge=de?window:{};ge.JS_SHA256_NO_WINDOW&&(de=!1);var ye=!de&&"object"==typeof self,we=!ge.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;we?ge=global:ye&&(ge=self);var me=!ge.JS_SHA256_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,be="0123456789abcdef".split(""),Ae=[-2147483648,8388608,32768,128],ve=[24,16,8,0],Se=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],De=["hex","array","digest","arrayBuffer"],Ee=[];!ge.JS_SHA256_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),!me||!ge.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return"object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});var Me=function(t,e){return function(r){return new Oe(e,!0).update(r)[t]()}},Fe=function(t){var e=Me("hex",t);we&&(e=Ce(e,t)),e.create=function(){return new Oe(t)},e.update=function(t){return e.create().update(t)};for(var r=0;r<De.length;++r){var n=De[r];e[n]=Me(n,t)}return e},Ce=function(t,e){var r,n=require("crypto"),i=require("buffer").Buffer,o=e?"sha224":"sha256";r=i.from&&!ge.JS_SHA256_NO_BUFFER_FROM?i.from:function(t){return new i(t)};return function(e){if("string"==typeof e)return n.createHash(o).update(e,"utf8").digest("hex");if(null==e)throw new Error(pe);return e.constructor===ArrayBuffer&&(e=new Uint8Array(e)),Array.isArray(e)||ArrayBuffer.isView(e)||e.constructor===i?n.createHash(o).update(r(e)).digest("hex"):t(e)}},Te=function(t,e){return function(r,n){return new Ie(r,e,!0).update(n)[t]()}},Be=function(t){var e=Te("hex",t);e.create=function(e){return new Ie(e,t)},e.update=function(t,r){return e.create(t).update(r)};for(var r=0;r<De.length;++r){var n=De[r];e[n]=Te(n,t)}return e};function Oe(t,e){e?(Ee[0]=Ee[16]=Ee[1]=Ee[2]=Ee[3]=Ee[4]=Ee[5]=Ee[6]=Ee[7]=Ee[8]=Ee[9]=Ee[10]=Ee[11]=Ee[12]=Ee[13]=Ee[14]=Ee[15]=0,this.blocks=Ee):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=t}function Ie(t,e,r){var n,i=typeof t;if("string"===i){var o,s=[],a=t.length,h=0;for(n=0;n<a;++n)(o=t.charCodeAt(n))<128?s[h++]=o:o<2048?(s[h++]=192|o>>>6,s[h++]=128|63&o):o<55296||o>=57344?(s[h++]=224|o>>>12,s[h++]=128|o>>>6&63,s[h++]=128|63&o):(o=65536+((1023&o)<<10|1023&t.charCodeAt(++n)),s[h++]=240|o>>>18,s[h++]=128|o>>>12&63,s[h++]=128|o>>>6&63,s[h++]=128|63&o);t=s}else{if("object"!==i)throw new Error(pe);if(null===t)throw new Error(pe);if(me&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||me&&ArrayBuffer.isView(t)))throw new Error(pe)}t.length>64&&(t=new Oe(e,!0).update(t).array());var u=[],f=[];for(n=0;n<64;++n){var c=t[n]||0;u[n]=92^c,f[n]=54^c}Oe.call(this,e,r),this.update(f),this.oKeyPad=u,this.inner=!0,this.sharedMemory=r}Oe.prototype.update=function(t){if(!this.finalized){var e,r=typeof t;if("string"!==r){if("object"!==r)throw new Error(pe);if(null===t)throw new Error(pe);if(me&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||me&&ArrayBuffer.isView(t)))throw new Error(pe);e=!0}for(var n,i,o=0,s=t.length,a=this.blocks;o<s;){if(this.hashed&&(this.hashed=!1,a[0]=this.block,this.block=a[16]=a[1]=a[2]=a[3]=a[4]=a[5]=a[6]=a[7]=a[8]=a[9]=a[10]=a[11]=a[12]=a[13]=a[14]=a[15]=0),e)for(i=this.start;o<s&&i<64;++o)a[i>>>2]|=t[o]<<ve[3&i++];else for(i=this.start;o<s&&i<64;++o)(n=t.charCodeAt(o))<128?a[i>>>2]|=n<<ve[3&i++]:n<2048?(a[i>>>2]|=(192|n>>>6)<<ve[3&i++],a[i>>>2]|=(128|63&n)<<ve[3&i++]):n<55296||n>=57344?(a[i>>>2]|=(224|n>>>12)<<ve[3&i++],a[i>>>2]|=(128|n>>>6&63)<<ve[3&i++],a[i>>>2]|=(128|63&n)<<ve[3&i++]):(n=65536+((1023&n)<<10|1023&t.charCodeAt(++o)),a[i>>>2]|=(240|n>>>18)<<ve[3&i++],a[i>>>2]|=(128|n>>>12&63)<<ve[3&i++],a[i>>>2]|=(128|n>>>6&63)<<ve[3&i++],a[i>>>2]|=(128|63&n)<<ve[3&i++]);this.lastByteIndex=i,this.bytes+=i-this.start,i>=64?(this.block=a[16],this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296|0,this.bytes=this.bytes%4294967296),this}},Oe.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[16]=this.block,t[e>>>2]|=Ae[3&e],this.block=t[16],e>=56&&(this.hashed||this.hash(),t[0]=this.block,t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.hBytes<<3|this.bytes>>>29,t[15]=this.bytes<<3,this.hash()}},Oe.prototype.hash=function(){var t,e,r,n,i,o,s,a,h,u=this.h0,f=this.h1,c=this.h2,l=this.h3,p=this.h4,d=this.h5,g=this.h6,y=this.h7,w=this.blocks;for(t=16;t<64;++t)e=((i=w[t-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,r=((i=w[t-2])>>>17|i<<15)^(i>>>19|i<<13)^i>>>10,w[t]=w[t-16]+e+w[t-7]+r|0;for(h=f&c,t=0;t<64;t+=4)this.first?(this.is224?(o=300032,y=(i=w[0]-1413257819)-150054599|0,l=i+24177077|0):(o=704751109,y=(i=w[0]-210244248)-1521486534|0,l=i+143694565|0),this.first=!1):(e=(u>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),n=(o=u&f)^u&c^h,y=l+(i=y+(r=(p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+(p&d^~p&g)+Se[t]+w[t])|0,l=i+(e+n)|0),e=(l>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),n=(s=l&u)^l&f^o,g=c+(i=g+(r=(y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7))+(y&p^~y&d)+Se[t+1]+w[t+1])|0,e=((c=i+(e+n)|0)>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),n=(a=c&l)^c&u^s,d=f+(i=d+(r=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&y^~g&p)+Se[t+2]+w[t+2])|0,e=((f=i+(e+n)|0)>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10),n=(h=f&c)^f&l^a,p=u+(i=p+(r=(d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&g^~d&y)+Se[t+3]+w[t+3])|0,u=i+(e+n)|0,this.chromeBugWorkAround=!0;this.h0=this.h0+u|0,this.h1=this.h1+f|0,this.h2=this.h2+c|0,this.h3=this.h3+l|0,this.h4=this.h4+p|0,this.h5=this.h5+d|0,this.h6=this.h6+g|0,this.h7=this.h7+y|0},Oe.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,r=this.h2,n=this.h3,i=this.h4,o=this.h5,s=this.h6,a=this.h7,h=be[t>>>28&15]+be[t>>>24&15]+be[t>>>20&15]+be[t>>>16&15]+be[t>>>12&15]+be[t>>>8&15]+be[t>>>4&15]+be[15&t]+be[e>>>28&15]+be[e>>>24&15]+be[e>>>20&15]+be[e>>>16&15]+be[e>>>12&15]+be[e>>>8&15]+be[e>>>4&15]+be[15&e]+be[r>>>28&15]+be[r>>>24&15]+be[r>>>20&15]+be[r>>>16&15]+be[r>>>12&15]+be[r>>>8&15]+be[r>>>4&15]+be[15&r]+be[n>>>28&15]+be[n>>>24&15]+be[n>>>20&15]+be[n>>>16&15]+be[n>>>12&15]+be[n>>>8&15]+be[n>>>4&15]+be[15&n]+be[i>>>28&15]+be[i>>>24&15]+be[i>>>20&15]+be[i>>>16&15]+be[i>>>12&15]+be[i>>>8&15]+be[i>>>4&15]+be[15&i]+be[o>>>28&15]+be[o>>>24&15]+be[o>>>20&15]+be[o>>>16&15]+be[o>>>12&15]+be[o>>>8&15]+be[o>>>4&15]+be[15&o]+be[s>>>28&15]+be[s>>>24&15]+be[s>>>20&15]+be[s>>>16&15]+be[s>>>12&15]+be[s>>>8&15]+be[s>>>4&15]+be[15&s];return this.is224||(h+=be[a>>>28&15]+be[a>>>24&15]+be[a>>>20&15]+be[a>>>16&15]+be[a>>>12&15]+be[a>>>8&15]+be[a>>>4&15]+be[15&a]),h},Oe.prototype.toString=Oe.prototype.hex,Oe.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,r=this.h2,n=this.h3,i=this.h4,o=this.h5,s=this.h6,a=this.h7,h=[t>>>24&255,t>>>16&255,t>>>8&255,255&t,e>>>24&255,e>>>16&255,e>>>8&255,255&e,r>>>24&255,r>>>16&255,r>>>8&255,255&r,n>>>24&255,n>>>16&255,n>>>8&255,255&n,i>>>24&255,i>>>16&255,i>>>8&255,255&i,o>>>24&255,o>>>16&255,o>>>8&255,255&o,s>>>24&255,s>>>16&255,s>>>8&255,255&s];return this.is224||h.push(a>>>24&255,a>>>16&255,a>>>8&255,255&a),h},Oe.prototype.array=Oe.prototype.digest,Oe.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(this.is224?28:32),e=new DataView(t);return e.setUint32(0,this.h0),e.setUint32(4,this.h1),e.setUint32(8,this.h2),e.setUint32(12,this.h3),e.setUint32(16,this.h4),e.setUint32(20,this.h5),e.setUint32(24,this.h6),this.is224||e.setUint32(28,this.h7),t},Ie.prototype=new Oe,Ie.prototype.finalize=function(){if(Oe.prototype.finalize.call(this),this.inner){this.inner=!1;var t=this.array();Oe.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(t),Oe.prototype.finalize.call(this)}};const _e=Fe(),Re=Fe(!0),xe=Be(),Ne=Be(!0); /* * [js-sha512]{@link https://github.com/emn178/js-sha512} * * @version 0.9.0 * @author Chen, Yi-Cyuan [emn178@gmail.com] * @copyright Chen, Yi-Cyuan 2014-2024 * @license MIT */ var Ue="input is invalid type",Pe="object"==typeof window,ke=Pe?window:{};ke.JS_SHA512_NO_WINDOW&&(Pe=!1);var ze=!Pe&&"object"==typeof self;!ke.JS_SHA512_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?ke=global:ze&&(ke=self);var je=!ke.JS_SHA512_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,Le="0123456789abcdef".split(""),$e=[-2147483648,8388608,32768,128],He=[24,16,8,0],qe=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452