mirror of
https://gitee.com/mirrors/AllinSSL.git
synced 2026-03-07 23:31:10 +08:00
2 lines
5.7 KiB
JavaScript
2 lines
5.7 KiB
JavaScript
import{bw as t,bq as e,bz as r,bN as n,bO as u,bP as a,bM as o,bQ as c,bu as i,bA as s,bR as f,bD as l,bC as p}from"./main-CVVsEoi-.js";function $(t){return t&&t["@@transducer/reduced"]?t:{"@@transducer/value":t,"@@transducer/reduced":!0}}var g=function(){function e(t,e){this.xf=e,this.f=t,this.all=!0}return e.prototype["@@transducer/init"]=t.init,e.prototype["@@transducer/result"]=function(t){return this.all&&(t=this.xf["@@transducer/step"](t,!0)),this.xf["@@transducer/result"](t)},e.prototype["@@transducer/step"]=function(t,e){return this.f(e)||(this.all=!1,t=$(this.xf["@@transducer/step"](t,!1))),t},e}();function d(t){return function(e){return new g(t,e)}}var b=e(r(["all"],d,function(t,e){for(var r=0;r<e.length;){if(!t(e[r]))return!1;r+=1}return!0}));function h(t,e){return function(t,e,r){var u,a;if("function"==typeof t.indexOf)switch(typeof e){case"number":if(0===e){for(u=1/e;r<t.length;){if(0===(a=t[r])&&1/a===u)return r;r+=1}return-1}if(e!=e){for(;r<t.length;){if("number"==typeof(a=t[r])&&a!=a)return r;r+=1}return-1}return t.indexOf(e,r);case"string":case"boolean":case"function":case"undefined":return t.indexOf(e,r);case"object":if(null===e)return t.indexOf(e,r)}for(;r<t.length;){if(n(t[r],e))return r;r+=1}return-1}(e,t,0)>=0}function y(t){return'"'+t.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0").replace(/"/g,'\\"')+'"'}var v=function(t){return(t<10?"0":"")+t},A="function"==typeof Date.prototype.toISOString?function(t){return t.toISOString()}:function(t){return t.getUTCFullYear()+"-"+v(t.getUTCMonth()+1)+"-"+v(t.getUTCDate())+"T"+v(t.getUTCHours())+":"+v(t.getUTCMinutes())+":"+v(t.getUTCSeconds())+"."+(t.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};var j=function(){function e(t,e){this.xf=e,this.f=t}return e.prototype["@@transducer/init"]=t.init,e.prototype["@@transducer/result"]=t.result,e.prototype["@@transducer/step"]=function(t,e){return this.f(e)?this.xf["@@transducer/step"](t,e):t},e}();function x(t){return function(e){return new j(t,e)}}var w=e(r(["fantasy-land/filter","filter"],x,function(t,e){return a(e)?u(function(r,n){return t(e[n])&&(r[n]=e[n]),r},{},o(e)):function(t,e){for(var r=0,n=e.length,u=[];r<n;)t(e[r])&&(u[u.length]=e[r]),r+=1;return u}(t,e)})),m=e(function(t,e){return w((r=t,function(){return!r.apply(this,arguments)}),e);var r});function S(t,e){var r=function(r){var n=e.concat([t]);return h(r,n)?"<Circular>":S(r,n)},n=function(t,e){return c(function(e){return y(e)+": "+r(t[e])},e.slice().sort())};switch(Object.prototype.toString.call(t)){case"[object Arguments]":return"(function() { return arguments; }("+c(r,t).join(", ")+"))";case"[object Array]":return"["+c(r,t).concat(n(t,m(function(t){return/^\d+$/.test(t)},o(t)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof t?"new Boolean("+r(t.valueOf())+")":t.toString();case"[object Date]":return"new Date("+(isNaN(t.valueOf())?r(NaN):y(A(t)))+")";case"[object Map]":return"new Map("+r(Array.from(t))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof t?"new Number("+r(t.valueOf())+")":1/t==-1/0?"-0":t.toString(10);case"[object Set]":return"new Set("+r(Array.from(t).sort())+")";case"[object String]":return"object"==typeof t?"new String("+r(t.valueOf())+")":y(t);case"[object Undefined]":return"undefined";default:if("function"==typeof t.toString){var u=t.toString();if("[object Object]"!==u)return u}return"{"+n(t,o(t)).join(", ")+"}"}}var z=i(function(t){return S(t,[])});function Z(t){return new RegExp(t.source,t.flags?t.flags:(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.sticky?"y":"")+(t.unicode?"u":"")+(t.dotAll?"s":""))}var O=e(function(t,e){return s(t+1,function(){var r=arguments[t];if(null!=r&&f(r[e]))return r[e].apply(r,Array.prototype.slice.call(arguments,0,t));throw new TypeError(z(r)+' does not have a method named "'+e+'"')})})(1,"split");var T=e(function(t,e){if(r=t,"[object RegExp]"!==Object.prototype.toString.call(r))throw new TypeError("‘test’ requires a value of type RegExp as its first argument; received "+z(t));var r;return Z(t).test(e)});const C="(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])",B=new RegExp(`^${C}\\.${C}\\.${C}\\.${C}$`),E="[0-9A-Fa-f]{1,4}",F=new RegExp([`^(${E}:){7}${E}$`,`^(${E}:){1,7}:$`,"^:((:[0-9A-Fa-f]{1,4}){1,7}|:)$",`^(${E}:){1,6}:${E}$`,`^(${E}:){1,5}(:${E}){1,2}$`,`^(${E}:){1,4}(:${E}){1,3}$`,`^(${E}:){1,3}(:${E}){1,4}$`,`^(${E}:){1,2}(:${E}){1,5}$`,`^${E}:(:${E}){1,6}$`,"^fe80:(:[0-9A-Fa-f]{1,4}){0,4}%[0-9A-Za-z]{1,}$",`^::((ffff(:0{1,4})?:)?${C}\\.${C}\\.${C}\\.${C})$`,`^(${E}:){1,4}:${C}\\.${C}\\.${C}\\.${C}$`].join("|")),M=new RegExp(`^${C}\\.${C}\\.${C}\\.${C}(\\/([1-2][0-9]|3[0-2]|[1-9]))?$`),N=T(/^[^\s@]+@[^\s@]+\.[^\s@]+$/);T(/^1[3-9]\d{9}$/),T(/^[1-9]\d{5}(18|19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}[\dXx]$/);const U=T(/^((https|http|ftp|rtsp|mms)?:\/\/)[^\s]+/),R=T(B),D=T(F),q=t=>R(t)||D(t);T(M);const I=T(/^([1-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$/);T(/^([0-9A-Fa-f]{2}-){5}[0-9A-Fa-f]{2}$/),T(/^[\u4e00-\u9fa5]+$/);const k=T(/^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/),G=T(/^(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)|(?:\*))\.)+(?:[a-zA-Z\u00a1-\uffff]{2,}|xn--[a-zA-Z0-9]+)$/),H=T(/^\*\.(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/),K=(t,e=",")=>b(n(!0),p(t=>k(t)||H(t)||G(t),O(e,t)));l((t,e=2,r=!0,n="")=>{if(0===t)return r?"0 B":"0";const u=["B","KB","MB","GB","TB"],a=(t,o)=>{const c=u[o],i=0===o||0===e?Math.round(t).toString():t.toFixed(e);return n&&c===n||t<1024||o>=u.length-1?r?`${i} ${c}`:i:a(t/1024,o+1)};return a(t,0)});export{H as A,I as H,U as O,q as T,Z as _,$ as a,h as b,b as c,k as d,T as t,K as v,N as w};
|