gemi 0.113.0 → 0.115.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/ai/index.js +32 -32
- package/dist/ai/index.js.map +3 -5
- package/dist/app/App.d.ts.map +1 -1
- package/dist/app/index.js +1 -1
- package/dist/bin/gemi.js +8 -1
- package/dist/bin/gemi.js.map +3 -3
- package/dist/bun/plugin.js +1 -1
- package/dist/bun/preload.js +1 -1
- package/dist/{chunk-1p85fdrk.js → chunk-0av6xvm6.js} +2 -2
- package/dist/{chunk-1p85fdrk.js.map → chunk-0av6xvm6.js.map} +1 -1
- package/dist/chunk-0z8ejxre.js +5 -0
- package/dist/chunk-0z8ejxre.js.map +12 -0
- package/dist/{chunk-r7b12dmm.js → chunk-15c2vgaf.js} +2 -2
- package/dist/{chunk-r7b12dmm.js.map → chunk-15c2vgaf.js.map} +1 -1
- package/dist/{chunk-fr0arqdj.js → chunk-1hr4xht1.js} +2 -2
- package/dist/{chunk-fr0arqdj.js.map → chunk-1hr4xht1.js.map} +1 -1
- package/dist/{chunk-4t1pbt9p.js → chunk-1myhm0g3.js} +3 -3
- package/dist/{chunk-4t1pbt9p.js.map → chunk-1myhm0g3.js.map} +1 -1
- package/dist/{chunk-v4gwmhtf.js → chunk-1vzks22y.js} +2 -2
- package/dist/{chunk-v4gwmhtf.js.map → chunk-1vzks22y.js.map} +1 -1
- package/dist/{chunk-vzf5pbx3.js → chunk-2tzm58j3.js} +2 -2
- package/dist/{chunk-vzf5pbx3.js.map → chunk-2tzm58j3.js.map} +1 -1
- package/dist/{chunk-qx87cdfg.js → chunk-2z1981d0.js} +2 -2
- package/dist/{chunk-qx87cdfg.js.map → chunk-2z1981d0.js.map} +1 -1
- package/dist/{chunk-mepaedy5.js → chunk-3hrj5rwm.js} +2 -2
- package/dist/{chunk-mepaedy5.js.map → chunk-3hrj5rwm.js.map} +1 -1
- package/dist/{chunk-rh2fad7n.js → chunk-41da9628.js} +1 -1
- package/dist/{chunk-5q4a7yqf.js → chunk-56jky6vf.js} +2 -2
- package/dist/{chunk-5q4a7yqf.js.map → chunk-56jky6vf.js.map} +1 -1
- package/dist/{chunk-5x0aacrn.js → chunk-785b41h1.js} +2 -2
- package/dist/{chunk-5x0aacrn.js.map → chunk-785b41h1.js.map} +1 -1
- package/dist/{chunk-nysqgzp1.js → chunk-7g9yh5ae.js} +2 -2
- package/dist/{chunk-nysqgzp1.js.map → chunk-7g9yh5ae.js.map} +1 -1
- package/dist/{chunk-g8kx549d.js → chunk-7vb4eey2.js} +3 -3
- package/dist/{chunk-g8kx549d.js.map → chunk-7vb4eey2.js.map} +1 -1
- package/dist/{chunk-szr1k584.js → chunk-8rv62v14.js} +2 -2
- package/dist/{chunk-szr1k584.js.map → chunk-8rv62v14.js.map} +1 -1
- package/dist/{chunk-68s1f5d5.js → chunk-98m15b9x.js} +2 -2
- package/dist/{chunk-68s1f5d5.js.map → chunk-98m15b9x.js.map} +1 -1
- package/dist/{chunk-y596ghpz.js → chunk-9b4erdy2.js} +2 -2
- package/dist/{chunk-y596ghpz.js.map → chunk-9b4erdy2.js.map} +1 -1
- package/dist/{chunk-rg4hhxj3.js → chunk-9n1hx3mq.js} +2 -2
- package/dist/{chunk-rg4hhxj3.js.map → chunk-9n1hx3mq.js.map} +1 -1
- package/dist/{chunk-9tpx9ag3.js → chunk-aazmrxj9.js} +2 -2
- package/dist/{chunk-9tpx9ag3.js.map → chunk-aazmrxj9.js.map} +1 -1
- package/dist/{chunk-01qd6xx3.js → chunk-aeh67ynz.js} +3 -3
- package/dist/{chunk-01qd6xx3.js.map → chunk-aeh67ynz.js.map} +1 -1
- package/dist/{chunk-5nqkwa2w.js → chunk-agyfv3f8.js} +1 -1
- package/dist/{chunk-sr18y2ck.js → chunk-bra1a1fq.js} +2 -2
- package/dist/{chunk-sr18y2ck.js.map → chunk-bra1a1fq.js.map} +1 -1
- package/dist/{chunk-y6v0x869.js → chunk-cbqazg9k.js} +2 -2
- package/dist/{chunk-y6v0x869.js.map → chunk-cbqazg9k.js.map} +1 -1
- package/dist/{chunk-k2fh4r0p.js → chunk-d2gfcf85.js} +2 -2
- package/dist/{chunk-k2fh4r0p.js.map → chunk-d2gfcf85.js.map} +1 -1
- package/dist/chunk-d6591xck.js +46 -0
- package/dist/{chunk-6g20zec2.js.map → chunk-d6591xck.js.map} +6 -6
- package/dist/{chunk-fnkjmq94.js → chunk-d9mar37g.js} +2 -2
- package/dist/{chunk-fnkjmq94.js.map → chunk-d9mar37g.js.map} +1 -1
- package/dist/chunk-dexdkh3z.js +14 -0
- package/dist/{chunk-cqnfp0n9.js.map → chunk-dexdkh3z.js.map} +7 -7
- package/dist/{chunk-bq5nqqeq.js → chunk-e573yxpq.js} +1 -1
- package/dist/{chunk-p3zmc8k8.js → chunk-eqse2m6n.js} +2 -2
- package/dist/{chunk-p3zmc8k8.js.map → chunk-eqse2m6n.js.map} +1 -1
- package/dist/{chunk-yyzexrnb.js → chunk-er3wf6ng.js} +2 -2
- package/dist/{chunk-yyzexrnb.js.map → chunk-er3wf6ng.js.map} +1 -1
- package/dist/{chunk-3f1kq32g.js → chunk-fre6f4nk.js} +2 -2
- package/dist/{chunk-3f1kq32g.js.map → chunk-fre6f4nk.js.map} +1 -1
- package/dist/{chunk-qt8nvpqp.js → chunk-fxgxf16k.js} +2 -2
- package/dist/{chunk-qt8nvpqp.js.map → chunk-fxgxf16k.js.map} +1 -1
- package/dist/{chunk-6wymbbes.js → chunk-gts5p6mw.js} +3 -3
- package/dist/{chunk-6wymbbes.js.map → chunk-gts5p6mw.js.map} +1 -1
- package/dist/{chunk-571rvxe6.js → chunk-hdps9n52.js} +2 -2
- package/dist/{chunk-571rvxe6.js.map → chunk-hdps9n52.js.map} +1 -1
- package/dist/{chunk-w45agtch.js → chunk-hytt9qyj.js} +2 -2
- package/dist/{chunk-w45agtch.js.map → chunk-hytt9qyj.js.map} +1 -1
- package/dist/{chunk-de03dewf.js → chunk-jafm3613.js} +2 -2
- package/dist/{chunk-de03dewf.js.map → chunk-jafm3613.js.map} +1 -1
- package/dist/{chunk-dbwhgyg3.js → chunk-jdhdrr2k.js} +2 -2
- package/dist/{chunk-dbwhgyg3.js.map → chunk-jdhdrr2k.js.map} +1 -1
- package/dist/{chunk-d04r0hdf.js → chunk-jmpw6bqz.js} +2 -2
- package/dist/{chunk-d04r0hdf.js.map → chunk-jmpw6bqz.js.map} +1 -1
- package/dist/{chunk-vwprq300.js → chunk-kejwjerj.js} +2 -2
- package/dist/{chunk-vwprq300.js.map → chunk-kejwjerj.js.map} +1 -1
- package/dist/{chunk-wr3e4sez.js → chunk-kqxdsv22.js} +2 -2
- package/dist/{chunk-wr3e4sez.js.map → chunk-kqxdsv22.js.map} +1 -1
- package/dist/{chunk-9vsj0ksk.js → chunk-ktr3k768.js} +3 -3
- package/dist/{chunk-9vsj0ksk.js.map → chunk-ktr3k768.js.map} +1 -1
- package/dist/{chunk-kz4yp5n7.js → chunk-m54s6jpr.js} +2 -2
- package/dist/{chunk-8mbyyh8j.js.map → chunk-m54s6jpr.js.map} +1 -1
- package/dist/{chunk-xqwdn9kb.js → chunk-mazznq15.js} +3 -3
- package/dist/{chunk-xqwdn9kb.js.map → chunk-mazznq15.js.map} +1 -1
- package/dist/{chunk-zng3qexn.js → chunk-mps6ynbh.js} +2 -2
- package/dist/{chunk-zng3qexn.js.map → chunk-mps6ynbh.js.map} +1 -1
- package/dist/{chunk-vdwagp7y.js → chunk-mqfzdfnz.js} +2 -2
- package/dist/{chunk-vdwagp7y.js.map → chunk-mqfzdfnz.js.map} +1 -1
- package/dist/{chunk-mk0rtgd1.js → chunk-mschc94q.js} +2 -2
- package/dist/{chunk-mk0rtgd1.js.map → chunk-mschc94q.js.map} +1 -1
- package/dist/{chunk-x5yq097b.js → chunk-mtbygktb.js} +3 -3
- package/dist/{chunk-x5yq097b.js.map → chunk-mtbygktb.js.map} +1 -1
- package/dist/{chunk-f1y8eggf.js → chunk-n672d4g8.js} +2 -2
- package/dist/{chunk-f1y8eggf.js.map → chunk-n672d4g8.js.map} +1 -1
- package/dist/{chunk-4tp2cr02.js → chunk-pyk3gzvc.js} +2 -2
- package/dist/{chunk-4tp2cr02.js.map → chunk-pyk3gzvc.js.map} +1 -1
- package/dist/{chunk-agw3anaf.js → chunk-qjhw8nje.js} +1 -1
- package/dist/{chunk-vqa3agzw.js → chunk-qsrcdzan.js} +3 -3
- package/dist/{chunk-vqa3agzw.js.map → chunk-qsrcdzan.js.map} +1 -1
- package/dist/{chunk-nksn6xcd.js → chunk-sr942vb1.js} +2 -2
- package/dist/{chunk-nksn6xcd.js.map → chunk-sr942vb1.js.map} +1 -1
- package/dist/{chunk-kexsfyjj.js → chunk-t04f3akb.js} +2 -2
- package/dist/{chunk-kexsfyjj.js.map → chunk-t04f3akb.js.map} +1 -1
- package/dist/chunk-t24p7gc6.js +5 -0
- package/dist/{chunk-fsfbyg5e.js.map → chunk-t24p7gc6.js.map} +1 -1
- package/dist/chunk-t4t3hqe0.js +10 -0
- package/dist/chunk-t4t3hqe0.js.map +38 -0
- package/dist/{chunk-z5hrymvn.js → chunk-t4yh4nf9.js} +3 -3
- package/dist/{chunk-z5hrymvn.js.map → chunk-t4yh4nf9.js.map} +1 -1
- package/dist/{chunk-c7mp2kyp.js → chunk-tn2bryy2.js} +2 -2
- package/dist/{chunk-c7mp2kyp.js.map → chunk-tn2bryy2.js.map} +1 -1
- package/dist/chunk-tw5kwbx4.js +4 -0
- package/dist/{chunk-kp7k4s5c.js.map → chunk-tw5kwbx4.js.map} +3 -3
- package/dist/{chunk-zyer1g7k.js → chunk-tzm3c7n6.js} +4 -4
- package/dist/{chunk-zyer1g7k.js.map → chunk-tzm3c7n6.js.map} +1 -1
- package/dist/{chunk-1se4t9rg.js → chunk-vbdty91k.js} +3 -3
- package/dist/{chunk-1se4t9rg.js.map → chunk-vbdty91k.js.map} +1 -1
- package/dist/{chunk-8mbyyh8j.js → chunk-vw8849ys.js} +2 -2
- package/dist/{chunk-kz4yp5n7.js.map → chunk-vw8849ys.js.map} +1 -1
- package/dist/{chunk-g8sc6scv.js → chunk-vxm6yevm.js} +2 -2
- package/dist/{chunk-g8sc6scv.js.map → chunk-vxm6yevm.js.map} +1 -1
- package/dist/{chunk-qpttgn4k.js → chunk-whtzggn6.js} +3 -3
- package/dist/{chunk-qpttgn4k.js.map → chunk-whtzggn6.js.map} +1 -1
- package/dist/{chunk-7jnpnjth.js → chunk-wyw6p3fg.js} +2 -2
- package/dist/{chunk-7jnpnjth.js.map → chunk-wyw6p3fg.js.map} +1 -1
- package/dist/{chunk-atmzm0z3.js → chunk-wzrt5mac.js} +2 -2
- package/dist/{chunk-atmzm0z3.js.map → chunk-wzrt5mac.js.map} +1 -1
- package/dist/{chunk-y6frz1vm.js → chunk-x7cpth2f.js} +1 -1
- package/dist/{chunk-essqp1ek.js → chunk-xt9tv99x.js} +2 -2
- package/dist/{chunk-essqp1ek.js.map → chunk-xt9tv99x.js.map} +1 -1
- package/dist/{chunk-x5sert1k.js → chunk-yhrye9cm.js} +2 -2
- package/dist/{chunk-x5sert1k.js.map → chunk-yhrye9cm.js.map} +1 -1
- package/dist/{chunk-vc9phr57.js → chunk-zyt2w03d.js} +2 -2
- package/dist/{chunk-vc9phr57.js.map → chunk-zyt2w03d.js.map} +1 -1
- package/dist/config/index.js +1 -1
- package/dist/console/run.js +2 -2
- package/dist/console/run.js.map +1 -1
- package/dist/container/index.js +2 -2
- package/dist/container/index.js.map +1 -1
- package/dist/database/index.js +2 -2
- package/dist/database/index.js.map +1 -1
- package/dist/email/index.js +2 -2
- package/dist/email/index.js.map +1 -1
- package/dist/facades/Storage.d.ts +25 -1
- package/dist/facades/Storage.d.ts.map +1 -1
- package/dist/facades/index.js +2 -2
- package/dist/facades/index.js.map +1 -1
- package/dist/foundation/index.js +2 -2
- package/dist/foundation/index.js.map +1 -1
- package/dist/http/HttpRequest.d.ts +31 -0
- package/dist/http/HttpRequest.d.ts.map +1 -1
- package/dist/http/McpRouter.d.ts +54 -1
- package/dist/http/McpRouter.d.ts.map +1 -1
- package/dist/http/RateLimitMiddleware.d.ts +4 -1
- package/dist/http/RateLimitMiddleware.d.ts.map +1 -1
- package/dist/http/index.d.ts +1 -0
- package/dist/http/index.d.ts.map +1 -1
- package/dist/http/index.js +2 -2
- package/dist/http/index.js.map +1 -1
- package/dist/http/modelOriginated.d.ts +36 -2
- package/dist/http/modelOriginated.d.ts.map +1 -1
- package/dist/i18n/dictionaryRuntime.js +2 -2
- package/dist/i18n/dictionaryRuntime.js.map +1 -1
- package/dist/i18n/index.js +2 -2
- package/dist/i18n/index.js.map +1 -1
- package/dist/kernel/Kernel.d.ts +3 -0
- package/dist/kernel/Kernel.d.ts.map +1 -1
- package/dist/kernel/index.js +3 -3
- package/dist/kernel/index.js.map +3 -3
- package/dist/orm/index.js +2 -2
- package/dist/orm/index.js.map +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/index.js.map +1 -1
- package/dist/services/file-storage/drivers/AzureBlobDriver.d.ts +12 -1
- package/dist/services/file-storage/drivers/AzureBlobDriver.d.ts.map +1 -1
- package/dist/services/file-storage/drivers/FileStorageDriver.d.ts +32 -1
- package/dist/services/file-storage/drivers/FileStorageDriver.d.ts.map +1 -1
- package/dist/services/file-storage/drivers/FileSystemDriver.d.ts +22 -1
- package/dist/services/file-storage/drivers/FileSystemDriver.d.ts.map +1 -1
- package/dist/services/file-storage/drivers/S3Driver.d.ts +14 -1
- package/dist/services/file-storage/drivers/S3Driver.d.ts.map +1 -1
- package/dist/services/file-storage/drivers/types.d.ts +26 -0
- package/dist/services/file-storage/drivers/types.d.ts.map +1 -1
- package/dist/services/index.d.ts +8 -3
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +44 -9
- package/dist/services/index.js.map +8 -5
- package/dist/services/mcp/McpRegistry.d.ts +190 -29
- package/dist/services/mcp/McpRegistry.d.ts.map +1 -1
- package/dist/services/mcp/http/McpHttpServer.d.ts +153 -0
- package/dist/services/mcp/http/McpHttpServer.d.ts.map +1 -0
- package/dist/services/mcp/http/callers.d.ts +131 -0
- package/dist/services/mcp/http/callers.d.ts.map +1 -0
- package/dist/services/mcp/http/limits.d.ts +11 -0
- package/dist/services/mcp/http/limits.d.ts.map +1 -0
- package/dist/services/mcp/http/oauth/McpOAuthServer.d.ts +150 -0
- package/dist/services/mcp/http/oauth/McpOAuthServer.d.ts.map +1 -0
- package/dist/services/mcp/http/oauth/consentPage.d.ts +14 -0
- package/dist/services/mcp/http/oauth/consentPage.d.ts.map +1 -0
- package/dist/services/mcp/http/oauth/store.d.ts +98 -0
- package/dist/services/mcp/http/oauth/store.d.ts.map +1 -0
- package/dist/services/mcp/http/protocol.d.ts +95 -0
- package/dist/services/mcp/http/protocol.d.ts.map +1 -0
- package/dist/services/mcp/http/signedState.d.ts +25 -0
- package/dist/services/mcp/http/signedState.d.ts.map +1 -0
- package/dist/services/queue/work.js +2 -2
- package/dist/services/queue/work.js.map +1 -1
- package/dist/services/router/ApiRouteDispatcher.d.ts +29 -0
- package/dist/services/router/ApiRouteDispatcher.d.ts.map +1 -1
- package/dist/services/router/RouteServiceProvider.d.ts +6 -0
- package/dist/services/router/RouteServiceProvider.d.ts.map +1 -1
- package/dist/services/router/config.d.ts +16 -0
- package/dist/services/router/config.d.ts.map +1 -1
- package/dist/stats/route-table.js +1 -1
- package/dist/support/index.js +2 -2
- package/dist/support/index.js.map +1 -1
- package/dist/vitest/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-3z9vhjd7.js +0 -5
- package/dist/chunk-3z9vhjd7.js.map +0 -10
- package/dist/chunk-5zzhypmt.js +0 -5
- package/dist/chunk-5zzhypmt.js.map +0 -33
- package/dist/chunk-6g20zec2.js +0 -46
- package/dist/chunk-cqnfp0n9.js +0 -14
- package/dist/chunk-fsfbyg5e.js +0 -5
- package/dist/chunk-kp7k4s5c.js +0 -4
- /package/dist/{chunk-rh2fad7n.js.map → chunk-41da9628.js.map} +0 -0
- /package/dist/{chunk-5nqkwa2w.js.map → chunk-agyfv3f8.js.map} +0 -0
- /package/dist/{chunk-bq5nqqeq.js.map → chunk-e573yxpq.js.map} +0 -0
- /package/dist/{chunk-agw3anaf.js.map → chunk-qjhw8nje.js.map} +0 -0
- /package/dist/{chunk-y6frz1vm.js.map → chunk-x7cpth2f.js.map} +0 -0
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
"/**\n * The prefix every api route is served under. The browser adds it when it\n * fetches (`/api${path}`) and the server strips it before matching, so an api\n * router's own paths never carry it.\n */\nexport const API_PREFIX = \"/api\";\n\n/**\n * Whether a request pathname is an api request: `/api` itself or anything\n * under `/api/`. A bare `startsWith(\"/api\")` also claims `/apidocs`,\n * `/api-keys` and `/apiary`, so a view route there would never render — the\n * api dispatcher would answer its 404 JSON instead.\n */\nexport function isApiPath(pathname: string): boolean {\n return pathname === API_PREFIX || pathname.startsWith(`${API_PREFIX}/`);\n}\n\n/**\n * The api router path a request pathname addresses: `/api/users/1` is\n * `/users/1`, `/api/` is `/` and `/api` is `\"\"`. Only the leading prefix is\n * stripped — `replace(\"/api\", \"\")` would also strip an `/api` inside the path\n * of a request that did not start with one (`/files/api` becoming `/files`).\n * A pathname outside `/api` comes back unchanged, so the dispatcher can still\n * be handed a request by its route path directly.\n */\nexport function apiPath(pathname: string): string {\n return isApiPath(pathname) ? pathname.slice(API_PREFIX.length) : pathname;\n}\n"
|
|
6
6
|
],
|
|
7
7
|
"mappings": ";AAaO,SAAS,CAAS,CAAC,EAA2B,CACnD,OAAO,IATiB,QASU,EAAS,WAAW,OAAgB,EAWjE,SAAS,CAAO,CAAC,EAA0B,CAChD,OAAO,EAAU,CAAQ,EAAI,EAAS,MAAM,CAAiB,EAAI",
|
|
8
|
-
"debugId": "
|
|
8
|
+
"debugId": "63BC684A43BB685D64756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Rg as F,Sg as t,Tg as l}from"./chunk-15c2vgaf.js";import{Wg as V}from"./chunk-9b4erdy2.js";import{bi as f0}from"./chunk-t4yh4nf9.js";import{ni as h}from"./chunk-1hr4xht1.js";import{ui as LH}from"./chunk-vw8849ys.js";class A0{static kind="controller";constructor(){}}class u0 extends A0{}function Q0(H){let Q=new Map;if(!H)return Q;for(let X of H.split(";")){let $=X.indexOf("=");if($===-1)continue;let Z=X.slice(0,$).trim();if(!Z)continue;Q.set(Z,X.slice($+1).trim())}return Q}function gH(H){return Q0(H.headers.get("cookie"))}function N(H){if(!/^\d+$/.test(H))return null;let Q=Number(H);return Number.isSafeInteger(Q)?Q:null}function J0(H){if(!H)return null;let Q=H.trim();if(!/^bytes=/i.test(Q))return null;let $=Q.slice(6).split(",").map((U)=>U.trim()).filter((U)=>U!=="");if($.length!==1)return null;let Z=$[0],G=Z.indexOf("-");if(G===-1)return null;let W=Z.slice(0,G),Y=Z.slice(G+1);if(W===""){let U=N(Y);if(U===null)return null;return{kind:"suffix",suffixLength:U}}let T=N(W);if(T===null)return null;if(Y==="")return{kind:"offset",start:T,end:null};let M=N(Y);if(M===null||M<T)return null;return{kind:"offset",start:T,end:M}}function L0(H,Q){if(!Number.isFinite(Q)||Q<=0)return null;let X,$;if(H.kind==="suffix"){if(H.suffixLength<=0)return null;X=Math.max(0,Q-H.suffixLength),$=Q-1}else{if(H.start>=Q)return null;if(X=H.start,$=H.end===null?Q-1:Math.min(H.end,Q-1),$<X)return null}return{start:X,end:$,length:$-X+1}}function kH(H){if(H.kind==="suffix")return`bytes=-${H.suffixLength}`;return H.end===null?`bytes=${H.start}-`:`bytes=${H.start}-${H.end}`}function bH(H){if(!H)return null;let Q=/^bytes\s+(\d+)-(\d+)\/(\d+)$/i.exec(H.trim());if(!Q)return null;let X=N(Q[1]),$=N(Q[2]),Z=N(Q[3]);if(X===null||$===null||Z===null||$<X)return null;return{start:X,end:$,total:Z}}function fH(H,Q,X){return`bytes ${H}-${Q}/${X}`}function R0(H){return`bytes */${H}`}class S extends F{errors={};constructor(H){super("Validation error");this.name="ValidationError",this.errors=H,this.payload={api:{status:400,data:{error:{kind:"validation_error",messages:H,status:400}},headers:{"Content-Type":"application/json"}},view:{status:400}}}}function o0(H){let[Q,X]=H.match(/\d+|\D+/g)??[];if(!Q||!X)return 0;let $=Number.parseInt(Q);switch(X){case"B":return $;case"KB":return $*1024;case"MB":return $*1024*1024;case"GB":return $*1024*1024*1024;case"TB":return $*1024*1024*1024*1024;default:return 0}}function n0(H){switch(H){case"image":return"image";case"png":return"image/png";case"jpg":return"image/jpeg";case"jpeg":return"image/jpeg";case"ttf":return"font/ttf";case"excel":return"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";case"csv":return"text/csv";case"word":return"application/vnd.openxmlformats-officedocument.wordprocessingml.document";case"pdf":return"application/pdf";case"json":return"application/json";default:return H}}function C0(H){if(typeof H==="string"||Array.isArray(H))return H.length;return}function X0(H){return typeof H==="number"&&!Number.isNaN(H)}var i0=["required","string","boolean","number","email","password","min","max","gte","lte","file","fileType","fileSize","array","object","in"];class P extends Error{name="InvalidValidationRuleError"}function c(H,Q){let X=Q===void 0||Q.trim()===""?Number.NaN:Number(Q);if(Number.isNaN(X))throw new P(`Validation rule "${H}:${Q??""}" needs a number, e.g. "${H}:3"`);return X}function P0(H){let Q=H.indexOf(":"),X=Q===-1?H:H.slice(0,Q),$=Q===-1?void 0:H.slice(Q+1);switch(X){case"required":return(Z)=>{if(Z instanceof Blob)return Z.size>0;if(Z===null||Z===void 0)return!1;if(typeof Z==="string"||Array.isArray(Z))return Z.length>0;return!0};case"string":return(Z)=>typeof Z==="string";case"boolean":return(Z)=>typeof Z==="boolean";case"number":return(Z)=>X0(Z);case"password":return(Z)=>{return typeof Z==="string"&&/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9]).{8,}$/.test(Z)};case"min":{let Z=c(X,$);return(G)=>{let W=C0(G);return W!==void 0&&W>=Z}}case"max":{let Z=c(X,$);return(G)=>{let W=C0(G);return W!==void 0&&W<=Z}}case"gte":{let Z=c(X,$);return(G)=>X0(G)&&G>=Z}case"lte":{let Z=c(X,$);return(G)=>X0(G)&&G<=Z}case"email":return(Z)=>{return typeof Z==="string"&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(Z)};case"file":return(Z)=>{return Z instanceof Blob};case"fileType":{if(!$)throw new P('Validation rule "fileType" needs a type, e.g. "fileType:png" or "fileType:image"');let Z=n0($);return(G)=>G instanceof Blob&&G.type.startsWith(Z)}case"fileSize":{let Z=o0($??"");if(Z===0&&!/^0+(B|KB|MB|GB|TB)$/.test($??""))throw new P(`Validation rule "fileSize:${$??""}" needs a whole size in B, KB, MB, GB or TB, e.g. "fileSize:5MB"`);return(G)=>G instanceof Blob&&G.size<=Z}case"array":return(Z)=>Array.isArray(Z);case"object":return(Z)=>typeof Z==="object"&&Z!==null&&!Array.isArray(Z)&&!(Z instanceof Blob);case"in":{let Z=($??"").split(",").filter((G)=>G!=="");if(Z.length===0)throw new P('Validation rule "in" needs a comma-separated list, e.g. "in:draft,published"');return(G)=>typeof G==="string"&&Z.includes(G)}default:throw new P(`Unknown validation rule "${H}". Known rules: ${i0.join(", ")}`)}}function w(H){if(!H.definition)throw Error(`gemi/ai: the recursive schema "${H.name}" was used before its definition returned; \`self\` can be nested into the schema, but not parsed or emitted inside the callback`);return H.definition}var i=new WeakMap;function j0(H){return typeof H==="object"&&H!==null&&i.has(H)}function d(H){let Q=i.get(H);if(!Q)throw Error("gemi/ai: expected a schema built with `s`, got a foreign object");return Q}function t0(H){let Q={defs:{},cells:new Map},X=H;if(H.node.kind==="ref"){let Z=w(H.node.cell);X={...Z,...H.description?{description:H.description}:{},optional:H.optional,nullable:H.nullable||Z.nullable}}let $=g(X,Q);return Object.keys(Q.defs).length>0?{...$,$defs:Q.defs}:$}function g(H,Q){let X=(H.optional||H.nullable)&&H.node.kind!=="json",$=r0(s0(H.node,Q),X),Z=[H.description,l0(H.node)].filter(Boolean).join(" ");if(Z&&$.$ref!==void 0)$={anyOf:[$]};return Z?{description:Z,...$}:$}function l0(H){let Q=[];if(H.kind==="string"||H.kind==="enum"){let X=H.checks;if(X?.format)Q.push(`Format: ${X.format.name}.`);if(X?.minLength!==void 0)Q.push(`At least ${X.minLength} characters.`);if(X?.maxLength!==void 0)Q.push(`At most ${X.maxLength} characters.`)}else if(H.kind==="number"){let X=H.checks;if(X?.minimum!==void 0)Q.push(`Minimum ${X.minimum}.`);if(X?.exclusiveMinimum!==void 0)Q.push(`Greater than ${X.exclusiveMinimum}.`);if(X?.maximum!==void 0)Q.push(`Maximum ${X.maximum}.`);if(X?.exclusiveMaximum!==void 0)Q.push(`Less than ${X.exclusiveMaximum}.`)}else if(H.kind==="array"){let X=H.checks;if(X?.minItems!==void 0)Q.push(`At least ${X.minItems} items.`);if(X?.maxItems!==void 0)Q.push(`At most ${X.maxItems} items.`)}return Q.join(" ")}function s0(H,Q){switch(H.kind){case"string":return{type:"string"};case"number":return{type:H.checks?.integer?"integer":"number"};case"boolean":return{type:"boolean"};case"literal":return{type:typeof H.value,const:H.value};case"enum":return{type:"string",enum:H.values};case"array":return{type:"array",items:g(H.item,Q)};case"object":return{type:"object",properties:Object.fromEntries(Object.entries(H.shape).map(([X,$])=>[X,g($,Q)])),required:Object.keys(H.shape),additionalProperties:!1};case"union":return{anyOf:H.members.map((X)=>g(X,Q))};case"json":return{};case"ref":{let{cell:X}=H,$=Q.cells.get(X.name);if($&&$!==X)throw Error(`gemi/ai: two different recursive schemas are named "${X.name}" in one schema; give each s.recursive(...) its own name`);if(!$)Q.cells.set(X.name,X),Q.defs[X.name]={},Q.defs[X.name]=g(w(X),Q);return{$ref:`#/$defs/${X.name}`}}}}function r0(H,Q){if(!Q)return H;if(H.anyOf)return{...H,anyOf:[...H.anyOf,{type:"null"}]};if(H.enum||H.const!==void 0)return{anyOf:[H,{type:"null"}]};if(typeof H.type==="string")return{...H,type:[H.type,"null"]};return{anyOf:[H,{type:"null"}]}}function a0(H){if(H===null)return"null";if(Array.isArray(H))return"array";return typeof H}function e0(H,Q){if(typeof Q==="number"&&!Number.isFinite(Q))return String(Q);if(H.kind==="literal"||H.kind==="enum"){if(typeof Q==="string"||typeof Q==="number"||typeof Q==="boolean")return JSON.stringify(Q)}return a0(Q)}function O0(H){let Q=H.node,X=(()=>{switch(Q.kind){case"number":return Q.checks?.integer?"integer":"number";case"string":case"boolean":return Q.kind;case"literal":return JSON.stringify(Q.value);case"enum":return`one of ${Q.values.map(($)=>JSON.stringify($)).join(" | ")}`;case"array":return"array";case"object":return"object";case"union":return"one of the variants";case"json":return"a JSON value";case"ref":return O0({...w(Q.cell),optional:!1,nullable:!1})}})();return H.optional||H.nullable?`${X} or null`:X}function HH(H){let Q="";for(let X of H)Q+=typeof X==="number"?`[${X}]`:Q?`.${X}`:X;return Q}function QH(H){let Q=HH(H);return Q?`${Q}: `:""}function Z0(H){return`${QH(H.path)}${H.message}`}function u(H,Q){if(Q===null||Q===void 0)return H.optional||H.nullable?1:0;let X=H.node;switch(X.kind){case"string":return typeof Q==="string"?1:0;case"number":return typeof Q==="number"?1:0;case"boolean":return typeof Q==="boolean"?1:0;case"literal":return Q===X.value?10:0;case"enum":return typeof Q==="string"&&X.values.includes(Q)?10:0;case"array":return Array.isArray(Q)?1:0;case"object":{if(typeof Q!=="object"||Array.isArray(Q))return 0;let $=Q,Z=1;for(let[G,W]of Object.entries(X.shape))Z+=u(W,$[G]);return Z}case"union":return X.members.reduce(($,Z)=>Math.max($,u(Z,Q)),0);case"json":return 1;case"ref":return I0(X.cell,Q,()=>1,()=>u(w(X.cell),Q))}}function I0(H,Q,X,$){if(typeof Q!=="object"||Q===null)return $();if(H.active.has(Q))return X();H.active.add(Q);try{return $()}finally{H.active.delete(Q)}}function j(H,Q,X,$){if(H.optional&&(Q===null||Q===void 0))return{drop:!0,value:void 0};if(H.nullable&&Q===null)return{drop:!1,value:null};return{drop:!1,value:XH(H,Q,X,$)}}function XH(H,Q,X,$){let Z=H.node,G=()=>{let W=Q===void 0?"required":Z.kind==="literal"?"const":Z.kind==="enum"&&typeof Q==="string"?"enum":"type",Y=W==="const"?{allowedValue:Z.value}:W==="enum"?{allowedValues:Z.values}:{};$.push({path:X,code:W,message:`expected ${O0(H)}, got ${e0(Z,Q)}`,params:Y});return};switch(Z.kind){case"string":if(typeof Q!=="string")return G();return V0(Z.checks,Q,X,$),Q;case"number":if(typeof Q!=="number"||!Number.isFinite(Q))return G();if(Z.checks?.integer&&!Number.isInteger(Q))return G();return $H(Z.checks,Q,X,$),Q;case"boolean":return typeof Q==="boolean"?Q:G();case"literal":return Q===Z.value?Q:G();case"enum":if(typeof Q!=="string"||!Z.values.includes(Q))return G();return V0(Z.checks,Q,X,$),Q;case"array":{if(!Array.isArray(Q))return G();let W=Q.map((M,U)=>{let R=j(Z.item,M,[...X,U],$);return R.drop?void 0:R.value}),{minItems:Y,maxItems:T}=Z.checks??{};if(Y!==void 0&&Q.length<Y)$.push({path:X,code:"minItems",message:`expected at least ${Y} items, got ${Q.length}`,params:{limit:Y}});if(T!==void 0&&Q.length>T)$.push({path:X,code:"maxItems",message:`expected at most ${T} items, got ${Q.length}`,params:{limit:T}});return W}case"object":{if(typeof Q!=="object"||Q===null||Array.isArray(Q))return G();let W=Q,Y={};for(let[T,M]of Object.entries(Z.shape)){let U=j(M,W[T],[...X,T],$);if(!U.drop)Y[T]=U.value}if(Z.unknownKeys)for(let T of Object.keys(W)){if(Object.hasOwn(Z.shape,T)||W[T]===void 0)continue;if(Z.unknownKeys==="error"){$.push({path:[...X,T],code:"additionalProperties",message:"unknown key",params:{additionalProperty:T}});continue}b(W[T],[...X,T],$,new Set),Object.defineProperty(Y,T,{value:W[T],enumerable:!0,writable:!0,configurable:!0})}return Y}case"union":{let W;for(let Y of Z.members){let T=[],M=j(Y,Q,X,T);if(T.length===0)return M.drop?void 0:M.value;let U=u(Y,Q);if(!W||U>W.score)W={issues:T,score:U}}$.push({path:X,code:"anyOf",message:`no matching variant; closest: ${W.issues.map(Z0).join("; ")}`,params:{closest:W.issues}});return}case"json":if(Q===void 0)return G();return b(Q,X,$,new Set),Q;case"ref":return I0(Z.cell,Q,()=>{$.push({path:X,code:"type",message:"expected a finite tree, got a circular reference",params:{}});return},()=>j(w(Z.cell),Q,X,$).value)}}function ZH(H){let Q=0;for(let X of H)Q++;return Q}function V0(H,Q,X,$){if(!H)return;let{minLength:Z,maxLength:G,format:W}=H;if(Z!==void 0||G!==void 0){let Y=ZH(Q);if(Z!==void 0&&Y<Z)$.push({path:X,code:"minLength",message:`expected at least ${Z} characters, got ${Y}`,params:{limit:Z}});if(G!==void 0&&Y>G)$.push({path:X,code:"maxLength",message:`expected at most ${G} characters, got ${Y}`,params:{limit:G}})}if(W){let Y=!1;try{Y=W.test(Q)===!0}catch{}if(!Y)$.push({path:X,code:"format",message:`expected a string in format "${W.name}"`,params:{format:W.name}})}}function $H(H,Q,X,$){if(!H)return;let Z=(G,W,Y,T)=>{if(W===void 0||Y(W))return;$.push({path:X,code:G,message:`expected ${T} ${W}, got ${Q}`,params:{limit:W}})};Z("minimum",H.minimum,(G)=>Q>=G,"at least"),Z("exclusiveMinimum",H.exclusiveMinimum,(G)=>Q>G,"more than"),Z("maximum",H.maximum,(G)=>Q<=G,"at most"),Z("exclusiveMaximum",H.exclusiveMaximum,(G)=>Q<G,"less than")}function b(H,Q,X,$,Z=!0){let G=(Y)=>{X.push({path:Q,code:"type",message:`expected a JSON value, got ${Y}`,params:{}})};switch(typeof H){case"undefined":case"string":case"boolean":return;case"number":if(!Number.isFinite(H))G(String(H));return;case"bigint":return G("a bigint");case"function":return G("a function");case"symbol":return G("a symbol")}if(H===null)return;let W=H;if($.has(W))return G("a circular reference");$.add(W);try{let Y=Z?W.toJSON:void 0;if(typeof Y==="function"){let T;try{T=Y.call(W)}catch{return G("a toJSON that threw")}if(T===void 0)return G("a toJSON that returns undefined");return b(T,Q,X,$,!1)}if(Array.isArray(H))H.forEach((T,M)=>b(T,[...Q,M],X,$));else for(let[T,M]of Object.entries(W))b(M,[...Q,T],X,$)}finally{$.delete(W)}}function A(H){return o(H)}function o(H){let Q={toJSONSchema:()=>t0(H),parse(X){let $=[],Z=j(H,X,[],$);if($.length>0)throw Error($.map(Z0).join("; "));return Z.drop?void 0:Z.value},safeParse(X){let $=[],Z=j(H,X,[],$);if($.length>0)return{ok:!1,errors:$.map(Z0)};return{ok:!0,value:Z.drop?void 0:Z.value}},validate(X){let $=[],Z=j(H,X,[],$);if($.length>0)return{ok:!1,issues:$};return{ok:!0,value:Z.drop?void 0:Z.value}},describe:(X)=>o({...H,description:X}),optional:()=>o({...H,optional:!0}),nullable:()=>o({...H,nullable:!0,optional:!1})};return i.set(Q,H),Q}function L(H){return{node:H,optional:!1,nullable:!1}}var _0=["strip","error","passthrough"];class q0 extends Error{problems;constructor(H){super(`gemi/ai: s.fromJSONSchema cannot model this schema:
|
|
3
|
+
${H.map((Q)=>`- ${Q}`).join(`
|
|
4
|
+
`)}`);this.name="JSONSchemaError",this.problems=H}}var GH=new Set(["title","$schema","$id","$comment","examples","default","deprecated","readOnly","writeOnly"]),x={string:["minLength","maxLength","format"],number:["minimum","maximum","exclusiveMinimum","exclusiveMaximum"],integer:["minimum","maximum","exclusiveMinimum","exclusiveMaximum"],boolean:[],object:["properties","required","additionalProperties"],array:["items","minItems","maxItems"]};function m(H){return typeof H==="object"&&H!==null&&!Array.isArray(H)}function n(H,Q,X,$){let Z=(D,K=X)=>{$.push(K?`${K}: ${D}`:D);return},G=(D)=>X?`${X}.${D}`:D;if(!m(H))return Z("expected a schema object");let W=new Set(Q.ignoreKeywords??[]),Y=(D)=>GH.has(D)||D.startsWith("x-")||W.has(D),T=!1,M=H.type;if(Array.isArray(M)){let D=M.filter((K)=>K!=="null");if(D.length!==1)return Z(`type ${JSON.stringify(M)} is not supported; only one type, optionally with "null". Use anyOf for alternatives`,G("type"));T=D.length<M.length,M=D[0]}if(M!==void 0&&(typeof M!=="string"||!(M in x)))return Z(`type ${JSON.stringify(M)} is not supported; expected one of ${Object.keys(x).join(", ")}`,G("type"));let U=new Set(["type","description","enum","const","anyOf",...M?x[M]:[]]),R=!1;for(let D of Object.keys(H)){if(U.has(D)||Y(D))continue;R=!0;let K=Object.entries(x).find(([,z])=>z.includes(D));Z(K&&K[0]!==M?`"${D}" applies to type ${K[0]}, and this schema is ${M?`type ${M}`:"untyped"}`:`"${D}" is not supported by s.fromJSONSchema`,G(D))}if(R)return;if(H.description!==void 0&&typeof H.description!=="string")return Z("expected a string",G("description"));let p=H.description,C=(D)=>({node:D,optional:!1,nullable:T,...p?{description:p}:{}});if(H.anyOf!==void 0){if(M!==void 0||H.enum!==void 0||H.const!==void 0)return Z("anyOf cannot be combined with type, enum or const here",G("anyOf"));if(!Array.isArray(H.anyOf)||H.anyOf.length===0)return Z("expected a non-empty array",G("anyOf"));let D=[],K=!1;if(H.anyOf.forEach((z,B)=>{if(m(z)&&z.type==="null"&&Object.keys(z).length===1){T=!0;return}let J=n(z,Q,G(`anyOf[${B}]`),$);if(J)D.push(J);else K=!0}),K)return;if(D.length===0)return Z("anyOf has only null in it",G("anyOf"));if(D.length===1){let z=D[0];return{...z,nullable:z.nullable||T,...p?{description:p}:{}}}return C({kind:"union",members:D})}if(H.const!==void 0){let D=H.const;if(typeof D!=="string"&&typeof D!=="number"&&typeof D!=="boolean")return Z("only a string, number or boolean const is supported",G("const"));if(M!==void 0&&typeof D!==(M==="integer"?"number":M))return Z(`const ${JSON.stringify(D)} is not of type ${M}`,G("const"));return C({kind:"literal",value:D})}let q;if(M==="string"){if(q=WH(H,Q,G,$),q===null)return}if(H.enum!==void 0){if(!Array.isArray(H.enum)||H.enum.length===0)return Z("expected a non-empty array",G("enum"));let D=H.enum.filter((B)=>B!==null);if(D.length<H.enum.length)T=!0;let K=D.find((B)=>!(typeof B==="string"||typeof B==="number"||typeof B==="boolean")||M!==void 0&&typeof B!==(M==="integer"?"number":M));if(K!==void 0||D.length===0)return Z(M?`every value must be of type ${M}${D.length===0?", and there must be one":`; ${JSON.stringify(K)} is not`}`:"only strings, numbers and booleans are supported",G("enum"));if(D.every((B)=>typeof B==="string"))return C({kind:"enum",values:[...new Set(D)],...q?{checks:q}:{}});let z=[...new Set(D)];if(z.length===1)return C({kind:"literal",value:z[0]});return C({kind:"union",members:z.map((B)=>L({kind:"literal",value:B}))})}switch(M){case void 0:return Z("a schema needs a type, an enum, a const or an anyOf");case"string":return C({kind:"string",...q?{checks:q}:{}});case"number":case"integer":{let D=M==="integer"?{integer:!0}:{},K=!1;for(let z of x.number){let B=H[z];if(B===void 0)continue;if(typeof B!=="number"||!Number.isFinite(B)){Z("expected a number",G(z)),K=!0;continue}D[z]=B}if(K)return;return C({kind:"number",...Object.keys(D).length>0?{checks:D}:{}})}case"boolean":return C({kind:"boolean"});case"array":{if(!m(H.items))return Z('an array needs "items" to be one schema (tuples are not supported)',G("items"));let D={},K=!1;for(let B of["minItems","maxItems"]){let J=H[B];if(J===void 0)continue;if(typeof J!=="number"||!Number.isInteger(J)||J<0){Z("expected a non-negative integer",G(B)),K=!0;continue}D[B]=J}let z=n(H.items,Q,G("items"),$);if(!z||K)return;return C({kind:"array",item:z,...Object.keys(D).length>0?{checks:D}:{}})}case"object":{let D=H.properties??{};if(!m(D))return Z("expected an object",G("properties"));if(H.additionalProperties!==void 0&&H.additionalProperties!==!1)return Z("only false is supported; a record with arbitrary keys has no strict-mode form (use s.json())",G("additionalProperties"));let K=H.required??[];if(!Array.isArray(K)||!K.every((_)=>typeof _==="string"))return Z("expected an array of property names",G("required"));let z=K.filter((_)=>!Object.hasOwn(D,_));if(z.length>0)return Z(`lists properties the schema doesn't have: ${z.join(", ")}`,G("required"));let B={},J=!1;for(let[_,d0]of Object.entries(D)){let H0=n(d0,Q,G(`properties.${_}`),$);if(!H0){J=!0;continue}B[_]=K.includes(_)?H0:{...H0,optional:!0}}if(J)return;let e=Q.unknownKeys;return C({kind:"object",shape:B,...e==="error"||e==="passthrough"?{unknownKeys:e}:{}})}}return}function WH(H,Q,X,$){let Z={},G=!1;for(let W of["minLength","maxLength"]){let Y=H[W];if(Y===void 0)continue;if(typeof Y!=="number"||!Number.isInteger(Y)||Y<0){$.push(`${X(W)}: expected a non-negative integer`),G=!0;continue}Z[W]=Y}if(H.format!==void 0){let W=H.format,Y=typeof W==="string"?Q.formats?.[W]:void 0;if(typeof W!=="string")$.push(`${X("format")}: expected a string`),G=!0;else if(!Y||!Object.hasOwn(Q.formats,W))$.push(`${X("format")}: unknown format ${JSON.stringify(W)}; pass a check for it in the formats option`),G=!0;else Z.format={name:W,test:YH(Y)}}if(G)return null;return Object.keys(Z).length>0?Z:void 0}function YH(H){if(H===!0)return()=>!0;if(H instanceof RegExp)return(Q)=>{return H.lastIndex=0,H.test(Q)};return H}var mH={string:()=>A(L({kind:"string"})),number:()=>A(L({kind:"number"})),boolean:()=>A(L({kind:"boolean"})),literal:(H)=>A(L({kind:"literal",value:H})),enum:(H)=>A(L({kind:"enum",values:H})),object:(H)=>A(L({kind:"object",shape:Object.fromEntries(Object.entries(H).map(([Q,X])=>[Q,d(X)]))})),array:(H)=>A(L({kind:"array",item:d(H)})),union:(H)=>A(L({kind:"union",members:H.map(d)})),json:()=>A(L({kind:"json"})),recursive:MH,fromJSONSchema:(H,Q={})=>{let X=[];if(Q.unknownKeys!==void 0&&!_0.includes(Q.unknownKeys))throw Error(`gemi/ai: s.fromJSONSchema's unknownKeys option must be one of ${_0.map((Z)=>JSON.stringify(Z)).join(", ")}, got ${JSON.stringify(Q.unknownKeys)}`);let $=n(H,Q,"",X);if(!$||X.length>0)throw new q0(X.length>0?X:["unreadable schema"]);return A($)}};function dH(H){let Q=i.get(H);if(Q)return k(Q.node);return y(H.toJSONSchema())}function y(H){if(!(H.$ref!==void 0||H.type!==void 0||H.enum!==void 0||H.const!==void 0||H.anyOf!==void 0||H.properties!==void 0||H.items!==void 0))return!1;for(let X of Object.values(H.properties??{}))if(!y(X))return!1;if(H.items&&!y(H.items))return!1;for(let X of H.anyOf??[])if(!y(X))return!1;for(let X of Object.values(H.$defs??{}))if(!y(X))return!1;return!0}function k(H,Q=new Set){switch(H.kind){case"string":case"number":case"boolean":case"literal":case"enum":return!0;case"object":return Object.values(H.shape).every((X)=>k(X.node,Q));case"array":return k(H.item.node,Q);case"union":return H.members.every((X)=>k(X.node,Q));case"json":return!1;case"ref":if(Q.has(H.cell))return!0;return Q.add(H.cell),k(w(H.cell).node,Q)}}function $0(H,Q,X=new Set){let $=H.node;if($.kind==="union")return $.members.some((Z)=>$0(Z,Q,X));if($.kind!=="ref")return!1;if($.cell===Q)return!0;if(X.has($.cell)||!$.cell.definition)return!1;return X.add($.cell),$0($.cell.definition,Q,X)}var TH=/^[A-Za-z_][A-Za-z0-9_-]{0,63}$/;function MH(H,Q){if(typeof H!=="string"||!TH.test(H))throw Error(`gemi/ai: s.recursive needs a name of letters, digits, "_" and "-" (starting with a letter or "_", at most 64), got ${JSON.stringify(H)}`);let X={name:H,active:new Set},$=()=>L({kind:"ref",cell:X}),Z=d(Q(A($())));if(Z.optional)throw Error(`gemi/ai: the recursive schema "${H}" is optional() as a whole; mark the places that use it optional instead`);if($0(Z,X))throw Error(`gemi/ai: the recursive schema "${H}" refers to itself outside any object or array, so it describes no finite value; nest \`self\` in an s.object(...) field or an s.array(...)`);return X.definition=Z,A($())}function N0(H){if(typeof H!=="string")return null;let[Q]=H.split(";",1),X=Q.trim().toLowerCase();return X===""?null:X}function w0(H){if(H===null)return!1;if(H==="application/json")return!0;let Q=H.indexOf("/");return Q>0&&H.endsWith("+json")&&H.length>Q+1+5}var f=new WeakMap;function nH(H,Q,X,$){f.set(H,{clientAddress:Q,...X?{grant:Object.freeze({...X,scopes:Object.freeze([...X.scopes])})}:{},...$?{progress:$}:{}})}function E0(H){return f.get(H)?.progress}function S0(H){return f.get(H)?.grant}function x0(H){return f.has(H)}function iH(H){return f.get(H)?.clientAddress}var g0=new WeakMap;function lH(H,Q){g0.set(H,Q)}function y0(H){return g0.get(H)??null}var G0=new WeakMap;function sH(H,Q){let X=G0.get(H)??[];if(!X.includes(Q))G0.set(H,[...X,Q])}function rH(H){return G0.get(H)??[]}class E{data;constructor(H){this.data=H}get(H){return this.data[H]}has(H){return this.data[H]!==void 0}toJSON(){return this.data}}function k0(H){return typeof H==="object"&&H!==null&&!(H instanceof Blob)}function DH(H,Q){if(!Q.includes(".")||Object.hasOwn(H,Q))return[{path:[Q],value:H[Q]}];let X=[{path:[],value:H}];for(let $ of Q.split(".")){let Z=[];for(let{path:G,value:W}of X){if($==="*"){if(Array.isArray(W))W.forEach((Y,T)=>Z.push({path:[...G,T],value:Y}));else if(k0(W))for(let[Y,T]of Object.entries(W))Z.push({path:[...G,Y],value:T});continue}if(Array.isArray(W)&&/^\d+$/.test($)){Z.push({path:[...G,Number($)],value:W[Number($)]});continue}Z.push({path:[...G,$],value:k0(W)&&Object.hasOwn(W,$)?W[$]:void 0})}X=Z}return X}function b0(H){return H.join(".")}class UH{kind;rawRequest;headers;cookies;search;schema={};routePath;params;domain;constructor(H,Q,X,$){if(!H){let T=V.getStore().req;this.params=T.params,this.rawRequest=T.rawRequest,this.kind=T.kind,this.routePath=T.routePath,this.domain=T.domain??null}else this.params=Q,this.rawRequest=H,this.routePath=$,this.kind=X??"api",this.domain=y0(H);this.headers=this.rawRequest.headers;let Z=Q0(this.rawRequest.headers.get("Cookie")),G=new URL(this.rawRequest.url),W=new Map;for(let[T,M]of G.searchParams)if(W.has(T)){let U=W.get(T);if(Array.isArray(U))U.push(M),W.set(T,U);else W.set(T,[U,M])}else W.set(T,M);let Y=Object.fromEntries(W.entries());this.search=new E(Y),this.cookies=Z}locale(){return V.getStore().locale}ctx(){return V.getStore()}isModelOriginated(){return x0(this.rawRequest)}mcpGrant(){return S0(this.rawRequest)??null}reportProgress(H){let Q=E0(this.rawRequest);if(!Q)return!1;return Q(H),!0}get signal(){return this.rawRequest.signal}range(){return J0(this.rawRequest.headers.get("Range"))}refine(H){return{}}async parseBody(){let H=N0(this.rawRequest.headers.get("Content-Type"));if(w0(H))return new E(await this.parseJsonBody());if(H==="application/x-www-form-urlencoded"||H==="multipart/form-data"){let Q;try{Q=await this.rawRequest.formData()}catch($){if($ instanceof F)throw $;throw new F("The request body could not be read as a form.")}let X=new Map;for(let[$,Z]of Q.entries())if(X.has($)){let G=X.get($);if(Array.isArray(G))G.push(Z);else X.set($,[G,Z])}else X.set($,Z);return new E(Object.fromEntries(X.entries()))}return new E({})}async parseJsonBody(){if(!this.rawRequest.body)return{};let H;try{H=await this.rawRequest.text()}catch(X){if(X instanceof F)throw X;throw new F("The request body could not be read.")}if(H.trim()==="")return{};let Q;try{Q=JSON.parse(H)}catch{throw new F("The request body is not valid JSON.")}if(Q===null||typeof Q!=="object")throw new F("The request body must be a JSON object.");return Q}validateInput(H){if(j0(this.schema))return this.validateWithSchema(H);let Q=H.toJSON()??{},X={},$=Object.entries(this.schema).map(([Z,G])=>({key:Z,rules:Object.entries(G).map(([W,Y])=>({rule:W,message:Y,check:typeof Y==="function"?null:this.ruleFor(Z,W)}))}));for(let{key:Z,rules:G}of $)for(let{path:W,value:Y}of DH(Q,Z)){let T=this.checkField(Y,G);if(T.length>0){let M=X[b0(W)]??=[];for(let U of T)if(!M.includes(U))M.push(U)}}if(this.addRefinements(X,Q),Object.keys(X).length>0)throw new S(X);return H}checkField(H,Q){let X=Q.some(({rule:G})=>G==="required"),$=H===void 0||H===null||H==="",Z=[];for(let{rule:G,message:W,check:Y}of Q){let T=W,M=!1;if(typeof W==="function")T=W(H),M=typeof T>"u";else M=Y(H);if(M)continue;if($&&!X)continue;if(G==="required")return[String(T)];if(!Z.includes(String(T)))Z.push(String(T))}return Z}validateWithSchema(H){let Q=this.schema.validate(H.toJSON()),X={};if("issues"in Q)for(let Z of Q.issues){let G=b0(Z.path),W=X[G]??=[];if(!W.includes(Z.message))W.push(Z.message)}let $="value"in Q?new E(Q.value):H;if(this.addRefinements(X,$.toJSON()),Object.keys(X).length>0)throw new S(X);return $}addRefinements(H,Q){for(let[X,$]of Object.entries(this.refine(Q)??{})){let Z=H[X]??[];H[X]=Z.includes($)?Z:[...Z,$]}}ruleFor(H,Q){try{return P0(Q)}catch(X){if(X instanceof P)throw new P(`${this.constructor.name}.schema.${H}: ${X.message}`);throw X}}async input(){return this.validateInput(await this.parseBody())}async safeInput(){let H=await this.parseBody();try{return{isValid:!0,errors:{},input:this.validateInput(H)}}catch(Q){if(!(Q instanceof S))throw Q;return{isValid:!1,errors:Q.errors,input:H}}}}class KH extends F{error;constructor(H="Not authorized"){super(H);this.name="AuthorizationError",this.error=H,this.payload={api:{status:401,data:{error:l("authorization",this.error,401)}},view:{}}}}class W0 extends F{static apiStatus=403;error;constructor(H="Insufficient permissions"){super(H);this.name="InsufficientPermissionsError",this.error=H,this.payload={api:{status:W0.apiStatus,data:{error:l("permission",this.error,W0.apiStatus)}},view:{status:403}}}}class Y0 extends F{total;constructor(H){super("Range not satisfiable");this.total=H;this.name="RangeNotSatisfiableError",this.payload={api:{status:416,data:{error:t("range_not_satisfiable","Range not satisfiable",416)},headers:{"Content-Range":R0(H),"Accept-Ranges":"bytes","Cache-Control":"no-store"}},view:{}}}}class BH extends F{constructor(H="Not found"){super(H);this.name="NotFoundError",this.payload={api:{status:404,data:{error:t("not_found",H,404)},headers:{"Cache-Control":"no-store"}},view:{status:404}}}}class O extends F{fileName;constructor(H){super("File not found");this.fileName=H;this.name="FileNotFoundError",this.payload={api:{status:404,data:{error:t("not_found","Not found",404)},headers:{"Cache-Control":"no-store"}},view:{status:404}}}}class zH extends F{constructor(H={}){super("Authentication error");this.name="AuthenticationError";let Q=H.redirectTo??"/auth/sign-in";this.payload={api:{status:401,data:{error:l("authentication","Authentication error",401)}},viewData:{status:200,data:{},headers:{"Cache-Control":"private, no-cache, no-store, max-age=0, must-revalidate"},directive:{kind:"Redirect",path:Q}},view:{status:302,headers:{"Cache-Control":"private, no-cache, no-store, max-age=0, must-revalidate",Location:Q}}}}}class v{static getFacadeAccessor(){throw Error(`Facade [${this.name}] does not implement getFacadeAccessor().`)}static getFacadeRoot(){return f0(this.getFacadeAccessor())}}function s(H){if(typeof H!=="string"||/^[\s/.]*$/.test(H))throw Error(`Refusing to delete by prefix ${JSON.stringify(H)}: it would match the whole store`)}class T0{async*objects(H,Q={}){throw Error(`${this.constructor.name} does not implement objects(). Override it to list objects in this backend.`)}async deletePrefix(H,Q={}){s(H);let X=[];for await(let $ of this.objects(H,Q))X.push($.name);for(let $ of X)Q.signal?.throwIfAborted(),await this.delete({name:$,bucket:Q.bucket});return X.length}async delete(H){throw Error(`${this.constructor.name} does not implement delete(). Override it to remove objects from this backend.`)}async read(H){let Q=typeof H==="string"?{name:H}:H,X=await this.fetch({name:Q.name,bucket:Q.bucket});if(!X.ok)throw new O(Q.name);let $=X.headers.get("Content-Type")??"application/octet-stream",Z=X.headers.get("ETag")??void 0,G=X.headers.get("Last-Modified"),W=G?new Date(G):void 0;if(Q.range){let M=await X.blob();return{body:M,start:0,end:M.size-1,total:M.size,partial:!1,type:$,etag:Z,lastModified:W,name:Q.name}}let Y=Number(X.headers.get("Content-Length")),T=Number.isFinite(Y)?Y:0;return{body:X.body,start:0,end:T-1,total:T,partial:!1,type:$,etag:Z,lastModified:W,name:Q.name}}async size(H){let Q=typeof H==="string"?H:H.name,X=typeof H==="string"?void 0:H.bucket,$=await this.fetch({name:Q,bucket:X});if(!$.ok)throw new O(Q);let Z=Number($.headers.get("Content-Length"));if(Number.isFinite(Z))return await $.body?.cancel(),Z;return(await $.blob()).size}}function v0(H,Q){if(!Q)return H;let X=H.getReader(),$=!1,Z,G=()=>{if($=!0,Z)Q.removeEventListener("abort",Z)};return new ReadableStream({start(W){if(Z=()=>{if($)return;G(),W.error(Q.reason),X.cancel(Q.reason).catch(()=>{})},Q.aborted)Z();else Q.addEventListener("abort",Z,{once:!0})},async pull(W){let Y;try{Y=await X.read()}catch(T){if($)return;G(),W.error(T);return}if($)return;if(Y.done){G(),W.close();return}W.enqueue(Y.value)},cancel(W){return G(),X.cancel(W)}},{highWaterMark:0})}import{readdir as M0,rmdir as FH,stat as AH,unlink as JH}from"fs/promises";import{isAbsolute as h0,relative as r,resolve as a,sep as I}from"path";class D0 extends T0{configured;constructor(H){super();this.configured=H}get folderPath(){return this.configured??`${h()}/storage`}async put(H,{signal:Q}={}){Q?.throwIfAborted();let X,$;if(H instanceof Blob)X=H,$=`${Bun.randomUUIDv7()}.${H.type.split("/")[1].split(";")[0]}`;else X=H.body,$=H.name;let Z=X instanceof Buffer?X:X instanceof Blob||X instanceof File?Buffer.from(await X.arrayBuffer()):"",G=`${this.folderPath}/${$}`;return Q?.throwIfAborted(),await Bun.write(G,Z),$}async fetch(H,{signal:Q}={}){Q?.throwIfAborted();let X=process.env.BUCKET_NAME,$;if(typeof H==="string")$=H;else X=H.bucket??X,$=H.name;if(!$)throw Error("Object name has to be specified");let Z=`${this.folderPath}/${$}`,G=Bun.file(Z),W=v0(Bun.file(Z).stream(),Q),Y=new Date(G.lastModified).toUTCString();return new Response(W,{headers:{"Content-Type":G.type,"Content-Length":String(G.size),"Cache-Control":"private, max-age=12000, must-revalidate","Last-Modified":Y}})}async read(H){let Q=typeof H==="string"?{name:H}:H,{name:X,range:$=null}=Q;if(!X)throw Error("Object name has to be specified");let Z=Bun.file(`${this.folderPath}/${X}`);if(!await Z.exists())throw new O(X);let G=Z.size,W=$?L0($,G):null;if($&&!W)throw new Y0(G);let Y=W?.start??0,T=W?W.end:G-1;return{body:W?Z.slice(Y,T+1):Z,start:Y,end:T,total:G,partial:Boolean(W),type:Z.type||"application/octet-stream",lastModified:new Date(Z.lastModified),name:X}}async size(H){let Q=typeof H==="string"?H:H.name,X=Bun.file(`${this.folderPath}/${Q}`);if(!await X.exists())throw new O(Q);return X.size}async delete(H){let Q=typeof H==="string"?H:H.name;if(!Q)throw Error("Object name has to be specified");let X=a(this.folderPath),$=a(X,Q),Z=r(X,$);if(!Z||Z===".."||Z.startsWith(`..${I}`)||h0(Z))throw Error(`Refusing to delete "${Q}": it is outside the storage folder`);try{await JH($)}catch(G){if(G?.code==="ENOENT")return;throw G}}resolvePrefix(H){let Q=a(this.folderPath),X=H.lastIndexOf("/"),$=X===-1?"":H.slice(0,X),Z=X===-1?H:H.slice(X+1),G=a(Q,$),W=r(Q,G);if(W===".."||W.startsWith(`..${I}`)||h0(W))throw Error(`Refusing to list "${H}": it is outside the storage folder`);let Y=W.split(I).join("/");return{root:Q,dir:G,match:Y?`${Y}/${Z}`:Z}}async*objects(H,{signal:Q}={}){Q?.throwIfAborted();let{root:X,dir:$,match:Z}=this.resolvePrefix(H),G=[],W=async(Y)=>{let T;try{T=await M0(Y,{withFileTypes:!0})}catch(M){if(M?.code==="ENOENT"||M?.code==="ENOTDIR")return;throw M}for(let M of T){let U=`${Y}${I}${M.name}`,R=r(X,U).split(I).join("/");if(M.isDirectory()){if(`${R}/`.startsWith(Z)||Z.startsWith(`${R}/`))await W(U)}else if(M.isFile()&&R.startsWith(Z))G.push(R)}};await W($),G.sort();for(let Y of G){Q?.throwIfAborted();let T;try{T=await AH(`${X}/${Y}`)}catch(M){if(M?.code==="ENOENT")continue;throw M}yield{name:Y,size:T.size,lastModified:T.mtime}}}async deletePrefix(H,Q={}){s(H);let{root:X,match:$}=this.resolvePrefix(H);s($);let Z=await super.deletePrefix(H,Q);if(Z>0)await this.pruneEmptyDirs(X,$);return Z}async pruneEmptyDirs(H,Q){let X=[],$=async(Z)=>{let G;try{G=await M0(Z,{withFileTypes:!0})}catch{return}for(let W of G){if(!W.isDirectory())continue;let Y=`${Z}${I}${W.name}`,T=r(H,Y).split(I).join("/");if(`${T}/`.startsWith(Q)||Q.startsWith(`${T}/`)){if(await $(Y),`${T}/`.startsWith(Q))X.push(Y)}}};await $(H);for(let Z of X)try{await FH(Z)}catch{}}async list(){return await M0(this.folderPath)}}function qQ(H){return H}function p0(){return{driver:new D0}}class U0{static token="filesystem";driver;constructor(H={}){this.driver=H.driver??p0().driver}}import{Buffer as RH}from"buffer";async function c0(H){try{return(await import("sharp")).default}catch(Q){throw Error(`${H} requires the 'sharp' package. Install it with \`bun add sharp\`.`,{cause:Q})}}class CH extends v{static getFacadeAccessor(){return U0}static async put(H,Q={}){return this.getFacadeRoot().driver.put(H,Q)}static async metadata(H){let Q=RH.from(await H.arrayBuffer()),X=await c0("Storage.metadata()");try{return await X(Q).metadata()}catch{return{}}}static async fetch(H,Q={}){return Q.signal?.throwIfAborted(),this.getFacadeRoot().driver.fetch(H,Q)}static async read(H,Q={}){let X=typeof H==="string"?{name:H}:{...H},$="range"in Q?Q.range??null:X.range!==void 0?X.range:V.getStore()?.rangeRequest??null;return this.getFacadeRoot().driver.read({...X,range:$})}static list(H){return this.getFacadeRoot().driver.list(H)}static objects(H,Q={}){return this.getFacadeRoot().driver.objects(H,Q)}static async deletePrefix(H,Q={}){return this.getFacadeRoot().driver.deletePrefix(H,Q)}static async delete(H){return this.getFacadeRoot().driver.delete(H)}}import{mkdir as K0,readdir as PH,access as VH}from"fs/promises";async function B0(H){try{return await VH(H),!0}catch{return!1}}class z0{config;static token="log";writer;isReady=!1;flushTimeout;fileSize=0;writerSize=0;isCreatingFile=!1;bootPromise=null;currentLogFilePath;get logsDirPath(){return`${h()}/storage/logs`}constructor(H){this.config=H}boot(){if(!this.bootPromise)this.bootPromise=this.createStorage().catch((H)=>{console.error("Log storage unavailable, file logging disabled",H)}).then(()=>{this.isReady=!0});return this.bootPromise}async createStorage(){let H=`${h()}/storage`;if(!await B0(H))await K0(H);if(!await B0(this.logsDirPath))await K0(this.logsDirPath);await this.newLogFile()}async newLogFile(){if(!await B0(this.logsDirPath))await K0(this.logsDirPath);if(this.isCreatingFile=!0,this.currentLogFilePath){this.writer.flush(),this.writer.end(),this.writer=null;let X=new File([await Bun.file(this.currentLogFilePath).arrayBuffer()],this.currentLogFilePath.split("/").pop(),{type:"text/plain"});this.config.onLogFileClosed(X),this.fileSize=0,this.writerSize=0}let Q=(await PH(this.logsDirPath)).sort().reverse()[0];if(Q){let X=Bun.file(`${this.logsDirPath}/${Q}`);if(X.size<this.config.maxFileSize)this.currentLogFilePath=`${this.logsDirPath}/${Q}`,this.writer=X.writer(),this.writer.write(await X.text()),this.writer.write(`
|
|
5
|
+
`),this.writer.flush(),this.fileSize=X.size}if(!this.writer){let X=`${new Date(Date.now()).toISOString()}.log`.replaceAll(":","-");this.currentLogFilePath=`${this.logsDirPath}/${X}`;let $=Bun.file(`${this.logsDirPath}/${X}`);this.writer=$.writer(),this.fileSize=0,this.writerSize=0}this.isCreatingFile=!1}async log(H,Q,X={}){if(!this.isReady)await this.boot();let $=V.getStore(),Z={};if($)Z={url:$.req.rawRequest.url,method:$.req.rawRequest.method,headers:$.req.rawRequest.headers,body:$.req.rawRequest.body};let G={timestamp:new Date(Date.now()).toISOString(),env:Bun.env.NODE_ENV,level:H,message:Q,metadata:{...Z,...X}},W="";try{W=JSON.stringify(G)}catch(Y){console.log("Error parsing log object",Y)}try{let Y=this.config.onLogCreated(G);if(Y instanceof Promise)Y.catch((T)=>console.error("Error in onLogCreated",T))}catch(Y){console.error("Error in onLogCreated",Y)}if(!this.writer)return;this.writerSize+=W.length,this.fileSize+=W.length;try{this.writer.write(W),this.writer.write(`
|
|
6
|
+
`),this.tryFlush()}catch(Y){console.error("Error writing log",Y)}}async tryFlush(){if(this.fileSize>this.config.maxFileSize){if(!this.isCreatingFile)await this.newLogFile()}if(this.writerSize>this.config.maxFileSize/2)await this.writer.flush(),this.writerSize=0,await this.newLogFile();else clearTimeout(this.flushTimeout),this.flushTimeout=setTimeout(async()=>{await this.writer.flush(),this.writerSize=0},100)}}class _H extends v{static getFacadeAccessor(){return z0}static debug(H,Q){this.getFacadeRoot().log("debug",H,Q)}static info(H,Q){this.getFacadeRoot().log("info",H,Q)}static notice(H,Q){this.getFacadeRoot().log("notice",H,Q)}static warning(H,Q){this.getFacadeRoot().log("warning",H,Q)}static error(H,Q){this.getFacadeRoot().log("error",H,Q)}static critical(H,Q){this.getFacadeRoot().log("critical",H,Q)}static alert(H,Q){this.getFacadeRoot().log("alert",H,Q)}static emergency(H,Q){this.getFacadeRoot().log("emergency",H,Q)}}class jH{config;static token="redis";instance=null;constructor(H={}){this.config=H}get client(){return this.instance??=new(OH())(this.config.url,this.config.options)}set client(H){this.instance=H}close(){let H=this.instance;this.instance=null,H?.close()}}function OH(){let H=globalThis.Bun?.RedisClient;if(typeof H!=="function")throw Error("Redis requires Bun's built-in Redis client, which this runtime does not provide. Run the app under Bun, or bind your own client for the 'redis' token.");return H}var F0=new TextEncoder;function m0(H){return`id: ${H.seq}
|
|
7
|
+
data: ${JSON.stringify(H.event)}
|
|
8
|
+
|
|
9
|
+
`}var IH=5000,qH=`: keepalive
|
|
10
|
+
|
|
11
|
+
`;function NH(H,Q=IH){let X=null,$=!1,Z=()=>{if($)return;if(X!==null)clearTimeout(X);X=setTimeout(()=>{if(X=null,$)return;try{H.enqueue(F0.encode(qH))}catch{G();return}Z()},Q)},G=()=>{if($=!0,X!==null)clearTimeout(X);X=null};return Z(),{touch:Z,stop:G}}function wH(){return{"Content-Type":"text/event-stream","Cache-Control":"no-store, no-transform",Connection:"keep-alive","X-Accel-Buffering":"no"}}function nQ(H,Q=200){let X=H[Symbol.asyncIterator](),$=-1,Z,G=new ReadableStream({start(W){Z=NH(W)},async pull(W){try{let Y=await X.next();if(Y.done){Z.stop(),W.close();return}$=Y.value.seq,W.enqueue(F0.encode(m0(Y.value))),Z.touch()}catch(Y){let T={type:"error",error:SH(Y)};Z.stop(),W.enqueue(F0.encode(m0({seq:$+1,event:T}))),W.close()}},cancel(W){Z.stop(),X.return?.(W)}});return new Response(G,{status:Q,headers:wH()})}var EH=new Set(["frame_cursor_evicted","live_run_not_found"]);function SH(H){let Q=H&&typeof H==="object"?H.code:void 0;if(H instanceof Error&&typeof Q==="string"&&EH.has(Q))return{code:"unknown",message:H.message,retryable:!1};return console.error("[gemi/ai] agent stream failed",H),{code:"unknown",message:"The run's stream failed.",retryable:!1}}
|
|
12
|
+
export{A0 as Xf,u0 as Yf,gH as Zf,N0 as _f,nH as $f,S0 as ag,iH as bg,J0 as cg,L0 as dg,kH as eg,bH as fg,fH as gg,R0 as hg,lH as ig,y0 as jg,sH as kg,rH as lg,S as mg,P as ng,q0 as og,mH as pg,dH as qg,UH as rg,KH as sg,W0 as tg,Y0 as ug,BH as vg,O as wg,zH as xg,v as yg,c0 as zg,s as Ag,T0 as Bg,v0 as Cg,D0 as Dg,qQ as Eg,p0 as Fg,U0 as Gg,CH as Hg,z0 as Ig,_H as Jg,jH as Kg,qH as Lg,NH as Mg,wH as Ng,nQ as Og};
|
|
13
|
+
|
|
14
|
+
//# debugId=A82A79578A9AE18164756E2164756E21
|