UNPKG

0x1

Version:

0x1: Lightning-fast web framework for JavaScript/TypeScript with zero overhead and maximum performance, powered by Bun

2 lines (1 loc) 5.61 kB
import"./chunk-2n6713cf.js";var{create:P,defineProperty:w,getOwnPropertyDescriptor:N,getOwnPropertyNames:z,getPrototypeOf:E}=Object,T=Object.prototype.hasOwnProperty,_=(u,f)=>()=>(f||u((f={exports:{}}).exports,f),f.exports),I=(u,f,h,p)=>{if(f&&typeof f=="object"||typeof f=="function")for(let v of z(f))!T.call(u,v)&&v!==h&&w(u,v,{get:()=>f[v],enumerable:!(p=N(f,v))||p.enumerable});return u},L=(u,f,h)=>(h=u!=null?P(E(u)):{},I(f||!u||!u.__esModule?w(h,"default",{value:u,enumerable:!0}):h,u)),R=_((u,f)=>{function h(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function p(e,t){for(var r="",a=0,o=-1,n=0,s,i=0;i<=e.length;++i){if(i<e.length)s=e.charCodeAt(i);else{if(s===47)break;s=47}if(s===47){if(!(o===i-1||n===1))if(o!==i-1&&n===2){if(r.length<2||a!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){var g=r.lastIndexOf("/");if(g!==r.length-1){g===-1?(r="",a=0):(r=r.slice(0,g),a=r.length-1-r.lastIndexOf("/")),o=i,n=0;continue}}else if(r.length===2||r.length===1){r="",a=0,o=i,n=0;continue}}t&&(r.length>0?r+="/..":r="..",a=2)}else r.length>0?r+="/"+e.slice(o+1,i):r=e.slice(o+1,i),a=i-o-1;o=i,n=0}else s===46&&n!==-1?++n:n=-1}return r}function v(e,t){var r=t.dir||t.root,a=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+a:r+e+a:a}var b={resolve:function(){for(var e="",t=!1,r,a=arguments.length-1;a>=-1&&!t;a--){var o;a>=0?o=arguments[a]:(r===void 0&&(r=process.cwd()),o=r),h(o),o.length!==0&&(e=o+"/"+e,t=o.charCodeAt(0)===47)}return e=p(e,!t),t?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(h(e),e.length===0)return".";var t=e.charCodeAt(0)===47,r=e.charCodeAt(e.length-1)===47;return e=p(e,!t),e.length===0&&!t&&(e="."),e.length>0&&r&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return h(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,t=0;t<arguments.length;++t){var r=arguments[t];h(r),r.length>0&&(e===void 0?e=r:e+="/"+r)}return e===void 0?".":b.normalize(e)},relative:function(e,t){if(h(e),h(t),e===t||(e=b.resolve(e),t=b.resolve(t),e===t))return"";for(var r=1;r<e.length&&e.charCodeAt(r)===47;++r);for(var a=e.length,o=a-r,n=1;n<t.length&&t.charCodeAt(n)===47;++n);for(var s=t.length,i=s-n,g=o<i?o:i,m=-1,l=0;l<=g;++l){if(l===g){if(i>g){if(t.charCodeAt(n+l)===47)return t.slice(n+l+1);if(l===0)return t.slice(n+l)}else o>g&&(e.charCodeAt(r+l)===47?m=l:l===0&&(m=0));break}var C=e.charCodeAt(r+l),k=t.charCodeAt(n+l);if(C!==k)break;C===47&&(m=l)}var A="";for(l=r+m+1;l<=a;++l)(l===a||e.charCodeAt(l)===47)&&(A.length===0?A+="..":A+="/..");return A.length>0?A+t.slice(n+m):(n+=m,t.charCodeAt(n)===47&&++n,t.slice(n))},_makeLong:function(e){return e},dirname:function(e){if(h(e),e.length===0)return".";for(var t=e.charCodeAt(0),r=t===47,a=-1,o=!0,n=e.length-1;n>=1;--n)if(t=e.charCodeAt(n),t===47){if(!o){a=n;break}}else o=!1;return a===-1?r?"/":".":r&&a===1?"//":e.slice(0,a)},basename:function(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');h(e);var r=0,a=-1,o=!0,n;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var s=t.length-1,i=-1;for(n=e.length-1;n>=0;--n){var g=e.charCodeAt(n);if(g===47){if(!o){r=n+1;break}}else i===-1&&(o=!1,i=n+1),s>=0&&(g===t.charCodeAt(s)?--s===-1&&(a=n):(s=-1,a=i))}return r===a?a=i:a===-1&&(a=e.length),e.slice(r,a)}else{for(n=e.length-1;n>=0;--n)if(e.charCodeAt(n)===47){if(!o){r=n+1;break}}else a===-1&&(o=!1,a=n+1);return a===-1?"":e.slice(r,a)}},extname:function(e){h(e);for(var t=-1,r=0,a=-1,o=!0,n=0,s=e.length-1;s>=0;--s){var i=e.charCodeAt(s);if(i===47){if(!o){r=s+1;break}continue}a===-1&&(o=!1,a=s+1),i===46?t===-1?t=s:n!==1&&(n=1):t!==-1&&(n=-1)}return t===-1||a===-1||n===0||n===1&&t===a-1&&t===r+1?"":e.slice(t,a)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return v("/",e)},parse:function(e){h(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;var r=e.charCodeAt(0),a=r===47,o;a?(t.root="/",o=1):o=0;for(var n=-1,s=0,i=-1,g=!0,m=e.length-1,l=0;m>=o;--m){if(r=e.charCodeAt(m),r===47){if(!g){s=m+1;break}continue}i===-1&&(g=!1,i=m+1),r===46?n===-1?n=m:l!==1&&(l=1):n!==-1&&(l=-1)}return n===-1||i===-1||l===0||l===1&&n===i-1&&n===s+1?i!==-1&&(s===0&&a?t.base=t.name=e.slice(1,i):t.base=t.name=e.slice(s,i)):(s===0&&a?(t.name=e.slice(1,n),t.base=e.slice(1,i)):(t.name=e.slice(s,n),t.base=e.slice(s,i)),t.ext=e.slice(n,i)),s>0?t.dir=e.slice(0,s-1):a&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};b.posix=b,f.exports=b}),j=L(R()),c=j,D=j,x=function(u){return u},O=function(){throw new Error("Not implemented")};c.parse??=O;D.parse??=O;var d={resolve:c.resolve.bind(c),normalize:c.normalize.bind(c),isAbsolute:c.isAbsolute.bind(c),join:c.join.bind(c),relative:c.relative.bind(c),toNamespacedPath:x,dirname:c.dirname.bind(c),basename:c.basename.bind(c),extname:c.extname.bind(c),format:c.format.bind(c),parse:c.parse.bind(c),sep:"/",delimiter:":",win32:void 0,posix:void 0,_makeLong:x},y={sep:"\\",delimiter:";",win32:void 0,...d,posix:d};d.win32=y.win32=y;d.posix=d;var J=d,{resolve:S,normalize:q,isAbsolute:B,join:F,relative:G,toNamespacedPath:H,dirname:K,basename:M,extname:Q,format:U,parse:V,sep:W,delimiter:X}=d;export{y as win32,H as toNamespacedPath,W as sep,S as resolve,G as relative,d as posix,V as parse,q as normalize,F as join,B as isAbsolute,U as format,Q as extname,K as dirname,X as delimiter,J as default,M as basename};export{F as a,M as b,Q as c};