prismic 1.2.1 → 1.3.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/dist/{builders-hKD4IrLX-cdTCGdwG.mjs → builders-hKD4IrLX-CiOmsZQP.mjs} +1 -1
- package/dist/index.mjs +119 -58
- package/dist/nextjs-c8JOjFCt.mjs +413 -0
- package/dist/nuxt-BhwnOusi.mjs +90 -0
- package/dist/string-CFNpwnbk.mjs +7 -0
- package/dist/sveltekit-BW5_-HtZ.mjs +263 -0
- package/package.json +1 -1
- package/src/adapters/index.ts +6 -0
- package/src/adapters/nextjs.templates.ts +170 -38
- package/src/adapters/nextjs.ts +33 -3
- package/src/adapters/nuxt.templates.ts +48 -0
- package/src/adapters/nuxt.ts +42 -20
- package/src/adapters/sveltekit.templates.ts +92 -35
- package/src/adapters/sveltekit.ts +38 -3
- package/src/auth.ts +1 -2
- package/src/clients/locale.ts +64 -0
- package/src/clients/user.ts +1 -0
- package/src/clients/wroom.ts +212 -0
- package/src/commands/gen-setup.ts +38 -0
- package/src/commands/gen-types.ts +35 -0
- package/src/commands/gen.ts +18 -0
- package/src/commands/init.ts +7 -1
- package/src/commands/locale-add.ts +47 -0
- package/src/commands/locale-list.ts +43 -0
- package/src/commands/locale-remove.ts +45 -0
- package/src/commands/locale-set-master.ts +61 -0
- package/src/commands/locale.ts +28 -0
- package/src/commands/repo-create.ts +60 -0
- package/src/commands/repo-list.ts +58 -0
- package/src/commands/repo-set-api-access.ts +53 -0
- package/src/commands/repo-set-name.ts +46 -0
- package/src/commands/repo-view.ts +74 -0
- package/src/commands/repo.ts +33 -0
- package/src/commands/sync.ts +4 -2
- package/src/commands/token-create.ts +55 -0
- package/src/commands/token-delete.ts +61 -0
- package/src/commands/token-list.ts +67 -0
- package/src/commands/token.ts +23 -0
- package/src/config.ts +53 -0
- package/src/env.ts +2 -0
- package/src/index.ts +20 -0
- package/src/lib/codegen.ts +6 -5
- package/src/lib/url.ts +7 -0
- package/dist/nextjs-DrbOdw3q.mjs +0 -318
- package/dist/nuxt-DO5Kp4yy.mjs +0 -59
- package/dist/string-CnZrLYLV.mjs +0 -7
- package/dist/sveltekit-KHG7YUoX.mjs +0 -236
package/dist/nuxt-DO5Kp4yy.mjs
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import{C as e,T as t,_ as n,a as r,b as i,h as a,n as o,o as s,t as c,v as l,w as u,z as d}from"./string-CnZrLYLV.mjs";import{n as f,r as p,t as m}from"./builders-hKD4IrLX-cdTCGdwG.mjs";import{readFile as h,rm as g}from"node:fs/promises";import{fileURLToPath as _}from"node:url";import{relative as v}from"node:path";function y(e){let{name:t,typescript:n}=e,r=d(t);return n?c`
|
|
2
|
-
<script setup lang="ts">
|
|
3
|
-
import type { Content } from "@prismicio/client";
|
|
4
|
-
|
|
5
|
-
// The array passed to \`getSliceComponentProps\` is purely optional.
|
|
6
|
-
// Consider it as a visual hint for you when templating your slice.
|
|
7
|
-
defineProps(getSliceComponentProps<Content.${r}Slice>(
|
|
8
|
-
["slice", "index", "slices", "context"]
|
|
9
|
-
));
|
|
10
|
-
<\/script>
|
|
11
|
-
|
|
12
|
-
<template>
|
|
13
|
-
<section
|
|
14
|
-
:data-slice-type="slice.slice_type"
|
|
15
|
-
:data-slice-variation="slice.variation"
|
|
16
|
-
>
|
|
17
|
-
Placeholder component for {{ slice.slice_type }} (variation: {{ slice.variation }}) slices.
|
|
18
|
-
<br />
|
|
19
|
-
<strong>You can edit this slice directly in your code editor.</strong>
|
|
20
|
-
</section>
|
|
21
|
-
</template>
|
|
22
|
-
`:c`
|
|
23
|
-
<script setup>
|
|
24
|
-
// The array passed to \`getSliceComponentProps\` is purely optional.
|
|
25
|
-
// Consider it as a visual hint for you when templating your slice.
|
|
26
|
-
defineProps(getSliceComponentProps(["slice", "index", "slices", "context"]));
|
|
27
|
-
<\/script>
|
|
28
|
-
|
|
29
|
-
<template>
|
|
30
|
-
<section
|
|
31
|
-
:data-slice-type="slice.slice_type"
|
|
32
|
-
:data-slice-variation="slice.variation"
|
|
33
|
-
>
|
|
34
|
-
Placeholder component for {{ slice.slice_type }} (variation: {{ slice.variation }}) slices.
|
|
35
|
-
<br />
|
|
36
|
-
<strong>You can edit this slice directly in your code editor.</strong>
|
|
37
|
-
</section>
|
|
38
|
-
</template>
|
|
39
|
-
`}function b(e){let{typescript:t}=e,n=[`setup`];return t&&n.push(`lang="ts"`),c`
|
|
40
|
-
<script ${n.join(` `)}>
|
|
41
|
-
import { components } from "~/slices";
|
|
42
|
-
<\/script>
|
|
43
|
-
|
|
44
|
-
<template>
|
|
45
|
-
<SliceSimulator #default="{ slices }">
|
|
46
|
-
<SliceZone :slices="slices" :components="components" />
|
|
47
|
-
</SliceSimulator>
|
|
48
|
-
</template>
|
|
49
|
-
`}const x=`@nuxtjs/prismic`;var S=class extends o{id=`nuxt`;async onProjectInitialized(){await l({"@prismicio/client":`^${await i(`@prismicio/client`)}`,[x]:`^${await i(x)}`}),await w(),await T(),await E(),await D(this)}async onSliceCreated(e,n){let i=d(e.name),a=new URL(i,t(n));await u(new URL(`index.vue`,t(a)),y({name:e.name,typescript:await r()}))}onSliceUpdated(){}onSliceDeleted(){}onCustomTypeCreated(){}onCustomTypeUpdated(){}onCustomTypeDeleted(){}async createSliceIndexFile(e){let t=c`
|
|
50
|
-
// Code generated by Prismic. DO NOT EDIT.
|
|
51
|
-
|
|
52
|
-
import { defineAsyncComponent } from "vue";
|
|
53
|
-
import { defineSliceZoneComponents } from "@prismicio/vue";
|
|
54
|
-
|
|
55
|
-
export const components = defineSliceZoneComponents({
|
|
56
|
-
${(await this.getSlices()).filter(t=>t.library.href===e.href).map(t=>{let n=v(_(e),_(t.directory));return`${t.model.id}: defineAsyncComponent(() => import("./${n}/index.vue"))`}).join(`,
|
|
57
|
-
`)}
|
|
58
|
-
});
|
|
59
|
-
`,n=`index.${await O()}`;await u(new URL(n,e),t)}async getDefaultSliceLibrary(){let e=await C();return new URL(`slices/`,e)}};async function C(){let t=await s(),n=new URL(`app/`,t);if(await e(n))return n;let r=new URL(`src/`,t);return await e(r)?r:t}async function w(){let t=await s(),n=new URL(`nuxt.config.js`,t);if(await e(n)||(n=new URL(`nuxt.config.ts`,t)),!await e(n))return;let r=_(n),i=await f(r),a=i.exports.default.$type===`function-call`?i.exports.default.$args[0]:i.exports.default,o=!1;(a.modules||[]).find(e=>typeof e==`string`?e===x:Array.isArray(e)?(o=!!e[1],e[0]===x):!1)||(a.modules||=[],a.modules.push(x)),o||(i.imports.$prepend({from:`./prismic.config.json`,imported:`repositoryName`}),a.prismic||={},a.prismic.endpoint=m.raw(`repositoryName`)),await p(i,r)}async function T(){let t=await s(),n=await r(),i=new URL(`app/pages/`,t),a=new URL(`src/pages/`,t),o=new URL(`pages/`,t),c;c=await e(i)?i:await e(a)?a:await e(o)?o:new URL(`pages/`,await C());let l=new URL(`slice-simulator.vue`,c);await e(l)||await u(l,b({typescript:n}))}async function E(){let t=await C(),n=new URL(`app.vue`,t);if(!await e(n))return;let r=await h(n,`utf8`);if(!r.includes(`<NuxtWelcome`))return;let i=new URL(`pages/index.vue`,t);await e(i)||await u(i,r),await g(n)}async function D(t){let r=await s(),i=await e(new URL(`app/`,r)),o=await e(new URL(`src/`,r));if(!i&&!o)return;let c;try{c=await a()}catch{return}let l=c.libraries;!l||JSON.stringify(l)!==JSON.stringify([`./slices`])||(await t.getSlices()).length>0||await n({libraries:[i?`./app/slices`:`./src/slices`]})}async function O(){return await r()?`ts`:`js`}export{S as NuxtAdapter};
|
package/dist/string-CnZrLYLV.mjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{createRequire as e}from"node:module";import{access as t,mkdir as n,readFile as r,rm as i,writeFile as a}from"node:fs/promises";import{fileURLToPath as o,pathToFileURL as s}from"node:url";import*as c from"fs";import l from"fs";import u,{basename as d,dirname as f,normalize as p,posix as m,relative as h,resolve as g,sep as ee}from"path";import{fileURLToPath as _}from"url";import{createRequire as v}from"module";import{spawn as y}from"node:child_process";import{delimiter as te,dirname as b,normalize as x,resolve as S}from"node:path";import{cwd as C}from"node:process";import{PassThrough as w}from"node:stream";import T from"node:readline";var E=Object.create,D=Object.defineProperty,ne=Object.getOwnPropertyDescriptor,re=Object.getOwnPropertyNames,O=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty,ie=(e,t)=>()=>(e&&(t=e(e=0)),t),A=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),j=(e,t)=>{let n={};for(var r in e)D(n,r,{get:e[r],enumerable:!0});return t&&D(n,Symbol.toStringTag,{value:`Module`}),n},M=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=re(t),a=0,o=i.length,s;a<o;a++)s=i[a],!k.call(e,s)&&s!==n&&D(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=ne(t,s))||r.enumerable});return e},N=(e,t,n)=>(n=e==null?{}:E(O(e)),M(t||!e||!e.__esModule?D(n,`default`,{value:e,enumerable:!0}):n,e)),P=e=>k.call(e,`module.exports`)?e[`module.exports`]:M(D({},`__esModule`,{value:!0}),e),F=e(import.meta.url);const I=/([\p{Ll}\d])(\p{Lu})/gu,L=/(\p{Lu})([\p{Lu}][\p{Ll}])/gu,R=/(\d)\p{Ll}|(\p{L})\d/u,z=/[^\p{L}\d]+/giu,B=`$1\0$2`;function V(e){let t=e.trim();t=t.replace(I,B).replace(L,B),t=t.replace(z,`\0`);let n=0,r=t.length;for(;t.charAt(n)===`\0`;)n++;if(n===r)return[];for(;t.charAt(r-1)===`\0`;)r--;return t.slice(n,r).split(/\0/g)}function H(e){let t=V(e);for(let e=0;e<t.length;e++){let n=t[e],r=R.exec(n);if(r){let i=r.index+(r[1]??r[2]).length;t.splice(e,1,n.slice(0,i),n.slice(i))}}return t}function ae(e,t){let[n,r,i]=se(e,t),a=U(t?.locale),o=W(t?.locale),s=t?.mergeAmbiguousCharacters?G(a,o):oe(a,o);return n+r.map(s).join(t?.delimiter??``)+i}function U(e){return e===!1?e=>e.toLowerCase():t=>t.toLocaleLowerCase(e)}function W(e){return e===!1?e=>e.toUpperCase():t=>t.toLocaleUpperCase(e)}function G(e,t){return n=>`${t(n[0])}${e(n.slice(1))}`}function oe(e,t){return(n,r)=>{let i=n[0];return(r>0&&i>=`0`&&i<=`9`?`_`+i:t(i))+e(n.slice(1))}}function se(e,t={}){let n=t.split??(t.separateNumbers?H:V),r=t.prefixCharacters??``,i=t.suffixCharacters??``,a=0,o=e.length;for(;a<e.length;){let t=e.charAt(a);if(!r.includes(t))break;a++}for(;o>a;){let t=o-1,n=e.charAt(t);if(!i.includes(n))break;o=t}return[e.slice(0,a),n(e.slice(a,o)),e.slice(o)]}var ce=v(import.meta.url);function le(e){let t=p(e);return t.length>1&&t[t.length-1]===ee&&(t=t.substring(0,t.length-1)),t}const ue=/[\\/]/g;function de(e,t){return e.replace(ue,t)}const fe=/^[a-z]:[\\/]$/i;function pe(e){return e===`/`||fe.test(e)}function me(e,t){let{resolvePaths:n,normalizePath:r,pathSeparator:i}=t,a=process.platform===`win32`&&e.includes(`/`)||e.startsWith(`.`);return n&&(e=g(e)),(r||a)&&(e=le(e)),e===`.`?``:de(e[e.length-1]===i?e:e+i,i)}function he(e,t){return t+e}function ge(e,t){return function(n,r){return r.startsWith(e)?r.slice(e.length)+n:de(h(e,r),t.pathSeparator)+t.pathSeparator+n}}function _e(e){return e}function ve(e,t,n){return t+e+n}function ye(e,t){let{relativePaths:n,includeBasePath:r}=t;return n&&e?ge(e,t):r?he:_e}function be(e){return function(t,n){n.push(t.substring(e.length)||`.`)}}function xe(e){return function(t,n,r){let i=t.substring(e.length)||`.`;r.every(e=>e(i,!0))&&n.push(i)}}const Se=(e,t)=>{t.push(e||`.`)},Ce=(e,t,n)=>{let r=e||`.`;n.every(e=>e(r,!0))&&t.push(r)},we=()=>{};function Te(e,t){let{includeDirs:n,filters:r,relativePaths:i}=t;return n?i?r&&r.length?xe(e):be(e):r&&r.length?Ce:Se:we}const Ee=(e,t,n,r)=>{r.every(t=>t(e,!1))&&n.files++},De=(e,t,n,r)=>{r.every(t=>t(e,!1))&&t.push(e)},Oe=(e,t,n,r)=>{n.files++},ke=(e,t)=>{t.push(e)},Ae=()=>{};function je(e){let{excludeFiles:t,filters:n,onlyCounts:r}=e;return t?Ae:n&&n.length?r?Ee:De:r?Oe:ke}const Me=e=>e,Ne=()=>[``].slice(0,0);function Pe(e){return e.group?Ne:Me}const Fe=(e,t,n)=>{e.push({directory:t,files:n,dir:t})},Ie=()=>{};function Le(e){return e.group?Fe:Ie}const Re=function(e,t,n){let{queue:r,fs:i,options:{suppressErrors:a}}=t;r.enqueue(),i.realpath(e,(o,s)=>{if(o)return r.dequeue(a?null:o,t);i.stat(s,(i,o)=>{if(i)return r.dequeue(a?null:i,t);if(o.isDirectory()&&Ve(e,s,t))return r.dequeue(null,t);n(o,s),r.dequeue(null,t)})})},ze=function(e,t,n){let{queue:r,fs:i,options:{suppressErrors:a}}=t;r.enqueue();try{let r=i.realpathSync(e),a=i.statSync(r);if(a.isDirectory()&&Ve(e,r,t))return;n(a,r)}catch(e){if(!a)throw e}};function Be(e,t){return!e.resolveSymlinks||e.excludeSymlinks?null:t?ze:Re}function Ve(e,t,n){if(n.options.useRealPaths)return He(t,n);let r=f(e),i=1;for(;r!==n.root&&i<2;){let e=n.symlinks.get(r);e&&(e===t||e.startsWith(t)||t.startsWith(e))?i++:r=f(r)}return n.symlinks.set(e,t),i>1}function He(e,t){return t.visited.includes(e+t.options.pathSeparator)}const Ue=e=>e.counts,We=e=>e.groups,Ge=e=>e.paths,Ke=e=>e.paths.slice(0,e.options.maxFiles),qe=(e,t,n)=>(Ze(t,n,e.counts,e.options.suppressErrors),null),Je=(e,t,n)=>(Ze(t,n,e.paths,e.options.suppressErrors),null),Ye=(e,t,n)=>(Ze(t,n,e.paths.slice(0,e.options.maxFiles),e.options.suppressErrors),null),Xe=(e,t,n)=>(Ze(t,n,e.groups,e.options.suppressErrors),null);function Ze(e,t,n,r){t(e&&!r?e:null,n)}function Qe(e,t){let{onlyCounts:n,group:r,maxFiles:i}=e;return n?t?Ue:qe:r?t?We:Xe:i?t?Ke:Ye:t?Ge:Je}const $e={withFileTypes:!0},et=(e,t,n,r,i)=>{if(e.queue.enqueue(),r<0)return e.queue.dequeue(null,e);let{fs:a}=e;e.visited.push(t),e.counts.directories++,a.readdir(t||`.`,$e,(t,a=[])=>{i(a,n,r),e.queue.dequeue(e.options.suppressErrors?null:t,e)})},tt=(e,t,n,r,i)=>{let{fs:a}=e;if(r<0)return;e.visited.push(t),e.counts.directories++;let o=[];try{o=a.readdirSync(t||`.`,$e)}catch(t){if(!e.options.suppressErrors)throw t}i(o,n,r)};function nt(e){return e?tt:et}var rt=class{count=0;constructor(e){this.onQueueEmpty=e}enqueue(){return this.count++,this.count}dequeue(e,t){this.onQueueEmpty&&(--this.count<=0||e)&&(this.onQueueEmpty(e,t),e&&(t.controller.abort(),this.onQueueEmpty=void 0))}},it=class{_files=0;_directories=0;set files(e){this._files=e}get files(){return this._files}set directories(e){this._directories=e}get directories(){return this._directories}get dirs(){return this._directories}},at=class{aborted=!1;abort(){this.aborted=!0}},ot=class{root;isSynchronous;state;joinPath;pushDirectory;pushFile;getArray;groupFiles;resolveSymlink;walkDirectory;callbackInvoker;constructor(e,t,n){this.isSynchronous=!n,this.callbackInvoker=Qe(t,this.isSynchronous),this.root=me(e,t),this.state={root:pe(this.root)?this.root:this.root.slice(0,-1),paths:[``].slice(0,0),groups:[],counts:new it,options:t,queue:new rt((e,t)=>this.callbackInvoker(t,e,n)),symlinks:new Map,visited:[``].slice(0,0),controller:new at,fs:t.fs||c},this.joinPath=ye(this.root,t),this.pushDirectory=Te(this.root,t),this.pushFile=je(t),this.getArray=Pe(t),this.groupFiles=Le(t),this.resolveSymlink=Be(t,this.isSynchronous),this.walkDirectory=nt(this.isSynchronous)}start(){return this.pushDirectory(this.root,this.state.paths,this.state.options.filters),this.walkDirectory(this.state,this.root,this.root,this.state.options.maxDepth,this.walk),this.isSynchronous?this.callbackInvoker(this.state,null):null}walk=(e,t,n)=>{let{paths:r,options:{filters:i,resolveSymlinks:a,excludeSymlinks:o,exclude:s,maxFiles:c,signal:l,useRealPaths:u,pathSeparator:p},controller:m}=this.state;if(m.aborted||l&&l.aborted||c&&r.length>c)return;let h=this.getArray(this.state.paths);for(let c=0;c<e.length;++c){let l=e[c];if(l.isFile()||l.isSymbolicLink()&&!a&&!o){let e=this.joinPath(l.name,t);this.pushFile(e,h,this.state.counts,i)}else if(l.isDirectory()){let e=ve(l.name,t,this.state.options.pathSeparator);if(s&&s(l.name,e))continue;this.pushDirectory(e,r,i),this.walkDirectory(this.state,e,e,n-1,this.walk)}else if(this.resolveSymlink&&l.isSymbolicLink()){let e=he(l.name,t);this.resolveSymlink(e,this.state,(t,r)=>{if(t.isDirectory()){if(r=me(r,this.state.options),s&&s(l.name,u?r:e+p))return;this.walkDirectory(this.state,r,u?r:e+p,n-1,this.walk)}else{r=u?r:e;let t=d(r),n=me(f(r),this.state.options);r=this.joinPath(t,n),this.pushFile(r,h,this.state.counts,i)}})}}this.groupFiles(this.state.groups,t,h)}};function st(e,t){return new Promise((n,r)=>{ct(e,t,(e,t)=>{if(e)return r(e);n(t)})})}function ct(e,t,n){new ot(e,t,n).start()}function lt(e,t){return new ot(e,t).start()}var ut=class{constructor(e,t){this.root=e,this.options=t}withPromise(){return st(this.root,this.options)}withCallback(e){ct(this.root,this.options,e)}sync(){return lt(this.root,this.options)}};let dt=null;try{ce.resolve(`picomatch`),dt=ce(`picomatch`)}catch{}var ft=class{globCache={};options={maxDepth:1/0,suppressErrors:!0,pathSeparator:ee,filters:[]};globFunction;constructor(e){this.options={...this.options,...e},this.globFunction=this.options.globFunction}group(){return this.options.group=!0,this}withPathSeparator(e){return this.options.pathSeparator=e,this}withBasePath(){return this.options.includeBasePath=!0,this}withRelativePaths(){return this.options.relativePaths=!0,this}withDirs(){return this.options.includeDirs=!0,this}withMaxDepth(e){return this.options.maxDepth=e,this}withMaxFiles(e){return this.options.maxFiles=e,this}withFullPaths(){return this.options.resolvePaths=!0,this.options.includeBasePath=!0,this}withErrors(){return this.options.suppressErrors=!1,this}withSymlinks({resolvePaths:e=!0}={}){return this.options.resolveSymlinks=!0,this.options.useRealPaths=e,this.withFullPaths()}withAbortSignal(e){return this.options.signal=e,this}normalize(){return this.options.normalizePath=!0,this}filter(e){return this.options.filters.push(e),this}onlyDirs(){return this.options.excludeFiles=!0,this.options.includeDirs=!0,this}exclude(e){return this.options.exclude=e,this}onlyCounts(){return this.options.onlyCounts=!0,this}crawl(e){return new ut(e||`.`,this.options)}withGlobFunction(e){return this.globFunction=e,this}crawlWithOptions(e,t){return this.options={...this.options,...t},new ut(e||`.`,this.options)}glob(...e){return this.globFunction?this.globWithOptions(e):this.globWithOptions(e,{dot:!0})}globWithOptions(e,...t){let n=this.globFunction||dt;if(!n)throw Error(`Please specify a glob function to use glob matching.`);var r=this.globCache[e.join(`\0`)];return r||(r=n(e,...t),this.globCache[e.join(`\0`)]=r),this.options.filters.push(e=>r(e)),this}},pt=A(((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={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:{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}}})),mt=A((e=>{let{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=pt();e.isObject=e=>typeof e==`object`&&!!e&&!Array.isArray(e),e.hasRegexChars=e=>r.test(e),e.isRegexChar=t=>t.length===1&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(i,`\\$1`),e.toPosixSlashes=e=>e.replace(t,`/`),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(n,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}})),ht=A(((e,t)=>{let n=mt(),{CHAR_ASTERISK:r,CHAR_AT:i,CHAR_BACKWARD_SLASH:a,CHAR_COMMA:o,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:c,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:u,CHAR_LEFT_PARENTHESES:d,CHAR_LEFT_SQUARE_BRACKET:f,CHAR_PLUS:p,CHAR_QUESTION_MARK:m,CHAR_RIGHT_CURLY_BRACE:h,CHAR_RIGHT_PARENTHESES:g,CHAR_RIGHT_SQUARE_BRACKET:ee}=pt(),_=e=>e===l||e===a,v=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)};t.exports=(e,t)=>{let y=t||{},te=e.length-1,b=y.parts===!0||y.scanToEnd===!0,x=[],S=[],C=[],w=e,T=-1,E=0,D=0,ne=!1,re=!1,O=!1,k=!1,ie=!1,A=!1,j=!1,M=!1,N=!1,P=!1,F=0,I,L,R={value:``,depth:0,isGlob:!1},z=()=>T>=te,B=()=>w.charCodeAt(T+1),V=()=>(I=L,w.charCodeAt(++T));for(;T<te;){L=V();let e;if(L===a){j=R.backslashes=!0,L=V(),L===u&&(A=!0);continue}if(A===!0||L===u){for(F++;z()!==!0&&(L=V());){if(L===a){j=R.backslashes=!0,V();continue}if(L===u){F++;continue}if(A!==!0&&L===s&&(L=V())===s){if(ne=R.isBrace=!0,O=R.isGlob=!0,P=!0,b===!0)continue;break}if(A!==!0&&L===o){if(ne=R.isBrace=!0,O=R.isGlob=!0,P=!0,b===!0)continue;break}if(L===h&&(F--,F===0)){A=!1,ne=R.isBrace=!0,P=!0;break}}if(b===!0)continue;break}if(L===l){if(x.push(T),S.push(R),R={value:``,depth:0,isGlob:!1},P===!0)continue;if(I===s&&T===E+1){E+=2;continue}D=T+1;continue}if(y.noext!==!0&&(L===p||L===i||L===r||L===m||L===c)&&B()===d){if(O=R.isGlob=!0,k=R.isExtglob=!0,P=!0,L===c&&T===E&&(N=!0),b===!0){for(;z()!==!0&&(L=V());){if(L===a){j=R.backslashes=!0,L=V();continue}if(L===g){O=R.isGlob=!0,P=!0;break}}continue}break}if(L===r){if(I===r&&(ie=R.isGlobstar=!0),O=R.isGlob=!0,P=!0,b===!0)continue;break}if(L===m){if(O=R.isGlob=!0,P=!0,b===!0)continue;break}if(L===f){for(;z()!==!0&&(e=V());){if(e===a){j=R.backslashes=!0,V();continue}if(e===ee){re=R.isBracket=!0,O=R.isGlob=!0,P=!0;break}}if(b===!0)continue;break}if(y.nonegate!==!0&&L===c&&T===E){M=R.negated=!0,E++;continue}if(y.noparen!==!0&&L===d){if(O=R.isGlob=!0,b===!0){for(;z()!==!0&&(L=V());){if(L===d){j=R.backslashes=!0,L=V();continue}if(L===g){P=!0;break}}continue}break}if(O===!0){if(P=!0,b===!0)continue;break}}y.noext===!0&&(k=!1,O=!1);let H=w,ae=``,U=``;E>0&&(ae=w.slice(0,E),w=w.slice(E),D-=E),H&&O===!0&&D>0?(H=w.slice(0,D),U=w.slice(D)):O===!0?(H=``,U=w):H=w,H&&H!==``&&H!==`/`&&H!==w&&_(H.charCodeAt(H.length-1))&&(H=H.slice(0,-1)),y.unescape===!0&&(U&&=n.removeBackslashes(U),H&&j===!0&&(H=n.removeBackslashes(H)));let W={prefix:ae,input:e,start:E,base:H,glob:U,isBrace:ne,isBracket:re,isGlob:O,isExtglob:k,isGlobstar:ie,negated:M,negatedExtglob:N};if(y.tokens===!0&&(W.maxDepth=0,_(L)||S.push(R),W.tokens=S),y.parts===!0||y.tokens===!0){let t;for(let n=0;n<x.length;n++){let r=t?t+1:E,i=x[n],a=e.slice(r,i);y.tokens&&(n===0&&E!==0?(S[n].isPrefix=!0,S[n].value=ae):S[n].value=a,v(S[n]),W.maxDepth+=S[n].depth),(n!==0||a!==``)&&C.push(a),t=i}if(t&&t+1<e.length){let n=e.slice(t+1);C.push(n),y.tokens&&(S[S.length-1].value=n,v(S[S.length-1]),W.maxDepth+=S[S.length-1].depth)}W.slashes=x,W.parts=C}return W}})),gt=A(((e,t)=>{let n=pt(),r=mt(),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:a,REGEX_NON_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:c}=n,l=(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=>r.escapeRegex(e)).join(`..`)}return n},u=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,d=(e,t)=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);e=c[e]||e;let f={...t},p=typeof f.maxLength==`number`?Math.min(i,f.maxLength):i,m=e.length;if(m>p)throw SyntaxError(`Input length: ${m}, exceeds maximum allowed length: ${p}`);let h={type:`bos`,value:``,output:f.prepend||``},g=[h],ee=f.capture?``:`?:`,_=n.globChars(f.windows),v=n.extglobChars(_),{DOT_LITERAL:y,PLUS_LITERAL:te,SLASH_LITERAL:b,ONE_CHAR:x,DOTS_SLASH:S,NO_DOT:C,NO_DOT_SLASH:w,NO_DOTS_SLASH:T,QMARK:E,QMARK_NO_DOT:D,STAR:ne,START_ANCHOR:re}=_,O=e=>`(${ee}(?:(?!${re}${e.dot?S:y}).)*?)`,k=f.dot?``:C,ie=f.dot?E:D,A=f.bash===!0?O(f):ne;f.capture&&(A=`(${A})`),typeof f.noext==`boolean`&&(f.noextglob=f.noext);let j={input:e,index:-1,start:0,dot:f.dot===!0,consumed:``,output:``,prefix:``,backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:g};e=r.removePrefix(e,j),m=e.length;let M=[],N=[],P=[],F=h,I,L=()=>j.index===m-1,R=j.peek=(t=1)=>e[j.index+t],z=j.advance=()=>e[++j.index]||``,B=()=>e.slice(j.index+1),V=(e=``,t=0)=>{j.consumed+=e,j.index+=t},H=e=>{j.output+=e.output==null?e.value:e.output,V(e.value)},ae=()=>{let e=1;for(;R()===`!`&&(R(2)!==`(`||R(3)===`?`);)z(),j.start++,e++;return e%2==0?!1:(j.negated=!0,j.start++,!0)},U=e=>{j[e]++,P.push(e)},W=e=>{j[e]--,P.pop()},G=e=>{if(F.type===`globstar`){let t=j.braces>0&&(e.type===`comma`||e.type===`brace`),n=e.extglob===!0||M.length&&(e.type===`pipe`||e.type===`paren`);e.type!==`slash`&&e.type!==`paren`&&!t&&!n&&(j.output=j.output.slice(0,-F.output.length),F.type=`star`,F.value=`*`,F.output=A,j.output+=F.output)}if(M.length&&e.type!==`paren`&&(M[M.length-1].inner+=e.value),(e.value||e.output)&&H(e),F&&F.type===`text`&&e.type===`text`){F.output=(F.output||F.value)+e.value,F.value+=e.value;return}e.prev=F,g.push(e),F=e},oe=(e,t)=>{let n={...v[t],conditions:1,inner:``};n.prev=F,n.parens=j.parens,n.output=j.output;let r=(f.capture?`(`:``)+n.open;U(`parens`),G({type:e,value:t,output:j.output?``:x}),G({type:`paren`,extglob:!0,value:z(),output:r}),M.push(n)},se=e=>{let n=e.close+(f.capture?`)`:``),r;if(e.type===`negate`){let i=A;e.inner&&e.inner.length>1&&e.inner.includes(`/`)&&(i=O(f)),(i!==A||L()||/^\)+$/.test(B()))&&(n=e.close=`)$))${i}`),e.inner.includes(`*`)&&(r=B())&&/^\.[^\\/.]+$/.test(r)&&(n=e.close=`)${d(r,{...t,fastpaths:!1}).output})${i})`),e.prev.type===`bos`&&(j.negatedExtglob=!0)}G({type:`paren`,extglob:!0,value:I,output:n}),W(`parens`)};if(f.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let n=!1,i=e.replace(s,(e,t,r,i,a,o)=>i===`\\`?(n=!0,e):i===`?`?t?t+i+(a?E.repeat(a.length):``):o===0?ie+(a?E.repeat(a.length):``):E.repeat(r.length):i===`.`?y.repeat(r.length):i===`*`?t?t+i+(a?A:``):A:t?e:`\\${e}`);return n===!0&&(i=f.unescape===!0?i.replace(/\\/g,``):i.replace(/\\+/g,e=>e.length%2==0?`\\\\`:e?`\\`:``)),i===e&&f.contains===!0?(j.output=e,j):(j.output=r.wrapOutput(i,j,t),j)}for(;!L();){if(I=z(),I===`\0`)continue;if(I===`\\`){let e=R();if(e===`/`&&f.bash!==!0||e===`.`||e===`;`)continue;if(!e){I+=`\\`,G({type:`text`,value:I});continue}let t=/^\\+/.exec(B()),n=0;if(t&&t[0].length>2&&(n=t[0].length,j.index+=n,n%2!=0&&(I+=`\\`)),f.unescape===!0?I=z():I+=z(),j.brackets===0){G({type:`text`,value:I});continue}}if(j.brackets>0&&(I!==`]`||F.value===`[`||F.value===`[^`)){if(f.posix!==!1&&I===`:`){let e=F.value.slice(1);if(e.includes(`[`)&&(F.posix=!0,e.includes(`:`))){let e=F.value.lastIndexOf(`[`),t=F.value.slice(0,e),n=a[F.value.slice(e+2)];if(n){F.value=t+n,j.backtrack=!0,z(),!h.output&&g.indexOf(F)===1&&(h.output=x);continue}}}(I===`[`&&R()!==`:`||I===`-`&&R()===`]`)&&(I=`\\${I}`),I===`]`&&(F.value===`[`||F.value===`[^`)&&(I=`\\${I}`),f.posix===!0&&I===`!`&&F.value===`[`&&(I=`^`),F.value+=I,H({value:I});continue}if(j.quotes===1&&I!==`"`){I=r.escapeRegex(I),F.value+=I,H({value:I});continue}if(I===`"`){j.quotes=j.quotes===1?0:1,f.keepQuotes===!0&&G({type:`text`,value:I});continue}if(I===`(`){U(`parens`),G({type:`paren`,value:I});continue}if(I===`)`){if(j.parens===0&&f.strictBrackets===!0)throw SyntaxError(u(`opening`,`(`));let e=M[M.length-1];if(e&&j.parens===e.parens+1){se(M.pop());continue}G({type:`paren`,value:I,output:j.parens?`)`:`\\)`}),W(`parens`);continue}if(I===`[`){if(f.nobracket===!0||!B().includes(`]`)){if(f.nobracket!==!0&&f.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));I=`\\${I}`}else U(`brackets`);G({type:`bracket`,value:I});continue}if(I===`]`){if(f.nobracket===!0||F&&F.type===`bracket`&&F.value.length===1){G({type:`text`,value:I,output:`\\${I}`});continue}if(j.brackets===0){if(f.strictBrackets===!0)throw SyntaxError(u(`opening`,`[`));G({type:`text`,value:I,output:`\\${I}`});continue}W(`brackets`);let e=F.value.slice(1);if(F.posix!==!0&&e[0]===`^`&&!e.includes(`/`)&&(I=`/${I}`),F.value+=I,H({value:I}),f.literalBrackets===!1||r.hasRegexChars(e))continue;let t=r.escapeRegex(F.value);if(j.output=j.output.slice(0,-F.value.length),f.literalBrackets===!0){j.output+=t,F.value=t;continue}F.value=`(${ee}${t}|${F.value})`,j.output+=F.value;continue}if(I===`{`&&f.nobrace!==!0){U(`braces`);let e={type:`brace`,value:I,output:`(`,outputIndex:j.output.length,tokensIndex:j.tokens.length};N.push(e),G(e);continue}if(I===`}`){let e=N[N.length-1];if(f.nobrace===!0||!e){G({type:`text`,value:I,output:I});continue}let t=`)`;if(e.dots===!0){let e=g.slice(),n=[];for(let t=e.length-1;t>=0&&(g.pop(),e[t].type!==`brace`);t--)e[t].type!==`dots`&&n.unshift(e[t].value);t=l(n,f),j.backtrack=!0}if(e.comma!==!0&&e.dots!==!0){let n=j.output.slice(0,e.outputIndex),r=j.tokens.slice(e.tokensIndex);e.value=e.output=`\\{`,I=t=`\\}`,j.output=n;for(let e of r)j.output+=e.output||e.value}G({type:`brace`,value:I,output:t}),W(`braces`),N.pop();continue}if(I===`|`){M.length>0&&M[M.length-1].conditions++,G({type:`text`,value:I});continue}if(I===`,`){let e=I,t=N[N.length-1];t&&P[P.length-1]===`braces`&&(t.comma=!0,e=`|`),G({type:`comma`,value:I,output:e});continue}if(I===`/`){if(F.type===`dot`&&j.index===j.start+1){j.start=j.index+1,j.consumed=``,j.output=``,g.pop(),F=h;continue}G({type:`slash`,value:I,output:b});continue}if(I===`.`){if(j.braces>0&&F.type===`dot`){F.value===`.`&&(F.output=y);let e=N[N.length-1];F.type=`dots`,F.output+=I,F.value+=I,e.dots=!0;continue}if(j.braces+j.parens===0&&F.type!==`bos`&&F.type!==`slash`){G({type:`text`,value:I,output:y});continue}G({type:`dot`,value:I,output:y});continue}if(I===`?`){if(!(F&&F.value===`(`)&&f.noextglob!==!0&&R()===`(`&&R(2)!==`?`){oe(`qmark`,I);continue}if(F&&F.type===`paren`){let e=R(),t=I;(F.value===`(`&&!/[!=<:]/.test(e)||e===`<`&&!/<([!=]|\w+>)/.test(B()))&&(t=`\\${I}`),G({type:`text`,value:I,output:t});continue}if(f.dot!==!0&&(F.type===`slash`||F.type===`bos`)){G({type:`qmark`,value:I,output:D});continue}G({type:`qmark`,value:I,output:E});continue}if(I===`!`){if(f.noextglob!==!0&&R()===`(`&&(R(2)!==`?`||!/[!=<:]/.test(R(3)))){oe(`negate`,I);continue}if(f.nonegate!==!0&&j.index===0){ae();continue}}if(I===`+`){if(f.noextglob!==!0&&R()===`(`&&R(2)!==`?`){oe(`plus`,I);continue}if(F&&F.value===`(`||f.regex===!1){G({type:`plus`,value:I,output:te});continue}if(F&&(F.type===`bracket`||F.type===`paren`||F.type===`brace`)||j.parens>0){G({type:`plus`,value:I});continue}G({type:`plus`,value:te});continue}if(I===`@`){if(f.noextglob!==!0&&R()===`(`&&R(2)!==`?`){G({type:`at`,extglob:!0,value:I,output:``});continue}G({type:`text`,value:I});continue}if(I!==`*`){(I===`$`||I===`^`)&&(I=`\\${I}`);let e=o.exec(B());e&&(I+=e[0],j.index+=e[0].length),G({type:`text`,value:I});continue}if(F&&(F.type===`globstar`||F.star===!0)){F.type=`star`,F.star=!0,F.value+=I,F.output=A,j.backtrack=!0,j.globstar=!0,V(I);continue}let t=B();if(f.noextglob!==!0&&/^\([^?]/.test(t)){oe(`star`,I);continue}if(F.type===`star`){if(f.noglobstar===!0){V(I);continue}let n=F.prev,r=n.prev,i=n.type===`slash`||n.type===`bos`,a=r&&(r.type===`star`||r.type===`globstar`);if(f.bash===!0&&(!i||t[0]&&t[0]!==`/`)){G({type:`star`,value:I,output:``});continue}let o=j.braces>0&&(n.type===`comma`||n.type===`brace`),s=M.length&&(n.type===`pipe`||n.type===`paren`);if(!i&&n.type!==`paren`&&!o&&!s){G({type:`star`,value:I,output:``});continue}for(;t.slice(0,3)===`/**`;){let n=e[j.index+4];if(n&&n!==`/`)break;t=t.slice(3),V(`/**`,3)}if(n.type===`bos`&&L()){F.type=`globstar`,F.value+=I,F.output=O(f),j.output=F.output,j.globstar=!0,V(I);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&!a&&L()){j.output=j.output.slice(0,-(n.output+F.output).length),n.output=`(?:${n.output}`,F.type=`globstar`,F.output=O(f)+(f.strictSlashes?`)`:`|$)`),F.value+=I,j.globstar=!0,j.output+=n.output+F.output,V(I);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&t[0]===`/`){let e=t[1]===void 0?``:`|$`;j.output=j.output.slice(0,-(n.output+F.output).length),n.output=`(?:${n.output}`,F.type=`globstar`,F.output=`${O(f)}${b}|${b}${e})`,F.value+=I,j.output+=n.output+F.output,j.globstar=!0,V(I+z()),G({type:`slash`,value:`/`,output:``});continue}if(n.type===`bos`&&t[0]===`/`){F.type=`globstar`,F.value+=I,F.output=`(?:^|${b}|${O(f)}${b})`,j.output=F.output,j.globstar=!0,V(I+z()),G({type:`slash`,value:`/`,output:``});continue}j.output=j.output.slice(0,-F.output.length),F.type=`globstar`,F.output=O(f),F.value+=I,j.output+=F.output,j.globstar=!0,V(I);continue}let n={type:`star`,value:I,output:A};if(f.bash===!0){n.output=`.*?`,(F.type===`bos`||F.type===`slash`)&&(n.output=k+n.output),G(n);continue}if(F&&(F.type===`bracket`||F.type===`paren`)&&f.regex===!0){n.output=I,G(n);continue}(j.index===j.start||F.type===`slash`||F.type===`dot`)&&(F.type===`dot`?(j.output+=w,F.output+=w):f.dot===!0?(j.output+=T,F.output+=T):(j.output+=k,F.output+=k),R()!==`*`&&(j.output+=x,F.output+=x)),G(n)}for(;j.brackets>0;){if(f.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));j.output=r.escapeLast(j.output,`[`),W(`brackets`)}for(;j.parens>0;){if(f.strictBrackets===!0)throw SyntaxError(u(`closing`,`)`));j.output=r.escapeLast(j.output,`(`),W(`parens`)}for(;j.braces>0;){if(f.strictBrackets===!0)throw SyntaxError(u(`closing`,`}`));j.output=r.escapeLast(j.output,`{`),W(`braces`)}if(f.strictSlashes!==!0&&(F.type===`star`||F.type===`bracket`)&&G({type:`maybe_slash`,value:``,output:`${b}?`}),j.backtrack===!0){j.output=``;for(let e of j.tokens)j.output+=e.output==null?e.value:e.output,e.suffix&&(j.output+=e.suffix)}return j};d.fastpaths=(e,t)=>{let a={...t},o=typeof a.maxLength==`number`?Math.min(i,a.maxLength):i,s=e.length;if(s>o)throw SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${o}`);e=c[e]||e;let{DOT_LITERAL:l,SLASH_LITERAL:u,ONE_CHAR:d,DOTS_SLASH:f,NO_DOT:p,NO_DOTS:m,NO_DOTS_SLASH:h,STAR:g,START_ANCHOR:ee}=n.globChars(a.windows),_=a.dot?m:p,v=a.dot?h:p,y=a.capture?``:`?:`,te={negated:!1,prefix:``},b=a.bash===!0?`.*?`:g;a.capture&&(b=`(${b})`);let x=e=>e.noglobstar===!0?b:`(${y}(?:(?!${ee}${e.dot?f:l}).)*?)`,S=e=>{switch(e){case`*`:return`${_}${d}${b}`;case`.*`:return`${l}${d}${b}`;case`*.*`:return`${_}${b}${l}${d}${b}`;case`*/*`:return`${_}${b}${u}${d}${v}${b}`;case`**`:return _+x(a);case`**/*`:return`(?:${_}${x(a)}${u})?${v}${d}${b}`;case`**/*.*`:return`(?:${_}${x(a)}${u})?${v}${b}${l}${d}${b}`;case`**/.*`:return`(?:${_}${x(a)}${u})?${l}${d}${b}`;default:{let t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;let n=S(t[1]);return n?n+l+t[2]:void 0}}},C=S(r.removePrefix(e,te));return C&&a.strictSlashes!==!0&&(C+=`${u}?`),C},t.exports=d})),_t=A(((e,t)=>{let n=ht(),r=gt(),i=mt(),a=pt(),o=e=>e&&typeof e==`object`&&!Array.isArray(e),s=(e,t,n=!1)=>{if(Array.isArray(e)){let r=e.map(e=>s(e,t,n));return e=>{for(let t of r){let n=t(e);if(n)return n}return!1}}let r=o(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,c=r?s.compileRe(e,t):s.makeRe(e,t,!1,!0),l=c.state;delete c.state;let u=()=>!1;if(i.ignore){let e={...t,ignore:null,onMatch:null,onResult:null};u=s(i.ignore,e,n)}let d=(n,r=!1)=>{let{isMatch:o,match:d,output:f}=s.test(n,c,t,{glob:e,posix:a}),p={glob:e,state:l,regex:c,posix:a,input:n,output:f,match:d,isMatch:o};return typeof i.onResult==`function`&&i.onResult(p),o===!1?(p.isMatch=!1,r?p:!1):u(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&&(d.state=l),d};s.test=(e,t,n,{glob:r,posix:a}={})=>{if(typeof e!=`string`)throw TypeError(`Expected input to be a string`);if(e===``)return{isMatch:!1,output:``};let o=n||{},c=o.format||(a?i.toPosixSlashes:null),l=e===r,u=l&&c?c(e):e;return l===!1&&(u=c?c(e):e,l=u===r),(l===!1||o.capture===!0)&&(l=o.matchBase===!0||o.basename===!0?s.matchBase(e,t,n,a):t.exec(u)),{isMatch:!!l,match:l,output:u}},s.matchBase=(e,t,n)=>(t instanceof RegExp?t:s.makeRe(t,n)).test(i.basename(e)),s.isMatch=(e,t,n)=>s(t,n)(e),s.parse=(e,t)=>Array.isArray(e)?e.map(e=>s.parse(e,t)):r(e,{...t,fastpaths:!1}),s.scan=(e,t)=>n(e,t),s.compileRe=(e,t,n=!1,r=!1)=>{if(n===!0)return e.output;let i=t||{},a=i.contains?``:`^`,o=i.contains?``:`$`,c=`${a}(?:${e.output})${o}`;e&&e.negated===!0&&(c=`^(?!${c}).*$`);let l=s.toRegex(c,t);return r===!0&&(l.state=e),l},s.makeRe=(e,t={},n=!1,i=!1)=>{if(!e||typeof e!=`string`)throw TypeError(`Expected a non-empty string`);let a={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]===`.`||e[0]===`*`)&&(a.output=r.fastpaths(e,t)),a.output||(a=r(e,t)),s.compileRe(a,t,n,i)},s.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/$^/}},s.constants=a,t.exports=s})),vt=N(A(((e,t)=>{let n=_t(),r=mt();function i(e,t,i=!1){return t&&(t.windows===null||t.windows===void 0)&&(t={...t,windows:r.isWindows()}),n(e,t,i)}Object.assign(i,n),t.exports=i}))(),1);const yt=Array.isArray,bt=process.platform===`win32`,xt=/^(\/?\.\.)+$/;function St(e,t={}){let n=e.length,r=Array(n),i=Array(n),a=!t.noglobstar;for(let a=0;a<n;a++){let n=Ot(e[a]);r[a]=n;let o=n.length,s=Array(o);for(let e=0;e<o;e++)s[e]=(0,vt.default)(n[e],t);i[a]=s}return t=>{let n=t.split(`/`);if(n[0]===`..`&&xt.test(t))return!0;for(let t=0;t<e.length;t++){let e=r[t],o=i[t],s=n.length,c=Math.min(s,e.length),l=0;for(;l<c;){let t=e[l];if(t.includes(`/`))return!0;if(!o[l](n[l]))break;if(a&&t===`**`)return!0;l++}if(l===s)return!0}return!1}}const Ct=/^[A-Z]:\/$/i,wt=bt?e=>Ct.test(e):e=>e===`/`;function Tt(e,t,n){if(e===t||t.startsWith(`${e}/`)){if(n){let t=wt(e)?e.length:e.length+1;return(e,n)=>e.slice(t,n?-1:void 0)||`.`}let r=t.slice(e.length+1);return r?(e,t)=>{if(e===`.`)return r;let n=`${r}/${e}`;return t?n.slice(0,-1):n}:(e,t)=>t&&e!==`.`?e.slice(0,-1):e}return n?t=>m.relative(e,t)||`.`:n=>m.relative(e,`${t}/${n}`)||`.`}function Et(e,t){if(t.startsWith(`${e}/`)){let n=t.slice(e.length+1);return e=>`${n}/${e}`}return n=>{let r=m.relative(e,`${t}/${n}`);return n.endsWith(`/`)&&r!==``?`${r}/`:r||`.`}}const Dt={parts:!0};function Ot(e){let t=vt.default.scan(e,Dt);return t.parts?.length?t.parts:[e]}const kt=/(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g,At=/(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g,jt=bt?e=>e.replace(At,`\\$&`):e=>e.replace(kt,`\\$&`);function Mt(e,t){if(t?.caseSensitiveMatch===!1)return!0;let n=vt.default.scan(e);return n.isGlob||n.negated}function Nt(...e){console.log(`[tinyglobby ${new Date().toLocaleTimeString(`es`)}]`,...e)}const Pt=/^(\/?\.\.)+/,Ft=/\\(?=[()[\]{}!*+?@|])/g,It=/\\/g;function Lt(e,t,n,r,i){let a=e;e.endsWith(`/`)&&(a=e.slice(0,-1)),!a.endsWith(`*`)&&t&&(a+=`/**`);let o=jt(n);a=u.isAbsolute(a.replace(Ft,``))?m.relative(o,a):m.normalize(a);let s=Pt.exec(a),c=Ot(a);if(s?.[0]){let e=(s[0].length+1)/3,t=0,i=o.split(`/`);for(;t<e&&c[t+e]===i[i.length+t-e];)a=a.slice(0,(e-t-1)*3)+a.slice((e-t)*3+c[t+e].length+1)||`.`,t++;let l=m.join(n,s[0].slice(t*3));!l.startsWith(`.`)&&r.root.length>l.length&&(r.root=l,r.depthOffset=-e+t)}if(!i&&r.depthOffset>=0){r.commonPath??=c;let e=[],t=Math.min(r.commonPath.length,c.length);for(let n=0;n<t;n++){let t=c[n];if(t===`**`&&!c[n+1]){e.pop();break}if(t!==r.commonPath[n]||Mt(t)||n===c.length-1)break;e.push(t)}r.depthOffset=e.length,r.commonPath=e,r.root=e.length>0?m.join(n,...e):n}return a}function Rt({patterns:e=[`**/*`],ignore:t=[],expandDirectories:n=!0},r,i){typeof e==`string`&&(e=[e]),typeof t==`string`&&(t=[t]);let a=[],o=[];for(let e of t)e&&(e[0]!==`!`||e[1]===`(`)&&o.push(Lt(e,n,r,i,!0));for(let t of e)t&&(t[0]!==`!`||t[1]===`(`?a.push(Lt(t,n,r,i,!1)):(t[1]!==`!`||t[2]===`(`)&&o.push(Lt(t.slice(1),n,r,i,!0)));return{match:a,ignore:o}}function zt(e,t){for(let n=e.length-1;n>=0;n--){let r=e[n];e[n]=t(r)}return e}function Bt(e){return e?e instanceof URL?_(e).replace(It,`/`):u.resolve(e).replace(It,`/`):process.cwd().replace(It,`/`)}function Vt(e,t={}){let n=process.env.TINYGLOBBY_DEBUG?{...t,debug:!0}:t,r=Bt(n.cwd);if(n.debug&&Nt(`globbing with:`,{patterns:e,options:n,cwd:r}),Array.isArray(e)&&e.length===0)return[{sync:()=>[],withPromise:async()=>[]},!1];let i={root:r,commonPath:null,depthOffset:0},a=Rt({...n,patterns:e},r,i);n.debug&&Nt(`internal processing patterns:`,a);let o={dot:n.dot,nobrace:n.braceExpansion===!1,nocase:n.caseSensitiveMatch===!1,noextglob:n.extglob===!1,noglobstar:n.globstar===!1,posix:!0},s=(0,vt.default)(a.match,{...o,ignore:a.ignore}),c=(0,vt.default)(a.ignore,o),u=St(a.match,o),d=Tt(r,i.root,n.absolute),f=n.absolute?d:Tt(r,i.root,!0),p={filters:[n.debug?(e,t)=>{let n=d(e,t),r=s(n);return r&&Nt(`matched ${n}`),r}:(e,t)=>s(d(e,t))],exclude:n.debug?(e,t)=>{let n=f(t,!0),r=n!==`.`&&!u(n)||c(n);return Nt(r?`skipped ${t}`:`crawling ${t}`),r}:(e,t)=>{let n=f(t,!0);return n!==`.`&&!u(n)||c(n)},fs:n.fs?{readdir:n.fs.readdir||l.readdir,readdirSync:n.fs.readdirSync||l.readdirSync,realpath:n.fs.realpath||l.realpath,realpathSync:n.fs.realpathSync||l.realpathSync,stat:n.fs.stat||l.stat,statSync:n.fs.statSync||l.statSync}:void 0,pathSeparator:`/`,relativePaths:!0,resolveSymlinks:!0,signal:n.signal};n.deep!==void 0&&(p.maxDepth=Math.round(n.deep-i.depthOffset)),n.absolute&&(p.relativePaths=!1,p.resolvePaths=!0,p.includeBasePath=!0),n.followSymbolicLinks===!1&&(p.resolveSymlinks=!1,p.excludeSymlinks=!0),n.onlyDirectories?(p.excludeFiles=!0,p.includeDirs=!0):n.onlyFiles===!1&&(p.includeDirs=!0),i.root=i.root.replace(It,``);let m=i.root;n.debug&&Nt(`internal properties:`,i);let h=r!==m&&!n.absolute&&Et(r,i.root);return[new ft(p).crawl(m),h]}async function Ht(e,t){if(e&&t?.patterns)throw Error(`Cannot pass patterns as both an argument and an option`);let n=yt(e)||typeof e==`string`,r=n?t:e,[i,a]=Vt(n?e:e.patterns,r);return a?zt(await i.withPromise(),a):i.withPromise()}Object.freeze({status:`aborted`});function K(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var Ut=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}};const Wt={};function Gt(e){return e&&Object.assign(Wt,e),Wt}function Kt(e,t){return typeof t==`bigint`?t.toString():t}function qt(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function Jt(e){return e==null}function Yt(e){let t=e.startsWith(`^`)?1:0,n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}const Xt=Symbol(`evaluating`);function q(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Xt)return r===void 0&&(r=Xt,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Zt(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Qt(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}const $t=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function en(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function tn(e){if(en(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(en(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function nn(e){return tn(e)?{...e}:Array.isArray(e)?[...e]:e}function rn(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function J(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function an(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}-Number.MAX_VALUE,Number.MAX_VALUE;function on(e,t){if(!tn(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return rn(e,Qt(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Zt(this,`shape`,n),n}}))}function sn(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function cn(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function ln(e){return typeof e==`string`?e:e?.message}function un(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=ln(e.inst?._zod.def?.error?.(e))??ln(t?.error?.(e))??ln(n.customError?.(e))??ln(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function dn(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}const fn=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,Kt,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},pn=K(`$ZodError`,fn),mn=K(`$ZodError`,fn,{Parent:Error}),hn=(e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new Ut;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>un(e,a,Gt())));throw $t(t,i?.callee),t}return o.value})(mn),gn=(e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>un(e,a,Gt())));throw $t(t,i?.callee),t}return o.value})(mn),_n=(e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Ut;return a.issues.length?{success:!1,error:new(e??pn)(a.issues.map(e=>un(e,i,Gt())))}:{success:!0,data:a.value}})(mn),vn=(e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>un(e,i,Gt())))}:{success:!0,data:a.value}})(mn),yn=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,bn=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},xn=/^-?\d+(?:\.\d+)?$/,Sn=/^(?:true|false)$/i,Cn=K(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),wn=K(`$ZodCheckMinLength`,(e,t)=>{var n;Cn.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Jt(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=dn(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Tn=K(`$ZodCheckStringFormat`,(e,t)=>{var n,r;Cn.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),En={major:4,minor:3,patch:6},Y=K(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=En;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=sn(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new Ut;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=sn(e,t))});else{if(e.issues.length===t)continue;r||=sn(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(sn(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new Ut;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new Ut;return o.then(e=>t(e,r,a))}return t(o,r,a)}}q(e,`~standard`,()=>({validate:t=>{try{let n=_n(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return vn(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),Dn=K(`$ZodString`,(e,t)=>{Y.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??bn(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),On=K(`$ZodStringFormat`,(e,t)=>{Tn.init(e,t),Dn.init(e,t)}),kn=K(`$ZodURL`,(e,t)=>{On.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),An=K(`$ZodBoolean`,(e,t)=>{Y.init(e,t),e._zod.pattern=Sn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}});function jn(e,t,n){e.issues.length&&t.issues.push(...cn(n,e.issues)),t.value[n]=e.value}const Mn=K(`$ZodArray`,(e,t)=>{Y.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>jn(t,n,e))):jn(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function Nn(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...cn(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function Pn(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=an(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Fn(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optout===`optional`;for(let i in t){if(s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Nn(e,n,i,t,u))):Nn(a,n,i,t,u)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}const In=K(`$ZodObject`,(e,t)=>{if(Y.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,`shape`,{get:()=>{let n={...e};return Object.defineProperty(t,`shape`,{value:n}),n}})}let n=qt(()=>Pn(t));q(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=en,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optout===`optional`,i=n._zod.run({value:s[e],issues:[]},o);i instanceof Promise?c.push(i.then(n=>Nn(n,t,e,s,r))):Nn(i,t,e,s,r)}return i?Fn(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),Ln=K(`$ZodRecord`,(e,t)=>{Y.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!tn(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let e of o)if(typeof e==`string`||typeof e==`number`||typeof e==`symbol`){s.add(typeof e==`number`?e.toString():e);let o=t.valueType._zod.run({value:i[e],issues:[]},r);o instanceof Promise?a.push(o.then(t=>{t.issues.length&&n.issues.push(...cn(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...cn(e,o.issues)),n.value[e]=o.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`)continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&xn.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>un(e,r,Gt())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...cn(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...cn(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}});function Rn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const zn=K(`$ZodOptional`,(e,t)=>{Y.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,q(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),q(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Yt(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>Rn(t,e.value)):Rn(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),Bn=K(`$ZodNullable`,(e,t)=>{Y.init(e,t),q(e._zod,`optin`,()=>t.innerType._zod.optin),q(e._zod,`optout`,()=>t.innerType._zod.optout),q(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Yt(e.source)}|null)$`):void 0}),q(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Vn=K(`$ZodDefault`,(e,t)=>{Y.init(e,t),e._zod.optin=`optional`,q(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Hn(e,t)):Hn(r,t)}});function Hn(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Un=K(`$ZodPipe`,(e,t)=>{Y.init(e,t),q(e._zod,`values`,()=>t.in._zod.values),q(e._zod,`optin`,()=>t.in._zod.optin),q(e._zod,`optout`,()=>t.out._zod.optout),q(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Wn(e,t.in,n)):Wn(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Wn(e,t.out,n)):Wn(r,t.out,n)}});function Wn(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Gn=K(`$ZodCodec`,(e,t)=>{Y.init(e,t),q(e._zod,`values`,()=>t.in._zod.values),q(e._zod,`optin`,()=>t.in._zod.optin),q(e._zod,`optout`,()=>t.out._zod.optout),q(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if((n.direction||`forward`)===`forward`){let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Kn(e,t,n)):Kn(r,t,n)}else{let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Kn(e,t,n)):Kn(r,t,n)}}});function Kn(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||`forward`)===`forward`){let r=t.transform(e.value,e);return r instanceof Promise?r.then(r=>qn(e,r,t.out,n)):qn(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(r=>qn(e,r,t.in,n)):qn(e,r,t.in,n)}}function qn(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}var Jn,Yn=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Xn(){return new Yn}(Jn=globalThis).__zod_globalRegistry??(Jn.__zod_globalRegistry=Xn()),globalThis.__zod_globalRegistry;function Zn(e,t){return new e({type:`string`,...J(t)})}function Qn(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...J(t)})}function $n(e,t){return new e({type:`boolean`,...J(t)})}function er(e,t){return new wn({check:`min_length`,...J(t),minimum:e})}function tr(e,t){let n=J(t),r=n.truthy??[`true`,`1`,`yes`,`on`,`y`,`enabled`],i=n.falsy??[`false`,`0`,`no`,`off`,`n`,`disabled`];n.case!==`sensitive`&&(r=r.map(e=>typeof e==`string`?e.toLowerCase():e),i=i.map(e=>typeof e==`string`?e.toLowerCase():e));let a=new Set(r),o=new Set(i),s=e.Codec??Gn,c=e.Boolean??An,l=new s({type:`pipe`,in:new(e.String??Dn)({type:`string`,error:n.error}),out:new c({type:`boolean`,error:n.error}),transform:((e,t)=>{let r=e;return n.case!==`sensitive`&&(r=r.toLowerCase()),a.has(r)?!0:o.has(r)?!1:(t.issues.push({code:`invalid_value`,expected:`stringbool`,values:[...a,...o],input:t.value,inst:l,continue:!1}),{})}),reverseTransform:((e,t)=>e===!0?r[0]||`true`:i[0]||`false`),error:n.error});return l}const X=K(`ZodMiniType`,(e,t)=>{if(!e._zod)throw Error(`Uninitialized schema in ZodMiniType.`);Y.init(e,t),e.def=t,e.type=t.type,e.parse=(t,n)=>hn(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>_n(e,t,n),e.parseAsync=async(t,n)=>gn(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>vn(e,t,n),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]},{parent:!0}),e.with=e.check,e.clone=(t,n)=>rn(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.apply=t=>t(e)}),nr=K(`ZodMiniString`,(e,t)=>{Dn.init(e,t),X.init(e,t)});function Z(e){return Zn(nr,e)}const rr=K(`ZodMiniStringFormat`,(e,t)=>{On.init(e,t),nr.init(e,t)}),ir=K(`ZodMiniURL`,(e,t)=>{kn.init(e,t),rr.init(e,t)});function ar(e){return Qn(ir,{protocol:/^https?$/,hostname:yn,...J(e)})}const or=K(`ZodMiniBoolean`,(e,t)=>{An.init(e,t),X.init(e,t)});function sr(e){return $n(or,e)}const cr=K(`ZodMiniArray`,(e,t)=>{Mn.init(e,t),X.init(e,t)});function lr(e,t){return new cr({type:`array`,element:e,...J(t)})}const ur=K(`ZodMiniObject`,(e,t)=>{In.init(e,t),X.init(e,t),q(e,`shape`,()=>t.shape)});function dr(e,t){return new ur({type:`object`,shape:e??{},...J(t)})}function fr(e,t){return on(e,t)}const pr=K(`ZodMiniRecord`,(e,t)=>{Ln.init(e,t),X.init(e,t)});function mr(e,t,n){return new pr({type:`record`,keyType:e,valueType:t,...J(n)})}const hr=K(`ZodMiniOptional`,(e,t)=>{zn.init(e,t),X.init(e,t)});function gr(e){return new hr({type:`optional`,innerType:e})}const _r=K(`ZodMiniNullable`,(e,t)=>{Bn.init(e,t),X.init(e,t)});function vr(e){return new _r({type:`nullable`,innerType:e})}const yr=K(`ZodMiniDefault`,(e,t)=>{Vn.init(e,t),X.init(e,t)});function br(e,t){return new yr({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():nn(t)}})}const xr=K(`ZodMiniPipe`,(e,t)=>{Un.init(e,t),X.init(e,t)}),Sr=K(`ZodMiniCodec`,(e,t)=>{xr.init(e,t),Gn.init(e,t)}),Cr=(...e)=>tr({Codec:Sr,Boolean:or,String:nr},...e);function wr(e){let t=new URL(e);return t.pathname.endsWith(`/`)||(t.pathname+=`/`),t}async function Tr(e,n={}){let{start:r=s(process.cwd()),stop:i}=n,a=wr(r);for(;;){let n=new URL(e,a);try{return await t(n),n}catch{}if(typeof i==`string`){let e=new URL(i,a);try{await t(e);return}catch{}}else if(i instanceof URL&&i.href===a.href)return;let r=new URL(`..`,a);if(r.href===a.href)return;a=r}}async function Er(e){try{return await t(e),!0}catch{return!1}}async function Dr(e,t){await n(new URL(`.`,e),{recursive:!0}),await a(e,t)}async function Or(e,t={}){let{schema:n}=t,i=await r(e,`utf8`),a=JSON.parse(i);return n?hn(n,a):a}function kr(e){return JSON.stringify(e,null,2)}const Ar=/^(?:( )+|\t+)/,jr=`space`;function Mr(e,t,n){return e&&t===jr&&n===1}function Nr(e,t){let n=new Map,r=0,i,a;for(let o of e.split(/\n/g)){if(!o)continue;let e=o.match(Ar);if(e===null)r=0,i=``;else{let o=e[0].length,s=e[1]?jr:`tab`;if(Mr(t,s,o))continue;s!==i&&(r=0),i=s;let c=1,l=0,u=o-r;if(r=o,u===0)c=0,l=1;else{let e=Math.abs(u);if(Mr(t,s,e))continue;a=Pr(s,e)}let d=n.get(a);n.set(a,d===void 0?[1,0]:[d[0]+c,d[1]+l])}}return n}function Pr(e,t){return(e===jr?`s`:`t`)+String(t)}function Fr(e){return{type:e[0]===`s`?jr:`tab`,amount:Number(e.slice(1))}}function Ir(e){let t,n=0,r=0;for(let[i,[a,o]]of e)(a>n||a===n&&o>r)&&(n=a,r=o,t=i);return t}function Lr(e,t){return(e===jr?` `:` `).repeat(t)}function Rr(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);let t=Nr(e,!0);t.size===0&&(t=Nr(e,!1));let n=Ir(t),r,i=0,a=``;return n!==void 0&&({type:r,amount:i}=Fr(n),a=Lr(r,i)),{amount:i,type:r,indent:a}}var zr=Object.create,Br=Object.defineProperty,Vr=Object.getOwnPropertyDescriptor,Hr=Object.getOwnPropertyNames,Ur=Object.getPrototypeOf,Wr=Object.prototype.hasOwnProperty,Q=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Gr=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=Hr(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Wr.call(e,s)&&s!==n&&Br(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=Vr(t,s))||r.enumerable});return e},Kr=(e,t,n)=>(n=e==null?{}:zr(Ur(e)),Gr(t||!e||!e.__esModule?Br(n,`default`,{value:e,enumerable:!0}):n,e)),$=v(import.meta.url);const qr=/^path$/i,Jr={key:`PATH`,value:``};function Yr(e){for(let t in e){if(!Object.prototype.hasOwnProperty.call(e,t)||!qr.test(t))continue;let n=e[t];return n?{key:t,value:n}:Jr}return Jr}function Xr(e,t){let n=t.value.split(te),r=e,i;do n.push(S(r,`node_modules`,`.bin`)),i=r,r=b(r);while(r!==i);return{key:t.key,value:n.join(te)}}function Zr(e,t){let n={...process.env,...t},r=Xr(e,Yr(n));return n[r.key]=r.value,n}const Qr=e=>{let t=e.length,n=new w,r=()=>{--t===0&&n.emit(`end`)};for(let t of e)t.pipe(n,{end:!1}),t.on(`end`,r);return n};var $r=Q((e,t)=>{t.exports=a,a.sync=o;var n=$(`fs`);function r(e,t){var n=t.pathExt===void 0?process.env.PATHEXT:t.pathExt;if(!n||(n=n.split(`;`),n.indexOf(``)!==-1))return!0;for(var r=0;r<n.length;r++){var i=n[r].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}function i(e,t,n){return!e.isSymbolicLink()&&!e.isFile()?!1:r(t,n)}function a(e,t,r){n.stat(e,function(n,a){r(n,n?!1:i(a,e,t))})}function o(e,t){return i(n.statSync(e),e,t)}}),ei=Q((e,t)=>{t.exports=r,r.sync=i;var n=$(`fs`);function r(e,t,r){n.stat(e,function(e,n){r(e,e?!1:a(n,t))})}function i(e,t){return a(n.statSync(e),t)}function a(e,t){return e.isFile()&&o(e,t)}function o(e,t){var n=e.mode,r=e.uid,i=e.gid,a=t.uid===void 0?process.getuid&&process.getuid():t.uid,o=t.gid===void 0?process.getgid&&process.getgid():t.gid,s=64,c=8,l=1,u=s|c;return n&l||n&c&&i===o||n&s&&r===a||n&u&&a===0}}),ti=Q((e,t)=>{$(`fs`);var n=process.platform===`win32`||global.TESTING_WINDOWS?$r():ei();t.exports=r,r.sync=i;function r(e,t,i){if(typeof t==`function`&&(i=t,t={}),!i){if(typeof Promise!=`function`)throw TypeError(`callback not provided`);return new Promise(function(n,i){r(e,t||{},function(e,t){e?i(e):n(t)})})}n(e,t||{},function(e,n){e&&(e.code===`EACCES`||t&&t.ignoreErrors)&&(e=null,n=!1),i(e,n)})}function i(e,t){try{return n.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||e.code===`EACCES`)return!1;throw e}}}),ni=Q((e,t)=>{let n=process.platform===`win32`||process.env.OSTYPE===`cygwin`||process.env.OSTYPE===`msys`,r=$(`path`),i=n?`;`:`:`,a=ti(),o=e=>Object.assign(Error(`not found: ${e}`),{code:`ENOENT`}),s=(e,t)=>{let r=t.colon||i,a=e.match(/\//)||n&&e.match(/\\/)?[``]:[...n?[process.cwd()]:[],...(t.path||process.env.PATH||``).split(r)],o=n?t.pathExt||process.env.PATHEXT||`.EXE;.CMD;.BAT;.COM`:``,s=n?o.split(r):[``];return n&&e.indexOf(`.`)!==-1&&s[0]!==``&&s.unshift(``),{pathEnv:a,pathExt:s,pathExtExe:o}},c=(e,t,n)=>{typeof t==`function`&&(n=t,t={}),t||={};let{pathEnv:i,pathExt:c,pathExtExe:l}=s(e,t),u=[],d=n=>new Promise((a,s)=>{if(n===i.length)return t.all&&u.length?a(u):s(o(e));let c=i[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=r.join(l,e);a(f(!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d,n,0))}),f=(e,n,r)=>new Promise((i,o)=>{if(r===c.length)return i(d(n+1));let s=c[r];a(e+s,{pathExt:l},(a,o)=>{if(!a&&o)if(t.all)u.push(e+s);else return i(e+s);return i(f(e,n,r+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};t.exports=c,c.sync=(e,t)=>{t||={};let{pathEnv:n,pathExt:i,pathExtExe:c}=s(e,t),l=[];for(let o=0;o<n.length;o++){let s=n[o],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=r.join(u,e),f=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<i.length;e++){let n=f+i[e];try{if(a.sync(n,{pathExt:c}))if(t.all)l.push(n);else return n}catch{}}}if(t.all&&l.length)return l;if(t.nothrow)return null;throw o(e)}}),ri=Q((e,t)=>{let n=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)===`win32`?Object.keys(t).reverse().find(e=>e.toUpperCase()===`PATH`)||`Path`:`PATH`};t.exports=n,t.exports.default=n}),ii=Q((e,t)=>{let n=$(`path`),r=ni(),i=ri();function a(e,t){let a=e.options.env||process.env,o=process.cwd(),s=e.options.cwd!=null,c=s&&process.chdir!==void 0&&!process.chdir.disabled;if(c)try{process.chdir(e.options.cwd)}catch{}let l;try{l=r.sync(e.command,{path:a[i({env:a})],pathExt:t?n.delimiter:void 0})}catch{}finally{c&&process.chdir(o)}return l&&=n.resolve(s?e.options.cwd:``,l),l}function o(e){return a(e)||a(e,!0)}t.exports=o}),ai=Q((e,t)=>{let n=/([()\][%!^"`<>&|;, *?])/g;function r(e){return e=e.replace(n,`^$1`),e}function i(e,t){return e=`${e}`,e=e.replace(/(\\*)"/g,`$1$1\\"`),e=e.replace(/(\\*)$/,`$1$1`),e=`"${e}"`,e=e.replace(n,`^$1`),t&&(e=e.replace(n,`^$1`)),e}t.exports.command=r,t.exports.argument=i}),oi=Q((e,t)=>{t.exports=/^#!(.*)/}),si=Q((e,t)=>{let n=oi();t.exports=(e=``)=>{let t=e.match(n);if(!t)return null;let[r,i]=t[0].replace(/#! ?/,``).split(` `),a=r.split(`/`).pop();return a===`env`?i:i?`${a} ${i}`:a}}),ci=Q((e,t)=>{let n=$(`fs`),r=si();function i(e){let t=Buffer.alloc(150),i;try{i=n.openSync(e,`r`),n.readSync(i,t,0,150,0),n.closeSync(i)}catch{}return r(t.toString())}t.exports=i}),li=Q((e,t)=>{let n=$(`path`),r=ii(),i=ai(),a=ci(),o=process.platform===`win32`,s=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(e){e.file=r(e);let t=e.file&&a(e.file);return t?(e.args.unshift(e.file),e.command=t,r(e)):e.file}function u(e){if(!o)return e;let t=l(e),r=!s.test(t);if(e.options.forceShell||r){let r=c.test(t);e.command=n.normalize(e.command),e.command=i.command(e.command),e.args=e.args.map(e=>i.argument(e,r)),e.args=[`/d`,`/s`,`/c`,`"${[e.command].concat(e.args).join(` `)}"`],e.command=process.env.comspec||`cmd.exe`,e.options.windowsVerbatimArguments=!0}return e}function d(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null),t=t?t.slice(0):[],n=Object.assign({},n);let r={command:e,args:t,options:n,file:void 0,original:{command:e,args:t}};return n.shell?r:u(r)}t.exports=d}),ui=Q((e,t)=>{let n=process.platform===`win32`;function r(e,t){return Object.assign(Error(`${t} ${e.command} ENOENT`),{code:`ENOENT`,errno:`ENOENT`,syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function i(e,t){if(!n)return;let r=e.emit;e.emit=function(n,i){if(n===`exit`){let n=a(i,t,`spawn`);if(n)return r.call(e,`error`,n)}return r.apply(e,arguments)}}function a(e,t){return n&&e===1&&!t.file?r(t.original,`spawn`):null}function o(e,t){return n&&e===1&&!t.file?r(t.original,`spawnSync`):null}t.exports={hookChildProcess:i,verifyENOENT:a,verifyENOENTSync:o,notFoundError:r}}),di=Kr(Q((e,t)=>{let n=$(`child_process`),r=li(),i=ui();function a(e,t,a){let o=r(e,t,a),s=n.spawn(o.command,o.args,o.options);return i.hookChildProcess(s,o),s}function o(e,t,a){let o=r(e,t,a),s=n.spawnSync(o.command,o.args,o.options);return s.error=s.error||i.verifyENOENTSync(s.status,o),s}t.exports=a,t.exports.spawn=a,t.exports.sync=o,t.exports._parse=r,t.exports._enoent=i})(),1),fi=class extends Error{result;output;get exitCode(){if(this.result.exitCode!==null)return this.result.exitCode}constructor(e,t){super(`Process exited with non-zero status (${e.exitCode})`),this.result=e,this.output=t}};const pi={timeout:void 0,persist:!1},mi={windowsHide:!0};function hi(e,t){return{command:x(e),args:t??[]}}function gi(e){let t=new AbortController;for(let n of e){if(n.aborted)return t.abort(),n;n.addEventListener(`abort`,()=>{t.abort(n.reason)},{signal:t.signal})}return t.signal}async function _i(e){let t=``;for await(let n of e)t+=n.toString();return t}var vi=class{_process;_aborted=!1;_options;_command;_args;_resolveClose;_processClosed;_thrownError;get process(){return this._process}get pid(){return this._process?.pid}get exitCode(){if(this._process&&this._process.exitCode!==null)return this._process.exitCode}constructor(e,t,n){this._options={...pi,...n},this._command=e,this._args=t??[],this._processClosed=new Promise(e=>{this._resolveClose=e})}kill(e){return this._process?.kill(e)===!0}get aborted(){return this._aborted}get killed(){return this._process?.killed===!0}pipe(e,t,n){return bi(e,t,{...n,stdin:this})}async*[Symbol.asyncIterator](){let e=this._process;if(!e)return;let t=[];this._streamErr&&t.push(this._streamErr),this._streamOut&&t.push(this._streamOut);let n=Qr(t),r=T.createInterface({input:n});for await(let e of r)yield e.toString();if(await this._processClosed,e.removeAllListeners(),this._thrownError)throw this._thrownError;if(this._options?.throwOnError&&this.exitCode!==0&&this.exitCode!==void 0)throw new fi(this)}async _waitForOutput(){let e=this._process;if(!e)throw Error(`No process was started`);let[t,n]=await Promise.all([this._streamOut?_i(this._streamOut):``,this._streamErr?_i(this._streamErr):``]);if(await this._processClosed,this._options?.stdin&&await this._options.stdin,e.removeAllListeners(),this._thrownError)throw this._thrownError;let r={stderr:n,stdout:t,exitCode:this.exitCode};if(this._options.throwOnError&&this.exitCode!==0&&this.exitCode!==void 0)throw new fi(this,r);return r}then(e,t){return this._waitForOutput().then(e,t)}_streamOut;_streamErr;spawn(){let e=C(),t=this._options,n={...mi,...t.nodeOptions},r=[];this._resetState(),t.timeout!==void 0&&r.push(AbortSignal.timeout(t.timeout)),t.signal!==void 0&&r.push(t.signal),t.persist===!0&&(n.detached=!0),r.length>0&&(n.signal=gi(r)),n.env=Zr(e,n.env);let{command:i,args:a}=hi(this._command,this._args),o=(0,di._parse)(i,a,n),s=y(o.command,o.args,o.options);if(s.stderr&&(this._streamErr=s.stderr),s.stdout&&(this._streamOut=s.stdout),this._process=s,s.once(`error`,this._onError),s.once(`close`,this._onClose),t.stdin!==void 0&&s.stdin&&t.stdin.process){let{stdout:e}=t.stdin.process;e&&e.pipe(s.stdin)}}_resetState(){this._aborted=!1,this._processClosed=new Promise(e=>{this._resolveClose=e}),this._thrownError=void 0}_onError=e=>{if(e.name===`AbortError`&&(!(e.cause instanceof Error)||e.cause.name!==`TimeoutError`)){this._aborted=!0;return}this._thrownError=e};_onClose=()=>{this._resolveClose&&this._resolveClose()}};const yi=(e,t,n)=>{let r=new vi(e,t,n);return r.spawn(),r},bi=yi,xi=dr({dependencies:gr(mr(Z(),Z())),devDependencies:gr(mr(Z(),Z())),peerDependencies:gr(mr(Z(),Z())),packageManager:gr(Z())});async function Si(){return await Or(await Ci(),{schema:xi})}async function Ci(){let e=await Tr(`package.json`);if(!e)throw new wi;return e}var wi=class extends Error{name=`MissingPackageJson`;message=`Could not find a package.json file.`};async function Ti(e){let t=await Ci(),n=await r(t,`utf8`),i=Rr(n).indent||` `,o=JSON.parse(n);o.dependencies=Object.fromEntries(Object.entries({...o.dependencies,...e}).sort(([e],[t])=>e.localeCompare(t))),await a(t,JSON.stringify(o,null,i)+`
|
|
2
|
-
`)}async function Ei(e,t=`latest`){let n=new URL(`${e}/${t}`,`https://registry.npmjs.org/`),{version:r}=await(await fetch(n)).json();return r}const Di={npm:[`npm`,`install`],yarn:[`yarn`,`install`],pnpm:[`pnpm`,`install`],bun:[`bun`,`install`]};async function Oi(){let e=await Ci(),t=new URL(`.`,e),[n,...r]=Di[await Ai()];await yi(n,r,{nodeOptions:{cwd:o(t),stdio:`inherit`},throwOnError:!0})}const ki={"bun.lock":`bun`,"bun.lockb":`bun`,"pnpm-lock.yaml":`pnpm`,"yarn.lock":`yarn`,"package-lock.json":`npm`};async function Ai(){let e=await ji();if(e)return e;let t=await Ci();for(let e in ki){let n=ki[e];if(await Er(new URL(e,t)))return n}return`npm`}async function ji(){try{let e=await Si();if(!e.packageManager)return;let t=e.packageManager.split(`@`)[0];return t in Di?t:void 0}catch{return}}const Mi=`prismic.config.json`,Ni=`slicemachine.config.json`,Pi=dr({repositoryName:Z(),libraries:gr(lr(Z()))}),Fi=dr({repositoryName:Z(),libraries:gr(lr(Z()))});async function Ii(e){let t=await Hi();return await a(t,kr(e)),t}async function Li(){let e=await Bi();try{let t=await r(e,`utf8`);return hn(Pi,JSON.parse(t))}catch(e){throw e instanceof pn?new Ri(e.issues):new Ri}}var Ri=class extends Error{name=`InvalidPrismicConfig`;message=`${Mi} is invalid.`;issues;constructor(e=[]){super(),this.issues=e}};async function zi(e){let t=await Bi(),n={...await Li(),...e};return await a(t,kr(n)),n}async function Bi(){let e=await Tr(Mi,{stop:`package.json`});if(!e)throw new Vi;return e}var Vi=class extends Error{name=`MissingPrismicConfig`;message=`Could not find a ${Mi} file.`};async function Hi(){try{let e=await Ci();return new URL(Mi,e)}catch(e){throw e instanceof wi?new Ui(void 0,{cause:e}):e}}var Ui=class extends Error{name=`UnknownProjectRoot`};async function Wi(){let e=await qi();try{let t=await r(e,`utf8`);return hn(Fi,JSON.parse(t))}catch(e){throw e instanceof pn?new Gi(e.issues):new Gi}}var Gi=class extends Error{name=`InvalidLegacySliceMachineConfig`;message=`${Ni} is invalid.`;issues;constructor(e=[]){super(),this.issues=e}};async function Ki(){await i(await qi())}async function qi(){let e=await Tr(Ni,{stop:`package.json`});if(!e)throw new Ji;return e}var Ji=class extends Error{name=`MissingLegacySliceMachineConfig`;message=`Could not find a ${Ni} file.`};async function Yi(){let e;try{e=await Bi()}catch(t){if(t instanceof Vi)e=await Hi();else throw t}return new URL(`.`,e)}async function Xi(){try{return await Zi()}catch{return}}async function Zi(){return(await Li()).repositoryName}async function Qi(){let e=(await Li()).libraries;if(!e||e.length<1)return;let t=await Yi();return e.map(e=>wr(new URL(e.replace(/^\//,``),t)))}async function $i(){let e=await Yi();return await Er(new URL(`tsconfig.json`,e))}async function ea(){let{dependencies:e,devDependencies:t,peerDependencies:n}=await Si(),r={...e,...t,...n};if(`next`in r){let{NextJsAdapter:e}=await import(`./nextjs-DrbOdw3q.mjs`);return new e}if(`nuxt`in r){let{NuxtAdapter:e}=await import(`./nuxt-DO5Kp4yy.mjs`);return new e}if(`@sveltejs/kit`in r){let{SvelteKitAdapter:e}=await import(`./sveltekit-KHG7YUoX.mjs`);return new e}throw new ta}var ta=class extends Error{message=`No supported framework found (Next.js, Nuxt, or SvelteKit required)`},na=class{async initProject(){let e=await this.getSliceLibraries();for(let t of e)await this.createSliceIndexFile(t);await this.onProjectInitialized()}async getSliceLibraries(){return await Qi()||[await this.getDefaultSliceLibrary()]}async getSlices(){let e=[],t=await this.getSliceLibraries();for(let n of t){let t=new URL(`*/model.json`,n),r=Array.from(await Ht(o(t),{absolute:!0}),e=>s(e)),i=await Promise.all(r.map(async e=>({library:n,directory:new URL(`.`,e),model:await Or(e)})));e.push(...i)}return e.sort((e,t)=>e.model.id.toLowerCase().localeCompare(t.model.id.toLowerCase()))}async getSlice(e){let t=(await this.getSlices()).find(t=>t.model.id===e);if(!t)throw Error(`No slice found with ID: ${e}`);return t}async createSlice(e,t){t??=await this.getDefaultSliceLibrary(),await ra(e,t),await this.createSliceIndexFile(t),await this.onSliceCreated(e,t)}async updateSlice(e){await ra(e,(await this.getSlice(e.id)).library),await this.onSliceUpdated(e)}async deleteSlice(e){let t=await this.getSlice(e);await i(t.directory,{recursive:!0}),await this.createSliceIndexFile(t.library),await this.onSliceDeleted(e)}async getCustomTypes(){let e=await Yi(),t=new URL(`customtypes/`,e),n=new URL(`*/index.json`,t),r=Array.from(await Ht(o(n),{absolute:!0}),e=>s(e));return(await Promise.all(r.map(async e=>({directory:new URL(`.`,e),model:await Or(e)})))).sort((e,t)=>e.model.id.toLowerCase().localeCompare(t.model.id.toLowerCase()))}async getCustomType(e){let t=(await this.getCustomTypes()).find(t=>t.model.id===e);if(!t)throw Error(`No custom type found with ID: ${e}`);return t}async createCustomType(e){await ia(e),await this.onCustomTypeCreated(e)}async updateCustomType(e){await ia(e),await this.onCustomTypeUpdated(e)}async deleteCustomType(e){await i((await this.getCustomType(e)).directory,{recursive:!0}),await this.onCustomTypeDeleted(e)}};async function ra(e,t){let n=ae(e.name),r=new URL(n,wr(t));await Dr(new URL(`model.json`,wr(r)),kr(e))}async function ia(e){let t=await Yi(),n=new URL(`customtypes/`,t);await Dr(new URL(`${e.id}/index.json`,n),kr(e))}function aa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function oa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?aa(Object(n),!0).forEach(function(t){sa(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aa(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function sa(e,t,n){return t=ca(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ca(e){var t=la(e,`string`);return typeof t==`symbol`?t:String(t)}function la(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var ua=da({});function da(e){return t.withOptions=t=>da(oa(oa({},e),t)),t;function t(t,...n){let r=typeof t==`string`?[t]:t.raw,{alignValues:i=!1,escapeSpecialCharacters:a=Array.isArray(t),trimWhitespace:o=!0}=e,s=``;for(let e=0;e<r.length;e++){let t=r[e];if(a&&(t=t.replace(/\\\n[ \t]*/g,``).replace(/\\`/g,"`").replace(/\\\$/g,`$`).replace(/\\\{/g,`{`)),s+=t,e<n.length){let t=i?fa(n[e],s):n[e];s+=t}}let c=s.split(`
|
|
3
|
-
`),l=null;for(let e of c){let t=e.match(/^(\s+)\S+/);if(t){let e=t[1].length;l=l?Math.min(l,e):e}}if(l!==null){let e=l;s=c.map(t=>t[0]===` `||t[0]===` `?t.slice(e):t).join(`
|
|
4
|
-
`)}return o&&(s=s.trim()),a&&(s=s.replace(/\\n/g,`
|
|
5
|
-
`).replace(/\\t/g,` `).replace(/\\r/g,`\r`).replace(/\\v/g,`\v`).replace(/\\b/g,`\b`).replace(/\\f/g,`\f`).replace(/\\0/g,`\0`).replace(/\\x([\da-fA-F]{2})/g,(e,t)=>String.fromCharCode(parseInt(t,16))).replace(/\\u\{([\da-fA-F]{1,6})\}/g,(e,t)=>String.fromCodePoint(parseInt(t,16))).replace(/\\u([\da-fA-F]{4})/g,(e,t)=>String.fromCharCode(parseInt(t,16)))),typeof Bun<`u`&&(s=s.replace(/\\u(?:\{([\da-fA-F]{1,6})\}|([\da-fA-F]{4}))/g,(e,t,n)=>{let r=t??n??``;return String.fromCodePoint(parseInt(r,16))})),s}}function fa(e,t){if(typeof e!=`string`||!e.includes(`
|
|
6
|
-
`))return e;let n=t.slice(t.lastIndexOf(`
|
|
7
|
-
`)+1).match(/^(\s+)/);if(n){let t=n[1];return e.replace(/\n/g,`\n${t}`)}return e}const pa=ua.withOptions({alignValues:!0});export{ar as A,A as B,Er as C,lr as D,br as E,Z as F,N as G,j as H,Cr as I,er as L,dr as M,gr as N,sr as O,mr as P,hn as R,kr as S,wr as T,F as U,ie as V,P as W,zi as _,$i as a,Ei as b,Xi as c,Vi as d,Ui as f,Wi as g,Li as h,ea as i,vr as j,fr as k,Gi as l,Ki as m,na as n,Yi as o,Ii as p,ta as r,Zi as s,pa as t,Ri as u,Ti as v,Dr as w,Oi as x,Ci as y,ae as z};
|
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
import{C as e,T as t,a as n,b as r,n as i,o as a,t as o,v as s,w as c,y as l,z as u}from"./string-CnZrLYLV.mjs";import{n as d}from"./builders-hKD4IrLX-cdTCGdwG.mjs";import{createRequire as f}from"node:module";import{writeFile as p}from"node:fs/promises";import{fileURLToPath as m}from"node:url";import{relative as h}from"node:path";function g(e){let{typescript:t}=e;return t?o`
|
|
2
|
-
import { createClient as baseCreateClient, type Route } from "@prismicio/client";
|
|
3
|
-
import { type CreateClientConfig, enableAutoPreviews } from '@prismicio/svelte/kit';
|
|
4
|
-
import prismicConfig from "../../prismic.config.json";
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* The project's Prismic repository name.
|
|
8
|
-
*/
|
|
9
|
-
export const repositoryName = prismicConfig.repositoryName;
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* A list of Route Resolver objects that define how a document's \`url\` field is resolved.
|
|
13
|
-
*
|
|
14
|
-
* {@link https://prismic.io/docs/route-resolver}
|
|
15
|
-
*
|
|
16
|
-
* Note: \`prismic sync\` may append new default routes for Page Types. Feel free
|
|
17
|
-
* to edit these to match your site's routing structure.
|
|
18
|
-
*/
|
|
19
|
-
// TODO: Update the routes array to match your project's route structure.
|
|
20
|
-
const routes: Route[] = [
|
|
21
|
-
// Examples:
|
|
22
|
-
// { type: "homepage", path: "/" },
|
|
23
|
-
// { type: "page", path: "/:uid" },
|
|
24
|
-
];
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Creates a Prismic client for the project's repository. The client is used to
|
|
28
|
-
* query content from the Prismic API.
|
|
29
|
-
*
|
|
30
|
-
* @param config - Configuration for the Prismic client.
|
|
31
|
-
*/
|
|
32
|
-
export const createClient = ({ cookies, ...config }: CreateClientConfig = {}) => {
|
|
33
|
-
const client = baseCreateClient(repositoryName, {
|
|
34
|
-
routes,
|
|
35
|
-
...config,
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
enableAutoPreviews({ client, cookies });
|
|
39
|
-
|
|
40
|
-
return client;
|
|
41
|
-
};
|
|
42
|
-
`:o`
|
|
43
|
-
import { createClient as baseCreateClient } from "@prismicio/client";
|
|
44
|
-
import { enableAutoPreviews } from '@prismicio/svelte/kit';
|
|
45
|
-
import prismicConfig from "../../prismic.config.json";
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* The project's Prismic repository name.
|
|
49
|
-
*/
|
|
50
|
-
export const repositoryName = prismicConfig.repositoryName;
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* A list of Route Resolver objects that define how a document's \`url\` field is resolved.
|
|
54
|
-
*
|
|
55
|
-
* {@link https://prismic.io/docs/route-resolver#route-resolver}
|
|
56
|
-
*
|
|
57
|
-
* Note: \`prismic sync\` may append new default routes for Page Types. Feel free
|
|
58
|
-
* to edit these to match your site's routing structure.
|
|
59
|
-
*
|
|
60
|
-
* @type {import("@prismicio/client").Route[]}
|
|
61
|
-
*/
|
|
62
|
-
// TODO: Update the routes array to match your project's route structure.
|
|
63
|
-
const routes = [
|
|
64
|
-
// Examples:
|
|
65
|
-
// { type: "homepage", path: "/" },
|
|
66
|
-
// { type: "page", path: "/:uid" },
|
|
67
|
-
];
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Creates a Prismic client for the project's repository. The client is used to
|
|
71
|
-
* query content from the Prismic API.
|
|
72
|
-
*
|
|
73
|
-
* @param {import('@prismicio/svelte/kit').CreateClientConfig} config - Configuration for the Prismic client.
|
|
74
|
-
*/
|
|
75
|
-
export const createClient = ({ cookies, ...config } = {}) => {
|
|
76
|
-
const client = baseCreateClient(repositoryName, {
|
|
77
|
-
routes,
|
|
78
|
-
...config,
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
enableAutoPreviews({ client, cookies });
|
|
82
|
-
|
|
83
|
-
return client;
|
|
84
|
-
};
|
|
85
|
-
`}function _(e){let{version:t}=e,n=o`
|
|
86
|
-
<script>
|
|
87
|
-
import { SliceSimulator, SliceZone } from '@prismicio/svelte';
|
|
88
|
-
import { components } from '$lib/slices';
|
|
89
|
-
<\/script>
|
|
90
|
-
|
|
91
|
-
<!-- Slot syntax is used for backward compatibility with Svelte <=4. -->
|
|
92
|
-
<SliceSimulator let:slices>
|
|
93
|
-
<SliceZone {slices} {components} />
|
|
94
|
-
</SliceSimulator>
|
|
95
|
-
`,r=o`
|
|
96
|
-
<script>
|
|
97
|
-
import { SliceSimulator, SliceZone } from '@prismicio/svelte';
|
|
98
|
-
import { components } from '$lib/slices';
|
|
99
|
-
<\/script>
|
|
100
|
-
|
|
101
|
-
<SliceSimulator let:slices>
|
|
102
|
-
<SliceZone {slices} {components} />
|
|
103
|
-
</SliceSimulator>
|
|
104
|
-
`;return t<=4?r:n}function v(e){let{typescript:t}=e;return t?o`
|
|
105
|
-
import { redirectToPreviewURL } from '@prismicio/svelte/kit';
|
|
106
|
-
import { createClient } from '$lib/prismicio';
|
|
107
|
-
import type { RequestHandler } from "./$types";
|
|
108
|
-
|
|
109
|
-
export const GET: RequestHandler = async ({ fetch, request, cookies }) => {
|
|
110
|
-
const client = createClient({ fetch });
|
|
111
|
-
|
|
112
|
-
return await redirectToPreviewURL({ client, request, cookies });
|
|
113
|
-
}
|
|
114
|
-
`:o`
|
|
115
|
-
import { redirectToPreviewURL } from '@prismicio/svelte/kit';
|
|
116
|
-
import { createClient } from '$lib/prismicio';
|
|
117
|
-
|
|
118
|
-
/* @type {import("./$types").RequestHandler} */
|
|
119
|
-
export async function GET({ fetch, request, cookies }) {
|
|
120
|
-
const client = createClient({ fetch });
|
|
121
|
-
|
|
122
|
-
return await redirectToPreviewURL({ client, request, cookies });
|
|
123
|
-
}
|
|
124
|
-
`}function y(e){let{version:t}=e,n=o`
|
|
125
|
-
<script>
|
|
126
|
-
import { isFilled, asImageSrc } from '@prismicio/client';
|
|
127
|
-
import { PrismicPreview } from '@prismicio/svelte/kit';
|
|
128
|
-
import { page } from '$app/state';
|
|
129
|
-
import { repositoryName } from '$lib/prismicio';
|
|
130
|
-
|
|
131
|
-
const { children } = $props();
|
|
132
|
-
<\/script>
|
|
133
|
-
|
|
134
|
-
<svelte:head>
|
|
135
|
-
<title>{page.data.page?.data.meta_title}</title>
|
|
136
|
-
<meta property="og:title" content={page.data.page?.data.meta_title} />
|
|
137
|
-
{#if isFilled.keyText(page.data.page?.data.meta_description)}
|
|
138
|
-
<meta name="description" content={page.data.page.data.meta_description} />
|
|
139
|
-
<meta property="og:description" content={page.data.page.data.meta_description} />
|
|
140
|
-
{/if}
|
|
141
|
-
{#if isFilled.image(page.data.page?.data.meta_image)}
|
|
142
|
-
<meta property="og:image" content={asImageSrc(page.data.page.data.meta_image)} />
|
|
143
|
-
{/if}
|
|
144
|
-
</svelte:head>
|
|
145
|
-
{@render children()}
|
|
146
|
-
<PrismicPreview {repositoryName} />
|
|
147
|
-
`,r=o`
|
|
148
|
-
<script>
|
|
149
|
-
import { isFilled, asImageSrc } from '@prismicio/client';
|
|
150
|
-
import { PrismicPreview } from '@prismicio/svelte/kit';
|
|
151
|
-
import { page } from '$app/state';
|
|
152
|
-
import { repositoryName } from '$lib/prismicio';
|
|
153
|
-
<\/script>
|
|
154
|
-
|
|
155
|
-
<svelte:head>
|
|
156
|
-
<title>{page.data.page?.data.meta_title}</title>
|
|
157
|
-
<meta property="og:title" content={page.data.page?.data.meta_title} />
|
|
158
|
-
{#if isFilled.keyText(page.data.page?.data.meta_description)}
|
|
159
|
-
<meta name="description" content={page.data.page.data.meta_description} />
|
|
160
|
-
<meta property="og:description" content={page.data.page.data.meta_description} />
|
|
161
|
-
{/if}
|
|
162
|
-
{#if isFilled.image(page.data.page?.data.meta_image)}
|
|
163
|
-
<meta property="og:image" content={asImageSrc(page.data.page.data.meta_image)} />
|
|
164
|
-
{/if}
|
|
165
|
-
</svelte:head>
|
|
166
|
-
<slot />
|
|
167
|
-
<PrismicPreview {repositoryName} />
|
|
168
|
-
`;return t<=4?r:n}const b=o`
|
|
169
|
-
<section data-slice-type={slice.slice_type} data-slice-variation={slice.variation}>
|
|
170
|
-
Placeholder component for {slice.slice_type} (variation: {slice.variation}) slices.
|
|
171
|
-
<br />
|
|
172
|
-
<strong>You can edit this slice directly in your code editor.</strong>
|
|
173
|
-
</section>
|
|
174
|
-
`;function x(e){let{name:t,typescript:n,version:r}=e,i=u(t),a=o`
|
|
175
|
-
<script lang="ts">
|
|
176
|
-
import type { Content } from '@prismicio/client';
|
|
177
|
-
import type { SliceComponentProps } from '@prismicio/svelte';
|
|
178
|
-
|
|
179
|
-
type Props = SliceComponentProps<Content.${i}Slice>;
|
|
180
|
-
|
|
181
|
-
const { slice }: Props = $props();
|
|
182
|
-
<\/script>
|
|
183
|
-
|
|
184
|
-
${b}
|
|
185
|
-
`,s=o`
|
|
186
|
-
<script>
|
|
187
|
-
/* @typedef {import("@prismicio/client").Content} Content */
|
|
188
|
-
/* @typedef {import("@prismicio/svelte").SliceComponentProps} SliceComponentProps */
|
|
189
|
-
|
|
190
|
-
/* @type {SliceComponentProps<Content.${i}Slice>} */
|
|
191
|
-
const { slice } = $props();
|
|
192
|
-
<\/script>
|
|
193
|
-
|
|
194
|
-
${b}
|
|
195
|
-
`,c=o`
|
|
196
|
-
<script lang="ts">
|
|
197
|
-
import type { Content } from '@prismicio/client';
|
|
198
|
-
|
|
199
|
-
export let slice: Content.${i}Slice;
|
|
200
|
-
<\/script>
|
|
201
|
-
|
|
202
|
-
${b}
|
|
203
|
-
`,l=o`
|
|
204
|
-
<script>
|
|
205
|
-
/** @type {import("@prismicio/client").Content.${i}Slice} */
|
|
206
|
-
export let slice;
|
|
207
|
-
<\/script>
|
|
208
|
-
|
|
209
|
-
${b}
|
|
210
|
-
`;return n?r<=4?c:a:r<=4?l:s}var S=class extends i{id=`sveltekit`;async onProjectInitialized(){await s({"@prismicio/client":`^${await r(`@prismicio/client`)}`,"@prismicio/svelte":`^${await r(`@prismicio/svelte`)}`}),await C(),await w(),await T(),await E(),await D(),await O(),await k(),await A()}async onSliceCreated(e,r){let i=u(e.name),a=new URL(i,t(r));await c(new URL(`index.svelte`,t(a)),x({name:e.name,typescript:await n(),version:await M()}))}onSliceUpdated(){}onSliceDeleted(){}onCustomTypeCreated(){}onCustomTypeUpdated(){}onCustomTypeDeleted(){}async createSliceIndexFile(e){let t=(await this.getSlices()).filter(t=>t.library.href===e.href),n=t.map(t=>`import ${u(t.model.name)} from "./${h(m(e),m(t.directory))}/index.svelte";`),r=t.map(e=>{let t=u(e.model.name);return`${e.model.id}: ${t}`}),i=o`
|
|
211
|
-
// Code generated by Prismic. DO NOT EDIT.
|
|
212
|
-
|
|
213
|
-
${n.join(`
|
|
214
|
-
`)}
|
|
215
|
-
|
|
216
|
-
export const components = {
|
|
217
|
-
${r.join(`,
|
|
218
|
-
`)}
|
|
219
|
-
};
|
|
220
|
-
`,a=`index.${await j()}`;await c(new URL(a,e),i)}async getDefaultSliceLibrary(){let e=await a();return new URL(`src/lib/slices/`,e)}};async function C(){let t=await j(),r=await a(),i=new URL(`src/lib/prismicio.${t}`,r);await e(i)||await c(i,g({typescript:await n()}))}async function w(){let t=await a(),n=new URL(`src/routes/slice-simulator/+page.svelte`,t);await e(n)||await c(n,_({version:await M()}))}async function T(){let t=await j(),n=await a(),r=new URL(`src/params/preview.${t}`,n);await e(r)||await c(r,o`
|
|
221
|
-
export function match(param) {
|
|
222
|
-
return param === 'preview';
|
|
223
|
-
}
|
|
224
|
-
`)}async function E(){let t=await j(),r=await a(),i=new URL(`src/routes/api/preview/+server.${t}`,r);await e(i)||await c(i,v({typescript:await n()}))}async function D(){let t=await a(),n=new URL(`src/routes/[[preview=preview]]/README.md`,t);await e(n)||await c(n,o`
|
|
225
|
-
This directory adds support for optional \`/preview\` routes. Do not remove this directory.
|
|
226
|
-
|
|
227
|
-
All routes within this directory will be served using the following URLs:
|
|
228
|
-
|
|
229
|
-
- \`/example-route\` (prerendered)
|
|
230
|
-
- \`/preview/example-route\` (server-rendered)
|
|
231
|
-
|
|
232
|
-
See <https://prismic.io/docs/svelte-preview> for more information.
|
|
233
|
-
`)}async function O(){let t=await j(),n=await a(),r=new URL(`src/routes/+layout.server.${t}`,n);await e(r)||await c(r,o`
|
|
234
|
-
export const prerender = "auto";
|
|
235
|
-
`)}async function k(){let t=await a(),n=new URL(`src/routes/+layout.svelte`,t);await e(n)||await c(n,y({version:await M()}))}async function A(){let t=await a(),n=new URL(`vite.config.js`,t);if(await e(n)||(n=new URL(`vite.config.ts`,t)),!await e(n))return;let r=n.pathname,i=await d(r);if(i.exports.default.$type!==`function-call`)return;let o=i.exports.default.$args[0];o.server??={},o.server.fs??={},o.server.fs.allow??=[],o.server.fs.allow.includes(`./prismic.config.json`)||o.server.fs.allow.push(`./prismic.config.json`);let s=i.generate().code.replace(/\n\s*\n(?=\s*server:)/,`
|
|
236
|
-
`);await p(n,s)}async function j(){return await n()?`ts`:`js`}async function M(){let{version:e}=f(await l())(`svelte/package.json`),t=Number.parseInt(e.split(`.`)[0]);return Number.isNaN(t)?1/0:t}export{S as SvelteKitAdapter};
|