@stacksjs/slug 0.70.87 → 0.70.90

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +2 -7
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -1,8 +1,3 @@
1
1
  // @bun
2
- import{randomBytes as R1}from"crypto";import{db as a0}from"@stacksjs/database";var{defineProperty:G0,getOwnPropertyNames:W1,getOwnPropertyDescriptor:X1}=Object,Y1=Object.prototype.hasOwnProperty,L0=new WeakMap,$1=(Y)=>{var X=L0.get(Y),W;if(X)return X;if(X=G0({},"__esModule",{value:!0}),Y&&typeof Y==="object"||typeof Y==="function")W1(Y).map((V)=>!Y1.call(X,V)&&G0(X,V,{get:()=>Y[V],enumerable:!(W=X1(Y,V))||W.enumerable}));return L0.set(Y,X),X},D1=(Y,X)=>{for(var W in X)G0(Y,W,{get:X[W],enumerable:!0,configurable:!0,set:(V)=>X[W]=()=>V})},K1=(Y,X)=>()=>(Y&&(X=Y(Y=0)),X),S0={};D1(S0,{transcode:()=>A0,resolveObjectURL:()=>I0,kStringMaxLength:()=>p,kMaxLength:()=>k0,isUtf8:()=>y0,isAscii:()=>_0,default:()=>d0,createObjectURL:()=>$0,constants:()=>D0,btoa:()=>Y0,atob:()=>X0,File:()=>W0,Buffer:()=>m0,Blob:()=>J0});function I0(Y){throw Error("Not implemented")}function A0(Y,X,W){throw Error("Not implemented")}var B0,n,C0,M0,b0,x0,r=(Y,X)=>()=>(X||Y((X={exports:{}}).exports,X),X.exports),N1=(Y,X)=>{for(var W in X)n(Y,W,{get:X[W],enumerable:!0})},H0=(Y,X,W,V)=>{if(X&&typeof X=="object"||typeof X=="function")for(let D of M0(X))!x0.call(Y,D)&&D!==W&&n(Y,D,{get:()=>X[D],enumerable:!(V=C0(X,D))||V.enumerable});return Y},U1=(Y,X,W)=>(H0(Y,X,"default"),W&&H0(W,X,"default")),Q0=(Y,X,W)=>(W=Y!=null?B0(b0(Y)):{},H0(X||!Y||!Y.__esModule?n(W,"default",{value:Y,enumerable:!0}):W,Y)),P0,E0,h,Z0,q0,z0,p,k0=9007199254740991,J0,W0,X0,Y0,$0,_0=(Y)=>ArrayBuffer.isView(Y)?Y.every((X)=>X<128):Y.split("").every((X)=>X.charCodeAt(0)<128),y0=(Y)=>{throw Error("Not implemented")},D0,m0,d0,V1=K1(()=>{B0=Object.create,n=Object.defineProperty,C0=Object.getOwnPropertyDescriptor,M0=Object.getOwnPropertyNames,b0=Object.getPrototypeOf,x0=Object.prototype.hasOwnProperty,P0=r((Y)=>{Y.byteLength=R,Y.toByteArray=j,Y.fromByteArray=b;var X=[],W=[],V=typeof Uint8Array<"u"?Uint8Array:Array,D="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(v=0,N=D.length;v<N;++v)X[v]=D[v],W[D.charCodeAt(v)]=v;var v,N;W[45]=62,W[95]=63;function G(K){var O=K.length;if(O%4>0)throw Error("Invalid string. Length must be a multiple of 4");var L=K.indexOf("=");L===-1&&(L=O);var B=L===O?0:4-L%4;return[L,B]}function R(K){var O=G(K),L=O[0],B=O[1];return(L+B)*3/4-B}function U(K,O,L){return(O+L)*3/4-L}function j(K){var O,L=G(K),B=L[0],k=L[1],I=new V(U(K,B,k)),_=0,m=k>0?B-4:B,x;for(x=0;x<m;x+=4)O=W[K.charCodeAt(x)]<<18|W[K.charCodeAt(x+1)]<<12|W[K.charCodeAt(x+2)]<<6|W[K.charCodeAt(x+3)],I[_++]=O>>16&255,I[_++]=O>>8&255,I[_++]=O&255;return k===2&&(O=W[K.charCodeAt(x)]<<2|W[K.charCodeAt(x+1)]>>4,I[_++]=O&255),k===1&&(O=W[K.charCodeAt(x)]<<10|W[K.charCodeAt(x+1)]<<4|W[K.charCodeAt(x+2)]>>2,I[_++]=O>>8&255,I[_++]=O&255),I}function F(K){return X[K>>18&63]+X[K>>12&63]+X[K>>6&63]+X[K&63]}function S(K,O,L){for(var B,k=[],I=O;I<L;I+=3)B=(K[I]<<16&16711680)+(K[I+1]<<8&65280)+(K[I+2]&255),k.push(F(B));return k.join("")}function b(K){for(var O,L=K.length,B=L%3,k=[],I=16383,_=0,m=L-B;_<m;_+=I)k.push(S(K,_,_+I>m?m:_+I));return B===1?(O=K[L-1],k.push(X[O>>2]+X[O<<4&63]+"==")):B===2&&(O=(K[L-2]<<8)+K[L-1],k.push(X[O>>10]+X[O>>4&63]+X[O<<2&63]+"=")),k.join("")}}),E0=r((Y)=>{Y.read=function(X,W,V,D,v){var N,G,R=v*8-D-1,U=(1<<R)-1,j=U>>1,F=-7,S=V?v-1:0,b=V?-1:1,K=X[W+S];for(S+=b,N=K&(1<<-F)-1,K>>=-F,F+=R;F>0;N=N*256+X[W+S],S+=b,F-=8);for(G=N&(1<<-F)-1,N>>=-F,F+=D;F>0;G=G*256+X[W+S],S+=b,F-=8);if(N===0)N=1-j;else{if(N===U)return G?NaN:(K?-1:1)*(1/0);G=G+Math.pow(2,D),N=N-j}return(K?-1:1)*G*Math.pow(2,N-D)},Y.write=function(X,W,V,D,v,N){var G,R,U,j=N*8-v-1,F=(1<<j)-1,S=F>>1,b=v===23?Math.pow(2,-24)-Math.pow(2,-77):0,K=D?0:N-1,O=D?1:-1,L=W<0||W===0&&1/W<0?1:0;for(W=Math.abs(W),isNaN(W)||W===1/0?(R=isNaN(W)?1:0,G=F):(G=Math.floor(Math.log(W)/Math.LN2),W*(U=Math.pow(2,-G))<1&&(G--,U*=2),G+S>=1?W+=b/U:W+=b*Math.pow(2,1-S),W*U>=2&&(G++,U/=2),G+S>=F?(R=0,G=F):G+S>=1?(R=(W*U-1)*Math.pow(2,v),G=G+S):(R=W*Math.pow(2,S-1)*Math.pow(2,v),G=0));v>=8;X[V+K]=R&255,K+=O,R/=256,v-=8);for(G=G<<v|R,j+=v;j>0;X[V+K]=G&255,K+=O,G/=256,j-=8);X[V+K-O]|=L*128}}),h=r((Y)=>{var X=P0(),W=E0(),V=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Y.Buffer=G,Y.SlowBuffer=k,Y.INSPECT_MAX_BYTES=50;var D=2147483647;Y.kMaxLength=D,G.TYPED_ARRAY_SUPPORT=v(),!G.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function v(){try{let Q=new Uint8Array(1),Z={foo:function(){return 42}};return Object.setPrototypeOf(Z,Uint8Array.prototype),Object.setPrototypeOf(Q,Z),Q.foo()===42}catch{return!1}}Object.defineProperty(G.prototype,"parent",{enumerable:!0,get:function(){if(G.isBuffer(this))return this.buffer}}),Object.defineProperty(G.prototype,"offset",{enumerable:!0,get:function(){if(G.isBuffer(this))return this.byteOffset}});function N(Q){if(Q>D)throw RangeError('The value "'+Q+'" is invalid for option "size"');let Z=new Uint8Array(Q);return Object.setPrototypeOf(Z,G.prototype),Z}function G(Q,Z,q){if(typeof Q=="number"){if(typeof Z=="string")throw TypeError('The "string" argument must be of type string. Received type number');return F(Q)}return R(Q,Z,q)}G.poolSize=8192;function R(Q,Z,q){if(typeof Q=="string")return S(Q,Z);if(ArrayBuffer.isView(Q))return K(Q);if(Q==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Q);if(d(Q,ArrayBuffer)||Q&&d(Q.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(d(Q,SharedArrayBuffer)||Q&&d(Q.buffer,SharedArrayBuffer)))return O(Q,Z,q);if(typeof Q=="number")throw TypeError('The "value" argument must not be of type number. Received type number');let z=Q.valueOf&&Q.valueOf();if(z!=null&&z!==Q)return G.from(z,Z,q);let H=L(Q);if(H)return H;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Q[Symbol.toPrimitive]=="function")return G.from(Q[Symbol.toPrimitive]("string"),Z,q);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Q)}G.from=function(Q,Z,q){return R(Q,Z,q)},Object.setPrototypeOf(G.prototype,Uint8Array.prototype),Object.setPrototypeOf(G,Uint8Array);function U(Q){if(typeof Q!="number")throw TypeError('"size" argument must be of type number');if(Q<0)throw RangeError('The value "'+Q+'" is invalid for option "size"')}function j(Q,Z,q){return U(Q),Q<=0?N(Q):Z!==void 0?typeof q=="string"?N(Q).fill(Z,q):N(Q).fill(Z):N(Q)}G.alloc=function(Q,Z,q){return j(Q,Z,q)};function F(Q){return U(Q),N(Q<0?0:B(Q)|0)}G.allocUnsafe=function(Q){return F(Q)},G.allocUnsafeSlow=function(Q){return F(Q)};function S(Q,Z){if((typeof Z!="string"||Z==="")&&(Z="utf8"),!G.isEncoding(Z))throw TypeError("Unknown encoding: "+Z);let q=I(Q,Z)|0,z=N(q),H=z.write(Q,Z);return H!==q&&(z=z.slice(0,H)),z}function b(Q){let Z=Q.length<0?0:B(Q.length)|0,q=N(Z);for(let z=0;z<Z;z+=1)q[z]=Q[z]&255;return q}function K(Q){if(d(Q,Uint8Array)){let Z=new Uint8Array(Q);return O(Z.buffer,Z.byteOffset,Z.byteLength)}return b(Q)}function O(Q,Z,q){if(Z<0||Q.byteLength<Z)throw RangeError('"offset" is outside of buffer bounds');if(Q.byteLength<Z+(q||0))throw RangeError('"length" is outside of buffer bounds');let z;return Z===void 0&&q===void 0?z=new Uint8Array(Q):q===void 0?z=new Uint8Array(Q,Z):z=new Uint8Array(Q,Z,q),Object.setPrototypeOf(z,G.prototype),z}function L(Q){if(G.isBuffer(Q)){let Z=B(Q.length)|0,q=N(Z);return q.length===0||Q.copy(q,0,0,Z),q}if(Q.length!==void 0)return typeof Q.length!="number"||t(Q.length)?N(0):b(Q);if(Q.type==="Buffer"&&Array.isArray(Q.data))return b(Q.data)}function B(Q){if(Q>=D)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+D.toString(16)+" bytes");return Q|0}function k(Q){return+Q!=Q&&(Q=0),G.alloc(+Q)}G.isBuffer=function(Q){return Q!=null&&Q._isBuffer===!0&&Q!==G.prototype},G.compare=function(Q,Z){if(d(Q,Uint8Array)&&(Q=G.from(Q,Q.offset,Q.byteLength)),d(Z,Uint8Array)&&(Z=G.from(Z,Z.offset,Z.byteLength)),!G.isBuffer(Q)||!G.isBuffer(Z))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Q===Z)return 0;let q=Q.length,z=Z.length;for(let H=0,J=Math.min(q,z);H<J;++H)if(Q[H]!==Z[H]){q=Q[H],z=Z[H];break}return q<z?-1:z<q?1:0},G.isEncoding=function(Q){switch(String(Q).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},G.concat=function(Q,Z){if(!Array.isArray(Q))throw TypeError('"list" argument must be an Array of Buffers');if(Q.length===0)return G.alloc(0);let q;if(Z===void 0)for(Z=0,q=0;q<Q.length;++q)Z+=Q[q].length;let z=G.allocUnsafe(Z),H=0;for(q=0;q<Q.length;++q){let J=Q[q];if(d(J,Uint8Array))H+J.length>z.length?(G.isBuffer(J)||(J=G.from(J)),J.copy(z,H)):Uint8Array.prototype.set.call(z,J,H);else if(G.isBuffer(J))J.copy(z,H);else throw TypeError('"list" argument must be an Array of Buffers');H+=J.length}return z};function I(Q,Z){if(G.isBuffer(Q))return Q.length;if(ArrayBuffer.isView(Q)||d(Q,ArrayBuffer))return Q.byteLength;if(typeof Q!="string")throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Q);let q=Q.length,z=arguments.length>2&&arguments[2]===!0;if(!z&&q===0)return 0;let H=!1;for(;;)switch(Z){case"ascii":case"latin1":case"binary":return q;case"utf8":case"utf-8":return i(Q).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return q*2;case"hex":return q>>>1;case"base64":return F0(Q).length;default:if(H)return z?-1:i(Q).length;Z=(""+Z).toLowerCase(),H=!0}}G.byteLength=I;function _(Q,Z,q){let z=!1;if((Z===void 0||Z<0)&&(Z=0),Z>this.length||((q===void 0||q>this.length)&&(q=this.length),q<=0)||(q>>>=0,Z>>>=0,q<=Z))return"";for(Q||(Q="utf8");;)switch(Q){case"hex":return t0(this,Z,q);case"utf8":case"utf-8":return N0(this,Z,q);case"ascii":return e0(this,Z,q);case"latin1":case"binary":return i0(this,Z,q);case"base64":return o0(this,Z,q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r0(this,Z,q);default:if(z)throw TypeError("Unknown encoding: "+Q);Q=(Q+"").toLowerCase(),z=!0}}G.prototype._isBuffer=!0;function m(Q,Z,q){let z=Q[Z];Q[Z]=Q[q],Q[q]=z}G.prototype.swap16=function(){let Q=this.length;if(Q%2!==0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let Z=0;Z<Q;Z+=2)m(this,Z,Z+1);return this},G.prototype.swap32=function(){let Q=this.length;if(Q%4!==0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let Z=0;Z<Q;Z+=4)m(this,Z,Z+3),m(this,Z+1,Z+2);return this},G.prototype.swap64=function(){let Q=this.length;if(Q%8!==0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let Z=0;Z<Q;Z+=8)m(this,Z,Z+7),m(this,Z+1,Z+6),m(this,Z+2,Z+5),m(this,Z+3,Z+4);return this},G.prototype.toString=function(){let Q=this.length;return Q===0?"":arguments.length===0?N0(this,0,Q):_.apply(this,arguments)},G.prototype.toLocaleString=G.prototype.toString,G.prototype.equals=function(Q){if(!G.isBuffer(Q))throw TypeError("Argument must be a Buffer");return this===Q?!0:G.compare(this,Q)===0},G.prototype.inspect=function(){let Q="",Z=Y.INSPECT_MAX_BYTES;return Q=this.toString("hex",0,Z).replace(/(.{2})/g,"$1 ").trim(),this.length>Z&&(Q+=" ... "),"<Buffer "+Q+">"},V&&(G.prototype[V]=G.prototype.inspect),G.prototype.compare=function(Q,Z,q,z,H){if(d(Q,Uint8Array)&&(Q=G.from(Q,Q.offset,Q.byteLength)),!G.isBuffer(Q))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Q);if(Z===void 0&&(Z=0),q===void 0&&(q=Q?Q.length:0),z===void 0&&(z=0),H===void 0&&(H=this.length),Z<0||q>Q.length||z<0||H>this.length)throw RangeError("out of range index");if(z>=H&&Z>=q)return 0;if(z>=H)return-1;if(Z>=q)return 1;if(Z>>>=0,q>>>=0,z>>>=0,H>>>=0,this===Q)return 0;let J=H-z,$=q-Z,T=Math.min(J,$),M=this.slice(z,H),E=Q.slice(Z,q);for(let w=0;w<T;++w)if(M[w]!==E[w]){J=M[w],$=E[w];break}return J<$?-1:$<J?1:0};function x(Q,Z,q,z,H){if(Q.length===0)return-1;if(typeof q=="string"?(z=q,q=0):q>2147483647?q=2147483647:q<-2147483648&&(q=-2147483648),q=+q,t(q)&&(q=H?0:Q.length-1),q<0&&(q=Q.length+q),q>=Q.length){if(H)return-1;q=Q.length-1}else if(q<0)if(H)q=0;else return-1;if(typeof Z=="string"&&(Z=G.from(Z,z)),G.isBuffer(Z))return Z.length===0?-1:K0(Q,Z,q,z,H);if(typeof Z=="number")return Z=Z&255,typeof Uint8Array.prototype.indexOf=="function"?H?Uint8Array.prototype.indexOf.call(Q,Z,q):Uint8Array.prototype.lastIndexOf.call(Q,Z,q):K0(Q,[Z],q,z,H);throw TypeError("val must be string, number or Buffer")}function K0(Q,Z,q,z,H){let J=1,$=Q.length,T=Z.length;if(z!==void 0&&(z=String(z).toLowerCase(),z==="ucs2"||z==="ucs-2"||z==="utf16le"||z==="utf-16le")){if(Q.length<2||Z.length<2)return-1;J=2,$/=2,T/=2,q/=2}function M(w,A){return J===1?w[A]:w.readUInt16BE(A*J)}let E;if(H){let w=-1;for(E=q;E<$;E++)if(M(Q,E)===M(Z,w===-1?0:E-w)){if(w===-1&&(w=E),E-w+1===T)return w*J}else w!==-1&&(E-=E-w),w=-1}else for(q+T>$&&(q=$-T),E=q;E>=0;E--){let w=!0;for(let A=0;A<T;A++)if(M(Q,E+A)!==M(Z,A)){w=!1;break}if(w)return E}return-1}G.prototype.includes=function(Q,Z,q){return this.indexOf(Q,Z,q)!==-1},G.prototype.indexOf=function(Q,Z,q){return x(this,Q,Z,q,!0)},G.prototype.lastIndexOf=function(Q,Z,q){return x(this,Q,Z,q,!1)};function p0(Q,Z,q,z){q=Number(q)||0;let H=Q.length-q;z?(z=Number(z),z>H&&(z=H)):z=H;let J=Z.length;z>J/2&&(z=J/2);let $;for($=0;$<z;++$){let T=parseInt(Z.substr($*2,2),16);if(t(T))return $;Q[q+$]=T}return $}function l0(Q,Z,q,z){return l(i(Z,Q.length-q),Q,q,z)}function h0(Q,Z,q,z){return l(z1(Z),Q,q,z)}function u0(Q,Z,q,z){return l(F0(Z),Q,q,z)}function s0(Q,Z,q,z){return l(G1(Z,Q.length-q),Q,q,z)}G.prototype.write=function(Q,Z,q,z){if(Z===void 0)z="utf8",q=this.length,Z=0;else if(q===void 0&&typeof Z=="string")z=Z,q=this.length,Z=0;else if(isFinite(Z))Z=Z>>>0,isFinite(q)?(q=q>>>0,z===void 0&&(z="utf8")):(z=q,q=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let H=this.length-Z;if((q===void 0||q>H)&&(q=H),Q.length>0&&(q<0||Z<0)||Z>this.length)throw RangeError("Attempt to write outside buffer bounds");z||(z="utf8");let J=!1;for(;;)switch(z){case"hex":return p0(this,Q,Z,q);case"utf8":case"utf-8":return l0(this,Q,Z,q);case"ascii":case"latin1":case"binary":return h0(this,Q,Z,q);case"base64":return u0(this,Q,Z,q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return s0(this,Q,Z,q);default:if(J)throw TypeError("Unknown encoding: "+z);z=(""+z).toLowerCase(),J=!0}},G.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function o0(Q,Z,q){return Z===0&&q===Q.length?X.fromByteArray(Q):X.fromByteArray(Q.slice(Z,q))}function N0(Q,Z,q){q=Math.min(Q.length,q);let z=[],H=Z;for(;H<q;){let J=Q[H],$=null,T=J>239?4:J>223?3:J>191?2:1;if(H+T<=q){let M,E,w,A;switch(T){case 1:J<128&&($=J);break;case 2:M=Q[H+1],(M&192)===128&&(A=(J&31)<<6|M&63,A>127&&($=A));break;case 3:M=Q[H+1],E=Q[H+2],(M&192)===128&&(E&192)===128&&(A=(J&15)<<12|(M&63)<<6|E&63,A>2047&&(A<55296||A>57343)&&($=A));break;case 4:M=Q[H+1],E=Q[H+2],w=Q[H+3],(M&192)===128&&(E&192)===128&&(w&192)===128&&(A=(J&15)<<18|(M&63)<<12|(E&63)<<6|w&63,A>65535&&A<1114112&&($=A))}}$===null?($=65533,T=1):$>65535&&($-=65536,z.push($>>>10&1023|55296),$=56320|$&1023),z.push($),H+=T}return n0(z)}var U0=4096;function n0(Q){let Z=Q.length;if(Z<=U0)return String.fromCharCode.apply(String,Q);let q="",z=0;for(;z<Z;)q+=String.fromCharCode.apply(String,Q.slice(z,z+=U0));return q}function e0(Q,Z,q){let z="";q=Math.min(Q.length,q);for(let H=Z;H<q;++H)z+=String.fromCharCode(Q[H]&127);return z}function i0(Q,Z,q){let z="";q=Math.min(Q.length,q);for(let H=Z;H<q;++H)z+=String.fromCharCode(Q[H]);return z}function t0(Q,Z,q){let z=Q.length;(!Z||Z<0)&&(Z=0),(!q||q<0||q>z)&&(q=z);let H="";for(let J=Z;J<q;++J)H+=H1[Q[J]];return H}function r0(Q,Z,q){let z=Q.slice(Z,q),H="";for(let J=0;J<z.length-1;J+=2)H+=String.fromCharCode(z[J]+z[J+1]*256);return H}G.prototype.slice=function(Q,Z){let q=this.length;Q=~~Q,Z=Z===void 0?q:~~Z,Q<0?(Q+=q,Q<0&&(Q=0)):Q>q&&(Q=q),Z<0?(Z+=q,Z<0&&(Z=0)):Z>q&&(Z=q),Z<Q&&(Z=Q);let z=this.subarray(Q,Z);return Object.setPrototypeOf(z,G.prototype),z};function C(Q,Z,q){if(Q%1!==0||Q<0)throw RangeError("offset is not uint");if(Q+Z>q)throw RangeError("Trying to access beyond buffer length")}G.prototype.readUintLE=G.prototype.readUIntLE=function(Q,Z,q){Q=Q>>>0,Z=Z>>>0,q||C(Q,Z,this.length);let z=this[Q],H=1,J=0;for(;++J<Z&&(H*=256);)z+=this[Q+J]*H;return z},G.prototype.readUintBE=G.prototype.readUIntBE=function(Q,Z,q){Q=Q>>>0,Z=Z>>>0,q||C(Q,Z,this.length);let z=this[Q+--Z],H=1;for(;Z>0&&(H*=256);)z+=this[Q+--Z]*H;return z},G.prototype.readUint8=G.prototype.readUInt8=function(Q,Z){return Q=Q>>>0,Z||C(Q,1,this.length),this[Q]},G.prototype.readUint16LE=G.prototype.readUInt16LE=function(Q,Z){return Q=Q>>>0,Z||C(Q,2,this.length),this[Q]|this[Q+1]<<8},G.prototype.readUint16BE=G.prototype.readUInt16BE=function(Q,Z){return Q=Q>>>0,Z||C(Q,2,this.length),this[Q]<<8|this[Q+1]},G.prototype.readUint32LE=G.prototype.readUInt32LE=function(Q,Z){return Q=Q>>>0,Z||C(Q,4,this.length),(this[Q]|this[Q+1]<<8|this[Q+2]<<16)+this[Q+3]*16777216},G.prototype.readUint32BE=G.prototype.readUInt32BE=function(Q,Z){return Q=Q>>>0,Z||C(Q,4,this.length),this[Q]*16777216+(this[Q+1]<<16|this[Q+2]<<8|this[Q+3])},G.prototype.readBigUInt64LE=g(function(Q){Q=Q>>>0,c(Q,"offset");let Z=this[Q],q=this[Q+7];(Z===void 0||q===void 0)&&a(Q,this.length-8);let z=Z+this[++Q]*256+this[++Q]*65536+this[++Q]*16777216,H=this[++Q]+this[++Q]*256+this[++Q]*65536+q*16777216;return BigInt(z)+(BigInt(H)<<BigInt(32))}),G.prototype.readBigUInt64BE=g(function(Q){Q=Q>>>0,c(Q,"offset");let Z=this[Q],q=this[Q+7];(Z===void 0||q===void 0)&&a(Q,this.length-8);let z=Z*16777216+this[++Q]*65536+this[++Q]*256+this[++Q],H=this[++Q]*16777216+this[++Q]*65536+this[++Q]*256+q;return(BigInt(z)<<BigInt(32))+BigInt(H)}),G.prototype.readIntLE=function(Q,Z,q){Q=Q>>>0,Z=Z>>>0,q||C(Q,Z,this.length);let z=this[Q],H=1,J=0;for(;++J<Z&&(H*=256);)z+=this[Q+J]*H;return H*=128,z>=H&&(z-=Math.pow(2,8*Z)),z},G.prototype.readIntBE=function(Q,Z,q){Q=Q>>>0,Z=Z>>>0,q||C(Q,Z,this.length);let z=Z,H=1,J=this[Q+--z];for(;z>0&&(H*=256);)J+=this[Q+--z]*H;return H*=128,J>=H&&(J-=Math.pow(2,8*Z)),J},G.prototype.readInt8=function(Q,Z){return Q=Q>>>0,Z||C(Q,1,this.length),this[Q]&128?(255-this[Q]+1)*-1:this[Q]},G.prototype.readInt16LE=function(Q,Z){Q=Q>>>0,Z||C(Q,2,this.length);let q=this[Q]|this[Q+1]<<8;return q&32768?q|4294901760:q},G.prototype.readInt16BE=function(Q,Z){Q=Q>>>0,Z||C(Q,2,this.length);let q=this[Q+1]|this[Q]<<8;return q&32768?q|4294901760:q},G.prototype.readInt32LE=function(Q,Z){return Q=Q>>>0,Z||C(Q,4,this.length),this[Q]|this[Q+1]<<8|this[Q+2]<<16|this[Q+3]<<24},G.prototype.readInt32BE=function(Q,Z){return Q=Q>>>0,Z||C(Q,4,this.length),this[Q]<<24|this[Q+1]<<16|this[Q+2]<<8|this[Q+3]},G.prototype.readBigInt64LE=g(function(Q){Q=Q>>>0,c(Q,"offset");let Z=this[Q],q=this[Q+7];(Z===void 0||q===void 0)&&a(Q,this.length-8);let z=this[Q+4]+this[Q+5]*256+this[Q+6]*65536+(q<<24);return(BigInt(z)<<BigInt(32))+BigInt(Z+this[++Q]*256+this[++Q]*65536+this[++Q]*16777216)}),G.prototype.readBigInt64BE=g(function(Q){Q=Q>>>0,c(Q,"offset");let Z=this[Q],q=this[Q+7];(Z===void 0||q===void 0)&&a(Q,this.length-8);let z=(Z<<24)+this[++Q]*65536+this[++Q]*256+this[++Q];return(BigInt(z)<<BigInt(32))+BigInt(this[++Q]*16777216+this[++Q]*65536+this[++Q]*256+q)}),G.prototype.readFloatLE=function(Q,Z){return Q=Q>>>0,Z||C(Q,4,this.length),W.read(this,Q,!0,23,4)},G.prototype.readFloatBE=function(Q,Z){return Q=Q>>>0,Z||C(Q,4,this.length),W.read(this,Q,!1,23,4)},G.prototype.readDoubleLE=function(Q,Z){return Q=Q>>>0,Z||C(Q,8,this.length),W.read(this,Q,!0,52,8)},G.prototype.readDoubleBE=function(Q,Z){return Q=Q>>>0,Z||C(Q,8,this.length),W.read(this,Q,!1,52,8)};function y(Q,Z,q,z,H,J){if(!G.isBuffer(Q))throw TypeError('"buffer" argument must be a Buffer instance');if(Z>H||Z<J)throw RangeError('"value" argument is out of bounds');if(q+z>Q.length)throw RangeError("Index out of range")}G.prototype.writeUintLE=G.prototype.writeUIntLE=function(Q,Z,q,z){if(Q=+Q,Z=Z>>>0,q=q>>>0,!z){let $=Math.pow(2,8*q)-1;y(this,Q,Z,q,$,0)}let H=1,J=0;for(this[Z]=Q&255;++J<q&&(H*=256);)this[Z+J]=Q/H&255;return Z+q},G.prototype.writeUintBE=G.prototype.writeUIntBE=function(Q,Z,q,z){if(Q=+Q,Z=Z>>>0,q=q>>>0,!z){let $=Math.pow(2,8*q)-1;y(this,Q,Z,q,$,0)}let H=q-1,J=1;for(this[Z+H]=Q&255;--H>=0&&(J*=256);)this[Z+H]=Q/J&255;return Z+q},G.prototype.writeUint8=G.prototype.writeUInt8=function(Q,Z,q){return Q=+Q,Z=Z>>>0,q||y(this,Q,Z,1,255,0),this[Z]=Q&255,Z+1},G.prototype.writeUint16LE=G.prototype.writeUInt16LE=function(Q,Z,q){return Q=+Q,Z=Z>>>0,q||y(this,Q,Z,2,65535,0),this[Z]=Q&255,this[Z+1]=Q>>>8,Z+2},G.prototype.writeUint16BE=G.prototype.writeUInt16BE=function(Q,Z,q){return Q=+Q,Z=Z>>>0,q||y(this,Q,Z,2,65535,0),this[Z]=Q>>>8,this[Z+1]=Q&255,Z+2},G.prototype.writeUint32LE=G.prototype.writeUInt32LE=function(Q,Z,q){return Q=+Q,Z=Z>>>0,q||y(this,Q,Z,4,4294967295,0),this[Z+3]=Q>>>24,this[Z+2]=Q>>>16,this[Z+1]=Q>>>8,this[Z]=Q&255,Z+4},G.prototype.writeUint32BE=G.prototype.writeUInt32BE=function(Q,Z,q){return Q=+Q,Z=Z>>>0,q||y(this,Q,Z,4,4294967295,0),this[Z]=Q>>>24,this[Z+1]=Q>>>16,this[Z+2]=Q>>>8,this[Z+3]=Q&255,Z+4};function V0(Q,Z,q,z,H){w0(Z,z,H,Q,q,7);let J=Number(Z&BigInt(4294967295));Q[q++]=J,J=J>>8,Q[q++]=J,J=J>>8,Q[q++]=J,J=J>>8,Q[q++]=J;let $=Number(Z>>BigInt(32)&BigInt(4294967295));return Q[q++]=$,$=$>>8,Q[q++]=$,$=$>>8,Q[q++]=$,$=$>>8,Q[q++]=$,q}function O0(Q,Z,q,z,H){w0(Z,z,H,Q,q,7);let J=Number(Z&BigInt(4294967295));Q[q+7]=J,J=J>>8,Q[q+6]=J,J=J>>8,Q[q+5]=J,J=J>>8,Q[q+4]=J;let $=Number(Z>>BigInt(32)&BigInt(4294967295));return Q[q+3]=$,$=$>>8,Q[q+2]=$,$=$>>8,Q[q+1]=$,$=$>>8,Q[q]=$,q+8}G.prototype.writeBigUInt64LE=g(function(Q,Z=0){return V0(this,Q,Z,BigInt(0),BigInt("0xffffffffffffffff"))}),G.prototype.writeBigUInt64BE=g(function(Q,Z=0){return O0(this,Q,Z,BigInt(0),BigInt("0xffffffffffffffff"))}),G.prototype.writeIntLE=function(Q,Z,q,z){if(Q=+Q,Z=Z>>>0,!z){let T=Math.pow(2,8*q-1);y(this,Q,Z,q,T-1,-T)}let H=0,J=1,$=0;for(this[Z]=Q&255;++H<q&&(J*=256);)Q<0&&$===0&&this[Z+H-1]!==0&&($=1),this[Z+H]=(Q/J>>0)-$&255;return Z+q},G.prototype.writeIntBE=function(Q,Z,q,z){if(Q=+Q,Z=Z>>>0,!z){let T=Math.pow(2,8*q-1);y(this,Q,Z,q,T-1,-T)}let H=q-1,J=1,$=0;for(this[Z+H]=Q&255;--H>=0&&(J*=256);)Q<0&&$===0&&this[Z+H+1]!==0&&($=1),this[Z+H]=(Q/J>>0)-$&255;return Z+q},G.prototype.writeInt8=function(Q,Z,q){return Q=+Q,Z=Z>>>0,q||y(this,Q,Z,1,127,-128),Q<0&&(Q=255+Q+1),this[Z]=Q&255,Z+1},G.prototype.writeInt16LE=function(Q,Z,q){return Q=+Q,Z=Z>>>0,q||y(this,Q,Z,2,32767,-32768),this[Z]=Q&255,this[Z+1]=Q>>>8,Z+2},G.prototype.writeInt16BE=function(Q,Z,q){return Q=+Q,Z=Z>>>0,q||y(this,Q,Z,2,32767,-32768),this[Z]=Q>>>8,this[Z+1]=Q&255,Z+2},G.prototype.writeInt32LE=function(Q,Z,q){return Q=+Q,Z=Z>>>0,q||y(this,Q,Z,4,2147483647,-2147483648),this[Z]=Q&255,this[Z+1]=Q>>>8,this[Z+2]=Q>>>16,this[Z+3]=Q>>>24,Z+4},G.prototype.writeInt32BE=function(Q,Z,q){return Q=+Q,Z=Z>>>0,q||y(this,Q,Z,4,2147483647,-2147483648),Q<0&&(Q=4294967295+Q+1),this[Z]=Q>>>24,this[Z+1]=Q>>>16,this[Z+2]=Q>>>8,this[Z+3]=Q&255,Z+4},G.prototype.writeBigInt64LE=g(function(Q,Z=0){return V0(this,Q,Z,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),G.prototype.writeBigInt64BE=g(function(Q,Z=0){return O0(this,Q,Z,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function v0(Q,Z,q,z,H,J){if(q+z>Q.length)throw RangeError("Index out of range");if(q<0)throw RangeError("Index out of range")}function R0(Q,Z,q,z,H){return Z=+Z,q=q>>>0,H||v0(Q,Z,q,4,340282346638528860000000000000000000000,-340282346638528860000000000000000000000),W.write(Q,Z,q,z,23,4),q+4}G.prototype.writeFloatLE=function(Q,Z,q){return R0(this,Q,Z,!0,q)},G.prototype.writeFloatBE=function(Q,Z,q){return R0(this,Q,Z,!1,q)};function j0(Q,Z,q,z,H){return Z=+Z,q=q>>>0,H||v0(Q,Z,q,8,179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),W.write(Q,Z,q,z,52,8),q+8}G.prototype.writeDoubleLE=function(Q,Z,q){return j0(this,Q,Z,!0,q)},G.prototype.writeDoubleBE=function(Q,Z,q){return j0(this,Q,Z,!1,q)},G.prototype.copy=function(Q,Z,q,z){if(!G.isBuffer(Q))throw TypeError("argument should be a Buffer");if(q||(q=0),!z&&z!==0&&(z=this.length),Z>=Q.length&&(Z=Q.length),Z||(Z=0),z>0&&z<q&&(z=q),z===q||Q.length===0||this.length===0)return 0;if(Z<0)throw RangeError("targetStart out of bounds");if(q<0||q>=this.length)throw RangeError("Index out of range");if(z<0)throw RangeError("sourceEnd out of bounds");z>this.length&&(z=this.length),Q.length-Z<z-q&&(z=Q.length-Z+q);let H=z-q;return this===Q&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(Z,q,z):Uint8Array.prototype.set.call(Q,this.subarray(q,z),Z),H},G.prototype.fill=function(Q,Z,q,z){if(typeof Q=="string"){if(typeof Z=="string"?(z=Z,Z=0,q=this.length):typeof q=="string"&&(z=q,q=this.length),z!==void 0&&typeof z!="string")throw TypeError("encoding must be a string");if(typeof z=="string"&&!G.isEncoding(z))throw TypeError("Unknown encoding: "+z);if(Q.length===1){let J=Q.charCodeAt(0);(z==="utf8"&&J<128||z==="latin1")&&(Q=J)}}else typeof Q=="number"?Q=Q&255:typeof Q=="boolean"&&(Q=Number(Q));if(Z<0||this.length<Z||this.length<q)throw RangeError("Out of range index");if(q<=Z)return this;Z=Z>>>0,q=q===void 0?this.length:q>>>0,Q||(Q=0);let H;if(typeof Q=="number")for(H=Z;H<q;++H)this[H]=Q;else{let J=G.isBuffer(Q)?Q:G.from(Q,z),$=J.length;if($===0)throw TypeError('The value "'+Q+'" is invalid for argument "value"');for(H=0;H<q-Z;++H)this[H+Z]=J[H%$]}return this};var f={};function e(Q,Z,q){f[Q]=class extends q{constructor(){super(),Object.defineProperty(this,"message",{value:Z.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${Q}]`,this.stack,delete this.name}get code(){return Q}set code(z){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:z,writable:!0})}toString(){return`${this.name} [${Q}]: ${this.message}`}}}e("ERR_BUFFER_OUT_OF_BOUNDS",function(Q){return Q?`${Q} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),e("ERR_INVALID_ARG_TYPE",function(Q,Z){return`The "${Q}" argument must be of type number. Received type ${typeof Z}`},TypeError),e("ERR_OUT_OF_RANGE",function(Q,Z,q){let z=`The value of "${Q}" is out of range.`,H=q;return Number.isInteger(q)&&Math.abs(q)>4294967296?H=T0(String(q)):typeof q=="bigint"&&(H=String(q),(q>BigInt(2)**BigInt(32)||q<-(BigInt(2)**BigInt(32)))&&(H=T0(H)),H+="n"),z+=` It must be ${Z}. Received ${H}`,z},RangeError);function T0(Q){let Z="",q=Q.length,z=Q[0]==="-"?1:0;for(;q>=z+4;q-=3)Z=`_${Q.slice(q-3,q)}${Z}`;return`${Q.slice(0,q)}${Z}`}function Q1(Q,Z,q){c(Z,"offset"),(Q[Z]===void 0||Q[Z+q]===void 0)&&a(Z,Q.length-(q+1))}function w0(Q,Z,q,z,H,J){if(Q>q||Q<Z){let $=typeof Z=="bigint"?"n":"",T;throw J>3?Z===0||Z===BigInt(0)?T=`>= 0${$} and < 2${$} ** ${(J+1)*8}${$}`:T=`>= -(2${$} ** ${(J+1)*8-1}${$}) and < 2 ** ${(J+1)*8-1}${$}`:T=`>= ${Z}${$} and <= ${q}${$}`,new f.ERR_OUT_OF_RANGE("value",T,Q)}Q1(z,H,J)}function c(Q,Z){if(typeof Q!="number")throw new f.ERR_INVALID_ARG_TYPE(Z,"number",Q)}function a(Q,Z,q){throw Math.floor(Q)!==Q?(c(Q,q),new f.ERR_OUT_OF_RANGE(q||"offset","an integer",Q)):Z<0?new f.ERR_BUFFER_OUT_OF_BOUNDS:new f.ERR_OUT_OF_RANGE(q||"offset",`>= ${q?1:0} and <= ${Z}`,Q)}var Z1=/[^+/0-9A-Za-z-_]/g;function q1(Q){if(Q=Q.split("=")[0],Q=Q.trim().replace(Z1,""),Q.length<2)return"";for(;Q.length%4!==0;)Q=Q+"=";return Q}function i(Q,Z){Z=Z||1/0;let q,z=Q.length,H=null,J=[];for(let $=0;$<z;++$){if(q=Q.charCodeAt($),q>55295&&q<57344){if(!H){if(q>56319){(Z-=3)>-1&&J.push(239,191,189);continue}else if($+1===z){(Z-=3)>-1&&J.push(239,191,189);continue}H=q;continue}if(q<56320){(Z-=3)>-1&&J.push(239,191,189),H=q;continue}q=(H-55296<<10|q-56320)+65536}else H&&(Z-=3)>-1&&J.push(239,191,189);if(H=null,q<128){if((Z-=1)<0)break;J.push(q)}else if(q<2048){if((Z-=2)<0)break;J.push(q>>6|192,q&63|128)}else if(q<65536){if((Z-=3)<0)break;J.push(q>>12|224,q>>6&63|128,q&63|128)}else if(q<1114112){if((Z-=4)<0)break;J.push(q>>18|240,q>>12&63|128,q>>6&63|128,q&63|128)}else throw Error("Invalid code point")}return J}function z1(Q){let Z=[];for(let q=0;q<Q.length;++q)Z.push(Q.charCodeAt(q)&255);return Z}function G1(Q,Z){let q,z,H,J=[];for(let $=0;$<Q.length&&!((Z-=2)<0);++$)q=Q.charCodeAt($),z=q>>8,H=q%256,J.push(H),J.push(z);return J}function F0(Q){return X.toByteArray(q1(Q))}function l(Q,Z,q,z){let H;for(H=0;H<z&&!(H+q>=Z.length||H>=Q.length);++H)Z[H+q]=Q[H];return H}function d(Q,Z){return Q instanceof Z||Q!=null&&Q.constructor!=null&&Q.constructor.name!=null&&Q.constructor.name===Z.name}function t(Q){return Q!==Q}var H1=function(){let Q="0123456789abcdef",Z=Array(256);for(let q=0;q<16;++q){let z=q*16;for(let H=0;H<16;++H)Z[z+H]=Q[q]+Q[H]}return Z}();function g(Q){return typeof BigInt>"u"?J1:Q}function J1(){throw Error("BigInt not supported")}}),Z0={},N1(Z0,{Blob:()=>J0,Buffer:()=>z0.Buffer,File:()=>W0,atob:()=>X0,btoa:()=>Y0,constants:()=>D0,createObjectURL:()=>$0,default:()=>q0.Buffer,isAscii:()=>_0,isUtf8:()=>y0,kMaxLength:()=>k0,kStringMaxLength:()=>p,resolveObjectURL:()=>I0,transcode:()=>A0}),U1(Z0,Q0(h())),q0=Q0(h()),z0=Q0(h()),p=4294967295,{Blob:J0,File:W0,atob:X0,btoa:Y0}=globalThis,{createObjectURL:$0}=URL,D0={__proto__:null,MAX_LENGTH:p,MAX_STRING_LENGTH:p,BYTES_PER_ELEMENT:1},m0=z0.Buffer,d0=q0.Buffer;/*!
3
- * The buffer module from node.js, for the browser.
4
- *
5
- * @author Feross Aboukhadijeh <https://feross.org>
6
- * @license MIT
7
- *//*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */});function O1(Y,X){let W=Y.charCodeAt(X);if(Number.isNaN(W))throw RangeError(`Index ${X} out of range for string "${Y}"; please open an issue at https://github.com/Trott/slug/issues/new`);if(W<55296||W>57343)return[Y.charAt(X),X];if(W>=55296&&W<=56319){if(Y.length<=X+1)return[" ",X];let D=Y.charCodeAt(X+1);if(D<56320||D>57343)return[" ",X];return[Y.charAt(X)+Y.charAt(X+1),X+1]}if(X===0)return[" ",X];let V=Y.charCodeAt(X-1);if(V<55296||V>56319)return[" ",X];throw Error(`String "${Y}" reaches code believed to be unreachable; please open an issue at https://github.com/Trott/slug/issues/new`)}var u;if(typeof window<"u")if(window.btoa)u=function(Y){return btoa(unescape(encodeURIComponent(Y)))};else u=function(Y){let X=unescape(encodeURIComponent(`${Y}`)),W="",V=0,D,v=0,N="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";while(!0){let G=N;if(!X.charAt(v|0)){if(G="=",!(v%1))break}if(W+=G.charAt(63&V>>8-v%1*8),G==="="&&!(v%1))break;if(D=X.charCodeAt(v+=0.75),D>255)throw Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");V=V<<8|D}return W};else u=function(Y){return(V1(),$1(S0)).Buffer.from(Y).toString("base64")};var P=v1;function v1(Y,X){if(X&&typeof X==="object"&&X.debug===!0){let v=Y.split(" ").map((N)=>{return Array.from(N).map((G)=>G.codePointAt(0))});return`STRING: ${Y}
8
- CODEPOINTS: ${JSON.stringify(v)}`}let W=o(Y,X);if((X&&typeof X==="object"&&X.fallback!==void 0?X.fallback:P.defaults.fallback)===!0&&W===""){let D="";for(let N=0;N<Y.length;N++){let G=O1(Y,N);N=G[1],D+=G[0]}let v=u(D);if(typeof v==="string")W=o(v,X)}return W}var g0={bg:{\u{419}:"Y",\u{439}:"y",X:"H",x:"h",\u{426}:"Ts",\u{446}:"ts",\u{429}:"Sht",\u{449}:"sht",\u{42a}:"A",\u{44a}:"a",\u{42c}:"Y",\u{44c}:"y"},de:{\u{c4}:"AE",\u{e4}:"ae",\u{d6}:"OE",\u{f6}:"oe",\u{dc}:"UE",\u{fc}:"ue"},sr:{\u{111}:"dj",\u{110}:"DJ"},uk:{\u{418}:"Y",\u{438}:"y",\u{419}:"Y",\u{439}:"y",\u{426}:"Ts",\u{446}:"ts",\u{425}:"Kh",\u{445}:"kh",\u{429}:"Shch",\u{449}:"shch",\u{413}:"H",\u{433}:"h"}},s={};function o(Y,X){if(typeof Y!=="string")throw TypeError(`slug() requires a string argument, received ${typeof Y}`);let W;if(typeof X==="string")W={replacement:X};else W=X?Object.assign({},X):{};W.mode=W.mode||P.defaults.mode;let V=P.defaults.modes[W.mode],D=["replacement","multicharmap","charmap","remove","lower","trim"];for(let U,j=0,F=D.length;j<F;j++)U=D[j],W[U]=U in W?W[U]:V[U];let v=W.locale?g0[W.locale]||s:s,N=[];if(W.multicharmap)for(let U in W.multicharmap){if(!Object.prototype.hasOwnProperty.call(W.multicharmap,U))continue;let j=U.length;if(!N.includes(j))N.push(j)}N=N.sort((U,j)=>j-U);let G=W.mode==="rfc3986"?/[^\w\s\-.~]/:/[^A-Z0-9\s]/i,R="";for(let U,j=0,F=Y.length;j<F;j++){U=Y[j];let S=!1;for(let b=0;b<N.length;b++){let K=N[b],O=Y.substr(j,K);if(W.multicharmap&&W.multicharmap[O]){j+=K-1,U=W.multicharmap[O],S=!0;break}}if(!S)if(v[U])U=v[U];else if(W.charmap&&W.charmap[U])U=W.charmap[U].replace(W.replacement," ");else if(W.replacement&&U.includes(W.replacement))U=U.replace(W.replacement," ");else U=U.replace(G,"");R+=U}if(W.remove)R=R.replace(W.remove,"");if(W.trim)R=R.trim();if(R=R.replace(/\s+/g,W.replacement),W.lower)R=R.toLowerCase();return R}var f0={\u{92b}\u{93c}:"Fi",\u{917}\u{93c}:"Ghi",\u{916}\u{93c}:"Khi",\u{915}\u{93c}:"Qi",\u{921}\u{93c}:"ugDha",\u{922}\u{93c}:"ugDhha",\u{92f}\u{93c}:"Yi",\u{91c}\u{93c}:"Za",\u{5d1}\u{5b4}\u{5d9}:"i",\u{5d1}\u{5b5}:"e",\u{5d1}\u{5b5}\u{5d9}:"e",\u{5d1}\u{5b6}:"e",\u{5d1}\u{5b7}:"a",\u{5d1}\u{5b8}:"a",\u{5d1}\u{5b9}:"o",\u{5d5}\u{5b9}:"o",\u{5d1}\u{5bb}:"u",\u{5d5}\u{5bc}:"u",\u{5d1}\u{5bc}:"b",\u{5db}\u{5bc}:"k",\u{5da}\u{5bc}:"k",\u{5e4}\u{5bc}:"p",\u{5e9}\u{5c1}:"sh",\u{5e9}\u{5c2}:"s",\u{5d1}\u{5b0}:"e",\u{5d7}\u{5b1}:"e",\u{5d7}\u{5b2}:"a",\u{5d7}\u{5b3}:"o",\u{5d1}\u{5b4}:"i"},c0={\u{c0}:"A",\u{c1}:"A",\u{c2}:"A",\u{c3}:"A",\u{c4}:"A",\u{c5}:"A",\u{c6}:"AE",\u{c7}:"C",\u{c8}:"E",\u{c9}:"E",\u{ca}:"E",\u{cb}:"E",\u{cc}:"I",\u{cd}:"I",\u{ce}:"I",\u{cf}:"I",\u{d0}:"D",\u{d1}:"N",\u{d2}:"O",\u{d3}:"O",\u{d4}:"O",\u{d5}:"O",\u{d6}:"O",\u{150}:"O",\u{d8}:"O",\u{14c}:"O",\u{d9}:"U",\u{da}:"U",\u{db}:"U",\u{dc}:"U",\u{170}:"U",\u{dd}:"Y",\u{de}:"TH",\u{df}:"ss",\u{e0}:"a",\u{e1}:"a",\u{e2}:"a",\u{e3}:"a",\u{e4}:"a",\u{e5}:"a",\u{e6}:"ae",\u{e7}:"c",\u{e8}:"e",\u{e9}:"e",\u{ea}:"e",\u{eb}:"e",\u{ec}:"i",\u{ed}:"i",\u{ee}:"i",\u{ef}:"i",\u{f0}:"d",\u{f1}:"n",\u{f2}:"o",\u{f3}:"o",\u{f4}:"o",\u{f5}:"o",\u{f6}:"o",\u{151}:"o",\u{f8}:"o",\u{14d}:"o",\u{152}:"OE",\u{153}:"oe",\u{f9}:"u",\u{fa}:"u",\u{fb}:"u",\u{fc}:"u",\u{171}:"u",\u{fd}:"y",\u{fe}:"th",\u{ff}:"y",\u{1e9e}:"SS",\u{3b1}:"a",\u{3b2}:"b",\u{3b3}:"g",\u{3b4}:"d",\u{3b5}:"e",\u{3b6}:"z",\u{3b7}:"h",\u{3b8}:"th",\u{3b9}:"i",\u{3ba}:"k",\u{3bb}:"l",\u{3bc}:"m",\u{3bd}:"n",\u{3be}:"3",\u{3bf}:"o",\u{3c0}:"p",\u{3c1}:"r",\u{3c3}:"s",\u{3c4}:"t",\u{3c5}:"y",\u{3c6}:"f",\u{3c7}:"x",\u{3c8}:"ps",\u{3c9}:"w",\u{3ac}:"a",\u{3ad}:"e",\u{3af}:"i",\u{3cc}:"o",\u{3cd}:"y",\u{3ae}:"h",\u{3ce}:"w",\u{3c2}:"s",\u{3ca}:"i",\u{3b0}:"y",\u{3cb}:"y",\u{390}:"i",\u{391}:"A",\u{392}:"B",\u{393}:"G",\u{394}:"D",\u{395}:"E",\u{396}:"Z",\u{397}:"H",\u{398}:"Th",\u{399}:"I",\u{39a}:"K",\u{39b}:"L",\u{39c}:"M",\u{39d}:"N",\u{39e}:"3",\u{39f}:"O",\u{3a0}:"P",\u{3a1}:"R",\u{3a3}:"S",\u{3a4}:"T",\u{3a5}:"Y",\u{3a6}:"F",\u{3a7}:"X",\u{3a8}:"PS",\u{3a9}:"W",\u{386}:"A",\u{388}:"E",\u{38a}:"I",\u{38c}:"O",\u{38e}:"Y",\u{389}:"H",\u{38f}:"W",\u{3aa}:"I",\u{3ab}:"Y",\u{15f}:"s",\u{15e}:"S",\u{131}:"i",\u{130}:"I",\u{11f}:"g",\u{11e}:"G",\u{430}:"a",\u{431}:"b",\u{432}:"v",\u{433}:"g",\u{434}:"d",\u{435}:"e",\u{451}:"yo",\u{436}:"zh",\u{437}:"z",\u{438}:"i",\u{439}:"j",\u{43a}:"k",\u{43b}:"l",\u{43c}:"m",\u{43d}:"n",\u{43e}:"o",\u{43f}:"p",\u{440}:"r",\u{441}:"s",\u{442}:"t",\u{443}:"u",\u{444}:"f",\u{445}:"h",\u{446}:"c",\u{447}:"ch",\u{448}:"sh",\u{449}:"sh",\u{44a}:"u",\u{44b}:"y",\u{44c}:"",\u{44d}:"e",\u{44e}:"yu",\u{44f}:"ya",\u{410}:"A",\u{411}:"B",\u{412}:"V",\u{413}:"G",\u{414}:"D",\u{415}:"E",\u{401}:"Yo",\u{416}:"Zh",\u{417}:"Z",\u{418}:"I",\u{419}:"J",\u{41a}:"K",\u{41b}:"L",\u{41c}:"M",\u{41d}:"N",\u{41e}:"O",\u{41f}:"P",\u{420}:"R",\u{421}:"S",\u{422}:"T",\u{423}:"U",\u{424}:"F",\u{425}:"H",\u{426}:"C",\u{427}:"Ch",\u{428}:"Sh",\u{429}:"Sh",\u{42a}:"U",\u{42b}:"Y",\u{42c}:"",\u{42d}:"E",\u{42e}:"Yu",\u{42f}:"Ya",\u{404}:"Ye",\u{406}:"I",\u{407}:"Yi",\u{490}:"G",\u{454}:"ye",\u{456}:"i",\u{457}:"yi",\u{491}:"g",\u{10d}:"c",\u{10f}:"d",\u{11b}:"e",\u{148}:"n",\u{159}:"r",\u{161}:"s",\u{165}:"t",\u{16f}:"u",\u{17e}:"z",\u{10c}:"C",\u{10e}:"D",\u{11a}:"E",\u{147}:"N",\u{158}:"R",\u{160}:"S",\u{164}:"T",\u{16e}:"U",\u{17d}:"Z",\u{13e}:"l",\u{13a}:"l",\u{155}:"r",\u{13d}:"L",\u{139}:"L",\u{154}:"R",\u{105}:"a",\u{107}:"c",\u{119}:"e",\u{142}:"l",\u{144}:"n",\u{15b}:"s",\u{17a}:"z",\u{17c}:"z",\u{104}:"A",\u{106}:"C",\u{118}:"E",\u{141}:"L",\u{143}:"N",\u{15a}:"S",\u{179}:"Z",\u{17b}:"Z",\u{101}:"a",\u{113}:"e",\u{123}:"g",\u{12b}:"i",\u{137}:"k",\u{13c}:"l",\u{146}:"n",\u{16b}:"u",\u{100}:"A",\u{112}:"E",\u{122}:"G",\u{12a}:"I",\u{136}:"K",\u{13b}:"L",\u{145}:"N",\u{16a}:"U",\u{623}:"a",\u{625}:"i",\u{628}:"b",\u{62a}:"t",\u{62b}:"th",\u{62c}:"g",\u{62d}:"h",\u{62e}:"kh",\u{62f}:"d",\u{630}:"th",\u{631}:"r",\u{632}:"z",\u{633}:"s",\u{634}:"sh",\u{635}:"s",\u{636}:"d",\u{637}:"t",\u{638}:"th",\u{639}:"aa",\u{63a}:"gh",\u{641}:"f",\u{642}:"k",\u{643}:"k",\u{644}:"l",\u{645}:"m",\u{646}:"n",\u{647}:"h",\u{648}:"o",\u{64a}:"y",\u{621}:"aa",\u{629}:"a",\u{622}:"a",\u{627}:"a",\u{67e}:"p",\u{698}:"zh",\u{6af}:"g",\u{686}:"ch",\u{6a9}:"k",\u{6cc}:"i",\u{117}:"e",\u{12f}:"i",\u{173}:"u",\u{116}:"E",\u{12e}:"I",\u{172}:"U",\u{21b}:"t",\u{21a}:"T",\u{163}:"t",\u{162}:"T",\u{219}:"s",\u{218}:"S",\u{103}:"a",\u{102}:"A",\u{1ea0}:"A",\u{1ea2}:"A",\u{1ea6}:"A",\u{1ea4}:"A",\u{1eac}:"A",\u{1ea8}:"A",\u{1eaa}:"A",\u{1eb0}:"A",\u{1eae}:"A",\u{1eb6}:"A",\u{1eb2}:"A",\u{1eb4}:"A",\u{1eb8}:"E",\u{1eba}:"E",\u{1ebc}:"E",\u{1ec0}:"E",\u{1ebe}:"E",\u{1ec6}:"E",\u{1ec2}:"E",\u{1ec4}:"E",\u{1eca}:"I",\u{1ec8}:"I",\u{128}:"I",\u{1ecc}:"O",\u{1ece}:"O",\u{1ed2}:"O",\u{1ed0}:"O",\u{1ed8}:"O",\u{1ed4}:"O",\u{1ed6}:"O",\u{1a0}:"O",\u{1edc}:"O",\u{1eda}:"O",\u{1ee2}:"O",\u{1ede}:"O",\u{1ee0}:"O",\u{1ee4}:"U",\u{1ee6}:"U",\u{168}:"U",\u{1af}:"U",\u{1eea}:"U",\u{1ee8}:"U",\u{1ef0}:"U",\u{1eec}:"U",\u{1eee}:"U",\u{1ef2}:"Y",\u{1ef4}:"Y",\u{1ef6}:"Y",\u{1ef8}:"Y",\u{110}:"D",\u{1ea1}:"a",\u{1ea3}:"a",\u{1ea7}:"a",\u{1ea5}:"a",\u{1ead}:"a",\u{1ea9}:"a",\u{1eab}:"a",\u{1eb1}:"a",\u{1eaf}:"a",\u{1eb7}:"a",\u{1eb3}:"a",\u{1eb5}:"a",\u{1eb9}:"e",\u{1ebb}:"e",\u{1ebd}:"e",\u{1ec1}:"e",\u{1ebf}:"e",\u{1ec7}:"e",\u{1ec3}:"e",\u{1ec5}:"e",\u{1ecb}:"i",\u{1ec9}:"i",\u{129}:"i",\u{1ecd}:"o",\u{1ecf}:"o",\u{1ed3}:"o",\u{1ed1}:"o",\u{1ed9}:"o",\u{1ed5}:"o",\u{1ed7}:"o",\u{1a1}:"o",\u{1edd}:"o",\u{1edb}:"o",\u{1ee3}:"o",\u{1edf}:"o",\u{1ee1}:"o",\u{1ee5}:"u",\u{1ee7}:"u",\u{169}:"u",\u{1b0}:"u",\u{1eeb}:"u",\u{1ee9}:"u",\u{1ef1}:"u",\u{1eed}:"u",\u{1eef}:"u",\u{1ef3}:"y",\u{1ef5}:"y",\u{1ef7}:"y",\u{1ef9}:"y",\u{111}:"d",\u{4d8}:"AE",\u{4d9}:"ae",\u{492}:"GH",\u{493}:"gh",\u{49a}:"KH",\u{49b}:"kh",\u{4a2}:"NG",\u{4a3}:"ng",\u{4ae}:"UE",\u{4af}:"ue",\u{4b0}:"U",\u{4b1}:"u",\u{4ba}:"H",\u{4bb}:"h",\u{4e8}:"OE",\u{4e9}:"oe",\u{452}:"dj",\u{458}:"j",\u{459}:"lj",\u{45a}:"nj",\u{45b}:"c",\u{45f}:"dz",\u{402}:"Dj",\u{408}:"j",\u{409}:"Lj",\u{40a}:"Nj",\u{40b}:"C",\u{40f}:"Dz",\u{1cc}:"nj",\u{1c9}:"lj",\u{1cb}:"NJ",\u{1c8}:"LJ",\u{905}:"a",\u{906}:"aa",\u{90f}:"e",\u{908}:"ii",\u{90d}:"ei",\u{90e}:"ae",\u{910}:"ai",\u{907}:"i",\u{913}:"o",\u{911}:"oi",\u{912}:"oii",\u{90a}:"uu",\u{914}:"ou",\u{909}:"u",\u{92c}:"B",\u{92d}:"Bha",\u{91a}:"Ca",\u{91b}:"Chha",\u{921}:"Da",\u{922}:"Dha",\u{92b}:"Fa",\u{917}:"Ga",\u{918}:"Gha",\u{917}\u{93c}:"Ghi",\u{939}:"Ha",\u{91c}:"Ja",\u{91d}:"Jha",\u{915}:"Ka",\u{916}:"Kha",\u{916}\u{93c}:"Khi",\u{932}:"L",\u{933}:"Li",\u{90c}:"Li",\u{934}:"Lii",\u{961}:"Lii",\u{92e}:"Ma",\u{928}:"Na",\u{919}:"Na",\u{91e}:"Nia",\u{923}:"Nae",\u{929}:"Ni",\u{950}:"oms",\u{92a}:"Pa",\u{915}\u{93c}:"Qi",\u{930}:"Ra",\u{90b}:"Ri",\u{960}:"Ri",\u{931}:"Ri",\u{938}:"Sa",\u{936}:"Sha",\u{937}:"Shha",\u{91f}:"Ta",\u{924}:"Ta",\u{920}:"Tha",\u{926}:"Tha",\u{925}:"Tha",\u{927}:"Thha",\u{921}\u{93c}:"ugDha",\u{922}\u{93c}:"ugDhha",\u{935}:"Va",\u{92f}:"Ya",\u{92f}\u{93c}:"Yi",\u{91c}\u{93c}:"Za",\u{259}:"e",\u{18f}:"E",\u{10d0}:"a",\u{10d1}:"b",\u{10d2}:"g",\u{10d3}:"d",\u{10d4}:"e",\u{10d5}:"v",\u{10d6}:"z",\u{10d7}:"t",\u{10d8}:"i",\u{10d9}:"k",\u{10da}:"l",\u{10db}:"m",\u{10dc}:"n",\u{10dd}:"o",\u{10de}:"p",\u{10df}:"zh",\u{10e0}:"r",\u{10e1}:"s",\u{10e2}:"t",\u{10e3}:"u",\u{10e4}:"p",\u{10e5}:"k",\u{10e6}:"gh",\u{10e7}:"q",\u{10e8}:"sh",\u{10e9}:"ch",\u{10ea}:"ts",\u{10eb}:"dz",\u{10ec}:"ts",\u{10ed}:"ch",\u{10ee}:"kh",\u{10ef}:"j",\u{10f0}:"h",\u{5d1}:"v",\u{5d2}\u{5bc}:"g",\u{5d2}:"g",\u{5d3}:"d",\u{5d3}\u{5bc}:"d",\u{5d4}:"h",\u{5d5}:"v",\u{5d6}:"z",\u{5d7}:"h",\u{5d8}:"t",\u{5d9}:"y",\u{5db}:"kh",\u{5da}:"kh",\u{5dc}:"l",\u{5de}:"m",\u{5dd}:"m",\u{5e0}:"n",\u{5df}:"n",\u{5e1}:"s",\u{5e4}:"f",\u{5e3}:"f",\u{5e5}:"ts",\u{5e6}:"ts",\u{5e7}:"k",\u{5e8}:"r",\u{5ea}\u{5bc}:"t",\u{5ea}:"t"};P.charmap=Object.assign({},c0);P.multicharmap=Object.assign({},f0);P.defaults={charmap:P.charmap,mode:"pretty",modes:{rfc3986:{replacement:"-",remove:null,lower:!0,charmap:P.charmap,multicharmap:P.multicharmap,trim:!0},pretty:{replacement:"-",remove:null,lower:!0,charmap:P.charmap,multicharmap:P.multicharmap,trim:!0}},multicharmap:P.multicharmap,fallback:!0};P.reset=function(){P.defaults.modes.rfc3986.charmap=P.defaults.modes.pretty.charmap=P.charmap=P.defaults.charmap=Object.assign({},c0),P.defaults.modes.rfc3986.multicharmap=P.defaults.modes.pretty.multicharmap=P.multicharmap=P.defaults.multicharmap=Object.assign({},f0),s={}};P.extend=function(Y){let X=Object.keys(Y),W={},V={};for(let D=0;D<X.length;D++)if(X[D].length>1)W[X[D]]=Y[X[D]];else V[X[D]]=Y[X[D]];Object.assign(P.charmap,V),Object.assign(P.multicharmap,W)};P.setLocale=function(Y){s=g0[Y]||{}};async function P1(Y,X){let W=o(Y);if(!X?.table||!X?.column)return W;let V=W,D=1,v=1000;while(D<=v){if(!await a0.selectFrom(X.table).select(["id"]).where(X.column,"=",V).executeTakeFirst())return V;D++,V=`${W}-${D}`}let N=R1(6).toString("base64url").toLowerCase().replace(/[^a-z0-9]/g,"").slice(0,8);return`${W}-${N}`}export{P1 as uniqueSlug,o as slugify};
2
+ import{randomBytes as gt}from"crypto";import{db as _r}from"@stacksjs/database";var{defineProperty:Y,getOwnPropertyNames:Sr,getOwnPropertyDescriptor:Or}=Object,xr=Object.prototype.hasOwnProperty;function Mr(r){return this[r]}var Lr=(r)=>{var t=(Z??=new WeakMap).get(r),e;if(t)return t;if(t=Y({},"__esModule",{value:!0}),r&&typeof r==="object"||typeof r==="function"){for(var i of Sr(r))if(!xr.call(t,i))Y(t,i,{get:Mr.bind(r,i),enumerable:!(e=Or(r,i))||e.enumerable})}return Z.set(r,t),t},Z,jr=(r)=>r;function $r(r,t){this[r]=jr.bind(null,t)}var Pr=(r,t)=>{for(var e in t)Y(r,e,{get:t[e],enumerable:!0,configurable:!0,set:$r.bind(t,e)})},Dr=(r,t)=>()=>(r&&(t=r(r=0)),t),ir={};Pr(ir,{transcode:()=>Tr,resolveObjectURL:()=>Ur,kStringMaxLength:()=>fr,kMaxLength:()=>N,isUtf8:()=>br,isAscii:()=>st,default:()=>Rr,constants:()=>wr,btoa:()=>yr,atob:()=>mr,INSPECT_MAX_BYTES:()=>sr,File:()=>gr,Buffer:()=>h,Blob:()=>dr});function Yr(r){var t=r.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var e=r.indexOf("=");if(e===-1)e=t;var i=e===t?0:4-e%4;return[e,i]}function Fr(r,t){return(r+t)*3/4-t}function Gr(r){var t,e=Yr(r),i=e[0],n=e[1],o=new Uint8Array(Fr(i,n)),u=0,a=n>0?i-4:i,p;for(p=0;p<a;p+=4)t=d[r.charCodeAt(p)]<<18|d[r.charCodeAt(p+1)]<<12|d[r.charCodeAt(p+2)]<<6|d[r.charCodeAt(p+3)],o[u++]=t>>16&255,o[u++]=t>>8&255,o[u++]=t&255;if(n===2)t=d[r.charCodeAt(p)]<<2|d[r.charCodeAt(p+1)]>>4,o[u++]=t&255;if(n===1)t=d[r.charCodeAt(p)]<<10|d[r.charCodeAt(p+1)]<<4|d[r.charCodeAt(p+2)]>>2,o[u++]=t>>8&255,o[u++]=t&255;return o}function zr(r){return w[r>>18&63]+w[r>>12&63]+w[r>>6&63]+w[r&63]}function Hr(r,t,e){var i,n=[];for(var o=t;o<e;o+=3)i=(r[o]<<16&16711680)+(r[o+1]<<8&65280)+(r[o+2]&255),n.push(zr(i));return n.join("")}function J(r){var t,e=r.length,i=e%3,n=[],o=16383;for(var u=0,a=e-i;u<a;u+=o)n.push(Hr(r,u,u+o>a?a:u+o));if(i===1)t=r[e-1],n.push(w[t>>2]+w[t<<4&63]+"==");else if(i===2)t=(r[e-2]<<8)+r[e-1],n.push(w[t>>10]+w[t>>4&63]+w[t<<2&63]+"=");return n.join("")}function _(r,t,e,i,n){var o,u,a=n*8-i-1,p=(1<<a)-1,c=p>>1,l=-7,s=e?n-1:0,E=e?-1:1,m=r[t+s];s+=E,o=m&(1<<-l)-1,m>>=-l,l+=a;for(;l>0;o=o*256+r[t+s],s+=E,l-=8);u=o&(1<<-l)-1,o>>=-l,l+=i;for(;l>0;u=u*256+r[t+s],s+=E,l-=8);if(o===0)o=1-c;else if(o===p)return u?NaN:(m?-1:1)*(1/0);else u=u+Math.pow(2,i),o=o-c;return(m?-1:1)*u*Math.pow(2,o-i)}function nr(r,t,e,i,n,o){var u,a,p,c=o*8-n-1,l=(1<<c)-1,s=l>>1,E=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=i?0:o-1,T=i?1:-1,k=t<0||t===0&&1/t<0?1:0;if(t=Math.abs(t),isNaN(t)||t===1/0)a=isNaN(t)?1:0,u=l;else{if(u=Math.floor(Math.log(t)/Math.LN2),t*(p=Math.pow(2,-u))<1)u--,p*=2;if(u+s>=1)t+=E/p;else t+=E*Math.pow(2,1-s);if(t*p>=2)u++,p/=2;if(u+s>=l)a=0,u=l;else if(u+s>=1)a=(t*p-1)*Math.pow(2,n),u=u+s;else a=t*Math.pow(2,s-1)*Math.pow(2,n),u=0}for(;n>=8;r[e+m]=a&255,m+=T,a/=256,n-=8);u=u<<n|a,c+=n;for(;c>0;r[e+m]=u&255,m+=T,u/=256,c-=8);r[e+m-T]|=k*128}function A(r){if(r>N)throw RangeError('The value "'+r+'" is invalid for option "size"');let t=new Uint8Array(r);return Object.setPrototypeOf(t,h.prototype),t}function j(r,t,e){return class extends e{constructor(){super();Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${r}]`,this.stack,delete this.name}get code(){return r}set code(i){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:i,writable:!0})}toString(){return`${this.name} [${r}]: ${this.message}`}}}function h(r,t,e){if(typeof r==="number"){if(typeof t==="string")throw TypeError('The "string" argument must be of type string. Received type number');return F(r)}return or(r,t,e)}function or(r,t,e){if(typeof r==="string")return Zr(r,t);if(ArrayBuffer.isView(r))return Jr(r);if(r==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if(B(r,ArrayBuffer)||r&&B(r.buffer,ArrayBuffer))return z(r,t,e);if(typeof SharedArrayBuffer<"u"&&(B(r,SharedArrayBuffer)||r&&B(r.buffer,SharedArrayBuffer)))return z(r,t,e);if(typeof r==="number")throw TypeError('The "value" argument must not be of type number. Received type number');let i=r.valueOf&&r.valueOf();if(i!=null&&i!==r)return h.from(i,t,e);let n=Kr(r);if(n)return n;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof r[Symbol.toPrimitive]==="function")return h.from(r[Symbol.toPrimitive]("string"),t,e);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}function ur(r){if(typeof r!=="number")throw TypeError('"size" argument must be of type number');else if(r<0)throw RangeError('The value "'+r+'" is invalid for option "size"')}function Wr(r,t,e){if(ur(r),r<=0)return A(r);if(t!==void 0)return typeof e==="string"?A(r).fill(t,e):A(r).fill(t);return A(r)}function F(r){return ur(r),A(r<0?0:W(r)|0)}function Zr(r,t){if(typeof t!=="string"||t==="")t="utf8";if(!h.isEncoding(t))throw TypeError("Unknown encoding: "+t);let e=hr(r,t)|0,i=A(e),n=i.write(r,t);if(n!==e)i=i.slice(0,n);return i}function G(r){let t=r.length<0?0:W(r.length)|0,e=A(t);for(let i=0;i<t;i+=1)e[i]=r[i]&255;return e}function Jr(r){if(B(r,Uint8Array)){let t=new Uint8Array(r);return z(t.buffer,t.byteOffset,t.byteLength)}return G(r)}function z(r,t,e){if(t<0||r.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(r.byteLength<t+(e||0))throw RangeError('"length" is outside of buffer bounds');let i;if(t===void 0&&e===void 0)i=new Uint8Array(r);else if(e===void 0)i=new Uint8Array(r,t);else i=new Uint8Array(r,t,e);return Object.setPrototypeOf(i,h.prototype),i}function Kr(r){if(h.isBuffer(r)){let t=W(r.length)|0,e=A(t);if(e.length===0)return e;return r.copy(e,0,0,t),e}if(r.length!==void 0){if(typeof r.length!=="number"||Number.isNaN(r.length))return A(0);return G(r)}if(r.type==="Buffer"&&Array.isArray(r.data))return G(r.data)}function W(r){if(r>=N)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+N.toString(16)+" bytes");return r|0}function hr(r,t){if(h.isBuffer(r))return r.length;if(ArrayBuffer.isView(r)||B(r,ArrayBuffer))return r.byteLength;if(typeof r!=="string")throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof r);let e=r.length,i=arguments.length>2&&arguments[2]===!0;if(!i&&e===0)return 0;let n=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":return H(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return pr(r).length;default:if(n)return i?-1:H(r).length;t=(""+t).toLowerCase(),n=!0}}function Vr(r,t,e){let i=!1;if(t===void 0||t<0)t=0;if(t>this.length)return"";if(e===void 0||e>this.length)e=this.length;if(e<=0)return"";if(e>>>=0,t>>>=0,e<=t)return"";if(!r)r="utf8";while(!0)switch(r){case"hex":return ot(this,t,e);case"utf8":case"utf-8":return ar(this,t,e);case"ascii":return it(this,t,e);case"latin1":case"binary":return nt(this,t,e);case"base64":return tt(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ut(this,t,e);default:if(i)throw TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),i=!0}}function U(r,t,e){let i=r[t];r[t]=r[e],r[e]=i}function K(r,t,e,i,n){if(r.length===0)return-1;if(typeof e==="string")i=e,e=0;else if(e>2147483647)e=2147483647;else if(e<-2147483648)e=-2147483648;if(e=+e,Number.isNaN(e))e=n?0:r.length-1;if(e<0)e=r.length+e;if(e>=r.length)if(n)return-1;else e=r.length-1;else if(e<0)if(n)e=0;else return-1;if(typeof t==="string")t=h.from(t,i);if(h.isBuffer(t)){if(t.length===0)return-1;return V(r,t,e,i,n)}else if(typeof t==="number"){if(t=t&255,typeof Uint8Array.prototype.indexOf==="function")if(n)return Uint8Array.prototype.indexOf.call(r,t,e);else return Uint8Array.prototype.lastIndexOf.call(r,t,e);return V(r,[t],e,i,n)}throw TypeError("val must be string, number or Buffer")}function V(r,t,e,i,n){let o=1,u=r.length,a=t.length;if(i!==void 0){if(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le"){if(r.length<2||t.length<2)return-1;o=2,u/=2,a/=2,e/=2}}function p(l,s){if(o===1)return l[s];else return l.readUInt16BE(s*o)}let c;if(n){let l=-1;for(c=e;c<u;c++)if(p(r,c)===p(t,l===-1?0:c-l)){if(l===-1)l=c;if(c-l+1===a)return l*o}else{if(l!==-1)c-=c-l;l=-1}}else{if(e+a>u)e=u-a;for(c=e;c>=0;c--){let l=!0;for(let s=0;s<a;s++)if(p(r,c+s)!==p(t,s)){l=!1;break}if(l)return c}}return-1}function Xr(r,t,e,i){e=Number(e)||0;let n=r.length-e;if(!i)i=n;else if(i=Number(i),i>n)i=n;let o=t.length;if(i>o/2)i=o/2;let u;for(u=0;u<i;++u){let a=parseInt(t.substr(u*2,2),16);if(Number.isNaN(a))return u;r[e+u]=a}return u}function qr(r,t,e,i){return L(H(t,r.length-e),r,e,i)}function Qr(r,t,e,i){return L(ct(t),r,e,i)}function vr(r,t,e,i){return L(pr(t),r,e,i)}function rt(r,t,e,i){return L(lt(t,r.length-e),r,e,i)}function tt(r,t,e){if(t===0&&e===r.length)return J(r);else return J(r.slice(t,e))}function ar(r,t,e){e=Math.min(r.length,e);let i=[],n=t;while(n<e){let o=r[n],u=null,a=o>239?4:o>223?3:o>191?2:1;if(n+a<=e){let p,c,l,s;switch(a){case 1:if(o<128)u=o;break;case 2:if(p=r[n+1],(p&192)===128){if(s=(o&31)<<6|p&63,s>127)u=s}break;case 3:if(p=r[n+1],c=r[n+2],(p&192)===128&&(c&192)===128){if(s=(o&15)<<12|(p&63)<<6|c&63,s>2047&&(s<55296||s>57343))u=s}break;case 4:if(p=r[n+1],c=r[n+2],l=r[n+3],(p&192)===128&&(c&192)===128&&(l&192)===128){if(s=(o&15)<<18|(p&63)<<12|(c&63)<<6|l&63,s>65535&&s<1114112)u=s}}}if(u===null)u=65533,a=1;else if(u>65535)u-=65536,i.push(u>>>10&1023|55296),u=56320|u&1023;i.push(u),n+=a}return et(i)}function et(r){let t=r.length;if(t<=er)return String.fromCharCode.apply(String,r);let e="",i=0;while(i<t)e+=String.fromCharCode.apply(String,r.slice(i,i+=er));return e}function it(r,t,e){let i="";e=Math.min(r.length,e);for(let n=t;n<e;++n)i+=String.fromCharCode(r[n]&127);return i}function nt(r,t,e){let i="";e=Math.min(r.length,e);for(let n=t;n<e;++n)i+=String.fromCharCode(r[n]);return i}function ot(r,t,e){let i=r.length;if(!t||t<0)t=0;if(!e||e<0||e>i)e=i;let n="";for(let o=t;o<e;++o)n+=Ir[r[o]];return n}function ut(r,t,e){let i=r.slice(t,e),n="";for(let o=0;o<i.length-1;o+=2)n+=String.fromCharCode(i[o]+i[o+1]*256);return n}function y(r,t,e){if(r%1!==0||r<0)throw RangeError("offset is not uint");if(r+t>e)throw RangeError("Trying to access beyond buffer length")}function g(r,t,e,i,n,o){if(!h.isBuffer(r))throw TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<o)throw RangeError('"value" argument is out of bounds');if(e+i>r.length)throw RangeError("Index out of range")}function X(r,t,e,i,n){lr(t,i,n,r,e,7);let o=Number(t&BigInt(4294967295));r[e++]=o,o=o>>8,r[e++]=o,o=o>>8,r[e++]=o,o=o>>8,r[e++]=o;let u=Number(t>>BigInt(32)&BigInt(4294967295));return r[e++]=u,u=u>>8,r[e++]=u,u=u>>8,r[e++]=u,u=u>>8,r[e++]=u,e}function q(r,t,e,i,n){lr(t,i,n,r,e,7);let o=Number(t&BigInt(4294967295));r[e+7]=o,o=o>>8,r[e+6]=o,o=o>>8,r[e+5]=o,o=o>>8,r[e+4]=o;let u=Number(t>>BigInt(32)&BigInt(4294967295));return r[e+3]=u,u=u>>8,r[e+2]=u,u=u>>8,r[e+1]=u,u=u>>8,r[e]=u,e+8}function cr(r,t,e,i,n,o){if(e+i>r.length)throw RangeError("Index out of range");if(e<0)throw RangeError("Index out of range")}function Q(r,t,e,i,n){if(t=+t,e=e>>>0,!n)cr(r,t,e,4,340282346638528860000000000000000000000,-340282346638528860000000000000000000000);return nr(r,t,e,i,23,4),e+4}function v(r,t,e,i,n){if(t=+t,e=e>>>0,!n)cr(r,t,e,8,179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000);return nr(r,t,e,i,52,8),e+8}function rr(r){let t="",e=r.length,i=r[0]==="-"?1:0;for(;e>=i+4;e-=3)t=`_${r.slice(e-3,e)}${t}`;return`${r.slice(0,e)}${t}`}function ht(r,t,e){if(R(t,"offset"),r[t]===void 0||r[t+e]===void 0)C(t,r.length-(e+1))}function lr(r,t,e,i,n,o){if(r>e||r<t){let u=typeof t==="bigint"?"n":"",a;if(o>3)if(t===0||t===BigInt(0))a=`>= 0${u} and < 2${u} ** ${(o+1)*8}${u}`;else a=`>= -(2${u} ** ${(o+1)*8-1}${u}) and < 2 ** ${(o+1)*8-1}${u}`;else a=`>= ${t}${u} and <= ${e}${u}`;throw new O("value",a,r)}ht(i,n,o)}function R(r,t){if(typeof r!=="number")throw new Er(t,"number",r)}function C(r,t,e){if(Math.floor(r)!==r)throw R(r,e),new O(e||"offset","an integer",r);if(t<0)throw new Br;throw new O(e||"offset",`>= ${e?1:0} and <= ${t}`,r)}function at(r){if(r=r.split("=")[0],r=r.trim().replace(Ar,""),r.length<2)return"";while(r.length%4!==0)r=r+"=";return r}function H(r,t){t=t||1/0;let e,i=r.length,n=null,o=[];for(let u=0;u<i;++u){if(e=r.charCodeAt(u),e>55295&&e<57344){if(!n){if(e>56319){if((t-=3)>-1)o.push(239,191,189);continue}else if(u+1===i){if((t-=3)>-1)o.push(239,191,189);continue}n=e;continue}if(e<56320){if((t-=3)>-1)o.push(239,191,189);n=e;continue}e=(n-55296<<10|e-56320)+65536}else if(n){if((t-=3)>-1)o.push(239,191,189)}if(n=null,e<128){if((t-=1)<0)break;o.push(e)}else if(e<2048){if((t-=2)<0)break;o.push(e>>6|192,e&63|128)}else if(e<65536){if((t-=3)<0)break;o.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((t-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw Error("Invalid code point")}return o}function ct(r){let t=[];for(let e=0;e<r.length;++e)t.push(r.charCodeAt(e)&255);return t}function lt(r,t){let e,i,n,o=[];for(let u=0;u<r.length;++u){if((t-=2)<0)break;e=r.charCodeAt(u),i=e>>8,n=e%256,o.push(n),o.push(i)}return o}function pr(r){return Gr(at(r))}function L(r,t,e,i){let n;for(n=0;n<i;++n){if(n+e>=t.length||n>=r.length)break;t[n+e]=r[n]}return n}function B(r,t){return r instanceof t||r!=null&&r.constructor!=null&&r.constructor.name!=null&&r.constructor.name===t.name}function I(r){return typeof BigInt>"u"?pt:r}function pt(){throw Error("BigInt not supported")}function $(r){return()=>{throw Error(r+" is not implemented for node:buffer browser polyfill")}}var w,d,P="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b,tr,D,sr=50,N=2147483647,fr=536870888,yr,mr,gr,dr,wr,Br,Er,O,er=4096,Ar,Ir,Ur,br,st=(r)=>{for(let t of r)if(t.charCodeAt(0)>127)return!1;return!0},Tr,Rr,ft=Dr(()=>{w=[],d=[];for(b=0,tr=P.length;b<tr;++b)w[b]=P[b],d[P.charCodeAt(b)]=b;if(d[45]=62,d[95]=63,D=typeof Symbol==="function"&&typeof Symbol.for==="function"?Symbol.for("nodejs.util.inspect.custom"):null,yr=globalThis.btoa,mr=globalThis.atob,gr=globalThis.File,dr=globalThis.Blob,wr={MAX_LENGTH:N,MAX_STRING_LENGTH:fr},Br=j("ERR_BUFFER_OUT_OF_BOUNDS",function(r){if(r)return`${r} is outside of buffer bounds`;return"Attempt to access memory outside buffer bounds"},RangeError),Er=j("ERR_INVALID_ARG_TYPE",function(r,t){return`The "${r}" argument must be of type number. Received type ${typeof t}`},TypeError),O=j("ERR_OUT_OF_RANGE",function(r,t,e){let i=`The value of "${r}" is out of range.`,n=e;if(Number.isInteger(e)&&Math.abs(e)>4294967296)n=rr(String(e));else if(typeof e==="bigint"){if(n=String(e),e>BigInt(2)**BigInt(32)||e<-(BigInt(2)**BigInt(32)))n=rr(n);n+="n"}return i+=` It must be ${t}. Received ${n}`,i},RangeError),Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(!h.isBuffer(this))return;return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(!h.isBuffer(this))return;return this.byteOffset}}),h.poolSize=8192,h.from=function(r,t,e){return or(r,t,e)},Object.setPrototypeOf(h.prototype,Uint8Array.prototype),Object.setPrototypeOf(h,Uint8Array),h.alloc=function(r,t,e){return Wr(r,t,e)},h.allocUnsafe=function(r){return F(r)},h.allocUnsafeSlow=function(r){return F(r)},h.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==h.prototype},h.compare=function(r,t){if(B(r,Uint8Array))r=h.from(r,r.offset,r.byteLength);if(B(t,Uint8Array))t=h.from(t,t.offset,t.byteLength);if(!h.isBuffer(r)||!h.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===t)return 0;let e=r.length,i=t.length;for(let n=0,o=Math.min(e,i);n<o;++n)if(r[n]!==t[n]){e=r[n],i=t[n];break}if(e<i)return-1;if(i<e)return 1;return 0},h.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},h.concat=function(r,t){if(!Array.isArray(r))throw TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return h.alloc(0);let e;if(t===void 0){t=0;for(e=0;e<r.length;++e)t+=r[e].length}let i=h.allocUnsafe(t),n=0;for(e=0;e<r.length;++e){let o=r[e];if(B(o,Uint8Array))if(n+o.length>i.length){if(!h.isBuffer(o))o=h.from(o);o.copy(i,n)}else Uint8Array.prototype.set.call(i,o,n);else if(!h.isBuffer(o))throw TypeError('"list" argument must be an Array of Buffers');else o.copy(i,n);n+=o.length}return i},h.byteLength=hr,h.prototype._isBuffer=!0,h.prototype.swap16=function(){let r=this.length;if(r%2!==0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<r;t+=2)U(this,t,t+1);return this},h.prototype.swap32=function(){let r=this.length;if(r%4!==0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<r;t+=4)U(this,t,t+3),U(this,t+1,t+2);return this},h.prototype.swap64=function(){let r=this.length;if(r%8!==0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<r;t+=8)U(this,t,t+7),U(this,t+1,t+6),U(this,t+2,t+5),U(this,t+3,t+4);return this},h.prototype.toString=function(){let r=this.length;if(r===0)return"";if(arguments.length===0)return ar(this,0,r);return Vr.apply(this,arguments)},h.prototype.toLocaleString=h.prototype.toString,h.prototype.equals=function(r){if(!h.isBuffer(r))throw TypeError("Argument must be a Buffer");if(this===r)return!0;return h.compare(this,r)===0},h.prototype.inspect=function(){let r="",t=sr;if(r=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t)r+=" ... ";return"<Buffer "+r+">"},D)h.prototype[D]=h.prototype.inspect;h.prototype.compare=function(r,t,e,i,n){if(B(r,Uint8Array))r=h.from(r,r.offset,r.byteLength);if(!h.isBuffer(r))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(t===void 0)t=0;if(e===void 0)e=r?r.length:0;if(i===void 0)i=0;if(n===void 0)n=this.length;if(t<0||e>r.length||i<0||n>this.length)throw RangeError("out of range index");if(i>=n&&t>=e)return 0;if(i>=n)return-1;if(t>=e)return 1;if(t>>>=0,e>>>=0,i>>>=0,n>>>=0,this===r)return 0;let o=n-i,u=e-t,a=Math.min(o,u),p=this.slice(i,n),c=r.slice(t,e);for(let l=0;l<a;++l)if(p[l]!==c[l]){o=p[l],u=c[l];break}if(o<u)return-1;if(u<o)return 1;return 0},h.prototype.includes=function(r,t,e){return this.indexOf(r,t,e)!==-1},h.prototype.indexOf=function(r,t,e){return K(this,r,t,e,!0)},h.prototype.lastIndexOf=function(r,t,e){return K(this,r,t,e,!1)},h.prototype.write=function(r,t,e,i){if(t===void 0)i="utf8",e=this.length,t=0;else if(e===void 0&&typeof t==="string")i=t,e=this.length,t=0;else if(isFinite(t))if(t=t>>>0,isFinite(e)){if(e=e>>>0,i===void 0)i="utf8"}else i=e,e=void 0;else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let n=this.length-t;if(e===void 0||e>n)e=n;if(r.length>0&&(e<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");if(!i)i="utf8";let o=!1;for(;;)switch(i){case"hex":return Xr(this,r,t,e);case"utf8":case"utf-8":return qr(this,r,t,e);case"ascii":case"latin1":case"binary":return Qr(this,r,t,e);case"base64":return vr(this,r,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return rt(this,r,t,e);default:if(o)throw TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},h.prototype.slice=function(r,t){let e=this.length;if(r=~~r,t=t===void 0?e:~~t,r<0){if(r+=e,r<0)r=0}else if(r>e)r=e;if(t<0){if(t+=e,t<0)t=0}else if(t>e)t=e;if(t<r)t=r;let i=this.subarray(r,t);return Object.setPrototypeOf(i,h.prototype),i},h.prototype.readUintLE=h.prototype.readUIntLE=function(r,t,e){if(r=r>>>0,t=t>>>0,!e)y(r,t,this.length);let i=this[r],n=1,o=0;while(++o<t&&(n*=256))i+=this[r+o]*n;return i},h.prototype.readUintBE=h.prototype.readUIntBE=function(r,t,e){if(r=r>>>0,t=t>>>0,!e)y(r,t,this.length);let i=this[r+--t],n=1;while(t>0&&(n*=256))i+=this[r+--t]*n;return i},h.prototype.readUint8=h.prototype.readUInt8=function(r,t){if(r=r>>>0,!t)y(r,1,this.length);return this[r]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(r,t){if(r=r>>>0,!t)y(r,2,this.length);return this[r]|this[r+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(r,t){if(r=r>>>0,!t)y(r,2,this.length);return this[r]<<8|this[r+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(r,t){if(r=r>>>0,!t)y(r,4,this.length);return(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(r,t){if(r=r>>>0,!t)y(r,4,this.length);return this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])},h.prototype.readBigUInt64LE=I(function(r){r=r>>>0,R(r,"offset");let t=this[r],e=this[r+7];if(t===void 0||e===void 0)C(r,this.length-8);let i=t+this[++r]*256+this[++r]*65536+this[++r]*16777216,n=this[++r]+this[++r]*256+this[++r]*65536+e*16777216;return BigInt(i)+(BigInt(n)<<BigInt(32))}),h.prototype.readBigUInt64BE=I(function(r){r=r>>>0,R(r,"offset");let t=this[r],e=this[r+7];if(t===void 0||e===void 0)C(r,this.length-8);let i=t*16777216+this[++r]*65536+this[++r]*256+this[++r],n=this[++r]*16777216+this[++r]*65536+this[++r]*256+e;return(BigInt(i)<<BigInt(32))+BigInt(n)}),h.prototype.readIntLE=function(r,t,e){if(r=r>>>0,t=t>>>0,!e)y(r,t,this.length);let i=this[r],n=1,o=0;while(++o<t&&(n*=256))i+=this[r+o]*n;if(n*=128,i>=n)i-=Math.pow(2,8*t);return i},h.prototype.readIntBE=function(r,t,e){if(r=r>>>0,t=t>>>0,!e)y(r,t,this.length);let i=t,n=1,o=this[r+--i];while(i>0&&(n*=256))o+=this[r+--i]*n;if(n*=128,o>=n)o-=Math.pow(2,8*t);return o},h.prototype.readInt8=function(r,t){if(r=r>>>0,!t)y(r,1,this.length);if(!(this[r]&128))return this[r];return(255-this[r]+1)*-1},h.prototype.readInt16LE=function(r,t){if(r=r>>>0,!t)y(r,2,this.length);let e=this[r]|this[r+1]<<8;return e&32768?e|4294901760:e},h.prototype.readInt16BE=function(r,t){if(r=r>>>0,!t)y(r,2,this.length);let e=this[r+1]|this[r]<<8;return e&32768?e|4294901760:e},h.prototype.readInt32LE=function(r,t){if(r=r>>>0,!t)y(r,4,this.length);return this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},h.prototype.readInt32BE=function(r,t){if(r=r>>>0,!t)y(r,4,this.length);return this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},h.prototype.readBigInt64LE=I(function(r){r=r>>>0,R(r,"offset");let t=this[r],e=this[r+7];if(t===void 0||e===void 0)C(r,this.length-8);let i=this[r+4]+this[r+5]*256+this[r+6]*65536+(e<<24);return(BigInt(i)<<BigInt(32))+BigInt(t+this[++r]*256+this[++r]*65536+this[++r]*16777216)}),h.prototype.readBigInt64BE=I(function(r){r=r>>>0,R(r,"offset");let t=this[r],e=this[r+7];if(t===void 0||e===void 0)C(r,this.length-8);let i=(t<<24)+this[++r]*65536+this[++r]*256+this[++r];return(BigInt(i)<<BigInt(32))+BigInt(this[++r]*16777216+this[++r]*65536+this[++r]*256+e)}),h.prototype.readFloatLE=function(r,t){if(r=r>>>0,!t)y(r,4,this.length);return _(this,r,!0,23,4)},h.prototype.readFloatBE=function(r,t){if(r=r>>>0,!t)y(r,4,this.length);return _(this,r,!1,23,4)},h.prototype.readDoubleLE=function(r,t){if(r=r>>>0,!t)y(r,8,this.length);return _(this,r,!0,52,8)},h.prototype.readDoubleBE=function(r,t){if(r=r>>>0,!t)y(r,8,this.length);return _(this,r,!1,52,8)},h.prototype.writeUintLE=h.prototype.writeUIntLE=function(r,t,e,i){if(r=+r,t=t>>>0,e=e>>>0,!i){let u=Math.pow(2,8*e)-1;g(this,r,t,e,u,0)}let n=1,o=0;this[t]=r&255;while(++o<e&&(n*=256))this[t+o]=r/n&255;return t+e},h.prototype.writeUintBE=h.prototype.writeUIntBE=function(r,t,e,i){if(r=+r,t=t>>>0,e=e>>>0,!i){let u=Math.pow(2,8*e)-1;g(this,r,t,e,u,0)}let n=e-1,o=1;this[t+n]=r&255;while(--n>=0&&(o*=256))this[t+n]=r/o&255;return t+e},h.prototype.writeUint8=h.prototype.writeUInt8=function(r,t,e){if(r=+r,t=t>>>0,!e)g(this,r,t,1,255,0);return this[t]=r&255,t+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(r,t,e){if(r=+r,t=t>>>0,!e)g(this,r,t,2,65535,0);return this[t]=r&255,this[t+1]=r>>>8,t+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(r,t,e){if(r=+r,t=t>>>0,!e)g(this,r,t,2,65535,0);return this[t]=r>>>8,this[t+1]=r&255,t+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(r,t,e){if(r=+r,t=t>>>0,!e)g(this,r,t,4,4294967295,0);return this[t+3]=r>>>24,this[t+2]=r>>>16,this[t+1]=r>>>8,this[t]=r&255,t+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(r,t,e){if(r=+r,t=t>>>0,!e)g(this,r,t,4,4294967295,0);return this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4},h.prototype.writeBigUInt64LE=I(function(r,t=0){return X(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeBigUInt64BE=I(function(r,t=0){return q(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeIntLE=function(r,t,e,i){if(r=+r,t=t>>>0,!i){let a=Math.pow(2,8*e-1);g(this,r,t,e,a-1,-a)}let n=0,o=1,u=0;this[t]=r&255;while(++n<e&&(o*=256)){if(r<0&&u===0&&this[t+n-1]!==0)u=1;this[t+n]=(r/o>>0)-u&255}return t+e},h.prototype.writeIntBE=function(r,t,e,i){if(r=+r,t=t>>>0,!i){let a=Math.pow(2,8*e-1);g(this,r,t,e,a-1,-a)}let n=e-1,o=1,u=0;this[t+n]=r&255;while(--n>=0&&(o*=256)){if(r<0&&u===0&&this[t+n+1]!==0)u=1;this[t+n]=(r/o>>0)-u&255}return t+e},h.prototype.writeInt8=function(r,t,e){if(r=+r,t=t>>>0,!e)g(this,r,t,1,127,-128);if(r<0)r=255+r+1;return this[t]=r&255,t+1},h.prototype.writeInt16LE=function(r,t,e){if(r=+r,t=t>>>0,!e)g(this,r,t,2,32767,-32768);return this[t]=r&255,this[t+1]=r>>>8,t+2},h.prototype.writeInt16BE=function(r,t,e){if(r=+r,t=t>>>0,!e)g(this,r,t,2,32767,-32768);return this[t]=r>>>8,this[t+1]=r&255,t+2},h.prototype.writeInt32LE=function(r,t,e){if(r=+r,t=t>>>0,!e)g(this,r,t,4,2147483647,-2147483648);return this[t]=r&255,this[t+1]=r>>>8,this[t+2]=r>>>16,this[t+3]=r>>>24,t+4},h.prototype.writeInt32BE=function(r,t,e){if(r=+r,t=t>>>0,!e)g(this,r,t,4,2147483647,-2147483648);if(r<0)r=4294967295+r+1;return this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4},h.prototype.writeBigInt64LE=I(function(r,t=0){return X(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeBigInt64BE=I(function(r,t=0){return q(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeFloatLE=function(r,t,e){return Q(this,r,t,!0,e)},h.prototype.writeFloatBE=function(r,t,e){return Q(this,r,t,!1,e)},h.prototype.writeDoubleLE=function(r,t,e){return v(this,r,t,!0,e)},h.prototype.writeDoubleBE=function(r,t,e){return v(this,r,t,!1,e)},h.prototype.copy=function(r,t,e,i){if(!h.isBuffer(r))throw TypeError("argument should be a Buffer");if(!e)e=0;if(!i&&i!==0)i=this.length;if(t>=r.length)t=r.length;if(!t)t=0;if(i>0&&i<e)i=e;if(i===e)return 0;if(r.length===0||this.length===0)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw RangeError("Index out of range");if(i<0)throw RangeError("sourceEnd out of bounds");if(i>this.length)i=this.length;if(r.length-t<i-e)i=r.length-t+e;let n=i-e;if(this===r&&typeof Uint8Array.prototype.copyWithin==="function")this.copyWithin(t,e,i);else Uint8Array.prototype.set.call(r,this.subarray(e,i),t);return n},h.prototype.fill=function(r,t,e,i){if(typeof r==="string"){if(typeof t==="string")i=t,t=0,e=this.length;else if(typeof e==="string")i=e,e=this.length;if(i!==void 0&&typeof i!=="string")throw TypeError("encoding must be a string");if(typeof i==="string"&&!h.isEncoding(i))throw TypeError("Unknown encoding: "+i);if(r.length===1){let o=r.charCodeAt(0);if(i==="utf8"&&o<128||i==="latin1")r=o}}else if(typeof r==="number")r=r&255;else if(typeof r==="boolean")r=Number(r);if(t<0||this.length<t||this.length<e)throw RangeError("Out of range index");if(e<=t)return this;if(t=t>>>0,e=e===void 0?this.length:e>>>0,!r)r=0;let n;if(typeof r==="number")for(n=t;n<e;++n)this[n]=r;else{let o=h.isBuffer(r)?r:h.from(r,i),u=o.length;if(u===0)throw TypeError('The value "'+r+'" is invalid for argument "value"');for(n=0;n<e-t;++n)this[n+t]=o[n%u]}return this},Ar=/[^+/0-9A-Za-z-_]/g,Ir=function(){let r=Array(256);for(let t=0;t<16;++t){let e=t*16;for(let i=0;i<16;++i)r[e+i]="0123456789abcdef"[t]+"0123456789abcdef"[i]}return r}(),Ur=$("resolveObjectURL"),br=$("isUtf8"),Tr=$("transcode"),Rr=h});function yt(r,t){let e=r.charCodeAt(t);if(Number.isNaN(e))throw RangeError(`Index ${t} out of range for string "${r}"; please open an issue at https://github.com/Trott/slug/issues/new`);if(e<55296||e>57343)return[r.charAt(t),t];if(e>=55296&&e<=56319){if(r.length<=t+1)return[" ",t];let n=r.charCodeAt(t+1);if(n<56320||n>57343)return[" ",t];return[r.charAt(t)+r.charAt(t+1),t+1]}if(t===0)return[" ",t];let i=r.charCodeAt(t-1);if(i<55296||i>56319)return[" ",t];throw Error(`String "${r}" reaches code believed to be unreachable; please open an issue at https://github.com/Trott/slug/issues/new`)}var S;if(typeof window<"u")if(window.btoa)S=function(r){return btoa(unescape(encodeURIComponent(r)))};else S=function(r){let t=unescape(encodeURIComponent(`${r}`)),e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i="";for(let n=0;n<t.length;n+=3){let o=t.charCodeAt(n),u=n+1<t.length?t.charCodeAt(n+1):-1,a=n+2<t.length?t.charCodeAt(n+2):-1;if(o>255||u!==-1&&u>255||a!==-1&&a>255)throw Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");i+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[o>>2],i+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(o&3)<<4|(u<0?0:u>>4)],i+=u<0?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(u&15)<<2|(a<0?0:a>>6)],i+=a<0?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[a&63]}return i};else S=function(r){return(ft(),Lr(ir)).Buffer.from(r).toString("base64")};var f=mt;function mt(r,t){if(t&&typeof t==="object"&&t.debug===!0){let o=r.split(" ").map((u)=>{return Array.from(u).map((a)=>a.codePointAt(0))});return`STRING: ${r}
3
+ CODEPOINTS: ${JSON.stringify(o)}`}let e=M(r,t);if((t&&typeof t==="object"&&t.fallback!==void 0?t.fallback:f.defaults.fallback)===!0&&e===""){let n="";for(let u=0;u<r.length;u++){let a=yt(r,u);u=a[1],n+=a[0]}let o=S(n);if(typeof o==="string")e=M(o,t)}return e}var Cr={bg:{\u{419}:"Y",\u{439}:"y",X:"H",x:"h",\u{426}:"Ts",\u{446}:"ts",\u{429}:"Sht",\u{449}:"sht",\u{42a}:"A",\u{44a}:"a",\u{42c}:"Y",\u{44c}:"y"},de:{\u{c4}:"AE",\u{e4}:"ae",\u{d6}:"OE",\u{f6}:"oe",\u{dc}:"UE",\u{fc}:"ue"},sr:{\u{111}:"dj",\u{110}:"DJ"},uk:{\u{418}:"Y",\u{438}:"y",\u{419}:"Y",\u{439}:"y",\u{426}:"Ts",\u{446}:"ts",\u{425}:"Kh",\u{445}:"kh",\u{429}:"Shch",\u{449}:"shch",\u{413}:"H",\u{433}:"h"}},x={};function M(r,t){if(typeof r!=="string")throw TypeError(`slug() requires a string argument, received ${typeof r}`);let e;if(typeof t==="string")e={replacement:t};else e=t?Object.assign({},t):{};e.mode=e.mode||f.defaults.mode;let i=f.defaults.modes[e.mode],n=["replacement","multicharmap","charmap","remove","lower","trim"];for(let c,l=0,s=n.length;l<s;l++)c=n[l],e[c]=c in e?e[c]:i[c];let o=e.locale?Cr[e.locale]||x:x,u=[];if(e.multicharmap)for(let c in e.multicharmap){if(!Object.prototype.hasOwnProperty.call(e.multicharmap,c))continue;let l=c.length;if(!u.includes(l))u.push(l)}u=u.sort((c,l)=>l-c);let a=e.mode==="rfc3986"?/[^\w\s\-.~]/:/[^A-Z0-9\s]/i,p="";for(let c,l=0,s=r.length;l<s;l++){c=r[l];let E=!1;for(let m=0;m<u.length;m++){let T=u[m],k=r.substr(l,T);if(e.multicharmap&&e.multicharmap[k]){l+=T-1,c=e.multicharmap[k],E=!0;break}}if(!E)if(o[c])c=o[c];else if(e.charmap&&e.charmap[c])c=e.charmap[c].replace(e.replacement," ");else if(e.replacement&&c.includes(e.replacement))c=c.replace(e.replacement," ");else c=c.replace(a,"");p+=c}if(e.remove)p=p.replace(e.remove,"");if(e.trim)p=p.trim();if(p=p.replace(/\s+/g,e.replacement),e.lower)p=p.toLowerCase();return p}var Nr={\u{92b}\u{93c}:"Fi",\u{917}\u{93c}:"Ghi",\u{916}\u{93c}:"Khi",\u{915}\u{93c}:"Qi",\u{921}\u{93c}:"ugDha",\u{922}\u{93c}:"ugDhha",\u{92f}\u{93c}:"Yi",\u{91c}\u{93c}:"Za",\u{5d1}\u{5b4}\u{5d9}:"i",\u{5d1}\u{5b5}:"e",\u{5d1}\u{5b5}\u{5d9}:"e",\u{5d1}\u{5b6}:"e",\u{5d1}\u{5b7}:"a",\u{5d1}\u{5b8}:"a",\u{5d1}\u{5b9}:"o",\u{5d5}\u{5b9}:"o",\u{5d1}\u{5bb}:"u",\u{5d5}\u{5bc}:"u",\u{5d1}\u{5bc}:"b",\u{5db}\u{5bc}:"k",\u{5da}\u{5bc}:"k",\u{5e4}\u{5bc}:"p",\u{5e9}\u{5c1}:"sh",\u{5e9}\u{5c2}:"s",\u{5d1}\u{5b0}:"e",\u{5d7}\u{5b1}:"e",\u{5d7}\u{5b2}:"a",\u{5d7}\u{5b3}:"o",\u{5d1}\u{5b4}:"i"},kr={\u{c0}:"A",\u{c1}:"A",\u{c2}:"A",\u{c3}:"A",\u{c4}:"A",\u{c5}:"A",\u{c6}:"AE",\u{c7}:"C",\u{c8}:"E",\u{c9}:"E",\u{ca}:"E",\u{cb}:"E",\u{cc}:"I",\u{cd}:"I",\u{ce}:"I",\u{cf}:"I",\u{d0}:"D",\u{d1}:"N",\u{d2}:"O",\u{d3}:"O",\u{d4}:"O",\u{d5}:"O",\u{d6}:"O",\u{150}:"O",\u{d8}:"O",\u{14c}:"O",\u{d9}:"U",\u{da}:"U",\u{db}:"U",\u{dc}:"U",\u{170}:"U",\u{dd}:"Y",\u{de}:"TH",\u{df}:"ss",\u{e0}:"a",\u{e1}:"a",\u{e2}:"a",\u{e3}:"a",\u{e4}:"a",\u{e5}:"a",\u{e6}:"ae",\u{e7}:"c",\u{e8}:"e",\u{e9}:"e",\u{ea}:"e",\u{eb}:"e",\u{ec}:"i",\u{ed}:"i",\u{ee}:"i",\u{ef}:"i",\u{f0}:"d",\u{f1}:"n",\u{f2}:"o",\u{f3}:"o",\u{f4}:"o",\u{f5}:"o",\u{f6}:"o",\u{151}:"o",\u{f8}:"o",\u{14d}:"o",\u{152}:"OE",\u{153}:"oe",\u{f9}:"u",\u{fa}:"u",\u{fb}:"u",\u{fc}:"u",\u{171}:"u",\u{fd}:"y",\u{fe}:"th",\u{ff}:"y",\u{1e9e}:"SS",\u{3b1}:"a",\u{3b2}:"b",\u{3b3}:"g",\u{3b4}:"d",\u{3b5}:"e",\u{3b6}:"z",\u{3b7}:"h",\u{3b8}:"th",\u{3b9}:"i",\u{3ba}:"k",\u{3bb}:"l",\u{3bc}:"m",\u{3bd}:"n",\u{3be}:"3",\u{3bf}:"o",\u{3c0}:"p",\u{3c1}:"r",\u{3c3}:"s",\u{3c4}:"t",\u{3c5}:"y",\u{3c6}:"f",\u{3c7}:"x",\u{3c8}:"ps",\u{3c9}:"w",\u{3ac}:"a",\u{3ad}:"e",\u{3af}:"i",\u{3cc}:"o",\u{3cd}:"y",\u{3ae}:"h",\u{3ce}:"w",\u{3c2}:"s",\u{3ca}:"i",\u{3b0}:"y",\u{3cb}:"y",\u{390}:"i",\u{391}:"A",\u{392}:"B",\u{393}:"G",\u{394}:"D",\u{395}:"E",\u{396}:"Z",\u{397}:"H",\u{398}:"Th",\u{399}:"I",\u{39a}:"K",\u{39b}:"L",\u{39c}:"M",\u{39d}:"N",\u{39e}:"3",\u{39f}:"O",\u{3a0}:"P",\u{3a1}:"R",\u{3a3}:"S",\u{3a4}:"T",\u{3a5}:"Y",\u{3a6}:"F",\u{3a7}:"X",\u{3a8}:"PS",\u{3a9}:"W",\u{386}:"A",\u{388}:"E",\u{38a}:"I",\u{38c}:"O",\u{38e}:"Y",\u{389}:"H",\u{38f}:"W",\u{3aa}:"I",\u{3ab}:"Y",\u{15f}:"s",\u{15e}:"S",\u{131}:"i",\u{130}:"I",\u{11f}:"g",\u{11e}:"G",\u{430}:"a",\u{431}:"b",\u{432}:"v",\u{433}:"g",\u{434}:"d",\u{435}:"e",\u{451}:"yo",\u{436}:"zh",\u{437}:"z",\u{438}:"i",\u{439}:"j",\u{43a}:"k",\u{43b}:"l",\u{43c}:"m",\u{43d}:"n",\u{43e}:"o",\u{43f}:"p",\u{440}:"r",\u{441}:"s",\u{442}:"t",\u{443}:"u",\u{444}:"f",\u{445}:"h",\u{446}:"c",\u{447}:"ch",\u{448}:"sh",\u{449}:"sh",\u{44a}:"u",\u{44b}:"y",\u{44c}:"",\u{44d}:"e",\u{44e}:"yu",\u{44f}:"ya",\u{410}:"A",\u{411}:"B",\u{412}:"V",\u{413}:"G",\u{414}:"D",\u{415}:"E",\u{401}:"Yo",\u{416}:"Zh",\u{417}:"Z",\u{418}:"I",\u{419}:"J",\u{41a}:"K",\u{41b}:"L",\u{41c}:"M",\u{41d}:"N",\u{41e}:"O",\u{41f}:"P",\u{420}:"R",\u{421}:"S",\u{422}:"T",\u{423}:"U",\u{424}:"F",\u{425}:"H",\u{426}:"C",\u{427}:"Ch",\u{428}:"Sh",\u{429}:"Sh",\u{42a}:"U",\u{42b}:"Y",\u{42c}:"",\u{42d}:"E",\u{42e}:"Yu",\u{42f}:"Ya",\u{404}:"Ye",\u{406}:"I",\u{407}:"Yi",\u{490}:"G",\u{454}:"ye",\u{456}:"i",\u{457}:"yi",\u{491}:"g",\u{10d}:"c",\u{10f}:"d",\u{11b}:"e",\u{148}:"n",\u{159}:"r",\u{161}:"s",\u{165}:"t",\u{16f}:"u",\u{17e}:"z",\u{10c}:"C",\u{10e}:"D",\u{11a}:"E",\u{147}:"N",\u{158}:"R",\u{160}:"S",\u{164}:"T",\u{16e}:"U",\u{17d}:"Z",\u{13e}:"l",\u{13a}:"l",\u{155}:"r",\u{13d}:"L",\u{139}:"L",\u{154}:"R",\u{105}:"a",\u{107}:"c",\u{119}:"e",\u{142}:"l",\u{144}:"n",\u{15b}:"s",\u{17a}:"z",\u{17c}:"z",\u{104}:"A",\u{106}:"C",\u{118}:"E",\u{141}:"L",\u{143}:"N",\u{15a}:"S",\u{179}:"Z",\u{17b}:"Z",\u{101}:"a",\u{113}:"e",\u{123}:"g",\u{12b}:"i",\u{137}:"k",\u{13c}:"l",\u{146}:"n",\u{16b}:"u",\u{100}:"A",\u{112}:"E",\u{122}:"G",\u{12a}:"I",\u{136}:"K",\u{13b}:"L",\u{145}:"N",\u{16a}:"U",\u{623}:"a",\u{625}:"i",\u{628}:"b",\u{62a}:"t",\u{62b}:"th",\u{62c}:"g",\u{62d}:"h",\u{62e}:"kh",\u{62f}:"d",\u{630}:"th",\u{631}:"r",\u{632}:"z",\u{633}:"s",\u{634}:"sh",\u{635}:"s",\u{636}:"d",\u{637}:"t",\u{638}:"th",\u{639}:"aa",\u{63a}:"gh",\u{641}:"f",\u{642}:"k",\u{643}:"k",\u{644}:"l",\u{645}:"m",\u{646}:"n",\u{647}:"h",\u{648}:"o",\u{64a}:"y",\u{621}:"aa",\u{629}:"a",\u{622}:"a",\u{627}:"a",\u{67e}:"p",\u{698}:"zh",\u{6af}:"g",\u{686}:"ch",\u{6a9}:"k",\u{6cc}:"i",\u{117}:"e",\u{12f}:"i",\u{173}:"u",\u{116}:"E",\u{12e}:"I",\u{172}:"U",\u{21b}:"t",\u{21a}:"T",\u{163}:"t",\u{162}:"T",\u{219}:"s",\u{218}:"S",\u{103}:"a",\u{102}:"A",\u{1ea0}:"A",\u{1ea2}:"A",\u{1ea6}:"A",\u{1ea4}:"A",\u{1eac}:"A",\u{1ea8}:"A",\u{1eaa}:"A",\u{1eb0}:"A",\u{1eae}:"A",\u{1eb6}:"A",\u{1eb2}:"A",\u{1eb4}:"A",\u{1eb8}:"E",\u{1eba}:"E",\u{1ebc}:"E",\u{1ec0}:"E",\u{1ebe}:"E",\u{1ec6}:"E",\u{1ec2}:"E",\u{1ec4}:"E",\u{1eca}:"I",\u{1ec8}:"I",\u{128}:"I",\u{1ecc}:"O",\u{1ece}:"O",\u{1ed2}:"O",\u{1ed0}:"O",\u{1ed8}:"O",\u{1ed4}:"O",\u{1ed6}:"O",\u{1a0}:"O",\u{1edc}:"O",\u{1eda}:"O",\u{1ee2}:"O",\u{1ede}:"O",\u{1ee0}:"O",\u{1ee4}:"U",\u{1ee6}:"U",\u{168}:"U",\u{1af}:"U",\u{1eea}:"U",\u{1ee8}:"U",\u{1ef0}:"U",\u{1eec}:"U",\u{1eee}:"U",\u{1ef2}:"Y",\u{1ef4}:"Y",\u{1ef6}:"Y",\u{1ef8}:"Y",\u{110}:"D",\u{1ea1}:"a",\u{1ea3}:"a",\u{1ea7}:"a",\u{1ea5}:"a",\u{1ead}:"a",\u{1ea9}:"a",\u{1eab}:"a",\u{1eb1}:"a",\u{1eaf}:"a",\u{1eb7}:"a",\u{1eb3}:"a",\u{1eb5}:"a",\u{1eb9}:"e",\u{1ebb}:"e",\u{1ebd}:"e",\u{1ec1}:"e",\u{1ebf}:"e",\u{1ec7}:"e",\u{1ec3}:"e",\u{1ec5}:"e",\u{1ecb}:"i",\u{1ec9}:"i",\u{129}:"i",\u{1ecd}:"o",\u{1ecf}:"o",\u{1ed3}:"o",\u{1ed1}:"o",\u{1ed9}:"o",\u{1ed5}:"o",\u{1ed7}:"o",\u{1a1}:"o",\u{1edd}:"o",\u{1edb}:"o",\u{1ee3}:"o",\u{1edf}:"o",\u{1ee1}:"o",\u{1ee5}:"u",\u{1ee7}:"u",\u{169}:"u",\u{1b0}:"u",\u{1eeb}:"u",\u{1ee9}:"u",\u{1ef1}:"u",\u{1eed}:"u",\u{1eef}:"u",\u{1ef3}:"y",\u{1ef5}:"y",\u{1ef7}:"y",\u{1ef9}:"y",\u{111}:"d",\u{4d8}:"AE",\u{4d9}:"ae",\u{492}:"GH",\u{493}:"gh",\u{49a}:"KH",\u{49b}:"kh",\u{4a2}:"NG",\u{4a3}:"ng",\u{4ae}:"UE",\u{4af}:"ue",\u{4b0}:"U",\u{4b1}:"u",\u{4ba}:"H",\u{4bb}:"h",\u{4e8}:"OE",\u{4e9}:"oe",\u{452}:"dj",\u{458}:"j",\u{459}:"lj",\u{45a}:"nj",\u{45b}:"c",\u{45f}:"dz",\u{402}:"Dj",\u{408}:"j",\u{409}:"Lj",\u{40a}:"Nj",\u{40b}:"C",\u{40f}:"Dz",\u{1cc}:"nj",\u{1c9}:"lj",\u{1cb}:"NJ",\u{1c8}:"LJ",\u{905}:"a",\u{906}:"aa",\u{90f}:"e",\u{908}:"ii",\u{90d}:"ei",\u{90e}:"ae",\u{910}:"ai",\u{907}:"i",\u{913}:"o",\u{911}:"oi",\u{912}:"oii",\u{90a}:"uu",\u{914}:"ou",\u{909}:"u",\u{92c}:"B",\u{92d}:"Bha",\u{91a}:"Ca",\u{91b}:"Chha",\u{921}:"Da",\u{922}:"Dha",\u{92b}:"Fa",\u{917}:"Ga",\u{918}:"Gha",\u{917}\u{93c}:"Ghi",\u{939}:"Ha",\u{91c}:"Ja",\u{91d}:"Jha",\u{915}:"Ka",\u{916}:"Kha",\u{916}\u{93c}:"Khi",\u{932}:"L",\u{933}:"Li",\u{90c}:"Li",\u{934}:"Lii",\u{961}:"Lii",\u{92e}:"Ma",\u{928}:"Na",\u{919}:"Na",\u{91e}:"Nia",\u{923}:"Nae",\u{929}:"Ni",\u{950}:"oms",\u{92a}:"Pa",\u{915}\u{93c}:"Qi",\u{930}:"Ra",\u{90b}:"Ri",\u{960}:"Ri",\u{931}:"Ri",\u{938}:"Sa",\u{936}:"Sha",\u{937}:"Shha",\u{91f}:"Ta",\u{924}:"Ta",\u{920}:"Tha",\u{926}:"Tha",\u{925}:"Tha",\u{927}:"Thha",\u{921}\u{93c}:"ugDha",\u{922}\u{93c}:"ugDhha",\u{935}:"Va",\u{92f}:"Ya",\u{92f}\u{93c}:"Yi",\u{91c}\u{93c}:"Za",\u{259}:"e",\u{18f}:"E",\u{10d0}:"a",\u{10d1}:"b",\u{10d2}:"g",\u{10d3}:"d",\u{10d4}:"e",\u{10d5}:"v",\u{10d6}:"z",\u{10d7}:"t",\u{10d8}:"i",\u{10d9}:"k",\u{10da}:"l",\u{10db}:"m",\u{10dc}:"n",\u{10dd}:"o",\u{10de}:"p",\u{10df}:"zh",\u{10e0}:"r",\u{10e1}:"s",\u{10e2}:"t",\u{10e3}:"u",\u{10e4}:"p",\u{10e5}:"k",\u{10e6}:"gh",\u{10e7}:"q",\u{10e8}:"sh",\u{10e9}:"ch",\u{10ea}:"ts",\u{10eb}:"dz",\u{10ec}:"ts",\u{10ed}:"ch",\u{10ee}:"kh",\u{10ef}:"j",\u{10f0}:"h",\u{5d1}:"v",\u{5d2}\u{5bc}:"g",\u{5d2}:"g",\u{5d3}:"d",\u{5d3}\u{5bc}:"d",\u{5d4}:"h",\u{5d5}:"v",\u{5d6}:"z",\u{5d7}:"h",\u{5d8}:"t",\u{5d9}:"y",\u{5db}:"kh",\u{5da}:"kh",\u{5dc}:"l",\u{5de}:"m",\u{5dd}:"m",\u{5e0}:"n",\u{5df}:"n",\u{5e1}:"s",\u{5e4}:"f",\u{5e3}:"f",\u{5e5}:"ts",\u{5e6}:"ts",\u{5e7}:"k",\u{5e8}:"r",\u{5ea}\u{5bc}:"t",\u{5ea}:"t"};f.charmap=Object.assign({},kr);f.multicharmap=Object.assign({},Nr);f.defaults={charmap:f.charmap,mode:"pretty",modes:{rfc3986:{replacement:"-",remove:null,lower:!0,charmap:f.charmap,multicharmap:f.multicharmap,trim:!0},pretty:{replacement:"-",remove:null,lower:!0,charmap:f.charmap,multicharmap:f.multicharmap,trim:!0}},multicharmap:f.multicharmap,fallback:!0};f.reset=function(){f.defaults.modes.rfc3986.charmap=f.defaults.modes.pretty.charmap=f.charmap=f.defaults.charmap=Object.assign({},kr),f.defaults.modes.rfc3986.multicharmap=f.defaults.modes.pretty.multicharmap=f.multicharmap=f.defaults.multicharmap=Object.assign({},Nr),x={}};f.extend=function(r){let t=Object.keys(r),e={},i={};for(let n=0;n<t.length;n++)if(t[n].length>1)e[t[n]]=r[t[n]];else i[t[n]]=r[t[n]];Object.assign(f.charmap,i),Object.assign(f.multicharmap,e)};f.setLocale=function(r){x=Cr[r]||{}};async function It(r,t){let e=M(r);if(!t?.table||!t?.column)return e;let i=e,n=1,o=1000;while(n<=o){if(!await _r.selectFrom(t.table).select(["id"]).where(t.column,"=",i).executeTakeFirst())return i;n++,i=`${e}-${n}`}let u=gt(6).toString("base64url").toLowerCase().replace(/[^a-z0-9]/g,"").slice(0,8);return`${e}-${u}`}export{It as uniqueSlug,M as slugify};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/slug",
3
3
  "type": "module",
4
- "version": "0.70.87",
4
+ "version": "0.70.90",
5
5
  "description": "The Stacks slug functionality.",
6
6
  "author": "Chris Breuer",
7
7
  "contributors": [
@@ -51,12 +51,12 @@
51
51
  "prepublishOnly": "bun run build"
52
52
  },
53
53
  "devDependencies": {
54
- "@stacksjs/cli": "0.70.87",
55
- "@stacksjs/database": "0.70.87",
54
+ "@stacksjs/cli": "0.70.90",
55
+ "@stacksjs/database": "0.70.90",
56
56
  "better-dx": "^0.2.16",
57
- "@stacksjs/path": "0.70.87",
58
- "@stacksjs/strings": "0.70.87",
59
- "@stacksjs/utils": "0.70.87"
57
+ "@stacksjs/path": "0.70.90",
58
+ "@stacksjs/strings": "0.70.90",
59
+ "@stacksjs/utils": "0.70.90"
60
60
  },
61
61
  "sideEffects": false
62
62
  }