UNPKG

@ivu-plus/i-utils

Version:

前端模块化 JavaScript 工具库

54 lines 170 kB
"use strict";const t={DESC:0,ASC:1,RANDOM:2},e={ROUND:0,ROUND_FLOOR:1},r={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]*})$/},n={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:"'"},i={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 s(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 a(t){return Number.isInteger(t)}function h(t){return"String"===Object.prototype.toString.call(t).slice(8,-1)}function u(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 f(t){return"Date"===Object.prototype.toString.call(t).slice(8,-1)}function l(t){return null==t||"undefined"===t||"null"===t||0===t||!1===t||p(t)}function p(t){return window.isNaN(t)||u(t)||null==t||""===t}function d(t){return null==t||""===t}function g(t){return d(t)||!(Object.keys(t)||t).length}function y(t){return g(t)||/^\s*$/.test(t)}function w(t){return void 0===t}function m(t,e=10){return d(t)?0:Number.parseInt(t,e)}function x(t){return t.reduce((function(t,e){return t+e}))}function b(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 A(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 v(t){let e=Object.create(null);for(let[r,n]of t)e[r]=n;return e}function S(t){let e=new Map;for(let r of Object.keys(t))e.set(r,t[r]);return e}function D(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 E(t=new Date){let e=t.getFullYear();return e%100!=0&&e%4==0||e%400==0}function M(t,e=new Date){return t.getTime()-e.getTime()<0}function F(t,e=new Date){return t.getTime()-e.getTime()>0}function C(t,e){return["getFullYear","getMonth","getDate"].every((r=>t[r]()===e[r]()))}function T(t=new Date,e="yyyy-MM-dd"){return k(t,e)}function B(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 O(t=new Date){return[7,1,2,3,4,5,6][t.getDay()]}function I(t=new Date){return t.getDate()}function _(t=new Date){return Math.ceil((t-new Date(t.getFullYear().toString()))/864e5)+1}function R(t=new Date){return new Date(t.getFullYear(),t.getMonth()+1,0).getDate()}function N(t=new Date){return E(t)?366:365}function U(t){let e=0,r=k(t).split("-"),n=Number(r[0]),o=Number(r[1]),i=Number(r[2]),s=new Date,a=s.getFullYear(),h=s.getMonth()+1,u=s.getDate(),c=a-n;if(c>0){let t=h-o;e=0===t?u-i<0?c-1:c:t<0?c-1:c}return e}function P(t=new Date,e=1){return t.setDate(t.getDate()+e),t}function k(t,e="yyyy-MM-dd",r="zh"){if(d(t))return"";if(h(t))t=z(t);else if(f(t));else if(a(t)&&13===String(t).length)t=new Date(t);else{if(!a(t)||10!==String(t).length)return console.error("Not supported date format!"),t;t=new Date(1e3*t)}let o={"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()},i=new RegExp(/(y+)/g);i.test(e)&&(e=e.replace(i,(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,o){return o.length>1?t.getHours()<12?n.AM_PM[r].AM:n.AM_PM[r].PM:o===o.toLowerCase()?t.getHours()<12?n.AM_PM.en.AM.toLowerCase():n.AM_PM.en.PM.toLowerCase():t.getHours()<12?n.AM_PM.en.AM:n.AM_PM.en.PM})));let u=new RegExp(/(E+)/g);u.test(e)&&(e=e.replace(u,(function(e,o){return 1===o.length?n.WEEK[r].MINI[t.getDay()]:2===o.length?n.WEEK[r].SHORT[t.getDay()]:n.WEEK[r].FULL[t.getDay()]})));let c=new RegExp(/(Q+)/g);c.test(e)&&(e=e.replace(c,(function(e,o){return 1===o.length?n.QUARTER[r].MINI[Math.floor((t.getMonth()+3)/3)-1]:2===o.length?n.QUARTER[r].SHORT[Math.floor((t.getMonth()+3)/3)-1]:n.QUARTER[r].FULL[Math.floor((t.getMonth()+3)/3)-1]})));for(let t in o){let r=new RegExp("("+t+")");r.test(e)&&(e=e.replace(r,(function(e,r){return 1===r.length?o[t]:2===r.length?("00"+o[t]).substring((""+o[t]).length):("000"+o[t]).substring((""+o[t]).length)})))}return e}function z(t){return d(t)?null:h(t)?new Date(t.replace(/-/g,"/")):a(t)&&13===String(t).length?new Date(t):a(t)&&10===String(t).length?new Date(1e3*t):(console.error("Not supported date format!"),t)}function j(t){return(t=t.toString())[1]?t:"0"+t}function L(t,e){return e?L(e,t%e):t}function $(t,e){return new RegExp(e).test(t)}function H(t,e=Date.now()){return new Promise(((r,n)=>{try{const n=t.type,o=t.size,i=n.split("/")[1];r(new File([t],`${Date.now()}.${i}`,{type:n,size:o,name:`${e}.${i}`,lastModified:Date.now(),lastModifiedDate:new Date}))}catch(t){console.error(t),n(t)}}))}function q(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 Y(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 W="not a UTF-8 string",V="object"==typeof window,J=V?window:{};J.HI_BASE64_NO_WINDOW&&(V=!1);var K=!V&&"object"==typeof self,Z=!J.HI_BASE64_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;Z?J=global:K&&(J=self);for(var Q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),X={},G=0;G<64;++G)X[Q[G]]=G;X["-"]=62,X._=63;var tt,et,rt=function(t){return t.split("=")[0].replace(/[\r\n]/g,"")},nt=function(t){for(var e,r,n,o,i=[],s=0,a=(t=rt(t)).length,h=0,u=a>>2<<2;h<u;)e=X[t.charAt(h++)],r=X[t.charAt(h++)],n=X[t.charAt(h++)],o=X[t.charAt(h++)],i[s++]=255&(e<<2|r>>>4),i[s++]=255&(r<<4|n>>>2),i[s++]=255&(n<<6|o);var c=a-u;return 2===c?(e=X[t.charAt(h++)],r=X[t.charAt(h++)],i[s++]=255&(e<<2|r>>>4)):3===c&&(e=X[t.charAt(h++)],r=X[t.charAt(h++)],n=X[t.charAt(h++)],i[s++]=255&(e<<2|r>>>4),i[s++]=255&(r<<4|n>>>2)),i},ot=function(t){for(var e,r,n,o=[],i=t.length,s=0,a=3*parseInt(i/3);s<a;)e=t[s++],r=t[s++],n=t[s++],o.push(Q[e>>>2],Q[63&(e<<4|r>>>4)],Q[63&(r<<2|n>>>6)],Q[63&n]);var h=i-a;return 1===h?(e=t[s],o.push(Q[e>>>2],Q[e<<4&63],"==")):2===h&&(e=t[s++],r=t[s],o.push(Q[e>>>2],Q[63&(e<<4|r>>>4)],Q[r<<2&63],"=")),o.join("")},it=J.btoa,st=J.atob;if(Z){var at=require("buffer").Buffer;it=function(t){return at.from(t,"ascii").toString("base64")},ot=tt=function(t){return at.from(t).toString("base64")},st=function(t){return at.from(t,"base64").toString("ascii")},et=function(t){return at.from(t,"base64").toString()}}else it?(tt=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 it(e.join(""))},et=function(t){var e=st(t.replace(/-/g,"+").replace(/_/g,"/"));if(!/[^\x00-\x7F]/.test(e))return e;for(var r,n,o=[],i=0,s=e.length,a=0;i<s;)if((r=e.charCodeAt(i++))<=127)o.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(W);n=7&r,a=3}for(var h=0;h<a;++h){if((r=e.charCodeAt(i++))<128||r>191)throw new Error(W);n<<=6,n+=63&r}if(n>=55296&&n<=57343)throw new Error(W);if(n>1114111)throw new Error(W);n<=65535?o.push(String.fromCharCode(n)):(n-=65536,o.push(String.fromCharCode(55296+(n>>10)),String.fromCharCode(56320+(1023&n))))}return o.join("")}):(it=function(t){for(var e,r,n,o=[],i=t.length,s=0,a=3*parseInt(i/3);s<a;)e=t.charCodeAt(s++),r=t.charCodeAt(s++),n=t.charCodeAt(s++),o.push(Q[e>>>2],Q[63&(e<<4|r>>>4)],Q[63&(r<<2|n>>>6)],Q[63&n]);var h=i-a;return 1===h?(e=t.charCodeAt(s),o.push(Q[e>>>2],Q[e<<4&63],"==")):2===h&&(e=t.charCodeAt(s++),r=t.charCodeAt(s),o.push(Q[e>>>2],Q[63&(e<<4|r>>>4)],Q[r<<2&63],"=")),o.join("")},tt=function(t){for(var e,r,n,o=[],i=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=i.length,a=0,h=3*parseInt(s/3);a<h;)e=i[a++],r=i[a++],n=i[a++],o.push(Q[e>>>2],Q[63&(e<<4|r>>>4)],Q[63&(r<<2|n>>>6)],Q[63&n]);var u=s-h;return 1===u?(e=i[a],o.push(Q[e>>>2],Q[e<<4&63],"==")):2===u&&(e=i[a++],r=i[a],o.push(Q[e>>>2],Q[63&(e<<4|r>>>4)],Q[r<<2&63],"=")),o.join("")},st=function(t){for(var e,r,n,o,i=[],s=t.length,a=0,h=s>>2<<2;a<h;)e=X[t.charAt(a++)],r=X[t.charAt(a++)],n=X[t.charAt(a++)],o=X[t.charAt(a++)],i.push(String.fromCharCode(255&(e<<2|r>>>4)),String.fromCharCode(255&(r<<4|n>>>2)),String.fromCharCode(255&(n<<6|o)));var u=s-h;return 2===u?(e=X[t.charAt(a++)],r=X[t.charAt(a++)],i.push(String.fromCharCode(255&(e<<2|r>>>4)))):3===u&&(e=X[t.charAt(a++)],r=X[t.charAt(a++)],n=X[t.charAt(a++)],i.push(String.fromCharCode(255&(e<<2|r>>>4)),String.fromCharCode(255&(r<<4|n>>>2)))),i.join("")},et=function(t){for(var e,r,n=[],o=nt(t),i=o.length,s=0,a=0;s<i;)if((e=o[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(W);r=7&e,a=3}for(var h=0;h<a;++h){if((e=o[s++])<128||e>191)throw new Error(W);r<<=6,r+=63&e}if(r>=55296&&r<=57343)throw new Error(W);if(r>1114111)throw new Error(W);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 ht=function(t,e){var r="string"!=typeof t;return r&&t.constructor===J.ArrayBuffer&&(t=new Uint8Array(t)),r?ot(t):/[^\x00-\x7F]/.test(t)?tt(t):it(t)};const ut=tt,ct=et;var ft=Object.freeze({__proto__:null,decode:function(t){return e=rt(e=t),r?st(e):et(e);var e,r},decodeAsBytes:function(t){return nt(t)},encode:function(t){return ht(t)},encodeAsBytes:function(t){return ht(t)},utf8Decode:function(t){return ct(t)},utf8Encode:function(t){return ut(t)}}),lt="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 */!lt.HI_BASE32_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node&&(lt=global);var pt="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".split(""),dt={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},gt=[0,0,0,0,0,0,0,0],yt=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},wt=function(t){if(""===t)return[];if(!/^[A-Z2-7=]+$/.test(t))throw new Error("Invalid base32 characters");for(var e,r,n,o,i,s,a,h,u=[],c=0,f=(t=t.replace(/=/g,"")).length,l=0,p=f>>3<<3;l<p;)e=dt[t.charAt(l++)],r=dt[t.charAt(l++)],n=dt[t.charAt(l++)],o=dt[t.charAt(l++)],i=dt[t.charAt(l++)],s=dt[t.charAt(l++)],a=dt[t.charAt(l++)],h=dt[t.charAt(l++)],u[c++]=255&(e<<3|r>>>2),u[c++]=255&(r<<6|n<<1|o>>>4),u[c++]=255&(o<<4|i>>>1),u[c++]=255&(i<<7|s<<2|a>>>3),u[c++]=255&(a<<5|h);var d=f-p;return 2===d?(e=dt[t.charAt(l++)],r=dt[t.charAt(l++)],u[c++]=255&(e<<3|r>>>2)):4===d?(e=dt[t.charAt(l++)],r=dt[t.charAt(l++)],n=dt[t.charAt(l++)],o=dt[t.charAt(l++)],u[c++]=255&(e<<3|r>>>2),u[c++]=255&(r<<6|n<<1|o>>>4)):5===d?(e=dt[t.charAt(l++)],r=dt[t.charAt(l++)],n=dt[t.charAt(l++)],o=dt[t.charAt(l++)],i=dt[t.charAt(l++)],u[c++]=255&(e<<3|r>>>2),u[c++]=255&(r<<6|n<<1|o>>>4),u[c++]=255&(o<<4|i>>>1)):7===d&&(e=dt[t.charAt(l++)],r=dt[t.charAt(l++)],n=dt[t.charAt(l++)],o=dt[t.charAt(l++)],i=dt[t.charAt(l++)],s=dt[t.charAt(l++)],a=dt[t.charAt(l++)],u[c++]=255&(e<<3|r>>>2),u[c++]=255&(r<<6|n<<1|o>>>4),u[c++]=255&(o<<4|i>>>1),u[c++]=255&(i<<7|s<<2|a>>>3)),u},mt=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,o,i,s="",a=t.length,h=0,u=5*parseInt(a/5);h<u;)e=t[h++],r=t[h++],n=t[h++],o=t[h++],i=t[h++],s+=pt[e>>>3]+pt[31&(e<<2|r>>>6)]+pt[r>>>1&31]+pt[31&(r<<4|n>>>4)]+pt[31&(n<<1|o>>>7)]+pt[o>>>2&31]+pt[31&(o<<3|i>>>5)]+pt[31&i];var c=a-u;return 1===c?(e=t[h],s+=pt[e>>>3]+pt[e<<2&31]+"======"):2===c?(e=t[h++],r=t[h],s+=pt[e>>>3]+pt[31&(e<<2|r>>>6)]+pt[r>>>1&31]+pt[r<<4&31]+"===="):3===c?(e=t[h++],r=t[h++],n=t[h],s+=pt[e>>>3]+pt[31&(e<<2|r>>>6)]+pt[r>>>1&31]+pt[31&(r<<4|n>>>4)]+pt[n<<1&31]+"==="):4===c&&(e=t[h++],r=t[h++],n=t[h++],o=t[h],s+=pt[e>>>3]+pt[31&(e<<2|r>>>6)]+pt[r>>>1&31]+pt[31&(r<<4|n>>>4)]+pt[31&(n<<1|o>>>7)]+pt[o>>>2&31]+pt[o<<3&31]+"="),s}(t):function(t){var e,r,n,o,i,s,a,h=!1,u="",c=0,f=0,l=t.length;if(""===t)return u;do{for(gt[0]=gt[5],gt[1]=gt[6],gt[2]=gt[7],a=f;c<l&&a<5;++c)(s=t.charCodeAt(c))<128?gt[a++]=s:s<2048?(gt[a++]=192|s>>6,gt[a++]=128|63&s):s<55296||s>=57344?(gt[a++]=224|s>>12,gt[a++]=128|s>>6&63,gt[a++]=128|63&s):(s=65536+((1023&s)<<10|1023&t.charCodeAt(++c)),gt[a++]=240|s>>18,gt[a++]=128|s>>12&63,gt[a++]=128|s>>6&63,gt[a++]=128|63&s);f=a-5,c===l&&++c,c>l&&a<6&&(h=!0),e=gt[0],a>4?(r=gt[1],n=gt[2],o=gt[3],i=gt[4],u+=pt[e>>>3]+pt[31&(e<<2|r>>>6)]+pt[r>>>1&31]+pt[31&(r<<4|n>>>4)]+pt[31&(n<<1|o>>>7)]+pt[o>>>2&31]+pt[31&(o<<3|i>>>5)]+pt[31&i]):1===a?u+=pt[e>>>3]+pt[e<<2&31]+"======":2===a?(r=gt[1],u+=pt[e>>>3]+pt[31&(e<<2|r>>>6)]+pt[r>>>1&31]+pt[r<<4&31]+"===="):3===a?(r=gt[1],n=gt[2],u+=pt[e>>>3]+pt[31&(e<<2|r>>>6)]+pt[r>>>1&31]+pt[31&(r<<4|n>>>4)]+pt[n<<1&31]+"==="):(r=gt[1],n=gt[2],o=gt[3],u+=pt[e>>>3]+pt[31&(e<<2|r>>>6)]+pt[r>>>1&31]+pt[31&(r<<4|n>>>4)]+pt[31&(n<<1|o>>>7)]+pt[o>>>2&31]+pt[o<<3&31]+"=")}while(!h);return u}(t)},xt=function(t,e){return function(t){for(var e,r,n="",o=t.length,i=0,s=0;i<o;)if((e=t[i++])<=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):yt(i,n);for(var a=0;a<s;++a)((e=t[i++])<128||e>191)&&yt(i,n),r<<=6,r+=63&e;r>=55296&&r<=57343&&yt(i,n),r>1114111&&yt(i,n),r<=65535?n+=String.fromCharCode(r):(r-=65536,n+=String.fromCharCode(55296+(r>>10)),n+=String.fromCharCode(56320+(1023&r)))}return n}(wt(t))};var bt=Object.freeze({__proto__:null,decode:function(t){return xt(t)},decodeAsBytes:function(t){return wt(t)},encode:function(t){return mt(t)},encodeAsBytes:function(t){return mt(t)}}),At="input is invalid type",vt="object"==typeof window,St=vt?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 */St.JS_MD5_NO_WINDOW&&(vt=!1);var Dt=!vt&&"object"==typeof self,Et=!St.JS_MD5_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;Et?St=global:Dt&&(St=self);var Mt,Ft=!St.JS_MD5_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,Ct="0123456789abcdef".split(""),Tt=[128,32768,8388608,-2147483648],Bt=[0,8,16,24],Ot=["hex","array","digest","buffer","arrayBuffer","base64"],It="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),_t=[];if(Ft){var Rt=new ArrayBuffer(68);Mt=new Uint8Array(Rt),_t=new Uint32Array(Rt)}var Nt=Array.isArray;!St.JS_MD5_NO_NODE_JS&&Nt||(Nt=function(t){return"[object Array]"===Object.prototype.toString.call(t)});var Ut=ArrayBuffer.isView;!Ft||!St.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&Ut||(Ut=function(t){return"object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});var Pt=function(t){var e=typeof t;if("string"===e)return[t,!0];if("object"!==e||null===t)throw new Error(At);if(Ft&&t.constructor===ArrayBuffer)return[new Uint8Array(t),!1];if(!Nt(t)&&!Ut(t))throw new Error(At);return[t,!1]},kt=function(t){return function(e){return new Lt(!0).update(e)[t]()}},zt=function(t){var e,r=require("crypto"),n=require("buffer").Buffer;e=n.from&&!St.JS_MD5_NO_BUFFER_FROM?n.from:function(t){return new n(t)};return function(o){if("string"==typeof o)return r.createHash("md5").update(o,"utf8").digest("hex");if(null==o)throw new Error(At);return o.constructor===ArrayBuffer&&(o=new Uint8Array(o)),Nt(o)||Ut(o)||o.constructor===n?r.createHash("md5").update(e(o)).digest("hex"):t(o)}},jt=function(t){return function(e,r){return new $t(e,!0).update(r)[t]()}};function Lt(t){if(t)_t[0]=_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,this.blocks=_t,this.buffer8=Mt;else if(Ft){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 $t(t,e){var r,n=Pt(t);if(t=n[0],n[1]){var o,i=[],s=t.length,a=0;for(r=0;r<s;++r)(o=t.charCodeAt(r))<128?i[a++]=o:o<2048?(i[a++]=192|o>>>6,i[a++]=128|63&o):o<55296||o>=57344?(i[a++]=224|o>>>12,i[a++]=128|o>>>6&63,i[a++]=128|63&o):(o=65536+((1023&o)<<10|1023&t.charCodeAt(++r)),i[a++]=240|o>>>18,i[a++]=128|o>>>12&63,i[a++]=128|o>>>6&63,i[a++]=128|63&o);t=i}t.length>64&&(t=new Lt(!0).update(t).array());var h=[],u=[];for(r=0;r<64;++r){var c=t[r]||0;h[r]=92^c,u[r]=54^c}Lt.call(this,e),this.update(u),this.oKeyPad=h,this.inner=!0,this.sharedMemory=e}Lt.prototype.update=function(t){if(this.finalized)throw new Error("finalize already called");var e=Pt(t);t=e[0];for(var r,n,o=e[1],i=0,s=t.length,a=this.blocks,h=this.buffer8;i<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),o)if(Ft)for(n=this.start;i<s&&n<64;++i)(r=t.charCodeAt(i))<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(++i)),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;i<s&&n<64;++i)(r=t.charCodeAt(i))<128?a[n>>>2]|=r<<Bt[3&n++]:r<2048?(a[n>>>2]|=(192|r>>>6)<<Bt[3&n++],a[n>>>2]|=(128|63&r)<<Bt[3&n++]):r<55296||r>=57344?(a[n>>>2]|=(224|r>>>12)<<Bt[3&n++],a[n>>>2]|=(128|r>>>6&63)<<Bt[3&n++],a[n>>>2]|=(128|63&r)<<Bt[3&n++]):(r=65536+((1023&r)<<10|1023&t.charCodeAt(++i)),a[n>>>2]|=(240|r>>>18)<<Bt[3&n++],a[n>>>2]|=(128|r>>>12&63)<<Bt[3&n++],a[n>>>2]|=(128|r>>>6&63)<<Bt[3&n++],a[n>>>2]|=(128|63&r)<<Bt[3&n++]);else if(Ft)for(n=this.start;i<s&&n<64;++i)h[n++]=t[i];else for(n=this.start;i<s&&n<64;++i)a[n>>>2]|=t[i]<<Bt[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},Lt.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[e>>>2]|=Tt[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()}},Lt.prototype.hash=function(){var t,e,r,n,o,i,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+=((i=(n=((n+=((o=e^r)^(t=((t+=(o^n)+s[5]-378558)<<4|t>>>28)+e|0))+s[8]-2022574463)<<11|n>>>21)+t|0)^t)^(r=((r+=(i^e)+s[11]+1839030562)<<16|r>>>16)+n|0))+s[14]-35309556)<<23|e>>>9)+r|0,e=((e+=((i=(n=((n+=((o=e^r)^(t=((t+=(o^n)+s[1]-1530992060)<<4|t>>>28)+e|0))+s[4]+1272893353)<<11|n>>>21)+t|0)^t)^(r=((r+=(i^e)+s[7]-155497632)<<16|r>>>16)+n|0))+s[10]-1094730640)<<23|e>>>9)+r|0,e=((e+=((i=(n=((n+=((o=e^r)^(t=((t+=(o^n)+s[13]+681279174)<<4|t>>>28)+e|0))+s[0]-358537222)<<11|n>>>21)+t|0)^t)^(r=((r+=(i^e)+s[3]-722521979)<<16|r>>>16)+n|0))+s[6]+76029189)<<23|e>>>9)+r|0,e=((e+=((i=(n=((n+=((o=e^r)^(t=((t+=(o^n)+s[9]-640364487)<<4|t>>>28)+e|0))+s[12]-421815835)<<11|n>>>21)+t|0)^t)^(r=((r+=(i^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)},Lt.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,r=this.h2,n=this.h3;return Ct[t>>>4&15]+Ct[15&t]+Ct[t>>>12&15]+Ct[t>>>8&15]+Ct[t>>>20&15]+Ct[t>>>16&15]+Ct[t>>>28&15]+Ct[t>>>24&15]+Ct[e>>>4&15]+Ct[15&e]+Ct[e>>>12&15]+Ct[e>>>8&15]+Ct[e>>>20&15]+Ct[e>>>16&15]+Ct[e>>>28&15]+Ct[e>>>24&15]+Ct[r>>>4&15]+Ct[15&r]+Ct[r>>>12&15]+Ct[r>>>8&15]+Ct[r>>>20&15]+Ct[r>>>16&15]+Ct[r>>>28&15]+Ct[r>>>24&15]+Ct[n>>>4&15]+Ct[15&n]+Ct[n>>>12&15]+Ct[n>>>8&15]+Ct[n>>>20&15]+Ct[n>>>16&15]+Ct[n>>>28&15]+Ct[n>>>24&15]},Lt.prototype.toString=Lt.prototype.hex,Lt.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]},Lt.prototype.array=Lt.prototype.digest,Lt.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},Lt.prototype.buffer=Lt.prototype.arrayBuffer,Lt.prototype.base64=function(){for(var t,e,r,n="",o=this.array(),i=0;i<15;)t=o[i++],e=o[i++],r=o[i++],n+=It[t>>>2]+It[63&(t<<4|e>>>4)]+It[63&(e<<2|r>>>6)]+It[63&r];return t=o[i],n+=It[t>>>2]+It[t<<4&63]+"=="},$t.prototype=new Lt,$t.prototype.finalize=function(){if(Lt.prototype.finalize.call(this),this.inner){this.inner=!1;var t=this.array();Lt.call(this,this.sharedMemory),this.update(this.oKeyPad),this.update(t),Lt.prototype.finalize.call(this)}};const Ht=function(){var t=kt("hex");Et&&(t=zt(t)),t.create=function(){return new Lt},t.update=function(e){return t.create().update(e)};for(var e=0;e<Ot.length;++e){var r=Ot[e];t[r]=kt(r)}return t}(),qt=function(){var t=jt("hex");t.create=function(t){return new $t(t)},t.update=function(e,r){return t.create(e).update(r)};for(var e=0;e<Ot.length;++e){var r=Ot[e];t[r]=jt(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 Yt="input is invalid type",Wt="object"==typeof window,Vt=Wt?window:{};Vt.JS_SHA1_NO_WINDOW&&(Wt=!1);var Jt=!Wt&&"object"==typeof self,Kt=!Vt.JS_SHA1_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;Kt?Vt=global:Jt&&(Vt=self);var Zt=!Vt.JS_SHA1_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,Qt="0123456789abcdef".split(""),Xt=[-2147483648,8388608,32768,128],Gt=[24,16,8,0],te=["hex","array","digest","arrayBuffer"],ee=[],re=Array.isArray;!Vt.JS_SHA1_NO_NODE_JS&&re||(re=function(t){return"[object Array]"===Object.prototype.toString.call(t)});var ne=ArrayBuffer.isView;!Zt||!Vt.JS_SHA1_NO_ARRAY_BUFFER_IS_VIEW&&ne||(ne=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(Yt);if(Zt&&t.constructor===ArrayBuffer)return[new Uint8Array(t),!1];if(!re(t)&&!ne(t))throw new Error(Yt);return[t,!1]},ie=function(t){return function(e){return new he(!0).update(e)[t]()}},se=function(t){var e,r=require("crypto"),n=require("buffer").Buffer;e=n.from&&!Vt.JS_SHA1_NO_BUFFER_FROM?n.from:function(t){return new n(t)};return function(o){if("string"==typeof o)return r.createHash("sha1").update(o,"utf8").digest("hex");if(null==o)throw new Error(Yt);return o.constructor===ArrayBuffer&&(o=new Uint8Array(o)),re(o)||ne(o)||o.constructor===n?r.createHash("sha1").update(e(o)).digest("hex"):t(o)}},ae=function(t){return function(e,r){return new ue(e,!0).update(r)[t]()}};function he(t){t?(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],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 ue(t,e){var r,n=oe(t);if(t=n[0],n[1]){var o,i=[],s=t.length,a=0;for(r=0;r<s;++r)(o=t.charCodeAt(r))<128?i[a++]=o:o<2048?(i[a++]=192|o>>>6,i[a++]=128|63&o):o<55296||o>=57344?(i[a++]=224|o>>>12,i[a++]=128|o>>>6&63,i[a++]=128|63&o):(o=65536+((1023&o)<<10|1023&t.charCodeAt(++r)),i[a++]=240|o>>>18,i[a++]=128|o>>>12&63,i[a++]=128|o>>>6&63,i[a++]=128|63&o);t=i}t.length>64&&(t=new he(!0).update(t).array());var h=[],u=[];for(r=0;r<64;++r){var c=t[r]||0;h[r]=92^c,u[r]=54^c}he.call(this,e),this.update(u),this.oKeyPad=h,this.inner=!0,this.sharedMemory=e}he.prototype.update=function(t){if(this.finalized)throw new Error("finalize already called");var e=oe(t);t=e[0];for(var r,n,o=e[1],i=0,s=t.length||0,a=this.blocks;i<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),o)for(n=this.start;i<s&&n<64;++i)(r=t.charCodeAt(i))<128?a[n>>>2]|=r<<Gt[3&n++]:r<2048?(a[n>>>2]|=(192|r>>>6)<<Gt[3&n++],a[n>>>2]|=(128|63&r)<<Gt[3&n++]):r<55296||r>=57344?(a[n>>>2]|=(224|r>>>12)<<Gt[3&n++],a[n>>>2]|=(128|r>>>6&63)<<Gt[3&n++],a[n>>>2]|=(128|63&r)<<Gt[3&n++]):(r=65536+((1023&r)<<10|1023&t.charCodeAt(++i)),a[n>>>2]|=(240|r>>>18)<<Gt[3&n++],a[n>>>2]|=(128|r>>>12&63)<<Gt[3&n++],a[n>>>2]|=(128|r>>>6&63)<<Gt[3&n++],a[n>>>2]|=(128|63&r)<<Gt[3&n++]);else for(n=this.start;i<s&&n<64;++i)a[n>>>2]|=t[i]<<Gt[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},he.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[16]=this.block,t[e>>>2]|=Xt[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()}},he.prototype.hash=function(){var t,e,r=this.h0,n=this.h1,o=this.h2,i=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=(o=(e=(i=(e=(s=(e=r<<5|r>>>27)+(n&o|~n&i)+s+1518500249+a[t]|0)<<5|s>>>27)+(r&(n=n<<30|n>>>2)|~r&o)+i+1518500249+a[t+1]|0)<<5|i>>>27)+(s&(r=r<<30|r>>>2)|~s&n)+o+1518500249+a[t+2]|0)<<5|o>>>27)+(i&(s=s<<30|s>>>2)|~i&r)+n+1518500249+a[t+3]|0)<<5|n>>>27)+(o&(i=i<<30|i>>>2)|~o&s)+r+1518500249+a[t+4]|0,o=o<<30|o>>>2;for(;t<40;t+=5)r=(e=(n=(e=(o=(e=(i=(e=(s=(e=r<<5|r>>>27)+(n^o^i)+s+1859775393+a[t]|0)<<5|s>>>27)+(r^(n=n<<30|n>>>2)^o)+i+1859775393+a[t+1]|0)<<5|i>>>27)+(s^(r=r<<30|r>>>2)^n)+o+1859775393+a[t+2]|0)<<5|o>>>27)+(i^(s=s<<30|s>>>2)^r)+n+1859775393+a[t+3]|0)<<5|n>>>27)+(o^(i=i<<30|i>>>2)^s)+r+1859775393+a[t+4]|0,o=o<<30|o>>>2;for(;t<60;t+=5)r=(e=(n=(e=(o=(e=(i=(e=(s=(e=r<<5|r>>>27)+(n&o|n&i|o&i)+s-1894007588+a[t]|0)<<5|s>>>27)+(r&(n=n<<30|n>>>2)|r&o|n&o)+i-1894007588+a[t+1]|0)<<5|i>>>27)+(s&(r=r<<30|r>>>2)|s&n|r&n)+o-1894007588+a[t+2]|0)<<5|o>>>27)+(i&(s=s<<30|s>>>2)|i&r|s&r)+n-1894007588+a[t+3]|0)<<5|n>>>27)+(o&(i=i<<30|i>>>2)|o&s|i&s)+r-1894007588+a[t+4]|0,o=o<<30|o>>>2;for(;t<80;t+=5)r=(e=(n=(e=(o=(e=(i=(e=(s=(e=r<<5|r>>>27)+(n^o^i)+s-899497514+a[t]|0)<<5|s>>>27)+(r^(n=n<<30|n>>>2)^o)+i-899497514+a[t+1]|0)<<5|i>>>27)+(s^(r=r<<30|r>>>2)^n)+o-899497514+a[t+2]|0)<<5|o>>>27)+(i^(s=s<<30|s>>>2)^r)+n-899497514+a[t+3]|0)<<5|n>>>27)+(o^(i=i<<30|i>>>2)^s)+r-899497514+a[t+4]|0,o=o<<30|o>>>2;this.h0=this.h0+r|0,this.h1=this.h1+n|0,this.h2=this.h2+o|0,this.h3=this.h3+i|0,this.h4=this.h4+s|0},he.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,r=this.h2,n=this.h3,o=this.h4;return Qt[t>>>28&15]+Qt[t>>>24&15]+Qt[t>>>20&15]+Qt[t>>>16&15]+Qt[t>>>12&15]+Qt[t>>>8&15]+Qt[t>>>4&15]+Qt[15&t]+Qt[e>>>28&15]+Qt[e>>>24&15]+Qt[e>>>20&15]+Qt[e>>>16&15]+Qt[e>>>12&15]+Qt[e>>>8&15]+Qt[e>>>4&15]+Qt[15&e]+Qt[r>>>28&15]+Qt[r>>>24&15]+Qt[r>>>20&15]+Qt[r>>>16&15]+Qt[r>>>12&15]+Qt[r>>>8&15]+Qt[r>>>4&15]+Qt[15&r]+Qt[n>>>28&15]+Qt[n>>>24&15]+Qt[n>>>20&15]+Qt[n>>>16&15]+Qt[n>>>12&15]+Qt[n>>>8&15]+Qt[n>>>4&15]+Qt[15&n]+Qt[o>>>28&15]+Qt[o>>>24&15]+Qt[o>>>20&15]+Qt[o>>>16&15]+Qt[o>>>12&15]+Qt[o>>>8&15]+Qt[o>>>4&15]+Qt[15&o]},he.prototype.toString=he.prototype.hex,he.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,r=this.h2,n=this.h3,o=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,o>>>24&255,o>>>16&255,o>>>8&255,255&o]},he.prototype.array=he.prototype.digest,he.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},ue.prototype=new he,ue.prototype.finalize=function(){if(he.prototype.finalize.call(this),this.inner){this.inner=!1;var t=this.array();he.call(this,this.sharedMemory),this.update(this.oKeyPad),this.update(t),he.prototype.finalize.call(this)}};const ce=function(){var t=ie("hex");Kt&&(t=se(t)),t.create=function(){return new he},t.update=function(e){return t.create().update(e)};for(var e=0;e<te.length;++e){var r=te[e];t[r]=ie(r)}return t}(),fe=function(){var t=ae("hex");t.create=function(t){return new ue(t)},t.update=function(e,r){return t.create(e).update(r)};for(var e=0;e<te.length;++e){var r=te[e];t[r]=ae(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 le="input is invalid type",pe="object"==typeof window,de=pe?window:{};de.JS_SHA256_NO_WINDOW&&(pe=!1);var ge=!pe&&"object"==typeof self,ye=!de.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;ye?de=global:ge&&(de=self);var we=!de.JS_SHA256_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,me="0123456789abcdef".split(""),xe=[-2147483648,8388608,32768,128],be=[24,16,8,0],Ae=[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],ve=["hex","array","digest","arrayBuffer"],Se=[];!de.JS_SHA256_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),!we||!de.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return"object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});var De=function(t,e){return function(r){return new Te(e,!0).update(r)[t]()}},Ee=function(t){var e=De("hex",t);ye&&(e=Me(e,t)),e.create=function(){return new Te(t)},e.update=function(t){return e.create().update(t)};for(var r=0;r<ve.length;++r){var n=ve[r];e[n]=De(n,t)}return e},Me=function(t,e){var r,n=require("crypto"),o=require("buffer").Buffer,i=e?"sha224":"sha256";r=o.from&&!de.JS_SHA256_NO_BUFFER_FROM?o.from:function(t){return new o(t)};return function(e){if("string"==typeof e)return n.createHash(i).update(e,"utf8").digest("hex");if(null==e)throw new Error(le);return e.constructor===ArrayBuffer&&(e=new Uint8Array(e)),Array.isArray(e)||ArrayBuffer.isView(e)||e.constructor===o?n.createHash(i).update(r(e)).digest("hex"):t(e)}},Fe=function(t,e){return function(r,n){return new Be(r,e,!0).update(n)[t]()}},Ce=function(t){var e=Fe("hex",t);e.create=function(e){return new Be(e,t)},e.update=function(t,r){return e.create(t).update(r)};for(var r=0;r<ve.length;++r){var n=ve[r];e[n]=Fe(n,t)}return e};function Te(t,e){e?(Se[0]=Se[16]=Se[1]=Se[2]=Se[3]=Se[4]=Se[5]=Se[6]=Se[7]=Se[8]=Se[9]=Se[10]=Se[11]=Se[12]=Se[13]=Se[14]=Se[15]=0,this.blocks=Se):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 Be(t,e,r){var n,o=typeof t;if("string"===o){var i,s=[],a=t.length,h=0;for(n=0;n<a;++n)(i=t.charCodeAt(n))<128?s[h++]=i:i<2048?(s[h++]=192|i>>>6,s[h++]=128|63&i):i<55296||i>=57344?(s[h++]=224|i>>>12,s[h++]=128|i>>>6&63,s[h++]=128|63&i):(i=65536+((1023&i)<<10|1023&t.charCodeAt(++n)),s[h++]=240|i>>>18,s[h++]=128|i>>>12&63,s[h++]=128|i>>>6&63,s[h++]=128|63&i);t=s}else{if("object"!==o)throw new Error(le);if(null===t)throw new Error(le);if(we&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||we&&ArrayBuffer.isView(t)))throw new Error(le)}t.length>64&&(t=new Te(e,!0).update(t).array());var u=[],c=[];for(n=0;n<64;++n){var f=t[n]||0;u[n]=92^f,c[n]=54^f}Te.call(this,e,r),this.update(c),this.oKeyPad=u,this.inner=!0,this.sharedMemory=r}Te.prototype.update=function(t){if(!this.finalized){var e,r=typeof t;if("string"!==r){if("object"!==r)throw new Error(le);if(null===t)throw new Error(le);if(we&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||we&&ArrayBuffer.isView(t)))throw new Error(le);e=!0}for(var n,o,i=0,s=t.length,a=this.blocks;i<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(o=this.start;i<s&&o<64;++i)a[o>>>2]|=t[i]<<be[3&o++];else for(o=this.start;i<s&&o<64;++i)(n=t.charCodeAt(i))<128?a[o>>>2]|=n<<be[3&o++]:n<2048?(a[o>>>2]|=(192|n>>>6)<<be[3&o++],a[o>>>2]|=(128|63&n)<<be[3&o++]):n<55296||n>=57344?(a[o>>>2]|=(224|n>>>12)<<be[3&o++],a[o>>>2]|=(128|n>>>6&63)<<be[3&o++],a[o>>>2]|=(128|63&n)<<be[3&o++]):(n=65536+((1023&n)<<10|1023&t.charCodeAt(++i)),a[o>>>2]|=(240|n>>>18)<<be[3&o++],a[o>>>2]|=(128|n>>>12&63)<<be[3&o++],a[o>>>2]|=(128|n>>>6&63)<<be[3&o++],a[o>>>2]|=(128|63&n)<<be[3&o++]);this.lastByteIndex=o,this.bytes+=o-this.start,o>=64?(this.block=a[16],this.start=o-64,this.hash(),this.hashed=!0):this.start=o}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296|0,this.bytes=this.bytes%4294967296),this}},Te.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[16]=this.block,t[e>>>2]|=xe[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()}},Te.prototype.hash=function(){var t,e,r,n,o,i,s,a,h,u=this.h0,c=this.h1,f=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=((o=w[t-15])>>>7|o<<25)^(o>>>18|o<<14)^o>>>3,r=((o=w[t-2])>>>17|o<<15)^(o>>>19|o<<13)^o>>>10,w[t]=w[t-16]+e+w[t-7]+r|0;for(h=c&f,t=0;t<64;t+=4)this.first?(this.is224?(i=300032,y=(o=w[0]-1413257819)-150054599|0,l=o+24177077|0):(i=704751109,y=(o=w[0]-210244248)-1521486534|0,l=o+143694565|0),this.first=!1):(e=(u>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),n=(i=u&c)^u&f^h,y=l+(o=y+(r=(p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+(p&d^~p&g)+Ae[t]+w[t])|0,l=o+(e+n)|0),e=(l>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),n=(s=l&u)^l&c^i,g=f+(o=g+(r=(y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7))+(y&p^~y&d)+Ae[t+1]+w[t+1])|0,e=((f=o+(e+n)|0)>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10),n=(a=f&l)^f&u^s,d=c+(o=d+(r=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&y^~g&p)+Ae[t+2]+w[t+2])|0,e=((c=o+(e+n)|0)>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),n=(h=c&f)^c&l^a,p=u+(o=p+(r=(d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&g^~d&y)+Ae[t+3]+w[t+3])|0,u=o+(e+n)|0,this.chromeBugWorkAround=!0;this.h0=this.h0+u|0,this.h1=this.h1+c|0,this.h2=this.h2+f|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},Te.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,r=this.h2,n=this.h3,o=this.h4,i=this.h5,s=this.h6,a=this.h7,h=me[t>>>28&15]+me[t>>>24&15]+me[t>>>20&15]+me[t>>>16&15]+me[t>>>12&15]+me[t>>>8&15]+me[t>>>4&15]+me[15&t]+me[e>>>28&15]+me[e>>>24&15]+me[e>>>20&15]+me[e>>>16&15]+me[e>>>12&15]+me[e>>>8&15]+me[e>>>4&15]+me[15&e]+me[r>>>28&15]+me[r>>>24&15]+me[r>>>20&15]+me[r>>>16&15]+me[r>>>12&15]+me[r>>>8&15]+me[r>>>4&15]+me[15&r]+me[n>>>28&15]+me[n>>>24&15]+me[n>>>20&15]+me[n>>>16&15]+me[n>>>12&15]+me[n>>>8&15]+me[n>>>4&15]+me[15&n]+me[o>>>28&15]+me[o>>>24&15]+me[o>>>20&15]+me[o>>>16&15]+me[o>>>12&15]+me[o>>>8&15]+me[o>>>4&15]+me[15&o]+me[i>>>28&15]+me[i>>>24&15]+me[i>>>20&15]+me[i>>>16&15]+me[i>>>12&15]+me[i>>>8&15]+me[i>>>4&15]+me[15&i]+me[s>>>28&15]+me[s>>>24&15]+me[s>>>20&15]+me[s>>>16&15]+me[s>>>12&15]+me[s>>>8&15]+me[s>>>4&15]+me[15&s];return this.is224||(h+=me[a>>>28&15]+me[a>>>24&15]+me[a>>>20&15]+me[a>>>16&15]+me[a>>>12&15]+me[a>>>8&15]+me[a>>>4&15]+me[15&a]),h},Te.prototype.toString=Te.prototype.hex,Te.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,r=this.h2,n=this.h3,o=this.h4,i=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,o>>>24&255,o>>>16&255,o>>>8&255,255&o,i>>>24&255,i>>>16&255,i>>>8&255,255&i,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},Te.prototype.array=Te.prototype.digest,Te.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},Be.prototype=new Te,Be.prototype.finalize=function(){if(Te.prototype.finalize.call(this),this.inner){this.inner=!1;var t=this.array();Te.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(t),Te.prototype.finalize.call(this)}};const Oe=Ee(),Ie=Ee(!0),_e=Ce(),Re=Ce(!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 Ne="input is invalid type",Ue="object"==typeof window,Pe=Ue?window:{};Pe.JS_SHA512_NO_WINDOW&&(Ue=!1);var ke=!Ue&&"object"==typeof self;!Pe.JS_SHA512_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?Pe=global:ke&&(Pe=self);var ze=!Pe.JS_SHA512_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,je="0123456789abcdef".split(""),Le=[-2147483648,8388608,32768,128],$e=[24,16,8,0],He=[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,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142