likec4 1.55.1 → 1.56.0
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.
- package/__app__/chunks/ColorSchemeToggle.mjs +1 -0
- package/__app__/chunks/DiagramActorProvider.mjs +10 -0
- package/__app__/chunks/Fallback.mjs +1 -0
- package/__app__/chunks/Header.mjs +13 -0
- package/__app__/chunks/IconRenderer.mjs +1 -0
- package/__app__/chunks/LikeC4Diagram.mjs +19 -0
- package/__app__/chunks/LikeC4ModelContext.mjs +1 -0
- package/__app__/chunks/LikeC4ModelContext2.mjs +1 -0
- package/__app__/chunks/LikeC4Styles.mjs +48 -0
- package/__app__/chunks/NavigationPanel.mjs +1 -0
- package/__app__/chunks/StaticLikeC4Diagram.mjs +1 -0
- package/__app__/chunks/ViewReact.mjs +1 -0
- package/__app__/chunks/__root.mjs +1 -0
- package/__app__/chunks/adhoc-editor.mjs +1 -0
- package/__app__/chunks/hooks.mjs +1 -0
- package/__app__/chunks/libs/@dagrejs/dagre.mjs +1 -0
- package/__app__/chunks/libs/@floating-ui/core.mjs +1 -0
- package/__app__/chunks/libs/@floating-ui/dom.mjs +1 -0
- package/__app__/chunks/libs/@floating-ui/react.mjs +1 -0
- package/__app__/chunks/libs/@mantine/core.mjs +41 -0
- package/__app__/chunks/libs/@mantine/hooks.mjs +1 -0
- package/__app__/chunks/libs/@nanostores/react.mjs +1 -0
- package/__app__/chunks/libs/@react-hookz/web.mjs +1 -0
- package/__app__/chunks/libs/@tabler/icons-react.mjs +15 -0
- package/__app__/chunks/libs/@tanstack/history.mjs +1 -0
- package/__app__/chunks/libs/@tanstack/react-router.mjs +3 -0
- package/__app__/chunks/libs/@tanstack/router-core.mjs +1 -0
- package/__app__/chunks/libs/@xstate/react.mjs +1 -0
- package/__app__/chunks/libs/@xstate/store.mjs +1 -0
- package/__app__/chunks/libs/@xyflow/react.mjs +7 -0
- package/__app__/chunks/libs/@zag-js/anatomy.mjs +1 -0
- package/__app__/chunks/libs/@zag-js/collection.mjs +1 -0
- package/__app__/chunks/libs/@zag-js/core.mjs +1 -0
- package/__app__/chunks/libs/@zag-js/react.mjs +1 -0
- package/__app__/chunks/libs/@zag-js/tree-view.mjs +1 -0
- package/__app__/chunks/libs/bezier-js.mjs +1 -0
- package/__app__/chunks/libs/d3-path.mjs +1 -0
- package/__app__/chunks/libs/d3-shape.mjs +1 -0
- package/__app__/chunks/libs/fast-equals.mjs +1 -0
- package/__app__/chunks/libs/framer-motion.mjs +9 -0
- package/__app__/chunks/libs/html-to-image.mjs +2 -0
- package/__app__/chunks/libs/motion-dom.mjs +1 -0
- package/__app__/chunks/libs/motion.mjs +1 -0
- package/__app__/chunks/libs/nanostores.mjs +1 -0
- package/__app__/chunks/libs/react-error-boundary.mjs +1 -0
- package/__app__/chunks/libs/react-resizable-panels.mjs +1 -0
- package/__app__/chunks/libs/remeda.mjs +1 -0
- package/__app__/chunks/libs/xstate.mjs +1 -0
- package/__app__/chunks/libs/zod.mjs +39 -0
- package/__app__/chunks/rolldown-runtime.mjs +1 -0
- package/__app__/chunks/safeCtx.mjs +1 -0
- package/__app__/chunks/searchParams.mjs +1 -0
- package/__app__/chunks/single-index.mjs +1 -0
- package/__app__/chunks/styled-system.mjs +1 -0
- package/__app__/chunks/styles.css.mjs +1 -0
- package/__app__/chunks/useLikeC4Project.mjs +1 -0
- package/__app__/chunks/useUpdateEffect.mjs +1 -0
- package/__app__/codegen/react.mjs +11 -0
- package/__app__/codegen/webcomponent.mjs +790 -0
- package/__app__/src/fonts.css +1 -1
- package/__app__/src/main.mjs +1 -0
- package/__app__/src/pages/AdHocViewEditor.mjs +1 -0
- package/__app__/src/pages/EmbedPage.mjs +1 -0
- package/__app__/src/pages/ExportPage.mjs +1 -0
- package/__app__/src/pages/ProjectsOverview.mjs +1 -0
- package/__app__/src/pages/ViewAsD2.mjs +1 -0
- package/__app__/src/pages/ViewAsDot.mjs +1 -0
- package/__app__/src/pages/ViewAsMmd.mjs +1 -0
- package/__app__/src/pages/ViewAsPuml.mjs +1 -0
- package/__app__/src/pages/ViewEditor.mjs +1 -0
- package/__app__/src/pages/ViewReact.mjs +1 -0
- package/__app__/src/routeTree.gen.mjs +1 -0
- package/__app__/src/routes/__root.mjs +1 -0
- package/__app__/src/routes/_single/adhoc.mjs +1 -0
- package/__app__/src/routes/_single/embed._viewId.mjs +1 -0
- package/__app__/src/routes/_single/export._viewId.mjs +1 -0
- package/__app__/src/routes/_single/route.mjs +1 -0
- package/__app__/src/routes/_single/single-index.mjs +1 -0
- package/__app__/src/routes/_single/view._viewId.d2.mjs +1 -0
- package/__app__/src/routes/_single/view._viewId.dot.mjs +1 -0
- package/__app__/src/routes/_single/view._viewId.index.mjs +1 -0
- package/__app__/src/routes/_single/view._viewId.mjs +1 -0
- package/__app__/src/routes/_single/view._viewId.mmd.mjs +1 -0
- package/__app__/src/routes/_single/view._viewId.puml.mjs +1 -0
- package/__app__/src/routes/_single/webcomponent._.mjs +33 -0
- package/__app__/src/routes/index.mjs +1 -0
- package/__app__/src/routes/project._projectId/-components.mjs +1 -0
- package/__app__/src/routes/project._projectId/adhoc.mjs +1 -0
- package/__app__/src/routes/project._projectId/embed._viewId.mjs +1 -0
- package/__app__/src/routes/project._projectId/export._viewId.mjs +1 -0
- package/__app__/src/routes/project._projectId/index.mjs +1 -0
- package/__app__/src/routes/project._projectId/route.mjs +1 -0
- package/__app__/src/routes/project._projectId/view._viewId.d2.mjs +1 -0
- package/__app__/src/routes/project._projectId/view._viewId.dot.mjs +1 -0
- package/__app__/src/routes/project._projectId/view._viewId.index.mjs +1 -0
- package/__app__/src/routes/project._projectId/view._viewId.mjs +1 -0
- package/__app__/src/routes/project._projectId/view._viewId.mmd.mjs +1 -0
- package/__app__/src/routes/project._projectId/view._viewId.puml.mjs +1 -0
- package/__app__/src/routes/projects.mjs +1 -0
- package/__app__/src/style.css +1 -1
- package/dist/chunks/filenames.mjs +17 -0
- package/dist/{_chunks → chunks}/index.d.mts +2 -1
- package/dist/{_chunks → chunks}/index2.d.mts +70 -11
- package/dist/chunks/libs/@chevrotain/gast.mjs +1 -0
- package/dist/chunks/libs/@chevrotain/regexp-to-ast.mjs +9 -0
- package/dist/chunks/libs/@chevrotain/utils.mjs +1 -0
- package/dist/chunks/libs/@hono/mcp.mjs +45 -0
- package/dist/chunks/libs/@hono/node-server.mjs +1 -0
- package/dist/{_chunks → chunks}/libs/@logtape/logtape.d.mts +2 -0
- package/dist/chunks/libs/@logtape/logtape.mjs +4 -0
- package/dist/chunks/libs/@lume/kiwi.mjs +1 -0
- package/dist/chunks/libs/@modelcontextprotocol/sdk.mjs +12 -0
- package/dist/chunks/libs/ajv.mjs +1 -0
- package/dist/chunks/libs/ansi-align.mjs +2 -0
- package/dist/chunks/libs/ansi-regex.mjs +1 -0
- package/dist/chunks/libs/ansi-styles.mjs +1 -0
- package/dist/chunks/libs/atomically.mjs +1 -0
- package/dist/chunks/libs/birpc.mjs +1 -0
- package/dist/chunks/libs/boxen.mjs +22 -0
- package/dist/chunks/libs/chevrotain-allstar.mjs +2 -0
- package/dist/chunks/libs/chevrotain.mjs +58 -0
- package/dist/chunks/libs/conf.mjs +1 -0
- package/dist/chunks/libs/defu.mjs +1 -0
- package/dist/chunks/libs/destr.mjs +1 -0
- package/dist/chunks/libs/eventemitter3.mjs +1 -0
- package/dist/chunks/libs/find-up-simple.mjs +1 -0
- package/dist/chunks/libs/get-port.mjs +1 -0
- package/dist/chunks/libs/hono.mjs +1 -0
- package/dist/chunks/libs/is-docker.mjs +1 -0
- package/dist/chunks/libs/is-error-instance.mjs +1 -0
- package/dist/chunks/libs/is-inside-container.mjs +1 -0
- package/dist/chunks/libs/is-plain-obj.mjs +1 -0
- package/dist/chunks/libs/isexe.mjs +1 -0
- package/dist/chunks/libs/json5.mjs +14 -0
- package/dist/chunks/libs/khroma.mjs +1 -0
- package/dist/chunks/libs/ky.mjs +3 -0
- package/dist/{_chunks → chunks}/libs/langium.d.mts +4 -4
- package/dist/chunks/libs/langium.mjs +32 -0
- package/dist/chunks/libs/merge-error-cause.mjs +2 -0
- package/dist/chunks/libs/p-debounce.mjs +1 -0
- package/dist/chunks/libs/p-limit.mjs +1 -0
- package/dist/chunks/libs/p-queue.mjs +1 -0
- package/dist/chunks/libs/p-timeout.mjs +1 -0
- package/dist/chunks/libs/package-manager-detector.mjs +1 -0
- package/dist/chunks/libs/package-up.mjs +1 -0
- package/dist/chunks/libs/pako.mjs +1 -0
- package/dist/chunks/libs/parse-ms.mjs +1 -0
- package/dist/chunks/libs/pathe.mjs +1 -0
- package/dist/chunks/libs/picomatch.mjs +1 -0
- package/dist/chunks/libs/pretty-ms.mjs +1 -0
- package/dist/chunks/libs/remeda.mjs +1 -0
- package/dist/chunks/libs/safe-stringify.mjs +1 -0
- package/dist/chunks/libs/strip-indent.mjs +1 -0
- package/dist/chunks/libs/tinyrainbow.mjs +1 -0
- package/dist/{_chunks → chunks}/libs/ts-graphviz.d.mts +2 -0
- package/dist/chunks/libs/ts-graphviz.mjs +4 -0
- package/dist/chunks/libs/ufo.mjs +1 -0
- package/dist/chunks/libs/unstorage.mjs +1 -0
- package/dist/chunks/libs/which.mjs +1 -0
- package/dist/chunks/libs/word-wrap.mjs +12 -0
- package/dist/{_chunks → chunks}/libs/zod.d.mts +2 -0
- package/dist/chunks/node.mjs +76 -0
- package/dist/chunks/plugin.mjs +400 -0
- package/dist/chunks/rolldown-runtime.mjs +1 -0
- package/dist/chunks/sequence-view.mjs +1 -0
- package/dist/cli/index.mjs +262 -136
- package/dist/config/index.d.mts +1 -2
- package/dist/config/index.mjs +1 -1
- package/dist/index.d.mts +4 -8
- package/dist/index.mjs +1 -1
- package/dist/model/index.d.mts +2 -1
- package/dist/model/index.mjs +1 -1
- package/dist/vite-plugin/index.d.mts +38 -8
- package/dist/vite-plugin/index.mjs +1 -1
- package/dist/{_chunks → vite-plugin/internal/chunks}/libs/@nanostores/react.d.mts +2 -56
- package/dist/vite-plugin/internal/chunks/libs/@nanostores/react.mjs +1 -0
- package/dist/vite-plugin/internal/chunks/libs/birpc.mjs +1 -0
- package/dist/vite-plugin/internal/chunks/libs/fast-equals.mjs +1 -0
- package/dist/vite-plugin/internal/chunks/libs/nanostores.d.mts +59 -0
- package/dist/vite-plugin/internal/chunks/libs/nanostores.mjs +1 -0
- package/dist/vite-plugin/internal/chunks/libs/remeda.mjs +1 -0
- package/dist/vite-plugin/internal/chunks/rolldown-runtime.mjs +1 -0
- package/dist/vite-plugin/{internal.d.mts → internal/index.d.mts} +12 -3
- package/dist/vite-plugin/internal/index.mjs +1 -0
- package/package.json +35 -55
- package/react/index.d.mts +2 -28
- package/react/index.mjs +50520 -53863
- package/vite-plugin/internal/package.json +2 -2
- package/vite-plugin-modules.d.ts +14 -0
- package/__app__/react/likec4.tsx +0 -25
- package/__app__/src/ProjectsOverview.js +0 -16
- package/__app__/src/const.js +0 -19
- package/__app__/src/likec4.js +0 -21254
- package/__app__/src/main.js +0 -7
- package/__app__/src/routes/index.js +0 -324
- package/__app__/src/routes/projects.js +0 -193
- package/__app__/src/routes/single.js +0 -1983
- package/__app__/src/vendors.js +0 -52683
- package/__app__/src/webcomponent.js +0 -68
- package/dist/THIRD-PARTY-LICENSES.md +0 -1609
- package/dist/_chunks/libs/@chevrotain/cst-dts-gen.mjs +0 -30
- package/dist/_chunks/libs/@chevrotain/regexp-to-ast.mjs +0 -9
- package/dist/_chunks/libs/@chevrotain/types.d.mts +0 -1
- package/dist/_chunks/libs/@chevrotain/utils.mjs +0 -1
- package/dist/_chunks/libs/@hono/mcp.mjs +0 -45
- package/dist/_chunks/libs/@hono/node-server.mjs +0 -1
- package/dist/_chunks/libs/@logtape/logtape.mjs +0 -4
- package/dist/_chunks/libs/@lume/kiwi.mjs +0 -1
- package/dist/_chunks/libs/@modelcontextprotocol/sdk.mjs +0 -12
- package/dist/_chunks/libs/@nanostores/react.mjs +0 -1
- package/dist/_chunks/libs/ajv.mjs +0 -1
- package/dist/_chunks/libs/ansi-align.mjs +0 -2
- package/dist/_chunks/libs/ansi-regex.mjs +0 -1
- package/dist/_chunks/libs/ansi-styles.mjs +0 -1
- package/dist/_chunks/libs/atomically.mjs +0 -1
- package/dist/_chunks/libs/birpc.mjs +0 -1
- package/dist/_chunks/libs/boxen.mjs +0 -22
- package/dist/_chunks/libs/chevrotain-allstar.mjs +0 -2
- package/dist/_chunks/libs/chevrotain.mjs +0 -58
- package/dist/_chunks/libs/conf.mjs +0 -1
- package/dist/_chunks/libs/defu.mjs +0 -1
- package/dist/_chunks/libs/destr.mjs +0 -1
- package/dist/_chunks/libs/esm-env.mjs +0 -1
- package/dist/_chunks/libs/eventemitter3.mjs +0 -1
- package/dist/_chunks/libs/fast-equals.mjs +0 -1
- package/dist/_chunks/libs/find-up-simple.mjs +0 -1
- package/dist/_chunks/libs/get-port.mjs +0 -1
- package/dist/_chunks/libs/is-docker.mjs +0 -1
- package/dist/_chunks/libs/is-error-instance.mjs +0 -1
- package/dist/_chunks/libs/is-inside-container.mjs +0 -1
- package/dist/_chunks/libs/is-plain-obj.mjs +0 -1
- package/dist/_chunks/libs/isexe.mjs +0 -1
- package/dist/_chunks/libs/json5.mjs +0 -14
- package/dist/_chunks/libs/khroma.mjs +0 -1
- package/dist/_chunks/libs/ky.mjs +0 -3
- package/dist/_chunks/libs/langium.mjs +0 -33
- package/dist/_chunks/libs/merge-error-cause.mjs +0 -2
- package/dist/_chunks/libs/p-limit.mjs +0 -1
- package/dist/_chunks/libs/p-queue.mjs +0 -1
- package/dist/_chunks/libs/p-timeout.mjs +0 -1
- package/dist/_chunks/libs/package-manager-detector.mjs +0 -1
- package/dist/_chunks/libs/package-up.mjs +0 -1
- package/dist/_chunks/libs/pako.mjs +0 -1
- package/dist/_chunks/libs/parse-ms.mjs +0 -1
- package/dist/_chunks/libs/pathe.mjs +0 -1
- package/dist/_chunks/libs/picomatch.mjs +0 -1
- package/dist/_chunks/libs/pretty-ms.mjs +0 -1
- package/dist/_chunks/libs/remeda.mjs +0 -2
- package/dist/_chunks/libs/safe-stringify.mjs +0 -1
- package/dist/_chunks/libs/strip-indent.mjs +0 -1
- package/dist/_chunks/libs/tinyrainbow.mjs +0 -1
- package/dist/_chunks/libs/ts-graphviz.mjs +0 -4
- package/dist/_chunks/libs/ufo.mjs +0 -1
- package/dist/_chunks/libs/unstorage.mjs +0 -1
- package/dist/_chunks/libs/which.mjs +0 -1
- package/dist/_chunks/libs/word-wrap.mjs +0 -12
- package/dist/_chunks/node.mjs +0 -76
- package/dist/_chunks/rolldown-runtime.mjs +0 -1
- package/dist/_chunks/sequence.mjs +0 -1
- package/dist/_chunks/src.mjs +0 -17
- package/dist/_chunks/src2.mjs +0 -499
- package/dist/vite-plugin/internal.mjs +0 -1
- /package/dist/{_chunks → chunks}/libs/vscode-languageserver.mjs +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./is-error-instance.mjs";import{t}from"./is-plain-obj.mjs";const n=e=>{r.forEach(t=>{i(e,t)})},r=[`name`,`message`,`stack`,`cause`,`errors`],i=(e,t)=>{let n=a(e,t);if(n!==void 0){if(o(n)){c(e,t,e[t]);return}s(n)&&l(e,t,n)}},a=(e,t)=>{let n=Object.getOwnPropertyDescriptor(e,t);if(n!==void 0)return n;let r=Object.getPrototypeOf(e);return r===null?void 0:a(r,t)},o=({get:e,set:t})=>e!==void 0&&t===void 0,s=({enumerable:e,writable:t})=>e||!t,c=(e,t,n)=>{l(e,t,{value:n})},l=(e,t,n)=>{Object.defineProperty(e,t,{...n,...`get`in n||`set`in n?{}:{writable:!0},enumerable:!1,configurable:!0})},ee=(e,t)=>{Array.isArray(e.errors)?c(e,`errors`,e.errors.filter(te).map(t).filter(Boolean)):ne(e)?c(e,`errors`,[]):e.errors!==void 0&&re(e)},te=e=>e!==void 0,ne=e=>`AggregateError`in globalThis&&(e.name===`AggregateError`||e instanceof AggregateError),re=e=>{delete e.errors,e.errors!==void 0&&c(e,`errors`,[])},u=(e,t)=>{if(!(`cause`in e))return;let n=e.cause===void 0?e.cause:t(e.cause);n===void 0?delete e.cause:c(e,`cause`,n)},d=e=>!Object.isExtensible(e)||r.some(t=>f(e,t)||p(e,t)),f=(e,t)=>{let n=Object.getOwnPropertyDescriptor(e,t);return n!==void 0&&!n.configurable},p=(e,t)=>{try{return e[t],!1}catch{return!0}},m=e=>{c(e,`stack`,ie(e.message,e.name))},ie=(e=``,t=`Error`)=>{let{stack:n}=new(ae(t))(e);return typeof n==`string`&&n!==``?n:`${t}: ${e}`},ae=e=>{let t={value:e,enumerable:!1,writable:!0,configurable:!0},n=Object.defineProperty(class extends Error{},`name`,t);return Object.defineProperty(n.prototype,`name`,t),n},oe=e=>{let t={};for(let n of se(e))try{let r=e[n],{enumerable:i,configurable:o,writable:s=!0}=a(e,n);Object.defineProperty(t,n,{value:r,enumerable:i,configurable:o,writable:s})}catch{}return t},se=e=>{let t=ce(e);for(let n of r)le(e,n)&&t.push(n);return t},ce=e=>{try{return Reflect.ownKeys(e)}catch{return[]}},le=(e,t)=>{try{return t in e&&!Object.hasOwn(e,t)}catch{return!1}},h=e=>{let{name:t,message:n,stack:r,cause:i,errors:a,...o}=oe(e),s=ue(n,o),c=me(t,s);return n===s&&he(c,o),Object.entries({name:t,stack:r,cause:i,errors:a}).forEach(([e,t])=>{ge(c,e,t)}),r===void 0&&m(c),c},ue=(e,t)=>typeof e==`string`&&e!==``?e:pe(de(t)),de=e=>{try{return JSON.stringify(e)}catch{return fe(e)}},fe=e=>{try{return String(e)}catch{return`Invalid error`}},pe=e=>e.length<g?e:`${e.slice(0,g)}...`,g=1e3,me=(e,t)=>e===`AggregateError`&&`AggregateError`in globalThis?AggregateError([],t):e in _?new _[e](t):Error(t),_={Error,ReferenceError,TypeError,SyntaxError,RangeError,URIError,EvalError},he=(e,t)=>{for(let n in t)n in e||(e[n]=t[n])},ge=(e,t,n)=>{n!==void 0&&c(e,t,n)},_e=e=>{try{let t=Error(String(e));return m(t),t}catch(e){return e}},{toString:ve}=Object.prototype,ye=t=>be(t)?h(t):e(t)?v(t)?h(t):t:_e(t),be=e=>{try{return t(e)}catch{return!1}},v=e=>y(e)||d(e)||b(e),y=e=>{try{return ve.call(e)===`[object Object]`}catch{return!0}},b=e=>typeof e.constructor!=`function`||typeof e.constructor.name!=`string`||e.constructor.name===``||e.constructor.prototype!==Object.getPrototypeOf(e),x=(e,{shallow:t=!1}={})=>S(e,[],t),S=(e,t,n)=>{if(t.includes(e))return;let r=n?C:r=>S(r,[...t,e],n),i=ye(e);return w(i,r),i},C=e=>e,w=(e,t)=>{T(e),E(e),D(e),u(e,t),ee(e,t),n(e)},T=e=>{if(O(e.name))return;let t=Object.getPrototypeOf(e).name;c(e,`name`,O(t)?t:e.constructor.name)},E=e=>{O(e.message)||c(e,`message`,``)},D=e=>{O(e.stack)||m(e)},O=e=>typeof e==`string`&&e!==``,k=(e,t,n=e.name)=>{if(A(t),typeof n!=`string`)throw TypeError(`currentName must be a string: ${n}`);return n},A=e=>{if(!j(e))throw TypeError(`ErrorClass must be a class: ${e}`);if(!M(e.prototype))throw TypeError(`ErrorClass must inherit from Error: ${e}`);if(!N(e))throw TypeError(`ErrorClass must be have a valid constructor: ${e}`)},j=e=>typeof e==`function`&&typeof e.prototype==`object`&&e.prototype!==null,M=e=>e!==null&&(e.name===`Error`||M(Object.getPrototypeOf(e))),N=e=>typeof e.prototype.constructor==`function`,P=(e,t,n)=>{Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})},xe=(e,t)=>{Object.getPrototypeOf(e)!==t.prototype&&(Se(e,t),L(e,`constructor`),Ce(e,t))},Se=(e,t)=>{Object.setPrototypeOf(e,t.prototype)},Ce=(e,t)=>{L(e,`name`);let n=F(t.prototype);e.name!==n&&P(e,`name`,n)},F=e=>we(e)??Te(e)??F(Object.getPrototypeOf(e)),we=e=>Object.hasOwn(e,`name`)&&I(e.name)?e.name:void 0,Te=e=>typeof e.constructor==`function`&&I(e.constructor.name)?e.constructor.name:void 0,I=e=>typeof e==`string`&&e!==``,L=(e,t)=>{Object.hasOwn(e,t)&&delete e[t]},Ee=(e,t)=>{De(e,t)&&P(e,`stack`,ke(e,t))},De=(e,t)=>t!==e.name&&t!==``&&e.stack.includes(t)&&Oe(),Oe=()=>{class e extends Error{}let t={value:R,enumerable:!1,writable:!0,configurable:!0};Object.defineProperty(e,`name`,t),Object.defineProperty(e.prototype,`name`,t);let{stack:n}=new e(``);return typeof n==`string`&&n.includes(R)},R=`SetErrorClassError`,ke=({name:e,stack:t},n)=>{if(t.startsWith(`${n}: `))return t.replace(n,e);let[r,i]=Ae(n,e).find(([e])=>t.includes(e));return t.replace(r,i)},Ae=(e,t)=>[[`\n${e}: `,`\n${t}: `],[`${e}: `,`${t}: `],[`${e} `,`${t} `],[e,t]],je=(e,t,n)=>{let r=x(e),i=k(r,t,n);return xe(r,t),Ee(r,i),r},Me=(e,t)=>t.configurable===!1?Ne(e,t):Ie(e,t),Ne=(e,t)=>({...t,...Pe(e,t),...Fe(e,t)}),Pe=(e,t)=>t.writable===!0&&e.writable===!1?{writable:!1}:{},Fe=(e,t)=>e.hasValue&&`value`in t&&t.writable===!0?{value:e.value}:{},Ie=(e,t)=>{let n=B(e.enumerable,t.enumerable,!0),r=B(e.writable,t.writable,!0),i=B(e.configurable,t.configurable,!0);return{...Le(e,t,r),enumerable:n,configurable:i}},Le=(e,t,n)=>e.hasValue?{value:e.value,writable:n}:!z(e)&&!z(t)?{value:t.value,writable:n}:{get:B(e.get,t.get),set:B(e.set,t.set)},z=({get:e,set:t})=>e!==void 0||t!==void 0,B=(e,t,n)=>e??t??n,Re=(e,t,n)=>{if(!ze(e))throw TypeError(`Argument must be an object: ${e}`);if(!Be(t))throw TypeError(`Property key must be a string, a symbol or an integer: ${t}`);return Ve(n)},ze=e=>typeof e==`object`&&!!e,Be=e=>{let t=typeof e;return t===`string`||t===`symbol`||t===`number`},Ve=e=>{if(!t(e))throw TypeError(`Descriptor must be a plain object: ${e}`);let{enumerable:n,writable:r,configurable:i,value:a,get:o,set:s,...c}=e,l=`value`in e;return He({enumerable:n,writable:r,configurable:i,get:o,set:s,unknownProps:c,hasValue:l}),{enumerable:n,writable:r,configurable:i,value:a,get:o,set:s,hasValue:l}},He=({enumerable:e,writable:t,configurable:n,get:r,set:i,unknownProps:a,hasValue:o})=>{V(o,r,`get`),V(o,i,`set`),H(e,`enumerable`),H(t,`writable`),H(n,`configurable`),We(a)},V=(e,t,n)=>{if(Ue(t,n),e&&t!==void 0)throw TypeError(`Descriptor property "value" and "${n}" must not both be defined: ${t}`)},Ue=(e,t)=>{if(e!==void 0&&typeof e!=`function`)throw TypeError(`Descriptor property "${t}" must be a function: ${e}`)},H=(e,t)=>{if(e!==void 0&&typeof e!=`boolean`)throw TypeError(`Descriptor property "${t}" must be a boolean: ${e}`)},We=e=>{let[t]=Object.keys(e);if(t!==void 0)throw TypeError(`Unknown descriptor property "${t}": ${e[t]}`)},Ge=(e,t,n)=>(Ke(e,t,Me(Re(e,t,n),U(e,t))),e),U=(e,t)=>{let n=Object.getOwnPropertyDescriptor(e,t);if(n!==void 0)return n;let r=Object.getPrototypeOf(e);return r===null?{}:U(r,t)},Ke=(e,t,n)=>{try{Object.defineProperty(e,t,n)}catch{}},qe=(e,t,n)=>{if(n!==void 0)return W(e,t,n);try{delete e[t]}catch{}if(e[t]!==void 0)return W(e,t)},W=(e,t,n)=>{Ge(e,t,{value:n,...Je(t)})},Je=e=>typeof e==`string`&&e.startsWith(`_`)?{enumerable:!1}:{},Ye=(e,n,r={})=>{if(G(e,`First argument`),G(n,`Second argument`),!t(r))throw TypeError(`Options must be a plain object: ${r}`);let{soft:i=!1}=r;if(typeof i!=`boolean`)throw TypeError(`Option "soft" must be a boolean: ${i}`);return{soft:i}},G=(e,t)=>{if(e===void 0)throw TypeError(`${t} is required.`);if(!Xe(e))throw TypeError(`${t} must be a plain object or an error: ${e}`)},Xe=n=>t(n)||e(n),Ze=({error:e,props:t,propName:n,soft:r})=>Qe(n)||!tt.call(t,n)||r&&e[n]!==void 0,Qe=e=>e in $e||et.has(e),$e=Error(`check`),et=new Set([`prototype`,`errors`,`cause`]),{propertyIsEnumerable:tt}=Object.prototype,nt=(e,t,n)=>{let{soft:r}=Ye(e,t,n);for(let n of Reflect.ownKeys(t))rt({error:e,props:t,propName:n,soft:r});return e},rt=({error:e,props:t,propName:n,soft:r})=>{Ze({error:e,props:t,propName:n,soft:r})||qe(e,n,t[n])},K=(e,t,n)=>{Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!1,configurable:!0})},it=(e,t)=>{e.errors!==void 0&&K(e,`errors`,e.errors.map(e=>t(e).error).filter(Boolean))},at=({target:e,source:t,parent:n,child:r})=>{if(!q(e)){ot(e,t);return}q(t)&&K(e,`errors`,[...r.errors,...n.errors])},ot=(e,t)=>{t.errors!==void 0&&K(e,`errors`,t.errors)},q=e=>e.errors!==void 0&&e.errors.length!==0,st=(e,t,n=e.message)=>{if(typeof t!=`string`)throw TypeError(`newMessage must be a string: ${t}`);if(typeof n!=`string`)throw TypeError(`currentMessage must be a string: ${n}`);return n},ct=({name:e,stack:t},n,r)=>r!==``&&t.includes(r)?lt({name:e,stack:t,newMessage:n,currentMessage:r}):dt(e,t,n),lt=({name:e,stack:t,newMessage:n,currentMessage:r})=>{let[i,a]=ut(e,n,r).find(([e])=>t.includes(e));return t.replace(i,a)},ut=(e,t,n)=>[[`${e}: ${n}`,`${e}: ${t}`],[`: ${n}`,`: ${t}`],[`\n${n}`,`\n${t}`],[` ${n}`,` ${t}`],[n,t]],dt=(e,t,n)=>{let r=`${e}: `,i=n.trimEnd();return t===e||t.startsWith(`${e}\n`)?t.replace(e,`${r}${i}`):t.startsWith(r)?t.replace(r,`${r}${i}\n`):`${r}${i}\n${t}`},ft=(e,t,n)=>{let r=x(e),i=st(r,t,n);return Y(r,`message`,t),pt(r,t,i),r},pt=(e,t,n)=>{t===n||!mt()||Y(e,`stack`,ct(e,t,n))},mt=()=>{let{stack:e}=Error(J);return typeof e==`string`&&e.includes(J)},J=`set-error-message test message`,Y=(e,t,n)=>{Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})},X=(e,t,n)=>{if(typeof t!=`string`)throw TypeError(`Second argument must be a message string: ${t}`);let r=x(e);return ft(r,Z(t,r.message),n)},Z=(e,t)=>{let n=e.trim(),r=t.trim();return n===``?r:r===``?n:ht(n,r,e)},ht=(e,t,n)=>e.endsWith(gt)?n.endsWith(_t)?`${e}\n${t}`:`${e} ${t}`:`${t}\n${e}`,gt=`:`,_t=`
|
|
2
|
-
`,vt=({parent:e,child:t,target:n,stackError:r})=>{let i=e.message,a=r.message;return n.message=t.message,X(n,i,a)},yt=(e,t)=>Q(e)===t,Q=e=>typeof e==`object`&&e?e.stack:void 0,bt=({wrap:e,target:t,source:n,childHasStack:r})=>e===r?t:(K(t,`stack`,n.stack),n),xt=e=>{let{wrap:t,name:n}=e;return typeof t==`boolean`?(Object.hasOwn(e,`wrap`)&&delete e.wrap,t):n===`Error`},St=e=>$(e,[]).error,$=(e,t)=>{if(t.includes(e))return{};let n=n=>$(n,[...t,e]),r=Q(e),i=x(e,{shallow:!0}),a=yt(i,r);it(i,n);let{parent:o,childHasStack:s}=Ct(i,n);return{error:o,errorHasStack:a||s}},Ct=(e,t)=>{let n=xt(e);if(e.cause===void 0)return{parent:e,childHasStack:!1};let{error:r,errorHasStack:i}=t(e.cause);return delete e.cause,{parent:wt({parent:e,child:r,childHasStack:i,wrap:n}),childHasStack:i}},wt=({parent:e,child:t,childHasStack:n,wrap:r})=>{if(t===void 0)return e;let[i,a]=r?[t,e]:[e,t],o=bt({wrap:r,target:i,source:a,childHasStack:n}),s=vt({parent:e,child:t,target:je(i,i.constructor,o.name),stackError:o});return at({target:s,source:a,parent:e,child:t}),nt(s,a,{soft:!r})};export{X as n,St as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=class{value;next;constructor(e){this.value=e}},t=class{#e;#t;#n;constructor(){this.clear()}enqueue(t){let n=new e(t);this.#e?(this.#t.next=n,this.#t=n):(this.#e=n,this.#t=n),this.#n++}dequeue(){let e=this.#e;if(e)return this.#e=this.#e.next,this.#n--,this.#e||(this.#t=void 0),e.value}peek(){if(this.#e)return this.#e.value}clear(){this.#e=void 0,this.#t=void 0,this.#n=0}get size(){return this.#n}*[Symbol.iterator](){let e=this.#e;for(;e;)yield e.value,e=e.next}*drain(){for(;this.#e;)yield this.dequeue()}};function n(e){let n=!1;if(typeof e==`object`&&({concurrency:e,rejectOnClear:n=!1}=e),r(e),typeof n!=`boolean`)throw TypeError("Expected `rejectOnClear` to be a boolean");let i=new t,a=0,o=()=>{a<e&&i.size>0&&(a++,i.dequeue().run())},s=()=>{a--,o()},c=async(e,t,n)=>{let r=(async()=>e(...n))();t(r);try{await r}catch{}s()},l=(t,n,r,s)=>{let l={reject:r};new Promise(e=>{l.run=e,i.enqueue(l)}).then(c.bind(void 0,t,n,s)),a<e&&o()},u=(e,...t)=>new Promise((n,r)=>{l(e,n,r,t)});return Object.defineProperties(u,{activeCount:{get:()=>a},pendingCount:{get:()=>i.size},clearQueue:{value(){if(!n){i.clear();return}let e=AbortSignal.abort().reason;for(;i.size>0;)i.dequeue().reject(e)}},concurrency:{get:()=>e,set(t){r(t),e=t,queueMicrotask(()=>{for(;a<e&&i.size>0;)o()})}},map:{async value(e,t){let n=Array.from(e,(e,n)=>this(t,e,n));return Promise.all(n)}}}),u}function r(e){if(!((Number.isInteger(e)||e===1/0)&&e>0))throw TypeError("Expected `concurrency` to be a number from 1 and up")}export{n as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./eventemitter3.mjs";var t=class extends Error{constructor(e){super(e),this.name=`TimeoutError`}},n=class extends Error{constructor(e){super(),this.name=`AbortError`,this.message=e}};const r=e=>globalThis.DOMException===void 0?new n(e):new DOMException(e),i=e=>{let t=e.reason===void 0?r(`This operation was aborted.`):e.reason;return t instanceof Error?t:r(t)};function a(e,n){let{milliseconds:r,fallback:a,message:o,customTimers:s={setTimeout,clearTimeout}}=n,c,l,u=new Promise((u,d)=>{if(typeof r!=`number`||Math.sign(r)!==1)throw TypeError(`Expected \`milliseconds\` to be a positive number, got \`${r}\``);if(n.signal){let{signal:e}=n;e.aborted&&d(i(e)),l=()=>{d(i(e))},e.addEventListener(`abort`,l,{once:!0})}if(r===1/0){e.then(u,d);return}let f=new t;c=s.setTimeout.call(void 0,()=>{if(a){try{u(a())}catch(e){d(e)}return}typeof e.cancel==`function`&&e.cancel(),o===!1?u():o instanceof Error?d(o):(f.message=o??`Promise timed out after ${r} milliseconds`,d(f))},r),(async()=>{try{u(await e)}catch(e){d(e)}})()}).finally(()=>{u.clear(),l&&n.signal&&n.signal.removeEventListener(`abort`,l)});return u.clear=()=>{s.clearTimeout.call(void 0,c),c=void 0},u}function o(e,t,n){let r=0,i=e.length;for(;i>0;){let a=Math.trunc(i/2),o=r+a;n(e[o],t)<=0?(r=++o,i-=a+1):i=a}return r}var s=class{#e=[];enqueue(e,t){t={priority:0,...t};let n={priority:t.priority,id:t.id,run:e};if(this.size===0||this.#e[this.size-1].priority>=t.priority){this.#e.push(n);return}let r=o(this.#e,n,(e,t)=>t.priority-e.priority);this.#e.splice(r,0,n)}setPriority(e,t){let n=this.#e.findIndex(t=>t.id===e);if(n===-1)throw ReferenceError(`No promise function with the id "${e}" exists in the queue.`);let[r]=this.#e.splice(n,1);this.enqueue(r.run,{priority:t,id:e})}dequeue(){return this.#e.shift()?.run}filter(e){return this.#e.filter(t=>t.priority===e.priority).map(e=>e.run)}get size(){return this.#e.length}},c=class extends e.default{#e;#t;#n=0;#r;#i;#a=0;#o;#s;#c;#l;#u=0;#d;#f;#p;#m=1n;timeout;constructor(e){if(super(),e={carryoverConcurrencyCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:s,...e},!(typeof e.intervalCap==`number`&&e.intervalCap>=1))throw TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${e.intervalCap?.toString()??``}\` (${typeof e.intervalCap})`);if(e.interval===void 0||!(Number.isFinite(e.interval)&&e.interval>=0))throw TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${e.interval?.toString()??``}\` (${typeof e.interval})`);this.#e=e.carryoverConcurrencyCount,this.#t=e.intervalCap===1/0||e.interval===0,this.#r=e.intervalCap,this.#i=e.interval,this.#c=new e.queueClass,this.#l=e.queueClass,this.concurrency=e.concurrency,this.timeout=e.timeout,this.#p=e.throwOnTimeout===!0,this.#f=e.autoStart===!1}get#h(){return this.#t||this.#n<this.#r}get#g(){return this.#u<this.#d}#_(){this.#u--,this.#b(),this.emit(`next`)}#v(){this.#S(),this.#x(),this.#s=void 0}get#y(){let e=Date.now();if(this.#o===void 0){let t=this.#a-e;if(t<0)this.#n=this.#e?this.#u:0;else return this.#s===void 0&&(this.#s=setTimeout(()=>{this.#v()},t)),!0}return!1}#b(){if(this.#c.size===0)return this.#o&&clearInterval(this.#o),this.#o=void 0,this.emit(`empty`),this.#u===0&&this.emit(`idle`),!1;if(!this.#f){let e=!this.#y;if(this.#h&&this.#g){let t=this.#c.dequeue();return t?(this.emit(`active`),t(),e&&this.#x(),!0):!1}}return!1}#x(){this.#t||this.#o!==void 0||(this.#o=setInterval(()=>{this.#S()},this.#i),this.#a=Date.now()+this.#i)}#S(){this.#n===0&&this.#u===0&&this.#o&&(clearInterval(this.#o),this.#o=void 0),this.#n=this.#e?this.#u:0,this.#C()}#C(){for(;this.#b(););}get concurrency(){return this.#d}set concurrency(e){if(!(typeof e==`number`&&e>=1))throw TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this.#d=e,this.#C()}async#w(e){return new Promise((t,n)=>{e.addEventListener(`abort`,()=>{n(e.reason)},{once:!0})})}setPriority(e,t){this.#c.setPriority(e,t)}async add(e,n={}){return n.id??=(this.#m++).toString(),n={timeout:this.timeout,throwOnTimeout:this.#p,...n},new Promise((r,i)=>{this.#c.enqueue(async()=>{this.#u++;try{n.signal?.throwIfAborted(),this.#n++;let t=e({signal:n.signal});n.timeout&&(t=a(Promise.resolve(t),{milliseconds:n.timeout})),n.signal&&(t=Promise.race([t,this.#w(n.signal)]));let i=await t;r(i),this.emit(`completed`,i)}catch(e){if(e instanceof t&&!n.throwOnTimeout){r();return}i(e),this.emit(`error`,e)}finally{this.#_()}},n),this.emit(`add`),this.#b()})}async addAll(e,t){return Promise.all(e.map(async e=>this.add(e,t)))}start(){return this.#f?(this.#f=!1,this.#C(),this):this}pause(){this.#f=!0}clear(){this.#c=new this.#l}async onEmpty(){this.#c.size!==0&&await this.#T(`empty`)}async onSizeLessThan(e){this.#c.size<e||await this.#T(`next`,()=>this.#c.size<e)}async onIdle(){this.#u===0&&this.#c.size===0||await this.#T(`idle`)}async#T(e,t){return new Promise(n=>{let r=()=>{t&&!t()||(this.off(e,r),n())};this.on(e,r)})}get size(){return this.#c.size}sizeBy(e){return this.#c.filter(e).length}get pending(){return this.#u}get isPaused(){return this.#f}};export{c as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=class e extends Error{name=`TimeoutError`;constructor(t,n){super(t,n),Error.captureStackTrace?.(this,e)}};const t=e=>e.reason??new DOMException(`This operation was aborted.`,`AbortError`);function n(n,r){let{milliseconds:i,fallback:a,message:o,customTimers:s={setTimeout,clearTimeout},signal:c}=r,l,u,d=new Promise((r,d)=>{if(typeof i!=`number`||Math.sign(i)!==1)throw TypeError(`Expected \`milliseconds\` to be a positive number, got \`${i}\``);if(c?.aborted){d(t(c));return}if(c&&(u=()=>{d(t(c))},c.addEventListener(`abort`,u,{once:!0})),n.then(r,d),i===1/0)return;let f=new e;l=s.setTimeout.call(void 0,()=>{if(a){try{r(a())}catch(e){d(e)}return}typeof n.cancel==`function`&&n.cancel(),o===!1?r():o instanceof Error?d(o):(f.message=o??`Promise timed out after ${i} milliseconds`,d(f))},i)}).finally(()=>{d.clear(),u&&c&&c.removeEventListener(`abort`,u)});return d.clear=()=>{s.clearTimeout.call(void 0,l),l=void 0},d}export{n as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"node:path";import t from"node:fs/promises";import n from"node:process";function r(e,t){return n=>n.length>1?[e,t,n[0],`--`,...n.slice(1)]:[e,t,n[0]]}function i(){return e=>[`deno`,`run`,`npm:${e[0]}`,...e.slice(1)]}const a={agent:[`npm`,0],run:r(`npm`,`run`),install:[`npm`,`i`,0],frozen:[`npm`,`ci`,0],global:[`npm`,`i`,`-g`,0],add:[`npm`,`i`,0],upgrade:[`npm`,`update`,0],"upgrade-interactive":null,dedupe:[`npm`,`dedupe`,0],execute:[`npx`,0],"execute-local":[`npx`,0],uninstall:[`npm`,`uninstall`,0],global_uninstall:[`npm`,`uninstall`,`-g`,0]},o={agent:[`yarn`,0],run:[`yarn`,`run`,0],install:[`yarn`,`install`,0],frozen:[`yarn`,`install`,`--frozen-lockfile`,0],global:[`yarn`,`global`,`add`,0],add:[`yarn`,`add`,0],upgrade:[`yarn`,`upgrade`,0],"upgrade-interactive":[`yarn`,`upgrade-interactive`,0],dedupe:null,execute:[`npx`,0],"execute-local":r(`yarn`,`exec`),uninstall:[`yarn`,`remove`,0],global_uninstall:[`yarn`,`global`,`remove`,0]},s={...o,frozen:[`yarn`,`install`,`--immutable`,0],upgrade:[`yarn`,`up`,0],"upgrade-interactive":[`yarn`,`up`,`-i`,0],dedupe:[`yarn`,`dedupe`,0],execute:[`yarn`,`dlx`,0],"execute-local":[`yarn`,`exec`,0],global:[`npm`,`i`,`-g`,0],global_uninstall:[`npm`,`uninstall`,`-g`,0]},c={agent:[`pnpm`,0],run:[`pnpm`,`run`,0],install:[`pnpm`,`i`,0],frozen:[`pnpm`,`i`,`--frozen-lockfile`,0],global:[`pnpm`,`add`,`-g`,0],add:[`pnpm`,`add`,0],upgrade:[`pnpm`,`update`,0],"upgrade-interactive":[`pnpm`,`update`,`-i`,0],dedupe:[`pnpm`,`dedupe`,0],execute:[`pnpm`,`dlx`,0],"execute-local":[`pnpm`,`exec`,0],uninstall:[`pnpm`,`remove`,0],global_uninstall:[`pnpm`,`remove`,`--global`,0]},l={agent:[`bun`,0],run:[`bun`,`run`,0],install:[`bun`,`install`,0],frozen:[`bun`,`install`,`--frozen-lockfile`,0],global:[`bun`,`add`,`-g`,0],add:[`bun`,`add`,0],upgrade:[`bun`,`update`,0],"upgrade-interactive":[`bun`,`update`,`-i`,0],dedupe:null,execute:[`bun`,`x`,0],"execute-local":[`bun`,`x`,0],uninstall:[`bun`,`remove`,0],global_uninstall:[`bun`,`remove`,`-g`,0]},u={agent:[`deno`,0],run:[`deno`,`task`,0],install:[`deno`,`install`,0],frozen:[`deno`,`install`,`--frozen`,0],global:[`deno`,`install`,`-g`,0],add:[`deno`,`add`,0],upgrade:[`deno`,`outdated`,`--update`,0],"upgrade-interactive":[`deno`,`outdated`,`--update`,0],dedupe:null,execute:i(),"execute-local":[`deno`,`task`,`--eval`,0],uninstall:[`deno`,`remove`,0],global_uninstall:[`deno`,`uninstall`,`-g`,0]},d={npm:a,yarn:o,"yarn@berry":s,pnpm:c,"pnpm@6":{...c,run:r(`pnpm`,`run`)},bun:l,deno:u};function f(e,t,n){let r=d[e][t];return p(r,n)}function p(e,t){if(e==null)return null;let n=typeof e==`function`?e(t):e.flatMap(e=>typeof e==`number`?t:[e]);return{command:n[0],args:n.slice(1)}}const m=[`npm`,`yarn`,`yarn@berry`,`pnpm`,`pnpm@6`,`bun`,`deno`],h={"bun.lock":`bun`,"bun.lockb":`bun`,"deno.lock":`deno`,"pnpm-lock.yaml":`pnpm`,"pnpm-workspace.yaml":`pnpm`,"yarn.lock":`yarn`,"package-lock.json":`npm`,"npm-shrinkwrap.json":`npm`},g={"node_modules/.deno/":`deno`,"node_modules/.pnpm/":`pnpm`,"node_modules/.yarn-state.yml":`yarn`,"node_modules/.yarn_integrity":`yarn`,"node_modules/.package-lock.json":`npm`,".pnp.cjs":`yarn`,".pnp.js":`yarn`,"bun.lock":`bun`,"bun.lockb":`bun`};async function _(e,n){try{let r=await t.stat(e);return n===`file`?r.isFile():r.isDirectory()}catch{return!1}}function*v(t=n.cwd()){let r=e.resolve(t),{root:i}=e.parse(r);for(;r&&r!==i;)yield r,r=e.dirname(r)}async function y(e,t){return!e||!await _(e,`file`)?null:await S(e,t)}async function b(t={}){let{cwd:n,strategies:r=[`lockfile`,`packageManager-field`,`devEngines-field`]}=t,i;if(typeof t.stopDir==`string`){let n=e.resolve(t.stopDir);i=e=>e===n}else i=t.stopDir;for(let a of v(n)){for(let n of r)switch(n){case`lockfile`:for(let n of Object.keys(h))if(await _(e.join(a,n),`file`)){let r=h[n];return await y(e.join(a,`package.json`),t)||{name:r,agent:r}}break;case`packageManager-field`:case`devEngines-field`:{let n=await y(e.join(a,`package.json`),t);if(n)return n;break}case`install-metadata`:for(let t of Object.keys(g)){let n=t.endsWith(`/`)?`dir`:`file`;if(await _(e.join(a,t),n)){let e=g[t];return{name:e,agent:e===`yarn`?C(t)?`yarn`:`yarn@berry`:e}}}break}if(i?.(a))break}return null}function x(e){let t=e=>e?.match(/\d+(\.\d+){0,2}/)?.[0]??e;if(typeof e.packageManager==`string`){let[n,r]=e.packageManager.replace(/^\^/,``).split(`@`);return{name:n,ver:t(r)}}if(typeof e.devEngines?.packageManager?.name==`string`)return{name:e.devEngines.packageManager.name,ver:t(e.devEngines.packageManager.version)}}async function S(e,n){try{let r=await t.readFile(e,`utf8`),i=n.packageJsonParser?await n.packageJsonParser(r,e):JSON.parse(r),a,o=x(i);if(o){let e=o.name,t=o.ver,r=t;return e===`yarn`&&t&&Number.parseInt(t)>1?(a=`yarn@berry`,r=`berry`,{name:e,agent:a,version:r}):e===`pnpm`&&t&&Number.parseInt(t)<7?(a=`pnpm@6`,{name:e,agent:a,version:r}):m.includes(e)?(a=e,{name:e,agent:a,version:r}):n.onUnknown?.(i.packageManager)??null}}catch{}return null}function C(e){return e.endsWith(`.yarn_integrity`)}export{f as n,b as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./find-up-simple.mjs";import t from"node:process";function n({cwd:n=t.cwd()}={}){return e(`package.json`,{cwd:n})}export{n as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e){let t=e.length;for(;--t>=0;)e[t]=0}const t=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),n=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),i=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=Array(288*2);e(a);const o=Array(60);e(o);const s=Array(512);e(s);const c=Array(256);e(c);const l=Array(29);e(l);const u=Array(30);e(u);function d(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}let f,p,m;function h(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}const g=e=>e<256?s[e]:s[256+(e>>>7)],_=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},v=(e,t,n)=>{e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,_(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},y=(e,t,n)=>{v(e,n[t*2],n[t*2+1])},b=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},x=e=>{e.bi_valid===16?(_(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},S=(e,t)=>{let n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length,l,u,d,f,p,m,h=0;for(f=0;f<=15;f++)e.bl_count[f]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<573;l++)u=e.heap[l],f=n[n[u*2+1]*2+1]+1,f>c&&(f=c,h++),n[u*2+1]=f,!(u>r)&&(e.bl_count[f]++,p=0,u>=s&&(p=o[u-s]),m=n[u*2],e.opt_len+=m*(f+p),a&&(e.static_len+=m*(i[u*2+1]+p)));if(h!==0){do{for(f=c-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[c]--,h-=2}while(h>0);for(f=c;f!==0;f--)for(u=e.bl_count[f];u!==0;)d=e.heap[--l],!(d>r)&&(n[d*2+1]!==f&&(e.opt_len+=(f-n[d*2+1])*n[d*2],n[d*2+1]=f),u--)}},C=(e,t,n)=>{let r=Array(16),i=0,a,o;for(a=1;a<=15;a++)i=i+n[a-1]<<1,r[a]=i;for(o=0;o<=t;o++){let t=e[o*2+1];t!==0&&(e[o*2]=b(r[t]++,t))}},w=()=>{let e,i,h,g,_,v=Array(16);for(h=0,g=0;g<28;g++)for(l[g]=h,e=0;e<1<<t[g];e++)c[h++]=g;for(c[h-1]=g,_=0,g=0;g<16;g++)for(u[g]=_,e=0;e<1<<n[g];e++)s[_++]=g;for(_>>=7;g<30;g++)for(u[g]=_<<7,e=0;e<1<<n[g]-7;e++)s[256+ _++]=g;for(i=0;i<=15;i++)v[i]=0;for(e=0;e<=143;)a[e*2+1]=8,e++,v[8]++;for(;e<=255;)a[e*2+1]=9,e++,v[9]++;for(;e<=279;)a[e*2+1]=7,e++,v[7]++;for(;e<=287;)a[e*2+1]=8,e++,v[8]++;for(C(a,287,v),e=0;e<30;e++)o[e*2+1]=5,o[e*2]=b(e,5);f=new d(a,t,257,286,15),p=new d(o,n,0,30,15),m=new d([],r,0,19,7)},T=e=>{let t;for(t=0;t<286;t++)e.dyn_ltree[t*2]=0;for(t=0;t<30;t++)e.dyn_dtree[t*2]=0;for(t=0;t<19;t++)e.bl_tree[t*2]=0;e.dyn_ltree[256*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},E=e=>{e.bi_valid>8?_(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},D=(e,t,n,r)=>{let i=t*2,a=n*2;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]},O=(e,t,n)=>{let r=e.heap[n],i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&D(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!D(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},ee=(e,r,i)=>{let a,o,s=0,d,f;if(e.sym_next!==0)do a=e.pending_buf[e.sym_buf+ s++]&255,a+=(e.pending_buf[e.sym_buf+ s++]&255)<<8,o=e.pending_buf[e.sym_buf+ s++],a===0?y(e,o,r):(d=c[o],y(e,d+256+1,r),f=t[d],f!==0&&(o-=l[d],v(e,o,f)),a--,d=g(a),y(e,d,i),f=n[d],f!==0&&(a-=u[d],v(e,a,f)));while(s<e.sym_next);y(e,256,r)},k=(e,t)=>{let n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.elems,o,s,c=-1,l;for(e.heap_len=0,e.heap_max=573,o=0;o<a;o++)n[o*2]===0?n[o*2+1]=0:(e.heap[++e.heap_len]=c=o,e.depth[o]=0);for(;e.heap_len<2;)l=e.heap[++e.heap_len]=c<2?++c:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=c,o=e.heap_len>>1;o>=1;o--)O(e,n,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],O(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,n[l*2]=n[o*2]+n[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,n[o*2+1]=n[s*2+1]=l,e.heap[1]=l++,O(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],S(e,t),C(n,c,e.bl_count)},A=(e,t,n)=>{let r,i=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)&&(s<l?e.bl_tree[a*2]+=s:a===0?s<=10?e.bl_tree[34]++:e.bl_tree[36]++:(a!==i&&e.bl_tree[a*2]++,e.bl_tree[32]++),s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4))},te=(e,t,n)=>{let r,i=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),r=0;r<=n;r++)if(a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)){if(s<l)do y(e,a,e.bl_tree);while(--s!==0);else a===0?s<=10?(y(e,17,e.bl_tree),v(e,s-3,3)):(y(e,18,e.bl_tree),v(e,s-11,7)):(a!==i&&(y(e,a,e.bl_tree),s--),y(e,16,e.bl_tree),v(e,s-3,2));s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4)}},ne=e=>{let t;for(A(e,e.dyn_ltree,e.l_desc.max_code),A(e,e.dyn_dtree,e.d_desc.max_code),k(e,e.bl_desc),t=18;t>=3&&e.bl_tree[i[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},re=(e,t,n,r)=>{let a;for(v(e,t-257,5),v(e,n-1,5),v(e,r-4,4),a=0;a<r;a++)v(e,e.bl_tree[i[a]*2+1],3);te(e,e.dyn_ltree,t-1),te(e,e.dyn_dtree,n-1)},ie=e=>{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return 0;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return 1;for(n=32;n<256;n++)if(e.dyn_ltree[n*2]!==0)return 1;return 0};let ae=!1;const oe=e=>{ae||=(w(),!0),e.l_desc=new h(e.dyn_ltree,f),e.d_desc=new h(e.dyn_dtree,p),e.bl_desc=new h(e.bl_tree,m),e.bi_buf=0,e.bi_valid=0,T(e)},se=(e,t,n,r)=>{v(e,0+(r?1:0),3),E(e),_(e,n),_(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},ce=e=>{v(e,2,3),y(e,256,a),x(e)},le=(e,t,n,r)=>{let i,s,c=0;e.level>0?(e.strm.data_type===2&&(e.strm.data_type=ie(e)),k(e,e.l_desc),k(e,e.d_desc),c=ne(e),i=e.opt_len+3+7>>>3,s=e.static_len+3+7>>>3,s<=i&&(i=s)):i=s=n+5,n+4<=i&&t!==-1?se(e,t,n,r):e.strategy===4||s===i?(v(e,2+(r?1:0),3),ee(e,a,o)):(v(e,4+(r?1:0),3),re(e,e.l_desc.max_code+1,e.d_desc.max_code+1,c+1),ee(e,e.dyn_ltree,e.dyn_dtree)),T(e),r&&E(e)},ue=(e,t,n)=>(e.pending_buf[e.sym_buf+ e.sym_next++]=t,e.pending_buf[e.sym_buf+ e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+ e.sym_next++]=n,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(c[n]+256+1)*2]++,e.dyn_dtree[g(t)*2]++),e.sym_next===e.sym_end);var de={_tr_init:oe,_tr_stored_block:se,_tr_flush_block:le,_tr_tally:ue,_tr_align:ce};const fe=(e,t,n,r)=>{let i=e&65535|0,a=e>>>16&65535|0,o=0;for(;n!==0;){o=n>2e3?2e3:n,n-=o;do i=i+t[r++]|0,a=a+i|0;while(--o);i%=65521,a%=65521}return i|a<<16|0};var pe=fe;const me=()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t},he=new Uint32Array(me()),ge=(e,t,n,r)=>{let i=he,a=r+n;e^=-1;for(let n=r;n<a;n++)e=e>>>8^i[(e^t[n])&255];return e^-1};var j=ge,M={2:`need dictionary`,1:`stream end`,0:``,"-1":`file error`,"-2":`stream error`,"-3":`data error`,"-4":`insufficient memory`,"-5":`buffer error`,"-6":`incompatible version`},N={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:_e,_tr_stored_block:ve,_tr_flush_block:ye,_tr_tally:P,_tr_align:be}=de,{Z_NO_FLUSH:F,Z_PARTIAL_FLUSH:xe,Z_FULL_FLUSH:Se,Z_FINISH:I,Z_BLOCK:Ce,Z_OK:L,Z_STREAM_END:we,Z_STREAM_ERROR:R,Z_DATA_ERROR:Te,Z_BUF_ERROR:Ee,Z_DEFAULT_COMPRESSION:De,Z_FILTERED:Oe,Z_HUFFMAN_ONLY:ke,Z_RLE:Ae,Z_FIXED:je,Z_DEFAULT_STRATEGY:Me,Z_UNKNOWN:Ne,Z_DEFLATED:Pe}=N,z=(e,t)=>(e.msg=M[t],t),Fe=e=>e*2-(e>4?9:0),B=e=>{let t=e.length;for(;--t>=0;)e[t]=0},Ie=e=>{let t,n,r,i=e.w_size;t=e.hash_size,r=t;do n=e.head[--r],e.head[r]=n>=i?n-i:0;while(--t);t=i,r=t;do n=e.prev[--r],e.prev[r]=n>=i?n-i:0;while(--t)};let Le=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask,V=Le;const H=e=>{let t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))},U=(e,t)=>{ye(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,H(e.strm)},W=(e,t)=>{e.pending_buf[e.pending++]=t},Re=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},ze=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),e.state.wrap===1?e.adler=pe(e.adler,t,i,n):e.state.wrap===2&&(e.adler=j(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},Be=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,a,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+258,p=l[r+o-1],m=l[r+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do{if(i=t,l[i+o]!==m||l[i+o-1]!==p||l[i]!==l[r]||l[++i]!==l[r+1])continue;r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<f);if(a=258-(f-r),r=f-258,a>o){if(e.match_start=t,o=a,a>=s)break;p=l[r+o-1],m=l[r+o]}}while((t=d[t&u])>c&&--n!==0);return o<=e.lookahead?o:e.lookahead},G=e=>{let t=e.w_size,n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-262)&&(e.window.set(e.window.subarray(t,t+t-r),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),Ie(e),r+=t),e.strm.avail_in===0)break;if(n=ze(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=3)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=V(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=V(e,e.ins_h,e.window[i+3-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&e.strm.avail_in!==0)},Ve=(e,t)=>{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,i,a,o=0,s=e.strm.avail_in;do{if(r=65535,a=e.bi_valid+42>>3,e.strm.avail_out<a||(a=e.strm.avail_out-a,i=e.strstart-e.block_start,r>i+e.strm.avail_in&&(r=i+e.strm.avail_in),r>a&&(r=a),r<n&&(r===0&&t!==I||t===F||r!==i+e.strm.avail_in)))break;o=t===I&&r===i+e.strm.avail_in?1:0,ve(e,0,0,o),e.pending_buf[e.pending-4]=r,e.pending_buf[e.pending-3]=r>>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,H(e.strm),i&&(i>r&&(i=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,r-=i),r&&(ze(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(o===0);return s-=e.strm.avail_in,s&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),o?4:t!==F&&t!==I&&e.strm.avail_in===0&&e.strstart===e.block_start?2:(a=e.window_size-e.strstart,e.strm.avail_in>a&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,a+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),a>e.strm.avail_in&&(a=e.strm.avail_in),a&&(ze(e.strm,e.window,e.strstart,a),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.high_water<e.strstart&&(e.high_water=e.strstart),a=e.bi_valid+42>>3,a=e.pending_buf_size-a>65535?65535:e.pending_buf_size-a,n=a>e.w_size?e.w_size:a,i=e.strstart-e.block_start,(i>=n||(i||t===I)&&t!==F&&e.strm.avail_in===0&&i<=a)&&(r=i>a?a:i,o=t===I&&e.strm.avail_in===0&&r===i?1:0,ve(e,e.block_start,r,o),e.block_start+=r,H(e.strm)),o?3:1)},He=(e,t)=>{let n,r;for(;;){if(e.lookahead<262){if(G(e),e.lookahead<262&&t===F)return 1;if(e.lookahead===0)break}if(n=0,e.lookahead>=3&&(e.ins_h=V(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-262&&(e.match_length=Be(e,n)),e.match_length>=3)if(r=P(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do e.strstart++,e.ins_h=V(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=V(e,e.ins_h,e.window[e.strstart+1]);else r=P(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(U(e,!1),e.strm.avail_out===0))return 1}return e.insert=e.strstart<2?e.strstart:2,t===I?(U(e,!0),e.strm.avail_out===0?3:4):e.sym_next&&(U(e,!1),e.strm.avail_out===0)?1:2},K=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<262){if(G(e),e.lookahead<262&&t===F)return 1;if(e.lookahead===0)break}if(n=0,e.lookahead>=3&&(e.ins_h=V(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-262&&(e.match_length=Be(e,n),e.match_length<=5&&(e.strategy===Oe||e.match_length===3&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,r=P(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=V(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(U(e,!1),e.strm.avail_out===0))return 1}else if(e.match_available){if(r=P(e,0,e.window[e.strstart-1]),r&&U(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&=(r=P(e,0,e.window[e.strstart-1]),0),e.insert=e.strstart<2?e.strstart:2,t===I?(U(e,!0),e.strm.avail_out===0?3:4):e.sym_next&&(U(e,!1),e.strm.avail_out===0)?1:2},Ue=(e,t)=>{let n,r,i,a,o=e.window;for(;;){if(e.lookahead<=258){if(G(e),e.lookahead<=258&&t===F)return 1;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(i=e.strstart-1,r=o[i],r===o[++i]&&r===o[++i]&&r===o[++i])){a=e.strstart+258;do;while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&i<a);e.match_length=258-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=P(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=P(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(U(e,!1),e.strm.avail_out===0))return 1}return e.insert=0,t===I?(U(e,!0),e.strm.avail_out===0?3:4):e.sym_next&&(U(e,!1),e.strm.avail_out===0)?1:2},We=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(G(e),e.lookahead===0)){if(t===F)return 1;break}if(e.match_length=0,n=P(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(U(e,!1),e.strm.avail_out===0))return 1}return e.insert=0,t===I?(U(e,!0),e.strm.avail_out===0?3:4):e.sym_next&&(U(e,!1),e.strm.avail_out===0)?1:2};function q(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}const Ge=[new q(0,0,0,0,Ve),new q(4,4,8,4,He),new q(4,5,16,8,He),new q(4,6,32,32,He),new q(4,4,16,16,K),new q(8,16,32,32,K),new q(8,16,128,128,K),new q(8,32,128,256,K),new q(32,128,258,1024,K),new q(32,258,258,4096,K)],Ke=e=>{e.window_size=2*e.w_size,B(e.head),e.max_lazy_match=Ge[e.level].max_lazy,e.good_match=Ge[e.level].good_length,e.nice_match=Ge[e.level].nice_length,e.max_chain_length=Ge[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0};function qe(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Pe,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(573*2),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),B(this.dyn_ltree),B(this.dyn_dtree),B(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),B(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),B(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Je=e=>{if(!e)return 1;let t=e.state;return!t||t.strm!==e||t.status!==42&&t.status!==57&&t.status!==69&&t.status!==73&&t.status!==91&&t.status!==103&&t.status!==113&&t.status!==666?1:0},Ye=e=>{if(Je(e))return z(e,R);e.total_in=e.total_out=0,e.data_type=Ne;let t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?57:t.wrap?42:113,e.adler=t.wrap===2?0:1,t.last_flush=-2,_e(t),L},Xe=e=>{let t=Ye(e);return t===L&&Ke(e.state),t},Ze=(e,t)=>Je(e)||e.state.wrap!==2?R:(e.state.gzhead=t,L),Qe=(e,t,n,r,i,a)=>{if(!e)return R;let o=1;if(t===De&&(t=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),i<1||i>9||n!==Pe||r<8||r>15||t<0||t>9||a<0||a>je||r===8&&o!==1)return z(e,R);r===8&&(r=9);let s=new qe;return e.state=s,s.strm=e,s.status=42,s.wrap=o,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new Uint8Array(s.w_size*2),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Uint8Array(s.pending_buf_size),s.sym_buf=s.lit_bufsize,s.sym_end=(s.lit_bufsize-1)*3,s.level=t,s.strategy=a,s.method=n,Xe(e)},$e=(e,t)=>Qe(e,t,Pe,15,8,Me),et=(e,t)=>{if(Je(e)||t>Ce||t<0)return e?z(e,R):R;let n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===666&&t!==I)return z(e,e.avail_out===0?Ee:R);let r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(H(e),e.avail_out===0)return n.last_flush=-1,L}else if(e.avail_in===0&&Fe(t)<=Fe(r)&&t!==I)return z(e,Ee);if(n.status===666&&e.avail_in!==0)return z(e,Ee);if(n.status===42&&n.wrap===0&&(n.status=113),n.status===42){let t=Pe+(n.w_bits-8<<4)<<8,r=-1;if(r=n.strategy>=ke||n.level<2?0:n.level<6?1:n.level===6?2:3,t|=r<<6,n.strstart!==0&&(t|=32),t+=31-t%31,Re(n,t),n.strstart!==0&&(Re(n,e.adler>>>16),Re(n,e.adler&65535)),e.adler=1,n.status=113,H(e),n.pending!==0)return n.last_flush=-1,L}if(n.status===57){if(e.adler=0,W(n,31),W(n,139),W(n,8),n.gzhead)W(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),W(n,n.gzhead.time&255),W(n,n.gzhead.time>>8&255),W(n,n.gzhead.time>>16&255),W(n,n.gzhead.time>>24&255),W(n,n.level===9?2:n.strategy>=ke||n.level<2?4:0),W(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(W(n,n.gzhead.extra.length&255),W(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=j(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69;else if(W(n,0),W(n,0),W(n,0),W(n,0),W(n,0),W(n,n.level===9?2:n.strategy>=ke||n.level<2?4:0),W(n,3),n.status=113,H(e),n.pending!==0)return n.last_flush=-1,L}if(n.status===69){if(n.gzhead.extra){let t=n.pending,r=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+r>n.pending_buf_size;){let i=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+i),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>t&&(e.adler=j(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex+=i,H(e),n.pending!==0)return n.last_flush=-1,L;t=0,r-=i}let i=new Uint8Array(n.gzhead.extra);n.pending_buf.set(i.subarray(n.gzindex,n.gzindex+r),n.pending),n.pending+=r,n.gzhead.hcrc&&n.pending>t&&(e.adler=j(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex=0}n.status=73}if(n.status===73){if(n.gzhead.name){let t=n.pending,r;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>t&&(e.adler=j(e.adler,n.pending_buf,n.pending-t,t)),H(e),n.pending!==0)return n.last_flush=-1,L;t=0}r=n.gzindex<n.gzhead.name.length?n.gzhead.name.charCodeAt(n.gzindex++)&255:0,W(n,r)}while(r!==0);n.gzhead.hcrc&&n.pending>t&&(e.adler=j(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex=0}n.status=91}if(n.status===91){if(n.gzhead.comment){let t=n.pending,r;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>t&&(e.adler=j(e.adler,n.pending_buf,n.pending-t,t)),H(e),n.pending!==0)return n.last_flush=-1,L;t=0}r=n.gzindex<n.gzhead.comment.length?n.gzhead.comment.charCodeAt(n.gzindex++)&255:0,W(n,r)}while(r!==0);n.gzhead.hcrc&&n.pending>t&&(e.adler=j(e.adler,n.pending_buf,n.pending-t,t))}n.status=103}if(n.status===103){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(H(e),n.pending!==0))return n.last_flush=-1,L;W(n,e.adler&255),W(n,e.adler>>8&255),e.adler=0}if(n.status=113,H(e),n.pending!==0)return n.last_flush=-1,L}if(e.avail_in!==0||n.lookahead!==0||t!==F&&n.status!==666){let r=n.level===0?Ve(n,t):n.strategy===ke?We(n,t):n.strategy===Ae?Ue(n,t):Ge[n.level].func(n,t);if((r===3||r===4)&&(n.status=666),r===1||r===3)return e.avail_out===0&&(n.last_flush=-1),L;if(r===2&&(t===xe?be(n):t!==Ce&&(ve(n,0,0,!1),t===Se&&(B(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),H(e),e.avail_out===0))return n.last_flush=-1,L}return t===I?n.wrap<=0?we:(n.wrap===2?(W(n,e.adler&255),W(n,e.adler>>8&255),W(n,e.adler>>16&255),W(n,e.adler>>24&255),W(n,e.total_in&255),W(n,e.total_in>>8&255),W(n,e.total_in>>16&255),W(n,e.total_in>>24&255)):(Re(n,e.adler>>>16),Re(n,e.adler&65535)),H(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending===0?we:L):L},tt=e=>{if(Je(e))return R;let t=e.state.status;return e.state=null,t===113?z(e,Te):L},nt=(e,t)=>{let n=t.length;if(Je(e))return R;let r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==42||r.lookahead)return R;if(i===1&&(e.adler=pe(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(B(r.head),r.strstart=0,r.block_start=0,r.insert=0);let e=new Uint8Array(r.w_size);e.set(t.subarray(n-r.w_size,n),0),t=e,n=r.w_size}let a=e.avail_in,o=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,G(r);r.lookahead>=3;){let e=r.strstart,t=r.lookahead-2;do r.ins_h=V(r,r.ins_h,r.window[e+3-1]),r.prev[e&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=e,e++;while(--t);r.strstart=e,r.lookahead=2,G(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=o,e.input=s,e.avail_in=a,r.wrap=i,L};var rt={deflateInit:$e,deflateInit2:Qe,deflateReset:Xe,deflateResetKeep:Ye,deflateSetHeader:Ze,deflate:et,deflateEnd:tt,deflateSetDictionary:nt,deflateInfo:`pako deflate (from Nodeca project)`};const it=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var at=function(e){let t=Array.prototype.slice.call(arguments,1);for(;t.length;){let n=t.shift();if(n){if(typeof n!=`object`)throw TypeError(n+`must be non-object`);for(let t in n)it(n,t)&&(e[t]=n[t])}}return e},ot=e=>{let t=0;for(let n=0,r=e.length;n<r;n++)t+=e[n].length;let n=new Uint8Array(t);for(let t=0,r=0,i=e.length;t<i;t++){let i=e[t];n.set(i,r),r+=i.length}return n},st={assign:at,flattenChunks:ot};let ct=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{ct=!1}const lt=new Uint8Array(256);for(let e=0;e<256;e++)lt[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;lt[254]=lt[254]=1;var ut=e=>{if(typeof TextEncoder==`function`&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,r,i,a,o=e.length,s=0;for(i=0;i<o;i++)n=e.charCodeAt(i),(n&64512)==55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)==56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),a=0,i=0;a<s;i++)n=e.charCodeAt(i),(n&64512)==55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)==56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|n&63):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|n&63):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|n&63);return t};const dt=(e,t)=>{if(t<65534&&e.subarray&&ct)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n=``;for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n};var ft=(e,t)=>{let n=t||e.length;if(typeof TextDecoder==`function`&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let r,i,a=Array(n*2);for(i=0,r=0;r<n;){let t=e[r++];if(t<128){a[i++]=t;continue}let o=lt[t];if(o>4){a[i++]=65533,r+=o-1;continue}for(t&=o===2?31:o===3?15:7;o>1&&r<n;)t=t<<6|e[r++]&63,o--;if(o>1){a[i++]=65533;continue}t<65536?a[i++]=t:(t-=65536,a[i++]=55296|t>>10&1023,a[i++]=56320|t&1023)}return dt(a,i)},pt=(e,t)=>{t||=e.length,t>e.length&&(t=e.length);let n=t-1;for(;n>=0&&(e[n]&192)==128;)n--;return n<0||n===0?t:n+lt[e[n]]>t?n:t},mt={string2buf:ut,buf2string:ft,utf8border:pt};function ht(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=``,this.state=null,this.data_type=2,this.adler=0}var gt=ht;const _t=Object.prototype.toString,{Z_NO_FLUSH:vt,Z_SYNC_FLUSH:yt,Z_FULL_FLUSH:bt,Z_FINISH:xt,Z_OK:St,Z_STREAM_END:Ct,Z_DEFAULT_COMPRESSION:wt,Z_DEFAULT_STRATEGY:Tt,Z_DEFLATED:Et}=N;function Dt(e){this.options=st.assign({level:wt,method:Et,chunkSize:16384,windowBits:15,memLevel:8,strategy:Tt},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg=``,this.ended=!1,this.chunks=[],this.strm=new gt,this.strm.avail_out=0;let n=rt.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==St)throw Error(M[n]);if(t.header&&rt.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e=typeof t.dictionary==`string`?mt.string2buf(t.dictionary):_t.call(t.dictionary)===`[object ArrayBuffer]`?new Uint8Array(t.dictionary):t.dictionary,n=rt.deflateSetDictionary(this.strm,e),n!==St)throw Error(M[n]);this._dict_set=!0}}Dt.prototype.push=function(e,t){let n=this.strm,r=this.options.chunkSize,i,a;if(this.ended)return!1;for(a=t===~~t?t:t===!0?xt:vt,typeof e==`string`?n.input=mt.string2buf(e):_t.call(e)===`[object ArrayBuffer]`?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(a===yt||a===bt)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=rt.deflate(n,a),i===Ct)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=rt.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===St;if(n.avail_out===0){this.onData(n.output);continue}if(a>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)break}return!0},Dt.prototype.onData=function(e){this.chunks.push(e)},Dt.prototype.onEnd=function(e){e===St&&(this.result=st.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Ot(e,t){let n=new Dt(t);if(n.push(e,!0),n.err)throw n.msg||M[n.err];return n.result}function kt(e,t){return t||={},t.raw=!0,Ot(e,t)}function At(e,t){return t||={},t.gzip=!0,Ot(e,t)}var jt={Deflate:Dt,deflate:Ot,deflateRaw:kt,gzip:At,constants:N};const Mt=16209;var Nt=function e(t,n){let r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D=t.state;r=t.next_in,T=t.input,i=r+(t.avail_in-5),a=t.next_out,E=t.output,o=a-(n-t.avail_out),s=a+(t.avail_out-257),c=D.dmax,l=D.wsize,u=D.whave,d=D.wnext,f=D.window,p=D.hold,m=D.bits,h=D.lencode,g=D.distcode,_=(1<<D.lenbits)-1,v=(1<<D.distbits)-1;top:do{m<15&&(p+=T[r++]<<m,m+=8,p+=T[r++]<<m,m+=8),y=h[p&_];dolen:for(;;){if(b=y>>>24,p>>>=b,m-=b,b=y>>>16&255,b===0)E[a++]=y&65535;else if(b&16){x=y&65535,b&=15,b&&(m<b&&(p+=T[r++]<<m,m+=8),x+=p&(1<<b)-1,p>>>=b,m-=b),m<15&&(p+=T[r++]<<m,m+=8,p+=T[r++]<<m,m+=8),y=g[p&v];dodist:for(;;){if(b=y>>>24,p>>>=b,m-=b,b=y>>>16&255,b&16){if(S=y&65535,b&=15,m<b&&(p+=T[r++]<<m,m+=8,m<b&&(p+=T[r++]<<m,m+=8)),S+=p&(1<<b)-1,S>c){t.msg=`invalid distance too far back`,D.mode=Mt;break top}if(p>>>=b,m-=b,b=a-o,S>b){if(b=S-b,b>u&&D.sane){t.msg=`invalid distance too far back`,D.mode=Mt;break top}if(C=0,w=f,d===0){if(C+=l-b,b<x){x-=b;do E[a++]=f[C++];while(--b);C=a-S,w=E}}else if(d<b){if(C+=l+d-b,b-=d,b<x){x-=b;do E[a++]=f[C++];while(--b);if(C=0,d<x){b=d,x-=b;do E[a++]=f[C++];while(--b);C=a-S,w=E}}}else if(C+=d-b,b<x){x-=b;do E[a++]=f[C++];while(--b);C=a-S,w=E}for(;x>2;)E[a++]=w[C++],E[a++]=w[C++],E[a++]=w[C++],x-=3;x&&(E[a++]=w[C++],x>1&&(E[a++]=w[C++]))}else{C=a-S;do E[a++]=E[C++],E[a++]=E[C++],E[a++]=E[C++],x-=3;while(x>2);x&&(E[a++]=E[C++],x>1&&(E[a++]=E[C++]))}}else if(b&64){t.msg=`invalid distance code`,D.mode=Mt;break top}else{y=g[(y&65535)+(p&(1<<b)-1)];continue dodist}break}}else if(!(b&64)){y=h[(y&65535)+(p&(1<<b)-1)];continue dolen}else if(b&32){D.mode=16191;break top}else{t.msg=`invalid literal/length code`,D.mode=Mt;break top}break}}while(r<i&&a<s);x=m>>3,r-=x,m-=x<<3,p&=(1<<m)-1,t.next_in=r,t.next_out=a,t.avail_in=r<i?5+(i-r):5-(r-i),t.avail_out=a<s?257+(s-a):257-(a-s),D.hold=p,D.bits=m};const Pt=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),Ft=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),It=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),Lt=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),Rt=(e,t,n,r,i,a,o,s)=>{let c=s.bits,l=0,u=0,d=0,f=0,p=0,m=0,h=0,g=0,_=0,v=0,y,b,x,S,C,w=null,T,E=new Uint16Array(16),D=new Uint16Array(16),O=null,ee,k,A;for(l=0;l<=15;l++)E[l]=0;for(u=0;u<r;u++)E[t[n+u]]++;for(p=c,f=15;f>=1&&E[f]===0;f--);if(p>f&&(p=f),f===0)return i[a++]=20971520,i[a++]=20971520,s.bits=1,0;for(d=1;d<f&&E[d]===0;d++);for(p<d&&(p=d),g=1,l=1;l<=15;l++)if(g<<=1,g-=E[l],g<0)return-1;if(g>0&&(e===0||f!==1))return-1;for(D[1]=0,l=1;l<15;l++)D[l+1]=D[l]+E[l];for(u=0;u<r;u++)t[n+u]!==0&&(o[D[t[n+u]]++]=u);if(e===0?(w=O=o,T=20):e===1?(w=Pt,O=Ft,T=257):(w=It,O=Lt,T=0),v=0,u=0,l=d,C=a,m=p,h=0,x=-1,_=1<<p,S=_-1,e===1&&_>852||e===2&&_>592)return 1;for(;;){ee=l-h,o[u]+1<T?(k=0,A=o[u]):o[u]>=T?(k=O[o[u]-T],A=w[o[u]-T]):(k=96,A=0),y=1<<l-h,b=1<<m,d=b;do b-=y,i[C+(v>>h)+b]=ee<<24|k<<16|A|0;while(b!==0);for(y=1<<l-1;v&y;)y>>=1;if(y===0?v=0:(v&=y-1,v+=y),u++,--E[l]===0){if(l===f)break;l=t[n+o[u]]}if(l>p&&(v&S)!==x){for(h===0&&(h=p),C+=d,m=l-h,g=1<<m;m+h<f&&(g-=E[m+h],!(g<=0));)m++,g<<=1;if(_+=1<<m,e===1&&_>852||e===2&&_>592)return 1;x=v&S,i[x]=p<<24|m<<16|C-a|0}}return v!==0&&(i[C+v]=l-h<<24|4194304),s.bits=p,0};var zt=Rt;const{Z_FINISH:Bt,Z_BLOCK:Vt,Z_TREES:Ht,Z_OK:J,Z_STREAM_END:Ut,Z_NEED_DICT:Wt,Z_STREAM_ERROR:Y,Z_DATA_ERROR:Gt,Z_MEM_ERROR:Kt,Z_BUF_ERROR:qt,Z_DEFLATED:Jt}=N,Yt=16180,Xt=16181,Zt=16182,Qt=16183,$t=16184,en=16185,tn=16186,nn=16187,rn=16188,an=16189,on=16190,X=16191,sn=16192,cn=16193,ln=16194,un=16195,dn=16196,fn=16197,pn=16198,mn=16199,hn=16200,gn=16201,_n=16202,vn=16203,yn=16204,bn=16205,xn=16206,Sn=16207,Cn=16208,Z=16209,wn=16210,Tn=16211,En=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function Dn(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Q=e=>{if(!e)return 1;let t=e.state;return!t||t.strm!==e||t.mode<Yt||t.mode>Tn?1:0},On=e=>{if(Q(e))return Y;let t=e.state;return e.total_in=e.total_out=t.total=0,e.msg=``,t.wrap&&(e.adler=t.wrap&1),t.mode=Yt,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,J},kn=e=>{if(Q(e))return Y;let t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,On(e)},An=(e,t)=>{let n;if(Q(e))return Y;let r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?Y:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,kn(e))},jn=(e,t)=>{if(!e)return Y;let n=new Dn;e.state=n,n.strm=e,n.window=null,n.mode=Yt;let r=An(e,t);return r!==J&&(e.state=null),r},Mn=e=>jn(e,15);let Nn=!0,Pn,Fn;const In=e=>{if(Nn){Pn=new Int32Array(512),Fn=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(zt(1,e.lens,0,288,Pn,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;zt(2,e.lens,0,32,Fn,0,e.work,{bits:5}),Nn=!1}e.lencode=Pn,e.lenbits=9,e.distcode=Fn,e.distbits=5},Ln=(e,t,n,r)=>{let i,a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),r>=a.wsize?(a.window.set(t.subarray(n-a.wsize,n),0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>r&&(i=r),a.window.set(t.subarray(n-r,n-r+i),a.wnext),r-=i,r?(a.window.set(t.subarray(n-r,n),0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0},Rn=(e,t)=>{let n,r,i,a,o,s,c,l,u,d,f,p,m,h,g=0,_,v,y,b,x,S,C,w,T=new Uint8Array(4),E,D,O=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Q(e)||!e.output||!e.input&&e.avail_in!==0)return Y;n=e.state,n.mode===X&&(n.mode=sn),o=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,d=s,f=c,w=J;inf_leave:for(;;)switch(n.mode){case Yt:if(n.wrap===0){n.mode=sn;break}for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.wrap&2&&l===35615){n.wbits===0&&(n.wbits=15),n.check=0,T[0]=l&255,T[1]=l>>>8&255,n.check=j(n.check,T,2,0),l=0,u=0,n.mode=Xt;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg=`incorrect header check`,n.mode=Z;break}if((l&15)!==Jt){e.msg=`unknown compression method`,n.mode=Z;break}if(l>>>=4,u-=4,C=(l&15)+8,n.wbits===0&&(n.wbits=C),C>15||C>n.wbits){e.msg=`invalid window size`,n.mode=Z;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=l&512?an:X,l=0,u=0;break;case Xt:for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.flags=l,(n.flags&255)!==Jt){e.msg=`unknown compression method`,n.mode=Z;break}if(n.flags&57344){e.msg=`unknown header flags set`,n.mode=Z;break}n.head&&(n.head.text=l>>8&1),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,n.check=j(n.check,T,2,0)),l=0,u=0,n.mode=Zt;case Zt:for(;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.head&&(n.head.time=l),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,T[2]=l>>>16&255,T[3]=l>>>24&255,n.check=j(n.check,T,4,0)),l=0,u=0,n.mode=Qt;case Qt:for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.head&&(n.head.xflags=l&255,n.head.os=l>>8),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,n.check=j(n.check,T,2,0)),l=0,u=0,n.mode=$t;case $t:if(n.flags&1024){for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.length=l,n.head&&(n.head.extra_len=l),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,n.check=j(n.check,T,2,0)),l=0,u=0}else n.head&&(n.head.extra=null);n.mode=en;case en:if(n.flags&1024&&(p=n.length,p>s&&(p=s),p&&(n.head&&(C=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(a,a+p),C)),n.flags&512&&n.wrap&4&&(n.check=j(n.check,r,p,a)),s-=p,a+=p,n.length-=p),n.length))break inf_leave;n.length=0,n.mode=tn;case tn:if(n.flags&2048){if(s===0)break inf_leave;p=0;do C=r[a+ p++],n.head&&C&&n.length<65536&&(n.head.name+=String.fromCharCode(C));while(C&&p<s);if(n.flags&512&&n.wrap&4&&(n.check=j(n.check,r,p,a)),s-=p,a+=p,C)break inf_leave}else n.head&&(n.head.name=null);n.length=0,n.mode=nn;case nn:if(n.flags&4096){if(s===0)break inf_leave;p=0;do C=r[a+ p++],n.head&&C&&n.length<65536&&(n.head.comment+=String.fromCharCode(C));while(C&&p<s);if(n.flags&512&&n.wrap&4&&(n.check=j(n.check,r,p,a)),s-=p,a+=p,C)break inf_leave}else n.head&&(n.head.comment=null);n.mode=rn;case rn:if(n.flags&512){for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.wrap&4&&l!==(n.check&65535)){e.msg=`header crc mismatch`,n.mode=Z;break}l=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=X;break;case an:for(;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}e.adler=n.check=En(l),l=0,u=0,n.mode=on;case on:if(n.havedict===0)return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,Wt;e.adler=n.check=1,n.mode=X;case X:if(t===Vt||t===Ht)break inf_leave;case sn:if(n.last){l>>>=u&7,u-=u&7,n.mode=xn;break}for(;u<3;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}switch(n.last=l&1,l>>>=1,--u,l&3){case 0:n.mode=cn;break;case 1:if(In(n),n.mode=mn,t===Ht){l>>>=2,u-=2;break inf_leave}break;case 2:n.mode=dn;break;case 3:e.msg=`invalid block type`,n.mode=Z}l>>>=2,u-=2;break;case cn:for(l>>>=u&7,u-=u&7;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if((l&65535)!=(l>>>16^65535)){e.msg=`invalid stored block lengths`,n.mode=Z;break}if(n.length=l&65535,l=0,u=0,n.mode=ln,t===Ht)break inf_leave;case ln:n.mode=un;case un:if(p=n.length,p){if(p>s&&(p=s),p>c&&(p=c),p===0)break inf_leave;i.set(r.subarray(a,a+p),o),s-=p,a+=p,c-=p,o+=p,n.length-=p;break}n.mode=X;break;case dn:for(;u<14;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.nlen=(l&31)+257,l>>>=5,u-=5,n.ndist=(l&31)+1,l>>>=5,u-=5,n.ncode=(l&15)+4,l>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg=`too many length or distance symbols`,n.mode=Z;break}n.have=0,n.mode=fn;case fn:for(;n.have<n.ncode;){for(;u<3;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.lens[O[n.have++]]=l&7,l>>>=3,u-=3}for(;n.have<19;)n.lens[O[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,E={bits:n.lenbits},w=zt(0,n.lens,0,19,n.lencode,0,n.work,E),n.lenbits=E.bits,w){e.msg=`invalid code lengths set`,n.mode=Z;break}n.have=0,n.mode=pn;case pn:for(;n.have<n.nlen+n.ndist;){for(;g=n.lencode[l&(1<<n.lenbits)-1],_=g>>>24,v=g>>>16&255,y=g&65535,!(_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(y<16)l>>>=_,u-=_,n.lens[n.have++]=y;else{if(y===16){for(D=_+2;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(l>>>=_,u-=_,n.have===0){e.msg=`invalid bit length repeat`,n.mode=Z;break}C=n.lens[n.have-1],p=3+(l&3),l>>>=2,u-=2}else if(y===17){for(D=_+3;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=_,u-=_,C=0,p=3+(l&7),l>>>=3,u-=3}else{for(D=_+7;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=_,u-=_,C=0,p=11+(l&127),l>>>=7,u-=7}if(n.have+p>n.nlen+n.ndist){e.msg=`invalid bit length repeat`,n.mode=Z;break}for(;p--;)n.lens[n.have++]=C}}if(n.mode===Z)break;if(n.lens[256]===0){e.msg=`invalid code -- missing end-of-block`,n.mode=Z;break}if(n.lenbits=9,E={bits:n.lenbits},w=zt(1,n.lens,0,n.nlen,n.lencode,0,n.work,E),n.lenbits=E.bits,w){e.msg=`invalid literal/lengths set`,n.mode=Z;break}if(n.distbits=6,n.distcode=n.distdyn,E={bits:n.distbits},w=zt(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,E),n.distbits=E.bits,w){e.msg=`invalid distances set`,n.mode=Z;break}if(n.mode=mn,t===Ht)break inf_leave;case mn:n.mode=hn;case hn:if(s>=6&&c>=258){e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,Nt(e,f),o=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,n.mode===X&&(n.back=-1);break}for(n.back=0;g=n.lencode[l&(1<<n.lenbits)-1],_=g>>>24,v=g>>>16&255,y=g&65535,!(_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(v&&!(v&240)){for(b=_,x=v,S=y;g=n.lencode[S+((l&(1<<b+x)-1)>>b)],_=g>>>24,v=g>>>16&255,y=g&65535,!(b+_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=b,u-=b,n.back+=b}if(l>>>=_,u-=_,n.back+=_,n.length=y,v===0){n.mode=bn;break}if(v&32){n.back=-1,n.mode=X;break}if(v&64){e.msg=`invalid literal/length code`,n.mode=Z;break}n.extra=v&15,n.mode=gn;case gn:if(n.extra){for(D=n.extra;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=_n;case _n:for(;g=n.distcode[l&(1<<n.distbits)-1],_=g>>>24,v=g>>>16&255,y=g&65535,!(_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(!(v&240)){for(b=_,x=v,S=y;g=n.distcode[S+((l&(1<<b+x)-1)>>b)],_=g>>>24,v=g>>>16&255,y=g&65535,!(b+_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=b,u-=b,n.back+=b}if(l>>>=_,u-=_,n.back+=_,v&64){e.msg=`invalid distance code`,n.mode=Z;break}n.offset=y,n.extra=v&15,n.mode=vn;case vn:if(n.extra){for(D=n.extra;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg=`invalid distance too far back`,n.mode=Z;break}n.mode=yn;case yn:if(c===0)break inf_leave;if(p=f-c,n.offset>p){if(p=n.offset-p,p>n.whave&&n.sane){e.msg=`invalid distance too far back`,n.mode=Z;break}p>n.wnext?(p-=n.wnext,m=n.wsize-p):m=n.wnext-p,p>n.length&&(p=n.length),h=n.window}else h=i,m=o-n.offset,p=n.length;p>c&&(p=c),c-=p,n.length-=p;do i[o++]=h[m++];while(--p);n.length===0&&(n.mode=hn);break;case bn:if(c===0)break inf_leave;i[o++]=n.length,c--,n.mode=hn;break;case xn:if(n.wrap){for(;u<32;){if(s===0)break inf_leave;s--,l|=r[a++]<<u,u+=8}if(f-=c,e.total_out+=f,n.total+=f,n.wrap&4&&f&&(e.adler=n.check=n.flags?j(n.check,i,f,o-f):pe(n.check,i,f,o-f)),f=c,n.wrap&4&&(n.flags?l:En(l))!==n.check){e.msg=`incorrect data check`,n.mode=Z;break}l=0,u=0}n.mode=Sn;case Sn:if(n.wrap&&n.flags){for(;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.wrap&4&&l!==(n.total&4294967295)){e.msg=`incorrect length check`,n.mode=Z;break}l=0,u=0}n.mode=Cn;case Cn:w=Ut;break inf_leave;case Z:w=Gt;break inf_leave;case wn:return Kt;case Tn:default:return Y}return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,(n.wsize||f!==e.avail_out&&n.mode<Z&&(n.mode<xn||t!==Bt))&&Ln(e,e.output,e.next_out,f-e.avail_out),d-=e.avail_in,f-=e.avail_out,e.total_in+=d,e.total_out+=f,n.total+=f,n.wrap&4&&f&&(e.adler=n.check=n.flags?j(n.check,i,f,e.next_out-f):pe(n.check,i,f,e.next_out-f)),e.data_type=n.bits+(n.last?64:0)+(n.mode===X?128:0)+(n.mode===mn||n.mode===ln?256:0),(d===0&&f===0||t===Bt)&&w===J&&(w=qt),w},zn=e=>{if(Q(e))return Y;let t=e.state;return t.window&&=null,e.state=null,J},Bn=(e,t)=>{if(Q(e))return Y;let n=e.state;return n.wrap&2?(n.head=t,t.done=!1,J):Y},Vn=(e,t)=>{let n=t.length,r,i,a;return Q(e)||(r=e.state,r.wrap!==0&&r.mode!==on)?Y:r.mode===on&&(i=1,i=pe(i,t,n,0),i!==r.check)?Gt:(a=Ln(e,t,n,n),a?(r.mode=wn,Kt):(r.havedict=1,J))};var $={inflateReset:kn,inflateReset2:An,inflateResetKeep:On,inflateInit:Mn,inflateInit2:jn,inflate:Rn,inflateEnd:zn,inflateGetHeader:Bn,inflateSetDictionary:Vn,inflateInfo:`pako inflate (from Nodeca project)`};function Hn(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name=``,this.comment=``,this.hcrc=0,this.done=!1}var Un=Hn;const Wn=Object.prototype.toString,{Z_NO_FLUSH:Gn,Z_FINISH:Kn,Z_OK:qn,Z_STREAM_END:Jn,Z_NEED_DICT:Yn,Z_STREAM_ERROR:Xn,Z_DATA_ERROR:Zn,Z_MEM_ERROR:Qn}=N;function $n(e){this.options=st.assign({chunkSize:1024*64,windowBits:15,to:``},e||{});let t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg=``,this.ended=!1,this.chunks=[],this.strm=new gt,this.strm.avail_out=0;let n=$.inflateInit2(this.strm,t.windowBits);if(n!==qn||(this.header=new Un,$.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary==`string`?t.dictionary=mt.string2buf(t.dictionary):Wn.call(t.dictionary)===`[object ArrayBuffer]`&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=$.inflateSetDictionary(this.strm,t.dictionary),n!==qn))))throw Error(M[n])}$n.prototype.push=function(e,t){let n=this.strm,r=this.options.chunkSize,i=this.options.dictionary,a,o,s;if(this.ended)return!1;for(o=t===~~t?t:t===!0?Kn:Gn,Wn.call(e)===`[object ArrayBuffer]`?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),a=$.inflate(n,o),a===Yn&&i&&(a=$.inflateSetDictionary(n,i),a===qn?a=$.inflate(n,o):a===Zn&&(a=Yn));n.avail_in>0&&a===Jn&&n.state.wrap>0&&e[n.next_in]!==0;)$.inflateReset(n),a=$.inflate(n,o);switch(a){case Xn:case Zn:case Yn:case Qn:return this.onEnd(a),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(n.avail_out===0||a===Jn))if(this.options.to===`string`){let e=mt.utf8border(n.output,n.next_out),t=n.next_out-e,i=mt.buf2string(n.output,e);n.next_out=t,n.avail_out=r-t,t&&n.output.set(n.output.subarray(e,e+t),0),this.onData(i)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(a===qn&&s===0)){if(a===Jn)return a=$.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(n.avail_in===0)break}}return!0},$n.prototype.onData=function(e){this.chunks.push(e)},$n.prototype.onEnd=function(e){e===qn&&(this.options.to===`string`?this.result=this.chunks.join(``):this.result=st.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function er(e,t){let n=new $n(t);if(n.push(e),n.err)throw n.msg||M[n.err];return n.result}function tr(e,t){return t||={},t.raw=!0,er(e,t)}var nr={Inflate:$n,inflate:er,inflateRaw:tr,ungzip:er,constants:N};const{Deflate:rr,deflate:ir,deflateRaw:ar,gzip:or}=jt,{Inflate:sr,inflate:cr,inflateRaw:lr,ungzip:ur}=nr;var dr={Deflate:rr,deflate:ir,deflateRaw:ar,gzip:or,Inflate:sr,inflate:cr,inflateRaw:lr,ungzip:ur,constants:N};export{dr as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=e=>Number.isFinite(e)?e:0;function t(t){return{days:Math.trunc(t/864e5),hours:Math.trunc(t/36e5%24),minutes:Math.trunc(t/6e4%60),seconds:Math.trunc(t/1e3%60),milliseconds:Math.trunc(t%1e3),microseconds:Math.trunc(e(t*1e3)%1e3),nanoseconds:Math.trunc(e(t*1e6)%1e3)}}function n(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}function r(e){switch(typeof e){case`number`:if(Number.isFinite(e))return t(e);break;case`bigint`:return n(e)}throw TypeError(`Expected a finite number or bigint`)}export{r as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=/^[A-Za-z]:\//;function t(t=``){return t&&t.replace(/\\/g,`/`).replace(e,e=>e.toUpperCase())}const n=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,r=/.(\.[^./]+|\.)$/,i=function(e){return n.test(e)},a=function(e){if(e===`..`)return``;let n=r.exec(t(e));return n&&n[1]||``};globalThis.process?.platform;export{i as n,a as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"../rolldown-runtime.mjs";var t=e(((e,t)=>{let n=`[^\\\\/]`,r=`[^/]`,i=`(?:\\/|$)`,a=`(?:^|\\/)`,o=`\\.{1,2}${i}`,s={DOT_LITERAL:`\\.`,PLUS_LITERAL:`\\+`,QMARK_LITERAL:`\\?`,SLASH_LITERAL:`\\/`,ONE_CHAR:`(?=.)`,QMARK:r,END_ANCHOR:i,DOTS_SLASH:o,NO_DOT:`(?!\\.)`,NO_DOTS:`(?!${a}${o})`,NO_DOT_SLASH:`(?!\\.{0,1}${i})`,NO_DOTS_SLASH:`(?!${o})`,QMARK_NO_DOT:`[^.\\/]`,STAR:`${r}*?`,START_ANCHOR:a,SEP:`/`},c={...s,SLASH_LITERAL:`[\\\\/]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`\\.{1,2}(?:[\\\\/]|$)`,NO_DOT:`(?!\\.)`,NO_DOTS:`(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))`,NO_DOT_SLASH:`(?!\\.{0,1}(?:[\\\\/]|$))`,NO_DOTS_SLASH:`(?!\\.{1,2}(?:[\\\\/]|$))`,QMARK_NO_DOT:`[^.\\\\/]`,START_ANCHOR:`(?:^|[\\\\/])`,END_ANCHOR:`(?:[\\\\/]|$)`,SEP:`\\`};t.exports={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:{__proto__:null,alnum:`a-zA-Z0-9`,alpha:`a-zA-Z`,ascii:`\\x00-\\x7F`,blank:` \\t`,cntrl:`\\x00-\\x1F\\x7F`,digit:`0-9`,graph:`\\x21-\\x7E`,lower:`a-z`,print:`\\x20-\\x7E `,punct:`\\-!"#$%&'()\\*+,./:;<=>?@[\\]^_\`{|}~`,space:` \\t\\r\\n\\v\\f`,upper:`A-Z`,word:`A-Za-z0-9_`,xdigit:`A-Fa-f0-9`},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":`*`,"**/**":`**`,"**/**/**":`**`},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(e){return{"!":{type:`negate`,open:`(?:(?!(?:`,close:`))${e.STAR})`},"?":{type:`qmark`,open:`(?:`,close:`)?`},"+":{type:`plus`,open:`(?:`,close:`)+`},"*":{type:`star`,open:`(?:`,close:`)*`},"@":{type:`at`,open:`(?:`,close:`)`}}},globChars(e){return e===!0?c:s}}})),n=e((e=>{let{REGEX_BACKSLASH:n,REGEX_REMOVE_BACKSLASH:r,REGEX_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_GLOBAL:a}=t();e.isObject=e=>typeof e==`object`&&!!e&&!Array.isArray(e),e.hasRegexChars=e=>i.test(e),e.isRegexChar=t=>t.length===1&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(a,`\\$1`),e.toPosixSlashes=e=>e.replace(n,`/`),e.isWindows=()=>{if(typeof navigator<`u`&&navigator.platform){let e=navigator.platform.toLowerCase();return e===`win32`||e===`windows`}return typeof process<`u`&&process.platform?process.platform===`win32`:!1},e.removeBackslashes=e=>e.replace(r,e=>e===`\\`?``:e),e.escapeLast=(t,n,r)=>{let i=t.lastIndexOf(n,r);return i===-1?t:t[i-1]===`\\`?e.escapeLast(t,n,i-1):`${t.slice(0,i)}\\${t.slice(i)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith(`./`)&&(n=n.slice(2),t.prefix=`./`),n},e.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?``:`^`}(?:${e})${n.contains?``:`$`}`;return t.negated===!0&&(r=`(?:^(?!${r}).*$)`),r},e.basename=(e,{windows:t}={})=>{let n=e.split(t?/[\\/]/:`/`),r=n[n.length-1];return r===``?n[n.length-2]:r}})),r=e(((e,r)=>{let i=n(),{CHAR_ASTERISK:a,CHAR_AT:o,CHAR_BACKWARD_SLASH:s,CHAR_COMMA:c,CHAR_DOT:l,CHAR_EXCLAMATION_MARK:u,CHAR_FORWARD_SLASH:d,CHAR_LEFT_CURLY_BRACE:f,CHAR_LEFT_PARENTHESES:p,CHAR_LEFT_SQUARE_BRACKET:m,CHAR_PLUS:h,CHAR_QUESTION_MARK:g,CHAR_RIGHT_CURLY_BRACE:_,CHAR_RIGHT_PARENTHESES:v,CHAR_RIGHT_SQUARE_BRACKET:y}=t(),b=e=>e===d||e===s,x=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},S=(e,t)=>{let n=t||{},r=e.length-1,S=n.parts===!0||n.scanToEnd===!0,C=[],w=[],T=[],E=e,D=-1,O=0,k=0,A=!1,j=!1,M=!1,N=!1,P=!1,F=!1,I=!1,L=!1,R=!1,z=!1,B=0,V,H,U={value:``,depth:0,isGlob:!1},W=()=>D>=r,G=()=>E.charCodeAt(D+1),K=()=>(V=H,E.charCodeAt(++D));for(;D<r;){H=K();let e;if(H===s){I=U.backslashes=!0,H=K(),H===f&&(F=!0);continue}if(F===!0||H===f){for(B++;W()!==!0&&(H=K());){if(H===s){I=U.backslashes=!0,K();continue}if(H===f){B++;continue}if(F!==!0&&H===l&&(H=K())===l){if(A=U.isBrace=!0,M=U.isGlob=!0,z=!0,S===!0)continue;break}if(F!==!0&&H===c){if(A=U.isBrace=!0,M=U.isGlob=!0,z=!0,S===!0)continue;break}if(H===_&&(B--,B===0)){F=!1,A=U.isBrace=!0,z=!0;break}}if(S===!0)continue;break}if(H===d){if(C.push(D),w.push(U),U={value:``,depth:0,isGlob:!1},z===!0)continue;if(V===l&&D===O+1){O+=2;continue}k=D+1;continue}if(n.noext!==!0&&(H===h||H===o||H===a||H===g||H===u)&&G()===p){if(M=U.isGlob=!0,N=U.isExtglob=!0,z=!0,H===u&&D===O&&(R=!0),S===!0){for(;W()!==!0&&(H=K());){if(H===s){I=U.backslashes=!0,H=K();continue}if(H===v){M=U.isGlob=!0,z=!0;break}}continue}break}if(H===a){if(V===a&&(P=U.isGlobstar=!0),M=U.isGlob=!0,z=!0,S===!0)continue;break}if(H===g){if(M=U.isGlob=!0,z=!0,S===!0)continue;break}if(H===m){for(;W()!==!0&&(e=K());){if(e===s){I=U.backslashes=!0,K();continue}if(e===y){j=U.isBracket=!0,M=U.isGlob=!0,z=!0;break}}if(S===!0)continue;break}if(n.nonegate!==!0&&H===u&&D===O){L=U.negated=!0,O++;continue}if(n.noparen!==!0&&H===p){if(M=U.isGlob=!0,S===!0){for(;W()!==!0&&(H=K());){if(H===p){I=U.backslashes=!0,H=K();continue}if(H===v){z=!0;break}}continue}break}if(M===!0){if(z=!0,S===!0)continue;break}}n.noext===!0&&(N=!1,M=!1);let q=E,J=``,Y=``;O>0&&(J=E.slice(0,O),E=E.slice(O),k-=O),q&&M===!0&&k>0?(q=E.slice(0,k),Y=E.slice(k)):M===!0?(q=``,Y=E):q=E,q&&q!==``&&q!==`/`&&q!==E&&b(q.charCodeAt(q.length-1))&&(q=q.slice(0,-1)),n.unescape===!0&&(Y&&=i.removeBackslashes(Y),q&&I===!0&&(q=i.removeBackslashes(q)));let X={prefix:J,input:e,start:O,base:q,glob:Y,isBrace:A,isBracket:j,isGlob:M,isExtglob:N,isGlobstar:P,negated:L,negatedExtglob:R};if(n.tokens===!0&&(X.maxDepth=0,b(H)||w.push(U),X.tokens=w),n.parts===!0||n.tokens===!0){let t;for(let r=0;r<C.length;r++){let i=t?t+1:O,a=C[r],o=e.slice(i,a);n.tokens&&(r===0&&O!==0?(w[r].isPrefix=!0,w[r].value=J):w[r].value=o,x(w[r]),X.maxDepth+=w[r].depth),(r!==0||o!==``)&&T.push(o),t=a}if(t&&t+1<e.length){let r=e.slice(t+1);T.push(r),n.tokens&&(w[w.length-1].value=r,x(w[w.length-1]),X.maxDepth+=w[w.length-1].depth)}X.slashes=C,X.parts=T}return X};r.exports=S})),i=e(((e,r)=>{let i=t(),a=n(),{MAX_LENGTH:o,POSIX_REGEX_SOURCE:s,REGEX_NON_SPECIAL_CHARS:c,REGEX_SPECIAL_CHARS_BACKREF:l,REPLACEMENTS:u}=i,d=(e,t)=>{if(typeof t.expandRange==`function`)return t.expandRange(...e,t);e.sort();let n=`[${e.join(`-`)}]`;try{new RegExp(n)}catch{return e.map(e=>a.escapeRegex(e)).join(`..`)}return n},f=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,p=e=>{let t=[],n=0,r=0,i=0,a=``,o=!1;for(let s of e){if(o===!0){a+=s,o=!1;continue}if(s===`\\`){a+=s,o=!0;continue}if(s===`"`){i=i===1?0:1,a+=s;continue}if(i===0){if(s===`[`)n++;else if(s===`]`&&n>0)n--;else if(n===0){if(s===`(`)r++;else if(s===`)`&&r>0)r--;else if(s===`|`&&r===0){t.push(a),a=``;continue}}}a+=s}return t.push(a),t},m=e=>{let t=!1;for(let n of e){if(t===!0){t=!1;continue}if(n===`\\`){t=!0;continue}if(/[?*+@!()[\]{}]/.test(n))return!1}return!0},h=e=>{let t=e.trim(),n=!0;for(;n===!0;)n=!1,/^@\([^\\()[\]{}|]+\)$/.test(t)&&(t=t.slice(2,-1),n=!0);if(m(t))return t.replace(/\\(.)/g,`$1`)},g=e=>{let t=e.map(h).filter(Boolean);for(let e=0;e<t.length;e++)for(let n=e+1;n<t.length;n++){let r=t[e],i=t[n],a=r[0];if(!(!a||r!==a.repeat(r.length)||i!==a.repeat(i.length))&&(r===i||r.startsWith(i)||i.startsWith(r)))return!0}return!1},_=(e,t=!0)=>{if(e[0]!==`+`&&e[0]!==`*`||e[1]!==`(`)return;let n=0,r=0,i=0,a=!1;for(let o=1;o<e.length;o++){let s=e[o];if(a===!0){a=!1;continue}if(s===`\\`){a=!0;continue}if(s===`"`){i=i===1?0:1;continue}if(i!==1){if(s===`[`){n++;continue}if(s===`]`&&n>0){n--;continue}if(!(n>0)){if(s===`(`){r++;continue}if(s===`)`&&(r--,r===0))return t===!0&&o!==e.length-1?void 0:{type:e[0],body:e.slice(2,o),end:o}}}}},v=e=>{let t=0,n=[];for(;t<e.length;){let r=_(e.slice(t),!1);if(!r||r.type!==`*`)return;let i=p(r.body).map(e=>e.trim());if(i.length!==1)return;let a=h(i[0]);if(!a||a.length!==1)return;n.push(a),t+=r.end+1}if(!(n.length<1))return`${n.length===1?a.escapeRegex(n[0]):`[${n.map(e=>a.escapeRegex(e)).join(``)}]`}*`},y=e=>{let t=0,n=e.trim(),r=_(n);for(;r;)t++,n=r.body.trim(),r=_(n);return t},b=(e,t)=>{if(t.maxExtglobRecursion===!1)return{risky:!1};let n=typeof t.maxExtglobRecursion==`number`?t.maxExtglobRecursion:i.DEFAULT_MAX_EXTGLOB_RECURSION,r=p(e).map(e=>e.trim());if(r.length>1&&(r.some(e=>e===``)||r.some(e=>/^[*?]+$/.test(e))||g(r)))return{risky:!0};for(let e of r){let t=v(e);if(t)return{risky:!0,safeOutput:t};if(y(e)>n)return{risky:!0}}return{risky:!1}},x=(e,t)=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);e=u[e]||e;let n={...t},r=typeof n.maxLength==`number`?Math.min(o,n.maxLength):o,p=e.length;if(p>r)throw SyntaxError(`Input length: ${p}, exceeds maximum allowed length: ${r}`);let m={type:`bos`,value:``,output:n.prepend||``},h=[m],g=n.capture?``:`?:`,_=i.globChars(n.windows),v=i.extglobChars(_),{DOT_LITERAL:y,PLUS_LITERAL:S,SLASH_LITERAL:C,ONE_CHAR:w,DOTS_SLASH:T,NO_DOT:E,NO_DOT_SLASH:D,NO_DOTS_SLASH:O,QMARK:k,QMARK_NO_DOT:A,STAR:j,START_ANCHOR:M}=_,N=e=>`(${g}(?:(?!${M}${e.dot?T:y}).)*?)`,P=n.dot?``:E,F=n.dot?k:A,I=n.bash===!0?N(n):j;n.capture&&(I=`(${I})`),typeof n.noext==`boolean`&&(n.noextglob=n.noext);let L={input:e,index:-1,start:0,dot:n.dot===!0,consumed:``,output:``,prefix:``,backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:h};e=a.removePrefix(e,L),p=e.length;let R=[],z=[],B=[],V=m,H,U=()=>L.index===p-1,W=L.peek=(t=1)=>e[L.index+t],G=L.advance=()=>e[++L.index]||``,K=()=>e.slice(L.index+1),q=(e=``,t=0)=>{L.consumed+=e,L.index+=t},J=e=>{L.output+=e.output==null?e.value:e.output,q(e.value)},Y=()=>{let e=1;for(;W()===`!`&&(W(2)!==`(`||W(3)===`?`);)G(),L.start++,e++;return e%2==0?!1:(L.negated=!0,L.start++,!0)},X=e=>{L[e]++,B.push(e)},Z=e=>{L[e]--,B.pop()},Q=e=>{if(V.type===`globstar`){let t=L.braces>0&&(e.type===`comma`||e.type===`brace`),n=e.extglob===!0||R.length&&(e.type===`pipe`||e.type===`paren`);e.type!==`slash`&&e.type!==`paren`&&!t&&!n&&(L.output=L.output.slice(0,-V.output.length),V.type=`star`,V.value=`*`,V.output=I,L.output+=V.output)}if(R.length&&e.type!==`paren`&&(R[R.length-1].inner+=e.value),(e.value||e.output)&&J(e),V&&V.type===`text`&&e.type===`text`){V.output=(V.output||V.value)+e.value,V.value+=e.value;return}e.prev=V,h.push(e),V=e},$=(e,t)=>{let r={...v[t],conditions:1,inner:``};r.prev=V,r.parens=L.parens,r.output=L.output,r.startIndex=L.index,r.tokensIndex=h.length;let i=(n.capture?`(`:``)+r.open;X(`parens`),Q({type:e,value:t,output:L.output?``:w}),Q({type:`paren`,extglob:!0,value:G(),output:i}),R.push(r)},ee=r=>{let i=e.slice(r.startIndex,L.index+1),o=b(e.slice(r.startIndex+2,L.index),n);if((r.type===`plus`||r.type===`star`)&&o.risky){let e=o.safeOutput?(r.output?``:w)+(n.capture?`(${o.safeOutput})`:o.safeOutput):void 0,t=h[r.tokensIndex];t.type=`text`,t.value=i,t.output=e||a.escapeRegex(i);for(let e=r.tokensIndex+1;e<h.length;e++)h[e].value=``,h[e].output=``,delete h[e].suffix;L.output=r.output+t.output,L.backtrack=!0,Q({type:`paren`,extglob:!0,value:H,output:``}),Z(`parens`);return}let s=r.close+(n.capture?`)`:``),c;if(r.type===`negate`){let e=I;r.inner&&r.inner.length>1&&r.inner.includes(`/`)&&(e=N(n)),(e!==I||U()||/^\)+$/.test(K()))&&(s=r.close=`)$))${e}`),r.inner.includes(`*`)&&(c=K())&&/^\.[^\\/.]+$/.test(c)&&(s=r.close=`)${x(c,{...t,fastpaths:!1}).output})${e})`),r.prev.type===`bos`&&(L.negatedExtglob=!0)}Q({type:`paren`,extglob:!0,value:H,output:s}),Z(`parens`)};if(n.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let r=!1,i=e.replace(l,(e,t,n,i,a,o)=>i===`\\`?(r=!0,e):i===`?`?t?t+i+(a?k.repeat(a.length):``):o===0?F+(a?k.repeat(a.length):``):k.repeat(n.length):i===`.`?y.repeat(n.length):i===`*`?t?t+i+(a?I:``):I:t?e:`\\${e}`);return r===!0&&(i=n.unescape===!0?i.replace(/\\/g,``):i.replace(/\\+/g,e=>e.length%2==0?`\\\\`:e?`\\`:``)),i===e&&n.contains===!0?(L.output=e,L):(L.output=a.wrapOutput(i,L,t),L)}for(;!U();){if(H=G(),H===`\0`)continue;if(H===`\\`){let e=W();if(e===`/`&&n.bash!==!0||e===`.`||e===`;`)continue;if(!e){H+=`\\`,Q({type:`text`,value:H});continue}let t=/^\\+/.exec(K()),r=0;if(t&&t[0].length>2&&(r=t[0].length,L.index+=r,r%2!=0&&(H+=`\\`)),n.unescape===!0?H=G():H+=G(),L.brackets===0){Q({type:`text`,value:H});continue}}if(L.brackets>0&&(H!==`]`||V.value===`[`||V.value===`[^`)){if(n.posix!==!1&&H===`:`){let e=V.value.slice(1);if(e.includes(`[`)&&(V.posix=!0,e.includes(`:`))){let e=V.value.lastIndexOf(`[`),t=V.value.slice(0,e),n=s[V.value.slice(e+2)];if(n){V.value=t+n,L.backtrack=!0,G(),!m.output&&h.indexOf(V)===1&&(m.output=w);continue}}}(H===`[`&&W()!==`:`||H===`-`&&W()===`]`)&&(H=`\\${H}`),H===`]`&&(V.value===`[`||V.value===`[^`)&&(H=`\\${H}`),n.posix===!0&&H===`!`&&V.value===`[`&&(H=`^`),V.value+=H,J({value:H});continue}if(L.quotes===1&&H!==`"`){H=a.escapeRegex(H),V.value+=H,J({value:H});continue}if(H===`"`){L.quotes=L.quotes===1?0:1,n.keepQuotes===!0&&Q({type:`text`,value:H});continue}if(H===`(`){X(`parens`),Q({type:`paren`,value:H});continue}if(H===`)`){if(L.parens===0&&n.strictBrackets===!0)throw SyntaxError(f(`opening`,`(`));let e=R[R.length-1];if(e&&L.parens===e.parens+1){ee(R.pop());continue}Q({type:`paren`,value:H,output:L.parens?`)`:`\\)`}),Z(`parens`);continue}if(H===`[`){if(n.nobracket===!0||!K().includes(`]`)){if(n.nobracket!==!0&&n.strictBrackets===!0)throw SyntaxError(f(`closing`,`]`));H=`\\${H}`}else X(`brackets`);Q({type:`bracket`,value:H});continue}if(H===`]`){if(n.nobracket===!0||V&&V.type===`bracket`&&V.value.length===1){Q({type:`text`,value:H,output:`\\${H}`});continue}if(L.brackets===0){if(n.strictBrackets===!0)throw SyntaxError(f(`opening`,`[`));Q({type:`text`,value:H,output:`\\${H}`});continue}Z(`brackets`);let e=V.value.slice(1);if(V.posix!==!0&&e[0]===`^`&&!e.includes(`/`)&&(H=`/${H}`),V.value+=H,J({value:H}),n.literalBrackets===!1||a.hasRegexChars(e))continue;let t=a.escapeRegex(V.value);if(L.output=L.output.slice(0,-V.value.length),n.literalBrackets===!0){L.output+=t,V.value=t;continue}V.value=`(${g}${t}|${V.value})`,L.output+=V.value;continue}if(H===`{`&&n.nobrace!==!0){X(`braces`);let e={type:`brace`,value:H,output:`(`,outputIndex:L.output.length,tokensIndex:L.tokens.length};z.push(e),Q(e);continue}if(H===`}`){let e=z[z.length-1];if(n.nobrace===!0||!e){Q({type:`text`,value:H,output:H});continue}let t=`)`;if(e.dots===!0){let e=h.slice(),r=[];for(let t=e.length-1;t>=0&&(h.pop(),e[t].type!==`brace`);t--)e[t].type!==`dots`&&r.unshift(e[t].value);t=d(r,n),L.backtrack=!0}if(e.comma!==!0&&e.dots!==!0){let n=L.output.slice(0,e.outputIndex),r=L.tokens.slice(e.tokensIndex);e.value=e.output=`\\{`,H=t=`\\}`,L.output=n;for(let e of r)L.output+=e.output||e.value}Q({type:`brace`,value:H,output:t}),Z(`braces`),z.pop();continue}if(H===`|`){R.length>0&&R[R.length-1].conditions++,Q({type:`text`,value:H});continue}if(H===`,`){let e=H,t=z[z.length-1];t&&B[B.length-1]===`braces`&&(t.comma=!0,e=`|`),Q({type:`comma`,value:H,output:e});continue}if(H===`/`){if(V.type===`dot`&&L.index===L.start+1){L.start=L.index+1,L.consumed=``,L.output=``,h.pop(),V=m;continue}Q({type:`slash`,value:H,output:C});continue}if(H===`.`){if(L.braces>0&&V.type===`dot`){V.value===`.`&&(V.output=y);let e=z[z.length-1];V.type=`dots`,V.output+=H,V.value+=H,e.dots=!0;continue}if(L.braces+L.parens===0&&V.type!==`bos`&&V.type!==`slash`){Q({type:`text`,value:H,output:y});continue}Q({type:`dot`,value:H,output:y});continue}if(H===`?`){if(!(V&&V.value===`(`)&&n.noextglob!==!0&&W()===`(`&&W(2)!==`?`){$(`qmark`,H);continue}if(V&&V.type===`paren`){let e=W(),t=H;(V.value===`(`&&!/[!=<:]/.test(e)||e===`<`&&!/<([!=]|\w+>)/.test(K()))&&(t=`\\${H}`),Q({type:`text`,value:H,output:t});continue}if(n.dot!==!0&&(V.type===`slash`||V.type===`bos`)){Q({type:`qmark`,value:H,output:A});continue}Q({type:`qmark`,value:H,output:k});continue}if(H===`!`){if(n.noextglob!==!0&&W()===`(`&&(W(2)!==`?`||!/[!=<:]/.test(W(3)))){$(`negate`,H);continue}if(n.nonegate!==!0&&L.index===0){Y();continue}}if(H===`+`){if(n.noextglob!==!0&&W()===`(`&&W(2)!==`?`){$(`plus`,H);continue}if(V&&V.value===`(`||n.regex===!1){Q({type:`plus`,value:H,output:S});continue}if(V&&(V.type===`bracket`||V.type===`paren`||V.type===`brace`)||L.parens>0){Q({type:`plus`,value:H});continue}Q({type:`plus`,value:S});continue}if(H===`@`){if(n.noextglob!==!0&&W()===`(`&&W(2)!==`?`){Q({type:`at`,extglob:!0,value:H,output:``});continue}Q({type:`text`,value:H});continue}if(H!==`*`){(H===`$`||H===`^`)&&(H=`\\${H}`);let e=c.exec(K());e&&(H+=e[0],L.index+=e[0].length),Q({type:`text`,value:H});continue}if(V&&(V.type===`globstar`||V.star===!0)){V.type=`star`,V.star=!0,V.value+=H,V.output=I,L.backtrack=!0,L.globstar=!0,q(H);continue}let t=K();if(n.noextglob!==!0&&/^\([^?]/.test(t)){$(`star`,H);continue}if(V.type===`star`){if(n.noglobstar===!0){q(H);continue}let r=V.prev,i=r.prev,a=r.type===`slash`||r.type===`bos`,o=i&&(i.type===`star`||i.type===`globstar`);if(n.bash===!0&&(!a||t[0]&&t[0]!==`/`)){Q({type:`star`,value:H,output:``});continue}let s=L.braces>0&&(r.type===`comma`||r.type===`brace`),c=R.length&&(r.type===`pipe`||r.type===`paren`);if(!a&&r.type!==`paren`&&!s&&!c){Q({type:`star`,value:H,output:``});continue}for(;t.slice(0,3)===`/**`;){let n=e[L.index+4];if(n&&n!==`/`)break;t=t.slice(3),q(`/**`,3)}if(r.type===`bos`&&U()){V.type=`globstar`,V.value+=H,V.output=N(n),L.output=V.output,L.globstar=!0,q(H);continue}if(r.type===`slash`&&r.prev.type!==`bos`&&!o&&U()){L.output=L.output.slice(0,-(r.output+V.output).length),r.output=`(?:${r.output}`,V.type=`globstar`,V.output=N(n)+(n.strictSlashes?`)`:`|$)`),V.value+=H,L.globstar=!0,L.output+=r.output+V.output,q(H);continue}if(r.type===`slash`&&r.prev.type!==`bos`&&t[0]===`/`){let e=t[1]===void 0?``:`|$`;L.output=L.output.slice(0,-(r.output+V.output).length),r.output=`(?:${r.output}`,V.type=`globstar`,V.output=`${N(n)}${C}|${C}${e})`,V.value+=H,L.output+=r.output+V.output,L.globstar=!0,q(H+G()),Q({type:`slash`,value:`/`,output:``});continue}if(r.type===`bos`&&t[0]===`/`){V.type=`globstar`,V.value+=H,V.output=`(?:^|${C}|${N(n)}${C})`,L.output=V.output,L.globstar=!0,q(H+G()),Q({type:`slash`,value:`/`,output:``});continue}L.output=L.output.slice(0,-V.output.length),V.type=`globstar`,V.output=N(n),V.value+=H,L.output+=V.output,L.globstar=!0,q(H);continue}let r={type:`star`,value:H,output:I};if(n.bash===!0){r.output=`.*?`,(V.type===`bos`||V.type===`slash`)&&(r.output=P+r.output),Q(r);continue}if(V&&(V.type===`bracket`||V.type===`paren`)&&n.regex===!0){r.output=H,Q(r);continue}(L.index===L.start||V.type===`slash`||V.type===`dot`)&&(V.type===`dot`?(L.output+=D,V.output+=D):n.dot===!0?(L.output+=O,V.output+=O):(L.output+=P,V.output+=P),W()!==`*`&&(L.output+=w,V.output+=w)),Q(r)}for(;L.brackets>0;){if(n.strictBrackets===!0)throw SyntaxError(f(`closing`,`]`));L.output=a.escapeLast(L.output,`[`),Z(`brackets`)}for(;L.parens>0;){if(n.strictBrackets===!0)throw SyntaxError(f(`closing`,`)`));L.output=a.escapeLast(L.output,`(`),Z(`parens`)}for(;L.braces>0;){if(n.strictBrackets===!0)throw SyntaxError(f(`closing`,`}`));L.output=a.escapeLast(L.output,`{`),Z(`braces`)}if(n.strictSlashes!==!0&&(V.type===`star`||V.type===`bracket`)&&Q({type:`maybe_slash`,value:``,output:`${C}?`}),L.backtrack===!0){L.output=``;for(let e of L.tokens)L.output+=e.output==null?e.value:e.output,e.suffix&&(L.output+=e.suffix)}return L};x.fastpaths=(e,t)=>{let n={...t},r=typeof n.maxLength==`number`?Math.min(o,n.maxLength):o,s=e.length;if(s>r)throw SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${r}`);e=u[e]||e;let{DOT_LITERAL:c,SLASH_LITERAL:l,ONE_CHAR:d,DOTS_SLASH:f,NO_DOT:p,NO_DOTS:m,NO_DOTS_SLASH:h,STAR:g,START_ANCHOR:_}=i.globChars(n.windows),v=n.dot?m:p,y=n.dot?h:p,b=n.capture?``:`?:`,x={negated:!1,prefix:``},S=n.bash===!0?`.*?`:g;n.capture&&(S=`(${S})`);let C=e=>e.noglobstar===!0?S:`(${b}(?:(?!${_}${e.dot?f:c}).)*?)`,w=e=>{switch(e){case`*`:return`${v}${d}${S}`;case`.*`:return`${c}${d}${S}`;case`*.*`:return`${v}${S}${c}${d}${S}`;case`*/*`:return`${v}${S}${l}${d}${y}${S}`;case`**`:return v+C(n);case`**/*`:return`(?:${v}${C(n)}${l})?${y}${d}${S}`;case`**/*.*`:return`(?:${v}${C(n)}${l})?${y}${S}${c}${d}${S}`;case`**/.*`:return`(?:${v}${C(n)}${l})?${c}${d}${S}`;default:{let t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;let n=w(t[1]);return n?n+c+t[2]:void 0}}},T=w(a.removePrefix(e,x));return T&&n.strictSlashes!==!0&&(T+=`${l}?`),T},r.exports=x})),a=e(((e,a)=>{let o=r(),s=i(),c=n(),l=t(),u=e=>e&&typeof e==`object`&&!Array.isArray(e),d=(e,t,n=!1)=>{if(Array.isArray(e)){let r=e.map(e=>d(e,t,n)),i=e=>{for(let t of r){let n=t(e);if(n)return n}return!1};return i}let r=u(e)&&e.tokens&&e.input;if(e===``||typeof e!=`string`&&!r)throw TypeError(`Expected pattern to be a non-empty string`);let i=t||{},a=i.windows,o=r?d.compileRe(e,t):d.makeRe(e,t,!1,!0),s=o.state;delete o.state;let c=()=>!1;if(i.ignore){let e={...t,ignore:null,onMatch:null,onResult:null};c=d(i.ignore,e,n)}let l=(n,r=!1)=>{let{isMatch:l,match:u,output:f}=d.test(n,o,t,{glob:e,posix:a}),p={glob:e,state:s,regex:o,posix:a,input:n,output:f,match:u,isMatch:l};return typeof i.onResult==`function`&&i.onResult(p),l===!1?(p.isMatch=!1,r?p:!1):c(n)?(typeof i.onIgnore==`function`&&i.onIgnore(p),p.isMatch=!1,r?p:!1):(typeof i.onMatch==`function`&&i.onMatch(p),r?p:!0)};return n&&(l.state=s),l};d.test=(e,t,n,{glob:r,posix:i}={})=>{if(typeof e!=`string`)throw TypeError(`Expected input to be a string`);if(e===``)return{isMatch:!1,output:``};let a=n||{},o=a.format||(i?c.toPosixSlashes:null),s=e===r,l=s&&o?o(e):e;return s===!1&&(l=o?o(e):e,s=l===r),(s===!1||a.capture===!0)&&(s=a.matchBase===!0||a.basename===!0?d.matchBase(e,t,n,i):t.exec(l)),{isMatch:!!s,match:s,output:l}},d.matchBase=(e,t,n)=>(t instanceof RegExp?t:d.makeRe(t,n)).test(c.basename(e)),d.isMatch=(e,t,n)=>d(t,n)(e),d.parse=(e,t)=>Array.isArray(e)?e.map(e=>d.parse(e,t)):s(e,{...t,fastpaths:!1}),d.scan=(e,t)=>o(e,t),d.compileRe=(e,t,n=!1,r=!1)=>{if(n===!0)return e.output;let i=t||{},a=i.contains?``:`^`,o=i.contains?``:`$`,s=`${a}(?:${e.output})${o}`;e&&e.negated===!0&&(s=`^(?!${s}).*$`);let c=d.toRegex(s,t);return r===!0&&(c.state=e),c},d.makeRe=(e,t={},n=!1,r=!1)=>{if(!e||typeof e!=`string`)throw TypeError(`Expected a non-empty string`);let i={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]===`.`||e[0]===`*`)&&(i.output=s.fastpaths(e,t)),i.output||(i=s(e,t)),d.compileRe(i,t,n,r)},d.toRegex=(e,t)=>{try{let n=t||{};return new RegExp(e,n.flags||(n.nocase?`i`:``))}catch(e){if(t&&t.debug===!0)throw e;return/$^/}},d.constants=l,a.exports=d})),o=e(((e,t)=>{let r=a(),i=n();function o(e,t,n=!1){return t&&(t.windows===null||t.windows===void 0)&&(t={...t,windows:i.isWindows()}),r(e,t,n)}Object.assign(o,r),t.exports=o}));export{o as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./parse-ms.mjs";const t=e=>e===0||e===0n,n=(e,t)=>t===1||t===1n?e:`${e}s`,r=24n*60n*60n*1000n;function i(i,a){let o=typeof i==`bigint`;if(!o&&!Number.isFinite(i))throw TypeError(`Expected a finite number or bigint`);a={...a};let s=i<0?`-`:``;i=i<0?-i:i,a.colonNotation&&(a.compact=!1,a.formatSubMilliseconds=!1,a.separateMilliseconds=!1,a.verbose=!1),a.compact&&(a.unitCount=1,a.secondsDecimalDigits=0,a.millisecondsDecimalDigits=0);let c=[],l=(e,t)=>{let n=Math.floor(e*10**t+1e-7);return(Math.round(n)/10**t).toFixed(t)},u=(e,r,i,o)=>{if(!((c.length===0||!a.colonNotation)&&t(e)&&!(a.colonNotation&&i===`m`))){if(o??=String(e),a.colonNotation){let e=o.includes(`.`)?o.split(`.`)[0].length:o.length,t=c.length>0?2:1;o=`0`.repeat(Math.max(0,t-e))+o}else o+=a.verbose?` `+n(r,e):i;c.push(o)}},d=e(i),f=BigInt(d.days);if(a.hideYearAndDays?u(BigInt(f)*24n+BigInt(d.hours),`hour`,`h`):(a.hideYear?u(f,`day`,`d`):(u(f/365n,`year`,`y`),u(f%365n,`day`,`d`)),u(Number(d.hours),`hour`,`h`)),u(Number(d.minutes),`minute`,`m`),!a.hideSeconds)if(a.separateMilliseconds||a.formatSubMilliseconds||!a.colonNotation&&i<1e3&&!a.subSecondsAsDecimals){let e=Number(d.seconds),t=Number(d.milliseconds),n=Number(d.microseconds),r=Number(d.nanoseconds);if(u(e,`second`,`s`),a.formatSubMilliseconds)u(t,`millisecond`,`ms`),u(n,`microsecond`,`µs`),u(r,`nanosecond`,`ns`);else{let e=t+n/1e3+r/1e6,i=typeof a.millisecondsDecimalDigits==`number`?a.millisecondsDecimalDigits:0,o=i?e.toFixed(i):e>=1?Math.round(e):Math.ceil(e);u(Number.parseFloat(o),`millisecond`,`ms`,o)}}else{let e=l((o?Number(i%r):i)/1e3%60,typeof a.secondsDecimalDigits==`number`?a.secondsDecimalDigits:1),t=a.keepDecimalsOnWholeSeconds?e:e.replace(/\.0+$/,``);u(Number.parseFloat(t),`second`,`s`,t)}if(c.length===0)return s+`0`+(a.verbose?` milliseconds`:`ms`);let p=a.colonNotation?`:`:` `;return typeof a.unitCount==`number`&&(c=c.slice(0,Math.max(a.unitCount,1))),s+c.join(p)}export{i as t};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function e(e,t,n){let r=n=>e(n,...t);return n===void 0?r:Object.assign(r,{lazy:n,lazyArgs:t})}function t(t,n,r){let i=t.length-n.length;if(i===0)return t(...n);if(i===1)return e(t,n,r);throw Error(`Wrong number of arguments`)}function n(...e){return t(r,e)}const r=(e,t)=>t.some(t=>t(e));function i(...e){return t(a,e)}function a(e,t){if(t<1)throw RangeError(`chunk: A chunk size of '${t.toString()}' would result in an infinite array`);if(e.length===0)return[];if(t>=e.length)return[[...e]];let n=Math.ceil(e.length/t),r=Array(n);if(t===1)for(let[t,n]of e.entries())r[t]=[n];else for(let i=0;i<n;i+=1){let n=i*t;r[i]=e.slice(n,n+t)}return r}function o(...e){return t(s,e)}const s=(e,{min:t,max:n})=>t!==void 0&&e<t?t:n!==void 0&&e>n?n:e;function c(...e){return t(l,e)}const l=(e,t)=>[...e,...t],u={done:!0,hasNext:!1},d={done:!1,hasNext:!1},f=()=>u,p=e=>({hasNext:!0,next:e,done:!1});function m(e,...t){let n=e,r=t.map(e=>`lazy`in e?g(e):void 0),i=0;for(;i<t.length;){if(r[i]===void 0||!ee(n)){let e=t[i];n=e(n),i+=1;continue}let e=[];for(let n=i;n<t.length;n++){let t=r[n];if(t===void 0||(e.push(t),t.isSingle))break}let a=[];for(let t of n)if(h(t,a,e))break;let{isSingle:o}=e.at(-1);n=o?a[0]:a,i+=e.length}return n}function h(e,t,n){if(n.length===0)return t.push(e),!1;let r=e,i=d,a=!1;for(let[e,o]of n.entries()){let{index:s,items:c}=o;if(c.push(r),i=o(r,s,c),o.index+=1,i.hasNext){if(i.hasMany??!1){for(let r of i.next)if(h(r,t,n.slice(e+1)))return!0;return a}r=i.next}if(!i.hasNext)break;i.done&&(a=!0)}return i.hasNext&&t.push(r),a}function g(e){let{lazy:t,lazyArgs:n}=e,r=t(...n);return Object.assign(r,{isSingle:t.single??!1,index:0,items:[]})}function ee(e){return typeof e==`string`||typeof e==`object`&&!!e&&Symbol.iterator in e}function _(e,t){let n=t.length-e.length;if(n===1){let[n,...r]=t;return m(n,{lazy:e,lazyArgs:r})}if(n===0){let n={lazy:e,lazyArgs:t};return Object.assign(e=>m(e,n),n)}throw Error(`Wrong number of arguments`)}function v(...e){return _(y,e)}function y(e){if(e.length===0)return p;let t=new Map;for(let n of e)t.set(n,(t.get(n)??0)+1);return e=>{let n=t.get(e);return n===void 0||n===0?{done:!1,hasNext:!0,next:e}:(t.set(e,n-1),d)}}function b(...e){return t(te,e)}const te=(e,t)=>e.length>=t;function ne(...e){return t(Object.entries,e)}function re(...e){return t(x,e,S)}const x=(e,t)=>e.filter(t),S=e=>(t,n,r)=>e(t,n,r)?{done:!1,hasNext:!0,next:t}:d,C=e=>Object.assign(e,{single:!0});function w(...e){return t(T,e,C(E))}const T=(e,t)=>e.find(t),E=e=>(t,n,r)=>e(t,n,r)?{done:!0,hasNext:!0,next:t}:d;function D(...e){return t(O,e)}const O=(e,t)=>{for(let n=e.length-1;n>=0;n--){let r=e[n];if(t(r,n,e))return r}};function k(...e){return t(A,e,C(j))}const A=([e])=>e,j=()=>M,M=e=>({hasNext:!0,next:e,done:!0});function N(t,n){return typeof t==`object`?P(t,n):e(P,t===void 0?[]:[t],F)}const P=(e,t)=>t===void 0?e.flat():e.flat(t),F=e=>e===void 0||e===1?I:e<=0?p:t=>Array.isArray(t)?{next:t.flat(e-1),hasNext:!0,hasMany:!0,done:!1}:{next:t,hasNext:!0,done:!1},I=e=>Array.isArray(e)?{next:e,hasNext:!0,hasMany:!0,done:!1}:{next:e,hasNext:!0,done:!1};function L(...e){return t(R,e,z)}const R=(e,t)=>e.flatMap(t),z=e=>(t,n,r)=>{let i=e(t,n,r);return Array.isArray(i)?{done:!1,hasNext:!0,hasMany:!0,next:i}:{done:!1,hasNext:!0,next:i}};function B(...e){return t(V,e,H)}function V(e,t){return e.forEach(t),e}const H=e=>(t,n,r)=>(e(t,n,r),{done:!1,hasNext:!0,next:t});function U(...e){return t(W,e)}function W(e,t){for(let[n,r]of Object.entries(e))t(r,n,e);return e}const G=Symbol(`funnel/voidReducer`),K=()=>G;function q(e,{triggerAt:t=`end`,minQuietPeriodMs:n,maxBurstDurationMs:r,minGapMs:i,reducer:a=K}){let o,s,c,l,u=()=>{let t=c;t!==void 0&&(c=void 0,t===G?e():e(t),i!==void 0&&(s=setTimeout(d,i)))},d=()=>{clearTimeout(s),s=void 0,o===void 0&&u()},f=()=>{clearTimeout(o),o=void 0,l=void 0,s===void 0&&u()};return{call:(...e)=>{let d=o===void 0&&s===void 0;if((t!==`start`||d)&&(c=a(c,...e)),!(o===void 0&&!d)){if(n!==void 0||r!==void 0||i===void 0){clearTimeout(o);let e=Date.now();l??=e;let t=r===void 0?n??0:Math.min(n??r,Math.max(0,r-(e-l)));o=setTimeout(f,t)}t!==`end`&&d&&u()}},cancel:()=>{clearTimeout(o),o=void 0,l=void 0,clearTimeout(s),s=void 0,c=void 0},flush:()=>{f(),d()},get isIdle(){return o===void 0&&s===void 0}}}function J(...e){return t(Y,e)}const Y=(e,t)=>{let n=Object.create(null);for(let r=0;r<e.length;r++){let i=e[r],a=t(i,r,e);if(a!==void 0){let e=n[a];e===void 0?n[a]=[i]:e.push(i)}}return Object.setPrototypeOf(n,Object.prototype),n};function X(...e){return t(ie,e)}function ie(e,t){let n=Object.create(null);for(let r of e){let e=r?.[t];if(e!==void 0){let t=n[e];t===void 0?n[e]=[r]:t.push(r)}}return Object.setPrototypeOf(n,Object.prototype),n}function ae(...e){return t(Z,e)}function Z(e,t){if(e===t||Object.is(e,t))return!0;if(typeof e!=`object`||typeof t!=`object`||e===null||t===null||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;if(Array.isArray(e))return oe(e,t);if(e instanceof Map)return se(e,t);if(e instanceof Set)return ce(e,t);if(e instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp)return e.toString()===t.toString();if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let[n,r]of Object.entries(e))if(!(n in t)||!Z(r,t[n]))return!1;return!0}function oe(e,t){if(e.length!==t.length)return!1;for(let[n,r]of e.entries())if(!Z(r,t[n]))return!1;return!0}function se(e,t){if(e.size!==t.size)return!1;for(let[n,r]of e.entries())if(!t.has(n)||!Z(r,t.get(n)))return!1;return!0}function ce(e,t){if(e.size!==t.size)return!1;let n=[...t];for(let t of e){let e=!1;for(let[r,i]of n.entries())if(Z(t,i)){e=!0,n.splice(r,1);break}if(!e)return!1}return!0}function le(){return ue}const ue=e=>e;function de(...e){return t(fe,e)}function fe(e,t){let n={};for(let[r,i]of e.entries()){let a=t(i,r,e);n[a]=i}return n}function pe(e){return Array.isArray(e)}function me(e){return typeof e==`boolean`}function he(e){return e!==void 0}function ge(e){return e===``||e===void 0?!0:Array.isArray(e)?e.length===0:Object.keys(e).length===0}function _e(e){if(e==null||e===``)return!0;if(typeof e!=`object`)return!1;if(`length`in e&&typeof e.length==`number`)return e.length===0;if(`size`in e&&typeof e.size==`number`)return e.size===0;for(let t in e)return!1;return Object.getOwnPropertySymbols(e).length===0}function ve(e){return e!=null}function ye(e){return e==null}function be(e){return typeof e==`number`&&!Number.isNaN(e)}function xe(e){return e instanceof Promise}function Se(e){return typeof e==`string`}function Ce(e){return!!e}function we(...e){return t(Te,e)}const Te=(e,t)=>e.join(t);function Ee(...e){return t(Object.keys,e)}function De(...e){return t(Oe,e)}const Oe=e=>e.at(-1);function ke(...e){return t(Ae,e,je)}const Ae=(e,t)=>e.map(t),je=e=>(t,n,r)=>({done:!1,hasNext:!0,next:e(t,n,r)});function Me(...e){return t(Ne,e)}function Ne(e,t){let n={};for(let[r,i]of e.entries()){let[a,o]=t(i,r,e);n[a]=o}return n}function Pe(...e){return t(Fe,e)}function Fe(e,t){let n={};for(let[r,i]of Object.entries(e))n[r]=t(i,r,e);return n}function Ie(...e){return t(Le,e)}function Le(e,t){if(!b(t,1))return{...e};if(!b(t,2)){let{[t[0]]:n,...r}=e;return r}let n={...e};for(let e of t)delete n[e];return n}function Re(...e){return t(ze,e)}function ze(e,t){let n={...e};for(let[r,i]of Object.entries(n))t(i,r,e)&&delete n[r];return n}function Be(e){let t=!1,n;return()=>(t||=(n=e(),!0),n)}function Ve(...e){return t(He,e)}const He=e=>e.length===1?e[0]:void 0;function Ue(...e){return t(We,e)}const We=(e,t)=>{let n=[[],[]];for(let[r,i]of e.entries())t(i,r,e)?n[0].push(i):n[1].push(i);return n};function Ge(...e){return t=>m(t,...e)}function Ke(e,...t){return typeof e==`string`||typeof e==`number`||typeof e==`symbol`?n=>Q(n,e,...t):Q(e,...t)}function Q(e,...t){let n=e;for(let e of t){if(n==null)return;n=n[e]}return n}function qe(...e){return t(Je,e)}function Je(e){let t=[];for(let n=0;n<e;n++){let e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`[Math.floor(Math.random()*62)];t.push(e)}return t.join(``)}function $(...e){return t(Ye,e)}const Ye=(e,t,n)=>e.reduce(t,n);function Xe(...e){return t(Ze,e)}function Ze(e){return[...e].reverse()}function Qe(...e){return t($e,e)}function $e(e,t){let n=[...e];return n.sort(t),n}function et(...e){return t(tt,e,nt)}const tt=(e,t)=>t<0?[]:e.slice(0,t);function nt(e){if(e<=0)return f;let t=e;return e=>(--t,{done:t<=0,hasNext:!0,next:e})}function rt(...e){return t(it,e)}function it(e,t){return t(e),e}new Set([`-`,`_`,...` .
|
|
2
|
-
.\v.\f.\r. .
.\xA0. . . . . . . . . . . . .\u2028.\u2029. . . .`.split(`.`)]);function at(...e){return _(ot,e)}function ot(){let e=new Set;return t=>e.has(t)?d:(e.add(t),{done:!1,hasNext:!0,next:t})}function st(...e){return _(ct,e)}function ct(e){let t=e,n=new Set;return(e,r,i)=>{let a=t(e,r,i);return n.has(a)?d:(n.add(a),{done:!1,hasNext:!0,next:e})}}function lt(...e){return t(Object.values,e)}export{o as $,ge as A,U as B,Ce as C,ye as D,be as E,le as F,D as G,L as H,ae as I,ne as J,w as K,X as L,me as M,pe as N,ve as O,de as P,c as Q,J as R,we as S,xe as T,N as U,B as V,k as W,v as X,b as Y,m as Z,Pe as _,et as a,De as b,$ as c,Ge as d,i as et,Ue as f,Ie as g,Re as h,rt as i,he as j,_e as k,qe as l,Be as m,st as n,t as nt,Qe as o,Ve as p,re as q,at as r,Xe as s,lt as t,n as tt,Ke as u,Me as v,Se as w,Ee as x,ke as y,q as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(t,n,r,i){if(typeof t?.toJSON==`function`&&(t=t.toJSON()),!(typeof t==`object`&&t))return t;if(n.has(t)){if(!r)return`[Circular]`;let e=n.get(t);return`[Circular ${e===``?`*`:`*${e}`}]`}n.set(t,i);let a=Array.isArray(t)?[]:{};for(let[o,s]of Object.entries(t))a[o]=e(s,n,r,i===``?o:`${i}.${o}`);return n.delete(t),a}function t(t,{indentation:n,trace:r}={}){let i=e(t,new WeakMap,r,``);return JSON.stringify(i,void 0,n)}export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e){let t=e.match(/^[ \t]*(?=\S)/gm);if(!t)return e;let n=1/0;for(let e of t)n=Math.min(n,e.length);return n===0||n===1/0?e:e.replace(RegExp(`^[ \\t]{${n}}`,`gm`),``)}function t(t){return e(t.replace(/^(?:[ \t]*\r?\n)+|(?:\r?\n[ \t]*)+$/g,``))}export{e as n,t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e={reset:[0,0],bold:[1,22,`\x1B[22m\x1B[1m`],dim:[2,22,`\x1B[22m\x1B[2m`],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]};function t(e){return String(e)}t.open=``,t.close=``;function n(){let e=typeof process<`u`?process:void 0,t=e?.env||{},n=t.FORCE_TTY!==`false`,r=e?.argv||[];return!(`NO_COLOR`in t||r.includes(`--no-color`))&&(`FORCE_COLOR`in t||r.includes(`--color`)||e?.platform===`win32`||n&&t.TERM!==`dumb`||`CI`in t)||typeof window<`u`&&!!window.chrome}function r({force:r}={}){let i=r||n(),a=(e,t,n,r)=>{let i=``,a=0;do i+=e.substring(a,r)+n,a=r+t.length,r=e.indexOf(t,a);while(~r);return i+e.substring(a)},o=(e,t,n=e)=>{let r=r=>{let i=String(r),o=i.indexOf(t,e.length);return~o?e+a(i,t,n,o)+t:e+i+t};return r.open=e,r.close=t,r},s={isColorSupported:i},c=e=>`\x1B[${e}m`;for(let n in e){let r=e[n];s[n]=i?o(c(r[0]),c(r[1]),r[2]):t}return s}var i=r();export{i as t};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
function e(e){return typeof e==`object`&&!!e&&typeof e.id==`string`}function t(e){return typeof e==`object`&&!!e&&e.$$type===`Node`&&typeof e.id==`string`}function n(n){return t(n)||e(n)}function r(e){return typeof e==`string`||n(e)}function i(e){return Array.isArray(e)&&e.every(r)}function a(e){return[`n`,`ne`,`e`,`se`,`s`,`sw`,`w`,`nw`,`c`].includes(e)}function o(e){if(n(e))return e;let[t,r,i]=e.split(`:`);return a(i)?{id:t,port:r,compass:i}:{id:t,port:r}}function s(e){if(e.length<2&&(r(e[0])&&r(e[1]))===!1)throw Error(`EdgeTargets must have at least 2 elements.`);return e.map(e=>o(e))}const c=Object.seal({Graph:null,Digraph:null,Subgraph:null,Node:null,Edge:null});function l(e){return Object.assign(Object.seal(Object.assign({},c)),e)}function u(...e){let[t,...n]=e;return(...e)=>n.reduce((e,t)=>t(e),t(...e))}function d(e,...t){return u(e,...t)}const f=e=>(...t)=>n=>e(n,...t),p=e=>({[Symbol.iterator]:e}),m=f((e,t)=>Array.from(p(function*(){for(let n of e)yield t(n)})));var h=class{options;getLocation(){return this.options?.locationFunction?.()??null}constructor(e){this.options=e}createElement(e,t,n=[]){return{location:this.getLocation(),...t,type:e,children:n}}};const g=h.prototype.createElement.bind(new h),_=/\r?\n/;function v(e){return t=>t.join(e)}function y(e){return t=>e+t+e}function b(e,t){return n=>e+n+t}function x(e){return t=>e+t}const S=e=>e.replace(/\r/g,`\\r`).replace(/\n/g,`\\n`).replace(/"/g,`\\"`),C=e=>e.split(_),w=(e,t,n)=>d(C,m(x(e===`space`?` `.repeat(t):`
|
|
2
|
-
`)),v(n)),T=e=>{switch(e){case`crlf`:return`\r
|
|
3
|
-
`;case`lf`:return`
|
|
4
|
-
`}},E={match(e){return e.type===`AttributeList`},print(e,t){if(t.children.length===0)return`${t.kind.toLocaleLowerCase()} [];`;let n=T(e.endOfLine);return d(m(e.print),v(n),w(e.indentStyle,e.indentSize,n),b(`${t.kind.toLocaleLowerCase()} [${n}`,`${n}];`))(t.children)}},D={match(e){return e.type===`Attribute`},print(e,t){return`${e.print(t.key)} = ${e.print(t.value)};`}},O={match(e){return e.type===`Comment`},print(e,t){let n=T(e.endOfLine);switch(t.kind){case`Block`:return d(C,m(x(` * `)),v(n),b(`/**${n}`,`${n} */`))(t.value);case`Macro`:return d(C,m(x(`# `)),v(n))(t.value);default:return d(C,m(x(`// `)),v(n))(t.value)}}},k={match(e){return e.type===`Dot`},print(e,t){return t.children.map(e.print).join(T(e.endOfLine))}},ee={match(e){return e.type===`Edge`},print(e,t){let n=d(m(e.print),v(e.directed?` -> `:` -- `))(t.targets);if(t.children.length===0)return`${n};`;let r=T(e.endOfLine);return`${n} ${d(m(e.print),v(r),w(e.indentStyle,e.indentSize,r),b(`[${r}`,`${r}];`))(t.children)}`}},te={match(e){return e.type===`Graph`},print(e,t){e.directed=t.directed;let n=[];if(t.strict&&n.push(`strict`),n.push(t.directed?`digraph`:`graph`),t.id&&n.push(e.print(t.id)),t.children.length===0)return`${n.join(` `)} {}`;let r=T(e.endOfLine),i=d(m(e.print),v(r),w(e.indentStyle,e.indentSize,r),b(`{${r}`,`${r}}`))(t.children);return`${n.join(` `)} ${i}`}},ne=d(S,y(`"`)),A=b(`<`,`>`),j=[E,D,O,k,ee,te,{match(e){return e.type===`Literal`},print(e,t){switch(t.quoted){case`html`:return A(t.value);case!0:return ne(t.value);default:return S(t.value)}}},{match(e){return e.type===`Node`},print(e,t){let n=e.print(t.id);if(t.children.length===0)return`${n};`;let r=T(e.endOfLine);return`${n} ${d(m(e.print),v(r),w(e.indentStyle,e.indentSize,r),b(`[${r}`,`${r}];`))(t.children)}`}},{match(e){return e.type===`NodeRefGroup`},print(e,t){return d(m(e.print),v(` `),b(`{`,`}`))(t.children)}},{match(e){return e.type===`NodeRef`},print(e,t){let n=[e.print(t.id)];return t.port&&n.push(e.print(t.port)),t.compass&&n.push(e.print(t.compass)),n.join(`:`)}},{match(e){return e.type===`Subgraph`},print(e,t){let n=[`subgraph`];if(t.id&&n.push(e.print(t.id)),t.children.length===0)return`${n.join(` `)} {}`;let r=T(e.endOfLine),i=d(m(e.print),v(r),w(e.indentStyle,e.indentSize,r),b(`{${r}`,`${r}}`))(t.children);return`${n.join(` `)} ${i}`}}];var M=class{options;#e=[...j];constructor(e={}){this.options=e}print(e){let t=[...this.#e],{indentSize:n=2,indentStyle:r=`space`,endOfLine:i=`lf`}=this.options,a={directed:!0,indentSize:n,indentStyle:r,endOfLine:i,print(e){for(let n of t)if(n.match(e))return n.print(a,e);throw Error()}};return a.print(e)}};function N(e,t){let n=new M(t).print(e);if(!n)throw Error();return n}function P(e,t){if(typeof t==`string`){let n=t.trim();return/^<.+>$/ms.test(n)?g(`Attribute`,{key:g(`Literal`,{value:e,quoted:!1},[]),value:g(`Literal`,{value:n.slice(1,n.length-1),quoted:`html`},[])},[]):g(`Attribute`,{key:g(`Literal`,{value:e,quoted:!1},[]),value:g(`Literal`,{value:t,quoted:!0},[])},[])}return g(`Attribute`,{key:g(`Literal`,{value:e,quoted:!1},[]),value:g(`Literal`,{value:String(t),quoted:!1},[])},[])}function F(e,t){return g(`Comment`,{kind:t,value:e},[])}function I(e,t){return Array.from((function*(){for(let[e,n]of t.values)yield P(e,n);for(let n of Object.values(t.attributes))n.size>0&&(n.comment&&(yield F(n.comment,e.commentKind)),yield e.convert(n));for(let n of t.nodes)n.comment&&(yield F(n.comment,e.commentKind)),yield e.convert(n);for(let n of t.subgraphs)n.comment&&(yield F(n.comment,e.commentKind)),yield e.convert(n);for(let n of t.edges)n.comment&&(yield F(n.comment,e.commentKind)),yield e.convert(n)})())}const L=[{match(e){return e.$$type===`AttributeList`},convert(e,t){return g(`AttributeList`,{kind:t.$$kind},t.values.map(([e,t])=>P(e,t)))}},{match(e){return e.$$type===`Edge`},convert(n,r){return g(`Edge`,{targets:r.targets.map(n=>t(n)?g(`NodeRef`,{id:g(`Literal`,{value:n.id,quoted:!0},[])},[]):e(n)?g(`NodeRef`,{id:g(`Literal`,{value:n.id,quoted:!0},[]),port:n.port?g(`Literal`,{value:n.port,quoted:!0},[]):void 0,compass:n.compass?g(`Literal`,{value:n.compass,quoted:!0},[]):void 0},[]):g(`NodeRefGroup`,{},n.map(e=>t(e)?g(`NodeRef`,{id:g(`Literal`,{value:e.id,quoted:!0},[])},[]):g(`NodeRef`,{id:g(`Literal`,{value:e.id,quoted:!0},[]),port:e.port?g(`Literal`,{value:e.port,quoted:!0},[]):void 0,compass:e.compass?g(`Literal`,{value:e.compass,quoted:!0},[]):void 0},[]))))},[...r.attributes.comment?[F(r.attributes.comment,n.commentKind)]:[],...r.attributes.values.map(([e,t])=>P(e,t))])}},{match(e){return e.$$type===`Node`},convert(e,t){return g(`Node`,{id:g(`Literal`,{value:t.id,quoted:!0},[])},[...t.attributes.comment?[F(t.attributes.comment,e.commentKind)]:[],...t.attributes.values.map(([e,t])=>P(e,t))])}},{match(e){return e.$$type===`Graph`},convert(e,t){return g(`Dot`,{},[...t.comment?[F(t.comment,e.commentKind)]:[],g(`Graph`,{directed:t.directed,strict:t.strict,id:t.id?g(`Literal`,{value:t.id,quoted:!0},[]):void 0},I(e,t))])}},{match(e){return e.$$type===`Subgraph`},convert(e,t){return g(`Subgraph`,{id:t.id?g(`Literal`,{value:t.id,quoted:!0},[]):void 0},I(e,t))}}];var R=class{options;#e=[...L];constructor(e={}){this.options=e}convert(e){let t=[...this.#e],{commentKind:n=`Slash`}=this.options,r={commentKind:n,convert(e){for(let n of t)if(n.match(e))return n.convert(r,e);throw Error()}};return r.convert(e)}};function z(e,t){return new R(t).convert(e)}const B=new Proxy(Object.freeze({}),{get:(e,t)=>t});var V=class{},H=class extends V{#e=new Map;constructor(e){super(),e!==void 0&&this.apply(e)}get values(){return Array.from(this.#e.entries())}get size(){return this.#e.size}get(e){return this.#e.get(e)}set(e,t){t!=null&&this.#e.set(e,t)}delete(e){this.#e.delete(e)}apply(e){let t=Array.isArray(e)?e:Object.entries(e);for(let[e,n]of t)this.set(e,n)}clear(){this.#e.clear()}},U=class extends H{$$kind;get $$type(){return`AttributeList`}comment;constructor(e,t){super(t),this.$$kind=e}},W=class extends H{#e=c;id;comment;attributes=Object.freeze({graph:new U(`Graph`),edge:new U(`Edge`),node:new U(`Node`)});get nodes(){return Array.from(this.#t.nodes.values())}get edges(){return Array.from(this.#t.edges.values())}get subgraphs(){return Array.from(this.#t.subgraphs.values())}#t={nodes:new Map,edges:new Set,subgraphs:new Set};with(e){this.#e=l(e)}addNode(e){this.#t.nodes.set(e.id,e)}addEdge(e){this.#t.edges.add(e)}addSubgraph(e){this.#t.subgraphs.add(e)}existNode(e){return this.#t.nodes.has(e)}existEdge(e){return this.#t.edges.has(e)}existSubgraph(e){return this.#t.subgraphs.has(e)}createSubgraph(...e){let t=new this.#e.Subgraph(...e);return t.with(this.#e),this.addSubgraph(t),t}removeNode(e){this.#t.nodes.delete(typeof e==`string`?e:e.id)}removeEdge(e){this.#t.edges.delete(e)}removeSubgraph(e){this.#t.subgraphs.delete(e)}createNode(e,t){let n=new this.#e.Node(e,t);return this.addNode(n),n}getSubgraph(e){return Array.from(this.#t.subgraphs.values()).find(t=>t.id===e)}getNode(e){return this.#t.nodes.get(e)}createEdge(e,t){let n=e.map(e=>i(e)?s(e):o(e)),r=new this.#e.Edge(n,t);return this.addEdge(r),r}subgraph(...e){let t=e.find(e=>typeof e==`string`),n=e.find(e=>typeof e==`object`&&!!e),r=e.find(e=>typeof e==`function`),i=t?this.getSubgraph(t)??this.createSubgraph(t):this.createSubgraph();return n!==void 0&&i.apply(n),r!==void 0&&r(i),i}node(e,...t){if(typeof e==`string`){let n=e,r=t.find(e=>typeof e==`object`&&!!e),i=t.find(e=>typeof e==`function`),a=this.getNode(n)??this.createNode(n);return r!==void 0&&a.attributes.apply(r),i!==void 0&&i(a),a}typeof e==`object`&&e&&this.attributes.node.apply(e)}edge(e,...t){if(Array.isArray(e)){let n=e,r=t.find(e=>typeof e==`object`),i=t.find(e=>typeof e==`function`),a=this.createEdge(n,r);return i!==void 0&&i(a),a}typeof e==`object`&&e&&this.attributes.edge.apply(e)}graph(e){this.attributes.graph.apply(e)}},G=class extends W{get $$type(){return`Graph`}id;strict;constructor(...e){super(),this.id=e.find(e=>typeof e==`string`),this.strict=e.find(e=>typeof e==`boolean`)??!1;let t=e.find(e=>typeof e==`object`&&!!e);t!==void 0&&this.apply(t)}},K=class extends G{get directed(){return!0}},q=class extends G{get directed(){return!1}},J=class extends W{get $$type(){return`Subgraph`}id;constructor(...e){super(),this.id=e.find(e=>typeof e==`string`);let t=e.find(e=>typeof e==`object`&&!!e);t!==void 0&&this.apply(t)}isSubgraphCluster(){return typeof this.id==`string`?this.id.startsWith(`cluster`):!1}},Y=class extends H{comment},X=class extends V{id;get $$type(){return`Node`}comment;attributes;constructor(e,t){super(),this.id=e,this.attributes=new Y(t)}port(e){return typeof e==`string`?{id:this.id,port:e}:{id:this.id,...e}}},re=class extends V{targets;get $$type(){return`Edge`}comment;attributes;constructor(e,t){if(super(),this.targets=e,e.length<2&&(r(e[0])&&r(e[1]))===!1)throw Error(`The element of Edge target is missing or not satisfied as Edge target.`);this.attributes=new Y(t)}};Object.assign(c,{Graph:q,Digraph:K,Subgraph:J,Node:X,Edge:re});function Z(e,t){return(...n)=>{let r=e?this.Digraph:this.Graph,i=n.find(e=>typeof e==`string`),a=n.find(e=>typeof e==`object`),o=n.find(e=>typeof e==`function`),s=new r(i,t,a);return s.with(this),typeof o==`function`&&o(s),s}}function Q(e,t=c){return Object.freeze({digraph:Z.call(t,!0,e),graph:Z.call(t,!1,e)})}const $=Q(!1),ie=$.digraph;$.graph,Q(!0);function ae(e,t){return N(z(e,t?.convert),t?.print)}export{ie as n,ae as r,B as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
String.fromCharCode;const e=/#/g,t=/&/g,n=/\//g,r=/=/g,i=/\+/g,a=/%5e/gi,o=/%60/gi,s=/%7c/gi,c=/%20/gi;function l(e){return encodeURI(``+e).replace(s,`|`)}function u(r){return l(typeof r==`string`?r:JSON.stringify(r)).replace(i,`%2B`).replace(c,`+`).replace(e,`%23`).replace(t,`%26`).replace(o,"`").replace(a,`^`).replace(n,`%2F`)}function d(e){return u(e).replace(r,`%3D`)}function f(e=``){try{return decodeURIComponent(``+e)}catch{return``+e}}function p(e){return f(e.replace(i,` `))}function m(e){return f(e.replace(i,` `))}function h(e=``){let t=Object.create(null);e[0]===`?`&&(e=e.slice(1));for(let n of e.split(`&`)){let e=n.match(/([^=]+)=?(.*)/)||[];if(e.length<2)continue;let r=p(e[1]);if(r===`__proto__`||r===`constructor`)continue;let i=m(e[2]||``);t[r]===void 0?t[r]=i:Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]}return t}function g(e,t){return(typeof t==`number`||typeof t==`boolean`)&&(t=String(t)),t?Array.isArray(t)?t.map(t=>`${d(e)}=${u(t)}`).join(`&`):`${d(e)}=${u(t)}`:d(e)}function _(e){return Object.keys(e).filter(t=>e[t]!==void 0).map(t=>g(t,e[t])).filter(Boolean).join(`&`)}const v=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,y=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,b=/^([/\\]\s*){2,}[^/\\]/,x=/\/$|\/\?|\/#/,S=/^\.?\//;function C(e){return[`./`,`../`].some(t=>e.startsWith(t))}function w(e,t={}){return typeof t==`boolean`&&(t={acceptRelative:t}),t.strict?v.test(e):y.test(e)||(t.acceptRelative?b.test(e):!1)}function T(e=``,t){return t?x.test(e):e.endsWith(`/`)}function E(e=``,t){if(!t)return(T(e)?e.slice(0,-1):e)||`/`;if(!T(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);i!==-1&&(n=e.slice(0,i),r=e.slice(i));let[a,...o]=n.split(`?`);return((a.endsWith(`/`)?a.slice(0,-1):a)||`/`)+(o.length>0?`?${o.join(`?`)}`:``)+r}function D(e=``,t){if(!t)return e.endsWith(`/`)?e:e+`/`;if(T(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);if(i!==-1&&(n=e.slice(0,i),r=e.slice(i),!n))return r;let[a,...o]=n.split(`?`);return a+`/`+(o.length>0?`?${o.join(`?`)}`:``)+r}function O(e=``){return e.startsWith(`/`)}function k(e=``){return(O(e)?e.slice(1):e)||`/`}function A(e=``){return O(e)?e:`/`+e}function j(e=``){return e.split(`://`).map(e=>e.replace(/\/{2,}/g,`/`)).join(`://`)}function M(e,t){if(P(t))return e;let n=E(t);if(!e.startsWith(n))return e;let r=e[n.length];if(r&&r!==`/`&&r!==`?`)return e;let i=e.slice(n.length);return i[0]===`/`?i:`/`+i}function N(e,t){let n=V(e);return n.search=_({...h(n.search),...t}),U(n)}function P(e){return!e||e===`/`}function F(e){return e&&e!==`/`}function I(e,...t){let n=e||``;for(let e of t.filter(e=>F(e)))if(n){let t=e.replace(S,``);n=D(n)+t}else n=e;return n}function L(...e){let t=/\/(?!\/)/,n=e.filter(Boolean),r=[],i=0;for(let e of n)if(!(!e||e===`/`)){for(let[n,a]of e.split(t).entries())if(!(!a||a===`.`)){if(a===`..`){if(r.length===1&&w(r[0]))continue;r.pop(),i--;continue}if(n===1&&r[r.length-1]?.endsWith(`:/`)){r[r.length-1]+=`/`+a;continue}r.push(a),i++}}let a=r.join(`/`);return i>=0?n[0]?.startsWith(`/`)&&!a.startsWith(`/`)?a=`/`+a:n[0]?.startsWith(`./`)&&!a.startsWith(`./`)&&(a=`./`+a):a=`../`.repeat(-1*i)+a,n[n.length-1]?.endsWith(`/`)&&!a.endsWith(`/`)&&(a+=`/`),a}function R(e){return z(e,``)}function z(e,t){let n=e.match(y);return n||=e.match(/^\/{2,}/),n?t+e.slice(n[0].length):t+e}const B=Symbol.for(`ufo:protocolRelative`);function V(e=``,t){let n=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(n){let[,e,t=``]=n;return{protocol:e.toLowerCase(),pathname:t,href:e+t,auth:``,host:``,search:``,hash:``}}if(!w(e,{acceptRelative:!0}))return t?V(t+e):H(e);let[,r=``,i,a=``]=e.replace(/\\/g,`/`).match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,o=``,s=``]=a.match(/([^#/?]*)(.*)?/)||[];r===`file:`&&(s=s.replace(/\/(?=[A-Za-z]:)/,``));let{pathname:c,search:l,hash:u}=H(s);return{protocol:r.toLowerCase(),auth:i?i.slice(0,Math.max(0,i.length-1)):``,host:o,pathname:c,search:l,hash:u,[B]:!r}}function H(e=``){let[t=``,n=``,r=``]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:n,hash:r}}function U(e){let t=e.pathname||``,n=e.search?(e.search.startsWith(`?`)?``:`?`)+e.search:``,r=e.hash||``,i=e.auth?e.auth+`@`:``,a=e.host||``;return(e.protocol||e[B]?(e.protocol||``)+`//`:``)+i+a+t+n+r}export{L as a,N as c,k as d,R as f,C as i,D as l,O as n,I as o,E as p,w as r,A as s,j as t,M as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./destr.mjs";function t(e){return!e||typeof e.then!=`function`?Promise.resolve(e):e}function n(e,...n){try{return t(e(...n))}catch(e){return Promise.reject(e)}}function r(e){let t=typeof e;return e===null||t!==`object`&&t!==`function`}function i(e){let t=Object.getPrototypeOf(e);return!t||t.isPrototypeOf(Object)}function a(e){if(r(e))return String(e);if(i(e)||Array.isArray(e))return JSON.stringify(e);if(typeof e.toJSON==`function`)return a(e.toJSON());throw Error(`[unstorage] Cannot stringify value!`)}const o=`base64:`;function s(e){return typeof e==`string`?e:o+u(e)}function c(e){return typeof e!=`string`||!e.startsWith(o)?e:l(e.slice(7))}function l(e){return globalThis.Buffer?Buffer.from(e,`base64`):Uint8Array.from(globalThis.atob(e),e=>e.codePointAt(0))}function u(e){return globalThis.Buffer?Buffer.from(e).toString(`base64`):globalThis.btoa(String.fromCodePoint(...e))}const d=[`has`,`hasItem`,`get`,`getItem`,`getItemRaw`,`set`,`setItem`,`setItemRaw`,`del`,`remove`,`removeItem`,`getMeta`,`setMeta`,`removeMeta`,`getKeys`,`clear`,`mount`,`unmount`];function f(e,t){if(t=h(t),!t)return e;let n={...e};for(let r of d)n[r]=(n=``,...i)=>e[r](t+n,...i);return n.getKeys=(n=``,...r)=>e.getKeys(t+n,...r).then(e=>e.map(e=>e.slice(t.length))),n.keys=n.getKeys,n.getItems=async(n,r)=>{let i=n.map(e=>typeof e==`string`?t+e:{...e,key:t+e.key});return(await e.getItems(i,r)).map(e=>({key:e.key.slice(t.length),value:e.value}))},n.setItems=async(n,r)=>{let i=n.map(e=>({key:t+e.key,value:e.value,options:e.options}));return e.setItems(i,r)},n}function p(e){return e&&e.split(`?`)[0]?.replace(/[/\\]/g,`:`).replace(/:+/g,`:`).replace(/^:|:$/g,``)||``}function m(...e){return p(e.join(`:`))}function h(e){return e=p(e),e?e+`:`:``}function g(e,t){if(t===void 0)return!0;let n=0,r=e.indexOf(`:`);for(;r>-1;)n++,r=e.indexOf(`:`,r+1);return n<=t}function _(e,t){return t?e.startsWith(t)&&e[e.length-1]!==`$`:e[e.length-1]!==`$`}function v(e){return e}const y=v(()=>{let e=new Map;return{name:`memory`,getInstance:()=>e,hasItem(t){return e.has(t)},getItem(t){return e.get(t)??null},getItemRaw(t){return e.get(t)??null},setItem(t,n){e.set(t,n)},setItemRaw(t,n){e.set(t,n)},removeItem(t){e.delete(t)},getKeys(){return[...e.keys()]},clear(){e.clear()},dispose(){e.clear()}}});function b(t={}){let r={mounts:{"":t.driver||y()},mountpoints:[``],watching:!1,watchListeners:[],unwatch:{}},i=e=>{for(let t of r.mountpoints)if(e.startsWith(t))return{base:t,relativeKey:e.slice(t.length),driver:r.mounts[t]};return{base:``,relativeKey:e,driver:r.mounts[``]}},o=(e,t)=>r.mountpoints.filter(n=>n.startsWith(e)||t&&e.startsWith(n)).map(t=>({relativeBase:e.length>t.length?e.slice(t.length):void 0,mountpoint:t,driver:r.mounts[t]})),l=(e,t)=>{if(r.watching){t=p(t);for(let n of r.watchListeners)n(e,t)}},u=async()=>{if(!r.watching){r.watching=!0;for(let e in r.mounts)r.unwatch[e]=await x(r.mounts[e],l,e)}},d=async()=>{if(r.watching){for(let e in r.unwatch)await r.unwatch[e]();r.unwatch={},r.watching=!1}},f=(e,t,n)=>{let r=new Map,a=e=>{let t=r.get(e.base);return t||(t={driver:e.driver,base:e.base,items:[]},r.set(e.base,t)),t};for(let n of e){let e=typeof n==`string`,r=p(e?n:n.key),o=e?void 0:n.value,s=e||!n.options?t:{...t,...n.options},c=i(r);a(c).items.push({key:r,value:o,relativeKey:c.relativeKey,options:s})}return Promise.all([...r.values()].map(e=>n(e))).then(e=>e.flat())},v={hasItem(e,t={}){e=p(e);let{relativeKey:r,driver:a}=i(e);return n(a.hasItem,r,t)},getItem(t,r={}){t=p(t);let{relativeKey:a,driver:o}=i(t);return n(o.getItem,a,r).then(t=>e(t))},getItems(t,r={}){return f(t,r,t=>t.driver.getItems?n(t.driver.getItems,t.items.map(e=>({key:e.relativeKey,options:e.options})),r).then(n=>n.map(n=>({key:m(t.base,n.key),value:e(n.value)}))):Promise.all(t.items.map(r=>n(t.driver.getItem,r.relativeKey,r.options).then(t=>({key:r.key,value:e(t)})))))},getItemRaw(e,t={}){e=p(e);let{relativeKey:r,driver:a}=i(e);return a.getItemRaw?n(a.getItemRaw,r,t):n(a.getItem,r,t).then(e=>c(e))},async setItem(e,t,r={}){if(t===void 0)return v.removeItem(e);e=p(e);let{relativeKey:o,driver:s}=i(e);s.setItem&&(await n(s.setItem,o,a(t),r),s.watch||l(`update`,e))},async setItems(e,t){await f(e,t,async e=>{if(e.driver.setItems)return n(e.driver.setItems,e.items.map(e=>({key:e.relativeKey,value:a(e.value),options:e.options})),t);e.driver.setItem&&await Promise.all(e.items.map(t=>n(e.driver.setItem,t.relativeKey,a(t.value),t.options)))})},async setItemRaw(e,t,r={}){if(t===void 0)return v.removeItem(e,r);e=p(e);let{relativeKey:a,driver:o}=i(e);if(o.setItemRaw)await n(o.setItemRaw,a,t,r);else if(o.setItem)await n(o.setItem,a,s(t),r);else return;o.watch||l(`update`,e)},async removeItem(e,t={}){typeof t==`boolean`&&(t={removeMeta:t}),e=p(e);let{relativeKey:r,driver:a}=i(e);a.removeItem&&(await n(a.removeItem,r,t),(t.removeMeta||t.removeMata)&&await n(a.removeItem,r+`$`,t),a.watch||l(`remove`,e))},async getMeta(t,r={}){typeof r==`boolean`&&(r={nativeOnly:r}),t=p(t);let{relativeKey:a,driver:o}=i(t),s=Object.create(null);if(o.getMeta&&Object.assign(s,await n(o.getMeta,a,r)),!r.nativeOnly){let t=await n(o.getItem,a+`$`,r).then(t=>e(t));t&&typeof t==`object`&&(typeof t.atime==`string`&&(t.atime=new Date(t.atime)),typeof t.mtime==`string`&&(t.mtime=new Date(t.mtime)),Object.assign(s,t))}return s},setMeta(e,t,n={}){return this.setItem(e+`$`,t,n)},removeMeta(e,t={}){return this.removeItem(e+`$`,t)},async getKeys(e,t={}){e=h(e);let r=o(e,!0),i=[],a=[],s=!0;for(let e of r){e.driver.flags?.maxDepth||(s=!1);let r=await n(e.driver.getKeys,e.relativeBase,t);for(let t of r){let n=e.mountpoint+p(t);i.some(e=>n.startsWith(e))||a.push(n)}i=[e.mountpoint,...i.filter(t=>!t.startsWith(e.mountpoint))]}let c=t.maxDepth!==void 0&&!s;return a.filter(n=>(!c||g(n,t.maxDepth))&&_(n,e))},async clear(e,t={}){e=h(e),await Promise.all(o(e,!1).map(async e=>{if(e.driver.clear)return n(e.driver.clear,e.relativeBase,t);if(e.driver.removeItem){let n=await e.driver.getKeys(e.relativeBase||``,t);return Promise.all(n.map(n=>e.driver.removeItem(n,t)))}}))},async dispose(){await Promise.all(Object.values(r.mounts).map(e=>S(e)))},async watch(e){return await u(),r.watchListeners.push(e),async()=>{r.watchListeners=r.watchListeners.filter(t=>t!==e),r.watchListeners.length===0&&await d()}},async unwatch(){r.watchListeners=[],await d()},mount(e,t){if(e=h(e),e&&r.mounts[e])throw Error(`already mounted at ${e}`);return e&&(r.mountpoints.push(e),r.mountpoints.sort((e,t)=>t.length-e.length)),r.mounts[e]=t,r.watching&&Promise.resolve(x(t,l,e)).then(t=>{r.unwatch[e]=t}).catch(console.error),v},async unmount(e,t=!0){e=h(e),!(!e||!r.mounts[e])&&(r.watching&&e in r.unwatch&&(r.unwatch[e]?.(),delete r.unwatch[e]),t&&await S(r.mounts[e]),r.mountpoints=r.mountpoints.filter(t=>t!==e),delete r.mounts[e])},getMount(e=``){e=p(e)+`:`;let t=i(e);return{driver:t.driver,base:t.base}},getMounts(e=``,t={}){return e=p(e),o(e,t.parents).map(e=>({driver:e.driver,base:e.mountpoint}))},keys:(e,t={})=>v.getKeys(e,t),get:(e,t={})=>v.getItem(e,t),set:(e,t,n={})=>v.setItem(e,t,n),has:(e,t={})=>v.hasItem(e,t),del:(e,t={})=>v.removeItem(e,t),remove:(e,t={})=>v.removeItem(e,t)};return v}function x(e,t,n){return e.watch?e.watch((e,r)=>t(e,n+r)):()=>{}}async function S(e){typeof e.dispose==`function`&&await n(e.dispose)}export{f as n,b as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,o as t,t as n}from"../rolldown-runtime.mjs";import{n as r,t as i}from"./isexe.mjs";var a=n(((n,a)=>{let{isexe:o,sync:s}=(i(),t(r)),{join:c,delimiter:l,sep:u,posix:d}=e(`path`),f=process.platform===`win32`,p=new RegExp(`[${d.sep}${u===d.sep?``:u}]`.replace(/(\\)/g,`\\$1`)),m=RegExp(`^\\.${p.source}`),h=e=>Object.assign(Error(`not found: ${e}`),{code:`ENOENT`}),g=(e,{path:t=process.env.PATH,pathExt:n=process.env.PATHEXT,delimiter:r=l})=>{let i=e.match(p)?[``]:[...f?[process.cwd()]:[],...(t||``).split(r)];if(f){let t=n||[`.EXE`,`.CMD`,`.BAT`,`.COM`].join(r),a=t.split(r).flatMap(e=>[e,e.toLowerCase()]);return e.includes(`.`)&&a[0]!==``&&a.unshift(``),{pathEnv:i,pathExt:a,pathExtExe:t}}return{pathEnv:i,pathExt:[``]}},_=(e,t)=>{let n=/^".*"$/.test(e)?e.slice(1,-1):e;return(!n&&m.test(t)?t.slice(0,2):``)+c(n,t)},v=async(e,t={})=>{let{pathEnv:n,pathExt:r,pathExtExe:i}=g(e,t),a=[];for(let s of n){let n=_(s,e);for(let e of r){let r=n+e;if(await o(r,{pathExt:i,ignoreErrors:!0})){if(!t.all)return r;a.push(r)}}}if(t.all&&a.length)return a;if(t.nothrow)return null;throw h(e)},y=(e,t={})=>{let{pathEnv:n,pathExt:r,pathExtExe:i}=g(e,t),a=[];for(let o of n){let n=_(o,e);for(let e of r){let r=n+e;if(s(r,{pathExt:i,ignoreErrors:!0})){if(!t.all)return r;a.push(r)}}}if(t.all&&a.length)return a;if(t.nothrow)return null;throw h(e)};a.exports=v,v.sync=y}));export{a as t};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{t as e}from"../rolldown-runtime.mjs";var t=e(((e,t)=>{
|
|
2
|
-
/*!
|
|
3
|
-
* word-wrap <https://github.com/jonschlinkert/word-wrap>
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) 2014-2023, Jon Schlinkert.
|
|
6
|
-
* Released under the MIT License.
|
|
7
|
-
*/
|
|
8
|
-
function n(e){let t=e.length-1,n=e[t];for(;n===` `||n===` `;)n=e[--t];return e.substring(0,t+1)}function r(e){return e.split(`
|
|
9
|
-
`).map(e=>n(e)).join(`
|
|
10
|
-
`)}t.exports=function(e,t){if(t||={},e==null)return e;var n=t.width||50,a=typeof t.indent==`string`?t.indent:` `,o=t.newline||`
|
|
11
|
-
`+a,s=typeof t.escape==`function`?t.escape:i,c=`.{1,`+n+`}`;t.cut!==!0&&(c+=`([\\s]+|$)|[^\\s]+?([\\s]+|$)`);var l=new RegExp(c,`g`),u=a+(e.match(l)||[]).map(function(e){return e.slice(-1)===`
|
|
12
|
-
`&&(e=e.slice(0,e.length-1)),s(e)}).join(o);return t.trim===!0&&(u=r(u)),u};function i(e){return e}}));export{t};
|