mirror of https://github.com/EasyDarwin/EasyDarwin
2 lines
13 KiB
JavaScript
2 lines
13 KiB
JavaScript
import{g as ae}from"./call-bind-9I5n-WuC.1735711566000.js";import{s as ie}from"./side-channel-DffzUMpz.1735711566000.js";var le=String.prototype.replace,oe=/%20/g,Q={RFC1738:"RFC1738",RFC3986:"RFC3986"},z={default:Q.RFC3986,formatters:{RFC1738:function(i){return le.call(i,oe,"+")},RFC3986:function(i){return String(i)}},RFC1738:Q.RFC1738,RFC3986:Q.RFC3986},fe=z,$=Object.prototype.hasOwnProperty,D=Array.isArray,b=function(){for(var i=[],e=0;e<256;++e)i.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return i}(),ue=function(e){for(;e.length>1;){var n=e.pop(),r=n.obj[n.prop];if(D(r)){for(var t=[],l=0;l<r.length;++l)typeof r[l]<"u"&&t.push(r[l]);n.obj[n.prop]=t}}},J=function(e,n){for(var r=n&&n.plainObjects?{__proto__:null}:{},t=0;t<e.length;++t)typeof e[t]<"u"&&(r[t]=e[t]);return r},ce=function i(e,n,r){if(!n)return e;if(typeof n!="object"&&typeof n!="function"){if(D(e))e.push(n);else if(e&&typeof e=="object")(r&&(r.plainObjects||r.allowPrototypes)||!$.call(Object.prototype,n))&&(e[n]=!0);else return[e,n];return e}if(!e||typeof e!="object")return[e].concat(n);var t=e;return D(e)&&!D(n)&&(t=J(e,r)),D(e)&&D(n)?(n.forEach(function(l,a){if($.call(e,a)){var c=e[a];c&&typeof c=="object"&&l&&typeof l=="object"?e[a]=i(c,l,r):e.push(l)}else e[a]=l}),e):Object.keys(n).reduce(function(l,a){var c=n[a];return $.call(l,a)?l[a]=i(l[a],c,r):l[a]=c,l},t)},de=function(e,n){return Object.keys(n).reduce(function(r,t){return r[t]=n[t],r},e)},se=function(i,e,n){var r=i.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},L=1024,ye=function(e,n,r,t,l){if(e.length===0)return e;var a=e;if(typeof e=="symbol"?a=Symbol.prototype.toString.call(e):typeof e!="string"&&(a=String(e)),r==="iso-8859-1")return escape(a).replace(/%u[0-9a-f]{4}/gi,function(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var c="",f=0;f<a.length;f+=L){for(var d=a.length>=L?a.slice(f,f+L):a,o=[],m=0;m<d.length;++m){var u=d.charCodeAt(m);if(u===45||u===46||u===95||u===126||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||l===fe.RFC1738&&(u===40||u===41)){o[o.length]=d.charAt(m);continue}if(u<128){o[o.length]=b[u];continue}if(u<2048){o[o.length]=b[192|u>>6]+b[128|u&63];continue}if(u<55296||u>=57344){o[o.length]=b[224|u>>12]+b[128|u>>6&63]+b[128|u&63];continue}m+=1,u=65536+((u&1023)<<10|d.charCodeAt(m)&1023),o[o.length]=b[240|u>>18]+b[128|u>>12&63]+b[128|u>>6&63]+b[128|u&63]}c+=o.join("")}return c},pe=function(e){for(var n=[{obj:{o:e},prop:"o"}],r=[],t=0;t<n.length;++t)for(var l=n[t],a=l.obj[l.prop],c=Object.keys(a),f=0;f<c.length;++f){var d=c[f],o=a[d];typeof o=="object"&&o!==null&&r.indexOf(o)===-1&&(n.push({obj:a,prop:d}),r.push(o))}return ue(n),e},me=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},ve=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},he=function(e,n){return[].concat(e,n)},be=function(e,n){if(D(e)){for(var r=[],t=0;t<e.length;t+=1)r.push(n(e[t]));return r}return n(e)},X={arrayToObject:J,assign:de,combine:he,compact:pe,decode:se,encode:ye,isBuffer:ve,isRegExp:me,maybeMap:be,merge:ce},Y=ie,I=X,A=z,we=Object.prototype.hasOwnProperty,Z={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,n){return e+"["+n+"]"},repeat:function(e){return e}},w=Array.isArray,ge=Array.prototype.push,ee=function(i,e){ge.apply(i,w(e)?e:[e])},Ee=Date.prototype.toISOString,W=A.default,v={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:I.encode,encodeValuesOnly:!1,filter:void 0,format:W,formatter:A.formatters[W],indices:!1,serializeDate:function(e){return Ee.call(e)},skipNulls:!1,strictNullHandling:!1},xe=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},H={},De=function i(e,n,r,t,l,a,c,f,d,o,m,u,h,p,g,E,F,_){for(var s=e,j=_,N=0,M=!1;(j=j.get(H))!==void 0&&!M;){var V=j.get(e);if(N+=1,typeof V<"u"){if(V===N)throw new RangeError("Cyclic object value");M=!0}typeof j.get(H)>"u"&&(N=0)}if(typeof o=="function"?s=o(n,s):s instanceof Date?s=h(s):r==="comma"&&w(s)&&(s=I.maybeMap(s,function(K){return K instanceof Date?h(K):K})),s===null){if(a)return d&&!E?d(n,v.encoder,F,"key",p):n;s=""}if(xe(s)||I.isBuffer(s)){if(d){var ne=E?n:d(n,v.encoder,F,"key",p);return[g(ne)+"="+g(d(s,v.encoder,F,"value",p))]}return[g(n)+"="+g(String(s))]}var P=[];if(typeof s>"u")return P;var O;if(r==="comma"&&w(s))E&&d&&(s=I.maybeMap(s,d)),O=[{value:s.length>0?s.join(",")||null:void 0}];else if(w(o))O=o;else{var k=Object.keys(s);O=m?k.sort(m):k}var U=f?String(n).replace(/\./g,"%2E"):String(n),T=t&&w(s)&&s.length===1?U+"[]":U;if(l&&w(s)&&s.length===0)return T+"[]";for(var C=0;C<O.length;++C){var x=O[C],q=typeof x=="object"&&x&&typeof x.value<"u"?x.value:s[x];if(!(c&&q===null)){var R=u&&f?String(x).replace(/\./g,"%2E"):String(x),te=w(s)?typeof r=="function"?r(T,R):T:T+(u?"."+R:"["+R+"]");_.set(e,N);var G=Y();G.set(H,_),ee(P,i(q,te,r,t,l,a,c,f,r==="comma"&&E&&w(s)?null:d,o,m,u,h,p,g,E,F,G))}}return P},Se=function(e){if(!e)return v;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.encodeDotInKeys<"u"&&typeof e.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=e.charset||v.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=A.default;if(typeof e.format<"u"){if(!we.call(A.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var t=A.formatters[r],l=v.filter;(typeof e.filter=="function"||w(e.filter))&&(l=e.filter);var a;if(e.arrayFormat in Z?a=e.arrayFormat:"indices"in e?a=e.indices?"indices":"repeat":a=v.arrayFormat,"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var c=typeof e.allowDots>"u"?e.encodeDotInKeys===!0?!0:v.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:v.addQueryPrefix,allowDots:c,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:v.allowEmptyArrays,arrayFormat:a,charset:n,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:v.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?v.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:v.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:v.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:v.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:v.encodeValuesOnly,filter:l,format:r,formatter:t,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:v.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:v.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:v.strictNullHandling}},Oe=function(i,e){var n=i,r=Se(e),t,l;typeof r.filter=="function"?(l=r.filter,n=l("",n)):w(r.filter)&&(l=r.filter,t=l);var a=[];if(typeof n!="object"||n===null)return"";var c=Z[r.arrayFormat],f=c==="comma"&&r.commaRoundTrip;t||(t=Object.keys(n)),r.sort&&t.sort(r.sort);for(var d=Y(),o=0;o<t.length;++o){var m=t[o],u=n[m];r.skipNulls&&u===null||ee(a,De(u,m,c,f,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,d))}var h=a.join(r.delimiter),p=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),h.length>0?p+h:""},S=X,B=Object.prototype.hasOwnProperty,Ae=Array.isArray,y={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:S.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},Fe=function(i){return i.replace(/&#(\d+);/g,function(e,n){return String.fromCharCode(parseInt(n,10))})},re=function(i,e){return i&&typeof i=="string"&&e.comma&&i.indexOf(",")>-1?i.split(","):i},je="utf8=%26%2310003%3B",Ne="utf8=%E2%9C%93",Te=function(e,n){var r={__proto__:null},t=n.ignoreQueryPrefix?e.replace(/^\?/,""):e;t=t.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var l=n.parameterLimit===1/0?void 0:n.parameterLimit,a=t.split(n.delimiter,l),c=-1,f,d=n.charset;if(n.charsetSentinel)for(f=0;f<a.length;++f)a[f].indexOf("utf8=")===0&&(a[f]===Ne?d="utf-8":a[f]===je&&(d="iso-8859-1"),c=f,f=a.length);for(f=0;f<a.length;++f)if(f!==c){var o=a[f],m=o.indexOf("]="),u=m===-1?o.indexOf("="):m+1,h,p;u===-1?(h=n.decoder(o,y.decoder,d,"key"),p=n.strictNullHandling?null:""):(h=n.decoder(o.slice(0,u),y.decoder,d,"key"),p=S.maybeMap(re(o.slice(u+1),n),function(E){return n.decoder(E,y.decoder,d,"value")})),p&&n.interpretNumericEntities&&d==="iso-8859-1"&&(p=Fe(String(p))),o.indexOf("[]=")>-1&&(p=Ae(p)?[p]:p);var g=B.call(r,h);g&&n.duplicates==="combine"?r[h]=S.combine(r[h],p):(!g||n.duplicates==="last")&&(r[h]=p)}return r},Ie=function(i,e,n,r){for(var t=r?e:re(e,n),l=i.length-1;l>=0;--l){var a,c=i[l];if(c==="[]"&&n.parseArrays)a=n.allowEmptyArrays&&(t===""||n.strictNullHandling&&t===null)?[]:[].concat(t);else{a=n.plainObjects?{__proto__:null}:{};var f=c.charAt(0)==="["&&c.charAt(c.length-1)==="]"?c.slice(1,-1):c,d=n.decodeDotInKeys?f.replace(/%2E/g,"."):f,o=parseInt(d,10);!n.parseArrays&&d===""?a={0:t}:!isNaN(o)&&c!==d&&String(o)===d&&o>=0&&n.parseArrays&&o<=n.arrayLimit?(a=[],a[o]=t):d!=="__proto__"&&(a[d]=t)}t=a}return t},_e=function(e,n,r,t){if(e){var l=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/,c=/(\[[^[\]]*])/g,f=r.depth>0&&a.exec(l),d=f?l.slice(0,f.index):l,o=[];if(d){if(!r.plainObjects&&B.call(Object.prototype,d)&&!r.allowPrototypes)return;o.push(d)}for(var m=0;r.depth>0&&(f=c.exec(l))!==null&&m<r.depth;){if(m+=1,!r.plainObjects&&B.call(Object.prototype,f[1].slice(1,-1))&&!r.allowPrototypes)return;o.push(f[1])}if(f){if(r.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");o.push("["+l.slice(f.index)+"]")}return Ie(o,n,r,t)}},Pe=function(e){if(!e)return y;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.decodeDotInKeys<"u"&&typeof e.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&typeof e.decoder<"u"&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof e.charset>"u"?y.charset:e.charset,r=typeof e.duplicates>"u"?y.duplicates:e.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var t=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:y.allowDots:!!e.allowDots;return{allowDots:t,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:y.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:y.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:y.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:y.arrayLimit,charset:n,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:y.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:y.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:y.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:y.decoder,delimiter:typeof e.delimiter=="string"||S.isRegExp(e.delimiter)?e.delimiter:y.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:y.depth,duplicates:r,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:y.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:y.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:y.plainObjects,strictDepth:typeof e.strictDepth=="boolean"?!!e.strictDepth:y.strictDepth,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:y.strictNullHandling}},Ce=function(i,e){var n=Pe(e);if(i===""||i===null||typeof i>"u")return n.plainObjects?{__proto__:null}:{};for(var r=typeof i=="string"?Te(i,n):i,t=n.plainObjects?{__proto__:null}:{},l=Object.keys(r),a=0;a<l.length;++a){var c=l[a],f=_e(c,r[c],n,typeof i=="string");t=S.merge(t,f,n)}return n.allowSparse===!0?t:S.compact(t)},Re=Oe,Ke=Ce,Qe=z,$e={formats:Qe,parse:Ke,stringify:Re};const Be=ae($e);export{Be as q};
|