@geekmidas/constructs 10.0.0-alpha.99 → 10.0.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/CHANGELOG.md +437 -0
- package/README.md +193 -285
- package/dist/AWSScheduledFunction-BzGCUbkk.d.mts +117 -0
- package/dist/AWSScheduledFunction-BzGCUbkk.d.mts.map +1 -0
- package/dist/AWSScheduledFunction-C42adp8A.cjs +266 -0
- package/dist/AWSScheduledFunction-C42adp8A.cjs.map +1 -0
- package/dist/AWSScheduledFunction-CsNJhXQj.d.cts +117 -0
- package/dist/AWSScheduledFunction-CsNJhXQj.d.cts.map +1 -0
- package/dist/AWSScheduledFunction-KP6lqbsW.mjs +254 -0
- package/dist/AWSScheduledFunction-KP6lqbsW.mjs.map +1 -0
- package/dist/{Construct-B1vGBPme.mjs → Construct-BWF5HxaM.mjs} +37 -47
- package/dist/Construct-BWF5HxaM.mjs.map +1 -0
- package/dist/Construct-JlyQkBkv.d.cts +117 -0
- package/dist/Construct-JlyQkBkv.d.cts.map +1 -0
- package/dist/{Construct-DUSXuTHP.cjs → Construct-TGIM_E4o.cjs} +88 -67
- package/dist/Construct-TGIM_E4o.cjs.map +1 -0
- package/dist/Construct-pxwC6fDD.d.mts +117 -0
- package/dist/Construct-pxwC6fDD.d.mts.map +1 -0
- package/dist/{Endpoint-Du-NwPX2.d.mts → Endpoint-B0P_pEMr.d.mts} +85 -126
- package/dist/Endpoint-B0P_pEMr.d.mts.map +1 -0
- package/dist/{Endpoint-aCvBMPoH.d.cts → Endpoint-BLZ7r67m.d.cts} +84 -125
- package/dist/Endpoint-BLZ7r67m.d.cts.map +1 -0
- package/dist/{HonoEndpointAdaptor-PtPlbeKY.mjs → HonoEndpointAdaptor-BMVwx2cz.mjs} +69 -81
- package/dist/HonoEndpointAdaptor-BMVwx2cz.mjs.map +1 -0
- package/dist/{HonoEndpointAdaptor-zVzVLJEO.cjs → HonoEndpointAdaptor-DPDsDi-D.cjs} +77 -92
- package/dist/HonoEndpointAdaptor-DPDsDi-D.cjs.map +1 -0
- package/dist/Queue-BL68oDJ-.d.mts +66 -0
- package/dist/Queue-BL68oDJ-.d.mts.map +1 -0
- package/dist/Queue-DxJ6btRE.d.cts +66 -0
- package/dist/Queue-DxJ6btRE.d.cts.map +1 -0
- package/dist/Subscriber-BpVhcGhX.d.cts +47 -0
- package/dist/Subscriber-BpVhcGhX.d.cts.map +1 -0
- package/dist/Subscriber-DF6xsBAJ.d.mts +47 -0
- package/dist/Subscriber-DF6xsBAJ.d.mts.map +1 -0
- package/dist/Topic-DJXoDeMP.d.cts +60 -0
- package/dist/Topic-DJXoDeMP.d.cts.map +1 -0
- package/dist/Topic-DxWQBgMN.d.mts +60 -0
- package/dist/Topic-DxWQBgMN.d.mts.map +1 -0
- package/dist/adaptors/aws.cjs +205 -355
- package/dist/adaptors/aws.cjs.map +1 -1
- package/dist/adaptors/aws.d.cts +48 -126
- package/dist/adaptors/aws.d.cts.map +1 -1
- package/dist/adaptors/aws.d.mts +49 -127
- package/dist/adaptors/aws.d.mts.map +1 -1
- package/dist/adaptors/aws.mjs +178 -325
- package/dist/adaptors/aws.mjs.map +1 -1
- package/dist/adaptors/hono.cjs +9 -3
- package/dist/adaptors/hono.d.cts +15 -7
- package/dist/adaptors/hono.d.cts.map +1 -1
- package/dist/adaptors/hono.d.mts +17 -9
- package/dist/adaptors/hono.d.mts.map +1 -1
- package/dist/adaptors/hono.mjs +9 -2
- package/dist/adaptors/testing.cjs +209 -831
- package/dist/adaptors/testing.cjs.map +1 -1
- package/dist/adaptors/testing.d.cts +55 -351
- package/dist/adaptors/testing.d.cts.map +1 -1
- package/dist/adaptors/testing.d.mts +53 -349
- package/dist/adaptors/testing.d.mts.map +1 -1
- package/dist/adaptors/testing.mjs +195 -798
- package/dist/adaptors/testing.mjs.map +1 -1
- package/dist/{clone-UGJpvQnL.cjs → clone-I_WIpiFf.cjs} +8 -7
- package/dist/clone-I_WIpiFf.cjs.map +1 -0
- package/dist/{clone-EKNovYHu.mjs → clone-pdXxc0t3.mjs} +3 -3
- package/dist/clone-pdXxc0t3.mjs.map +1 -0
- package/dist/crons/index.cjs +66 -190
- package/dist/crons/index.cjs.map +1 -1
- package/dist/crons/index.d.cts +35 -70
- package/dist/crons/index.d.cts.map +1 -1
- package/dist/crons/index.d.mts +32 -70
- package/dist/crons/index.d.mts.map +1 -1
- package/dist/crons/index.mjs +63 -184
- package/dist/crons/index.mjs.map +1 -1
- package/dist/endpoints/index.cjs +761 -19
- package/dist/endpoints/index.cjs.map +1 -0
- package/dist/endpoints/index.d.cts +322 -22
- package/dist/endpoints/index.d.cts.map +1 -1
- package/dist/endpoints/index.d.mts +321 -22
- package/dist/endpoints/index.d.mts.map +1 -1
- package/dist/endpoints/index.mjs +751 -6
- package/dist/endpoints/index.mjs.map +1 -0
- package/dist/functions/index.cjs +5 -2
- package/dist/functions/index.d.cts +3 -3
- package/dist/functions/index.d.mts +3 -3
- package/dist/functions/index.mjs +5 -2
- package/dist/{functions-BFizikJU.mjs → functions-EqTloHjo.mjs} +331 -425
- package/dist/functions-EqTloHjo.mjs.map +1 -0
- package/dist/{functions-CfzJG9hK.cjs → functions-SqtCDc9c.cjs} +370 -459
- package/dist/functions-SqtCDc9c.cjs.map +1 -0
- package/dist/index-C7iynzLI.d.mts +139 -0
- package/dist/index-C7iynzLI.d.mts.map +1 -0
- package/dist/index-D4dM_WDY.d.cts +142 -0
- package/dist/index-D4dM_WDY.d.cts.map +1 -0
- package/dist/index.cjs +3 -6
- package/dist/index.d.cts +4 -27
- package/dist/index.d.mts +4 -27
- package/dist/index.mjs +3 -3
- package/dist/{Endpoint-BG4UJ9oA.mjs → lazyAccessors-CCTK19xj.mjs} +1040 -914
- package/dist/lazyAccessors-CCTK19xj.mjs.map +1 -0
- package/dist/{Endpoint-BoUg8ocM.cjs → lazyAccessors-D04oftGw.cjs} +1127 -960
- package/dist/lazyAccessors-D04oftGw.cjs.map +1 -0
- package/dist/monitors/index.cjs +49 -0
- package/dist/monitors/index.cjs.map +1 -0
- package/dist/monitors/index.d.cts +45 -0
- package/dist/monitors/index.d.cts.map +1 -0
- package/dist/monitors/index.d.mts +45 -0
- package/dist/monitors/index.d.mts.map +1 -0
- package/dist/monitors/index.mjs +48 -0
- package/dist/monitors/index.mjs.map +1 -0
- package/dist/processAudits-BJZT5gmy.cjs +92 -0
- package/dist/processAudits-BJZT5gmy.cjs.map +1 -0
- package/dist/processAudits-CwyaaSQc.mjs +80 -0
- package/dist/processAudits-CwyaaSQc.mjs.map +1 -0
- package/dist/publisher-BZgcrVPy.cjs +53 -0
- package/dist/publisher-BZgcrVPy.cjs.map +1 -0
- package/dist/publisher-CnpeMv-r.mjs +41 -0
- package/dist/publisher-CnpeMv-r.mjs.map +1 -0
- package/dist/queue/index.cjs +114 -6
- package/dist/queue/index.cjs.map +1 -0
- package/dist/queue/index.d.cts +45 -3
- package/dist/queue/index.d.cts.map +1 -0
- package/dist/queue/index.d.mts +44 -3
- package/dist/queue/index.d.mts.map +1 -0
- package/dist/queue/index.mjs +112 -3
- package/dist/queue/index.mjs.map +1 -0
- package/dist/subscribers/index.cjs +80 -111
- package/dist/subscribers/index.cjs.map +1 -1
- package/dist/subscribers/index.d.cts +43 -46
- package/dist/subscribers/index.d.cts.map +1 -1
- package/dist/subscribers/index.d.mts +42 -46
- package/dist/subscribers/index.d.mts.map +1 -1
- package/dist/subscribers/index.mjs +78 -108
- package/dist/subscribers/index.mjs.map +1 -1
- package/dist/{lambdaTelemetry-8vnmVZQ5.d.cts → telemetry-C--EgYVr.d.mts} +7 -4
- package/dist/telemetry-C--EgYVr.d.mts.map +1 -0
- package/dist/{lambdaTelemetry-8vnmVZQ5.d.mts → telemetry-Dqx-D3F7.d.cts} +7 -4
- package/dist/telemetry-Dqx-D3F7.d.cts.map +1 -0
- package/dist/topic/index.cjs +91 -3
- package/dist/topic/index.cjs.map +1 -0
- package/dist/topic/index.d.cts +32 -2
- package/dist/topic/index.d.cts.map +1 -0
- package/dist/topic/index.d.mts +32 -2
- package/dist/topic/index.d.mts.map +1 -0
- package/dist/topic/index.mjs +89 -2
- package/dist/topic/index.mjs.map +1 -0
- package/dist/{types-DMuSQeLL.d.cts → types-BdAaYDvd.d.cts} +5 -3
- package/dist/types-BdAaYDvd.d.cts.map +1 -0
- package/dist/{types-DMuSQeLL.d.mts → types-DNngH0fX.d.mts} +5 -3
- package/dist/types-DNngH0fX.d.mts.map +1 -0
- package/dist/types.d.cts +1 -1
- package/dist/types.d.mts +1 -1
- package/dist/types.mjs +0 -1
- package/package.json +55 -223
- package/src/Construct.ts +209 -0
- package/src/__benchmarks__/build-time-optimization.bench.ts +274 -0
- package/src/__benchmarks__/endpoint.bench.ts +494 -0
- package/src/__benchmarks__/fixtures.ts +241 -0
- package/src/__benchmarks__/hono-adaptor.bench.ts +533 -0
- package/src/__benchmarks__/hono-server.bench.ts +249 -0
- package/src/__benchmarks__/response-builder.bench.ts +428 -0
- package/src/__benchmarks__/strategies/strategy-a-lazy-services.ts +319 -0
- package/src/__benchmarks__/strategies/strategy-c-middleware.ts +530 -0
- package/src/__benchmarks__/strategies/strategy-d-opt-in-events.ts +567 -0
- package/src/__tests__/Construct.environment.spec.ts +704 -0
- package/src/__tests__/builder-reuse.spec.ts +587 -0
- package/src/__tests__/monitor.spec.ts +636 -0
- package/src/__tests__/publisher.setting.spec.ts +508 -0
- package/src/__tests__/publisher.spec.ts +452 -0
- package/src/adaptors/aws.ts +6 -0
- package/src/adaptors/hono.ts +1 -0
- package/src/adaptors/testing.ts +11 -0
- package/src/clone.ts +38 -0
- package/src/crons/AWSScheduledFunction.ts +73 -0
- package/src/crons/Cron.ts +149 -0
- package/src/crons/CronBuilder.ts +261 -0
- package/src/crons/__tests__/AWSScheduledFunction.spec.ts +152 -0
- package/src/crons/__tests__/Cron.spec.ts +472 -0
- package/src/crons/__tests__/CronBuilder.state-isolation.spec.ts +273 -0
- package/src/crons/index.ts +12 -0
- package/src/endpoints/AmazonApiGatewayEndpointAdaptor.ts +698 -0
- package/src/endpoints/AmazonApiGatewayV1EndpointAdaptor.ts +105 -0
- package/src/endpoints/AmazonApiGatewayV2EndpointAdaptor.ts +97 -0
- package/src/endpoints/Authorizer.ts +152 -0
- package/src/endpoints/Endpoint.ts +1287 -0
- package/src/endpoints/EndpointBuilder.ts +749 -0
- package/src/endpoints/EndpointFactory.ts +1179 -0
- package/src/endpoints/HonoEndpointAdaptor.ts +692 -0
- package/src/endpoints/MswEndpointAdaptor.ts +226 -0
- package/src/endpoints/TestEndpointAdaptor.ts +466 -0
- package/src/endpoints/__tests__/AmazonApiGatewayV1EndpointAdaptor.audits.spec.ts +499 -0
- package/src/endpoints/__tests__/AmazonApiGatewayV1EndpointAdaptor.events.spec.ts +560 -0
- package/src/endpoints/__tests__/AmazonApiGatewayV1EndpointAdaptor.spec.ts +1304 -0
- package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.audits.spec.ts +626 -0
- package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.events.spec.ts +732 -0
- package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.factory-publisher.spec.ts +296 -0
- package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.kysely-audit.integration.spec.ts +951 -0
- package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.responseType.spec.ts +111 -0
- package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.rls.spec.ts +307 -0
- package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.spec.ts +629 -0
- package/src/endpoints/__tests__/Authorizer.spec.ts +286 -0
- package/src/endpoints/__tests__/Endpoint.cookies.spec.ts +207 -0
- package/src/endpoints/__tests__/Endpoint.headers.spec.ts +187 -0
- package/src/endpoints/__tests__/Endpoint.manifest.spec.ts +175 -0
- package/src/endpoints/__tests__/Endpoint.spec.ts +857 -0
- package/src/endpoints/__tests__/EndpointBuilder.audit.spec.ts +451 -0
- package/src/endpoints/__tests__/EndpointBuilder.responseType.spec.ts +50 -0
- package/src/endpoints/__tests__/EndpointBuilder.spec.ts +531 -0
- package/src/endpoints/__tests__/EndpointFactory.authorizers.spec.ts +492 -0
- package/src/endpoints/__tests__/EndpointFactory.database-auditor.spec.ts +509 -0
- package/src/endpoints/__tests__/EndpointFactory.reference-audit.spec.ts +190 -0
- package/src/endpoints/__tests__/EndpointFactory.spec.ts +479 -0
- package/src/endpoints/__tests__/EndpointFactory.state-isolation.spec.ts +155 -0
- package/src/endpoints/__tests__/HonoEndpointAdaptor.audit-transactions.spec.ts +703 -0
- package/src/endpoints/__tests__/HonoEndpointAdaptor.audits.spec.ts +632 -0
- package/src/endpoints/__tests__/HonoEndpointAdaptor.events.spec.ts +577 -0
- package/src/endpoints/__tests__/HonoEndpointAdaptor.kysely-audit.integration.spec.ts +1067 -0
- package/src/endpoints/__tests__/HonoEndpointAdaptor.openapi.spec.ts +317 -0
- package/src/endpoints/__tests__/HonoEndpointAdaptor.pgboss-publisher.spec.ts +289 -0
- package/src/endpoints/__tests__/HonoEndpointAdaptor.responseType.spec.ts +128 -0
- package/src/endpoints/__tests__/HonoEndpointAdaptor.spec.ts +1207 -0
- package/src/endpoints/__tests__/MswEndpointAdaptor.spec.ts +211 -0
- package/src/endpoints/__tests__/ResponseBuilder.spec.ts +235 -0
- package/src/endpoints/__tests__/TestEndpointAdaptor.audits.spec.ts +602 -0
- package/src/endpoints/__tests__/TestEndpointAdaptor.spec.ts +1044 -0
- package/src/endpoints/__tests__/__snapshots__/HonoEndpointAdaptor.spec.ts.snap +54 -0
- package/src/endpoints/__tests__/endpoint-types.test.ts +88 -0
- package/src/endpoints/__tests__/helpers.spec.ts +37 -0
- package/src/endpoints/__tests__/lazyAccessors.spec.ts +330 -0
- package/src/endpoints/__tests__/processAudits.spec.ts +631 -0
- package/src/endpoints/audit.ts +87 -0
- package/src/endpoints/helpers.ts +98 -0
- package/src/endpoints/index.ts +42 -0
- package/src/endpoints/lazyAccessors.ts +241 -0
- package/src/endpoints/parseHonoQuery.ts +16 -0
- package/src/endpoints/parseQueryParams.ts +32 -0
- package/src/endpoints/processAudits.ts +371 -0
- package/src/endpoints/rls.ts +67 -0
- package/src/functions/AWSLambdaFunction.ts +374 -0
- package/src/functions/BaseFunctionBuilder.ts +212 -0
- package/src/functions/Function.ts +238 -0
- package/src/functions/FunctionBuilder.ts +381 -0
- package/src/functions/FunctionExecutionWrapper.ts +216 -0
- package/src/functions/TestFunctionAdaptor.ts +252 -0
- package/src/functions/__tests__/AWSLambdaFunctionAdaptor.spec.ts +513 -0
- package/src/functions/__tests__/Function.audits.spec.ts +393 -0
- package/src/functions/__tests__/Function.spec.ts +477 -0
- package/src/functions/__tests__/FunctionBuilder.state-isolation.spec.ts +250 -0
- package/src/functions/__tests__/TestFunctionAdaptor.spec.ts +480 -0
- package/src/functions/index.ts +12 -0
- package/src/index.ts +29 -0
- package/src/monitor.ts +145 -0
- package/src/monitors/heartbeat.ts +86 -0
- package/src/monitors/index.ts +6 -0
- package/src/publisher.ts +93 -0
- package/src/queue/AWSLambdaQueueAdaptor.ts +162 -0
- package/src/queue/Queue.ts +128 -0
- package/src/queue/QueueBuilder.ts +115 -0
- package/src/queue/TestQueueAdaptor.ts +63 -0
- package/src/queue/__tests__/QueueBuilder.spec.ts +137 -0
- package/src/queue/index.ts +12 -0
- package/src/subscribers/AWSLambdaSubscriberAdaptor.ts +342 -0
- package/src/subscribers/Subscriber.ts +117 -0
- package/src/subscribers/SubscriberBuilder.ts +183 -0
- package/src/subscribers/TestSubscriberAdaptor.ts +133 -0
- package/src/subscribers/__tests__/AWSLambdaSubscriberAdaptor.spec.ts +1018 -0
- package/src/subscribers/__tests__/Subscriber.spec.ts +430 -0
- package/src/subscribers/__tests__/TestSubscriberAdaptor.spec.ts +652 -0
- package/src/subscribers/index.ts +6 -0
- package/src/telemetry.ts +103 -0
- package/src/topic/Topic.ts +103 -0
- package/src/topic/TopicBuilder.ts +53 -0
- package/src/topic/__tests__/TopicBuilder.spec.ts +82 -0
- package/src/topic/index.ts +11 -0
- package/src/types.ts +13 -0
- package/test.ts +91 -0
- package/tsconfig.json +9 -0
- package/tsdown.config.ts +35 -0
- package/dist/Construct-B1vGBPme.mjs.map +0 -1
- package/dist/Construct-BQALFCh2.d.cts +0 -230
- package/dist/Construct-BQALFCh2.d.cts.map +0 -1
- package/dist/Construct-DUSXuTHP.cjs.map +0 -1
- package/dist/Construct-QXnl3VqT.d.mts +0 -230
- package/dist/Construct-QXnl3VqT.d.mts.map +0 -1
- package/dist/Cron-DI3nKoic.d.cts +0 -45
- package/dist/Cron-DI3nKoic.d.cts.map +0 -1
- package/dist/Cron-uYAHPnp7.d.mts +0 -45
- package/dist/Cron-uYAHPnp7.d.mts.map +0 -1
- package/dist/CronBuilder-C0Ek1-RA.cjs +0 -121
- package/dist/CronBuilder-C0Ek1-RA.cjs.map +0 -1
- package/dist/CronBuilder-DaSUm2Na.d.mts +0 -47
- package/dist/CronBuilder-DaSUm2Na.d.mts.map +0 -1
- package/dist/CronBuilder-Dmix_Pen.mjs +0 -109
- package/dist/CronBuilder-Dmix_Pen.mjs.map +0 -1
- package/dist/CronBuilder-g1lZLWyG.d.cts +0 -47
- package/dist/CronBuilder-g1lZLWyG.d.cts.map +0 -1
- package/dist/Endpoint-BG4UJ9oA.mjs.map +0 -1
- package/dist/Endpoint-BoUg8ocM.cjs.map +0 -1
- package/dist/Endpoint-Du-NwPX2.d.mts.map +0 -1
- package/dist/Endpoint-aCvBMPoH.d.cts.map +0 -1
- package/dist/EndpointFactory-BDtsrEvJ.mjs +0 -791
- package/dist/EndpointFactory-BDtsrEvJ.mjs.map +0 -1
- package/dist/EndpointFactory-DJ7gXLpR.cjs +0 -833
- package/dist/EndpointFactory-DJ7gXLpR.cjs.map +0 -1
- package/dist/EndpointFactory-DMYdJCOj.d.mts +0 -363
- package/dist/EndpointFactory-DMYdJCOj.d.mts.map +0 -1
- package/dist/EndpointFactory-I7s1co3Y.d.cts +0 -363
- package/dist/EndpointFactory-I7s1co3Y.d.cts.map +0 -1
- package/dist/Function-DuqGcbOI.d.mts +0 -76
- package/dist/Function-DuqGcbOI.d.mts.map +0 -1
- package/dist/Function-Pu-1kKZz.d.cts +0 -76
- package/dist/Function-Pu-1kKZz.d.cts.map +0 -1
- package/dist/HonoEndpointAdaptor-PtPlbeKY.mjs.map +0 -1
- package/dist/HonoEndpointAdaptor-zVzVLJEO.cjs.map +0 -1
- package/dist/Queue-A3wfD0it.cjs +0 -109
- package/dist/Queue-A3wfD0it.cjs.map +0 -1
- package/dist/Queue-D6USGS4q.mjs +0 -104
- package/dist/Queue-D6USGS4q.mjs.map +0 -1
- package/dist/Queue-DlsHRzUp.d.mts +0 -105
- package/dist/Queue-DlsHRzUp.d.mts.map +0 -1
- package/dist/Queue-HPyi0e1i.d.cts +0 -105
- package/dist/Queue-HPyi0e1i.d.cts.map +0 -1
- package/dist/QueueBuilder-BjuF0UBl.cjs +0 -135
- package/dist/QueueBuilder-BjuF0UBl.cjs.map +0 -1
- package/dist/QueueBuilder-Cue73M4t.mjs +0 -118
- package/dist/QueueBuilder-Cue73M4t.mjs.map +0 -1
- package/dist/QueueBuilder-OSi6LkV9.d.cts +0 -75
- package/dist/QueueBuilder-OSi6LkV9.d.cts.map +0 -1
- package/dist/QueueBuilder-QHsnVt1P.d.mts +0 -75
- package/dist/QueueBuilder-QHsnVt1P.d.mts.map +0 -1
- package/dist/Subscriber-Bpp02cGr.d.cts +0 -61
- package/dist/Subscriber-Bpp02cGr.d.cts.map +0 -1
- package/dist/Subscriber-CtN9R48-.d.mts +0 -61
- package/dist/Subscriber-CtN9R48-.d.mts.map +0 -1
- package/dist/SubscriberBuilder-CDy4nHCz.mjs +0 -134
- package/dist/SubscriberBuilder-CDy4nHCz.mjs.map +0 -1
- package/dist/SubscriberBuilder-CuCMFpYW.d.mts +0 -67
- package/dist/SubscriberBuilder-CuCMFpYW.d.mts.map +0 -1
- package/dist/SubscriberBuilder-D_owVoHo.cjs +0 -145
- package/dist/SubscriberBuilder-D_owVoHo.cjs.map +0 -1
- package/dist/SubscriberBuilder-g3fAVWgs.d.cts +0 -67
- package/dist/SubscriberBuilder-g3fAVWgs.d.cts.map +0 -1
- package/dist/Topic-D74b5cgs.mjs +0 -99
- package/dist/Topic-D74b5cgs.mjs.map +0 -1
- package/dist/Topic-GHxcU8AG.cjs +0 -104
- package/dist/Topic-GHxcU8AG.cjs.map +0 -1
- package/dist/auth-BMCJN30Y.d.cts +0 -268
- package/dist/auth-BMCJN30Y.d.cts.map +0 -1
- package/dist/auth-CcuceLYo.d.mts +0 -268
- package/dist/auth-CcuceLYo.d.mts.map +0 -1
- package/dist/auth.cjs +0 -433
- package/dist/auth.cjs.map +0 -1
- package/dist/auth.d.cts +0 -2
- package/dist/auth.d.mts +0 -2
- package/dist/auth.mjs +0 -426
- package/dist/auth.mjs.map +0 -1
- package/dist/cache-CXh6GIgb.d.mts +0 -44
- package/dist/cache-CXh6GIgb.d.mts.map +0 -1
- package/dist/cache-DnGDGly3.d.cts +0 -44
- package/dist/cache-DnGDGly3.d.cts.map +0 -1
- package/dist/cache.cjs +0 -69
- package/dist/cache.cjs.map +0 -1
- package/dist/cache.d.cts +0 -2
- package/dist/cache.d.mts +0 -2
- package/dist/cache.mjs +0 -68
- package/dist/cache.mjs.map +0 -1
- package/dist/cipher-C1lEFX63.mjs +0 -225
- package/dist/cipher-C1lEFX63.mjs.map +0 -1
- package/dist/cipher-CVxfwLjk.cjs +0 -332
- package/dist/cipher-CVxfwLjk.cjs.map +0 -1
- package/dist/clone-EKNovYHu.mjs.map +0 -1
- package/dist/clone-UGJpvQnL.cjs.map +0 -1
- package/dist/construct-interface-B1AfqRl4.d.cts +0 -162
- package/dist/construct-interface-B1AfqRl4.d.cts.map +0 -1
- package/dist/construct-interface-DluK3_da.d.mts +0 -162
- package/dist/construct-interface-DluK3_da.d.mts.map +0 -1
- package/dist/construct-interface.cjs +0 -114
- package/dist/construct-interface.cjs.map +0 -1
- package/dist/construct-interface.d.cts +0 -2
- package/dist/construct-interface.d.mts +0 -2
- package/dist/construct-interface.mjs +0 -107
- package/dist/construct-interface.mjs.map +0 -1
- package/dist/credential.cjs +0 -156
- package/dist/credential.cjs.map +0 -1
- package/dist/credential.d.cts +0 -86
- package/dist/credential.d.cts.map +0 -1
- package/dist/credential.d.mts +0 -86
- package/dist/credential.d.mts.map +0 -1
- package/dist/credential.mjs +0 -152
- package/dist/credential.mjs.map +0 -1
- package/dist/database/kysely.cjs +0 -4
- package/dist/database/kysely.d.cts +0 -2
- package/dist/database/kysely.d.mts +0 -2
- package/dist/database/kysely.mjs +0 -2
- package/dist/email.cjs +0 -72
- package/dist/email.cjs.map +0 -1
- package/dist/email.d.cts +0 -46
- package/dist/email.d.cts.map +0 -1
- package/dist/email.d.mts +0 -46
- package/dist/email.d.mts.map +0 -1
- package/dist/email.mjs +0 -71
- package/dist/email.mjs.map +0 -1
- package/dist/encryption.cjs +0 -96
- package/dist/encryption.cjs.map +0 -1
- package/dist/encryption.d.cts +0 -117
- package/dist/encryption.d.cts.map +0 -1
- package/dist/encryption.d.mts +0 -117
- package/dist/encryption.d.mts.map +0 -1
- package/dist/encryption.mjs +0 -83
- package/dist/encryption.mjs.map +0 -1
- package/dist/external-api-MJ8id87V.d.mts +0 -105
- package/dist/external-api-MJ8id87V.d.mts.map +0 -1
- package/dist/external-api-O107yzZJ.d.cts +0 -105
- package/dist/external-api-O107yzZJ.d.cts.map +0 -1
- package/dist/external-api.cjs +0 -142
- package/dist/external-api.cjs.map +0 -1
- package/dist/external-api.d.cts +0 -2
- package/dist/external-api.d.mts +0 -2
- package/dist/external-api.mjs +0 -139
- package/dist/external-api.mjs.map +0 -1
- package/dist/file-server.cjs +0 -186
- package/dist/file-server.cjs.map +0 -1
- package/dist/file-server.d.cts +0 -152
- package/dist/file-server.d.cts.map +0 -1
- package/dist/file-server.d.mts +0 -152
- package/dist/file-server.d.mts.map +0 -1
- package/dist/file-server.mjs +0 -184
- package/dist/file-server.mjs.map +0 -1
- package/dist/functions-BFizikJU.mjs.map +0 -1
- package/dist/functions-CfzJG9hK.cjs.map +0 -1
- package/dist/index-BuzRvKOQ.d.cts +0 -115
- package/dist/index-BuzRvKOQ.d.cts.map +0 -1
- package/dist/index-CTkKOer4.d.mts +0 -115
- package/dist/index-CTkKOer4.d.mts.map +0 -1
- package/dist/index-CeEtxDmK.d.cts +0 -79
- package/dist/index-CeEtxDmK.d.cts.map +0 -1
- package/dist/index-CeEtxDmK.d.mts +0 -79
- package/dist/index-CeEtxDmK.d.mts.map +0 -1
- package/dist/index.d.cts.map +0 -1
- package/dist/index.d.mts.map +0 -1
- package/dist/kms-B-Hm3d5r.cjs +0 -85
- package/dist/kms-B-Hm3d5r.cjs.map +0 -1
- package/dist/kms-BdUlMJEZ.mjs +0 -85
- package/dist/kms-BdUlMJEZ.mjs.map +0 -1
- package/dist/kysely-Bii4l6eP.mjs +0 -370
- package/dist/kysely-Bii4l6eP.mjs.map +0 -1
- package/dist/kysely-CO_Dk43W.cjs +0 -383
- package/dist/kysely-CO_Dk43W.cjs.map +0 -1
- package/dist/kysely-D0bpzgPs.d.cts +0 -175
- package/dist/kysely-D0bpzgPs.d.cts.map +0 -1
- package/dist/kysely-DUqC3Ie0.d.mts +0 -175
- package/dist/kysely-DUqC3Ie0.d.mts.map +0 -1
- package/dist/lambdaTelemetry-8vnmVZQ5.d.cts.map +0 -1
- package/dist/lambdaTelemetry-8vnmVZQ5.d.mts.map +0 -1
- package/dist/lazyAccessors-CFanua0O.mjs +0 -174
- package/dist/lazyAccessors-CFanua0O.mjs.map +0 -1
- package/dist/lazyAccessors-hJKGv8Ay.cjs +0 -221
- package/dist/lazyAccessors-hJKGv8Ay.cjs.map +0 -1
- package/dist/mobile-app.cjs +0 -73
- package/dist/mobile-app.cjs.map +0 -1
- package/dist/mobile-app.d.cts +0 -61
- package/dist/mobile-app.d.cts.map +0 -1
- package/dist/mobile-app.d.mts +0 -61
- package/dist/mobile-app.d.mts.map +0 -1
- package/dist/mobile-app.mjs +0 -72
- package/dist/mobile-app.mjs.map +0 -1
- package/dist/object-storage.cjs +0 -56
- package/dist/object-storage.cjs.map +0 -1
- package/dist/object-storage.d.cts +0 -32
- package/dist/object-storage.d.cts.map +0 -1
- package/dist/object-storage.d.mts +0 -32
- package/dist/object-storage.d.mts.map +0 -1
- package/dist/object-storage.mjs +0 -55
- package/dist/object-storage.mjs.map +0 -1
- package/dist/processAudits-BRRVVHUB.mjs +0 -131
- package/dist/processAudits-BRRVVHUB.mjs.map +0 -1
- package/dist/processAudits-DasOZjPl.cjs +0 -154
- package/dist/processAudits-DasOZjPl.cjs.map +0 -1
- package/dist/rest-api.cjs +0 -216
- package/dist/rest-api.cjs.map +0 -1
- package/dist/rest-api.d.cts +0 -241
- package/dist/rest-api.d.cts.map +0 -1
- package/dist/rest-api.d.mts +0 -241
- package/dist/rest-api.d.mts.map +0 -1
- package/dist/rest-api.mjs +0 -215
- package/dist/rest-api.mjs.map +0 -1
- package/dist/rolldown-runtime-y5ARvAq5.cjs +0 -35
- package/dist/runSubscriber-BHvJ8POr.mjs +0 -109
- package/dist/runSubscriber-BHvJ8POr.mjs.map +0 -1
- package/dist/runSubscriber-D8nLXIv1.cjs +0 -126
- package/dist/runSubscriber-D8nLXIv1.cjs.map +0 -1
- package/dist/shutdown-BMJmAhSt.cjs +0 -38
- package/dist/shutdown-BMJmAhSt.cjs.map +0 -1
- package/dist/shutdown-C7xa8x9S.mjs +0 -27
- package/dist/shutdown-C7xa8x9S.mjs.map +0 -1
- package/dist/site.cjs +0 -74
- package/dist/site.cjs.map +0 -1
- package/dist/site.d.cts +0 -104
- package/dist/site.d.cts.map +0 -1
- package/dist/site.d.mts +0 -104
- package/dist/site.d.mts.map +0 -1
- package/dist/site.mjs +0 -73
- package/dist/site.mjs.map +0 -1
- package/dist/stages-BSCF19o2.d.cts +0 -56
- package/dist/stages-BSCF19o2.d.cts.map +0 -1
- package/dist/stages-BSCF19o2.d.mts +0 -56
- package/dist/stages-BSCF19o2.d.mts.map +0 -1
- package/dist/surfaceEnv-CNimK76p.cjs +0 -56
- package/dist/surfaceEnv-CNimK76p.cjs.map +0 -1
- package/dist/surfaceEnv-wMT5QzgZ.mjs +0 -45
- package/dist/surfaceEnv-wMT5QzgZ.mjs.map +0 -1
- package/dist/telemetry-B48RLjyk.d.cts +0 -40
- package/dist/telemetry-B48RLjyk.d.cts.map +0 -1
- package/dist/telemetry-DRtT1_0A.d.mts +0 -40
- package/dist/telemetry-DRtT1_0A.d.mts.map +0 -1
- package/dist/telemetry.cjs +0 -56
- package/dist/telemetry.cjs.map +0 -1
- package/dist/telemetry.d.cts +0 -2
- package/dist/telemetry.d.mts +0 -2
- package/dist/telemetry.mjs +0 -55
- package/dist/telemetry.mjs.map +0 -1
- package/dist/tracing-CxaZ98IB.mjs +0 -110
- package/dist/tracing-CxaZ98IB.mjs.map +0 -1
- package/dist/tracing-DPMidF_r.cjs +0 -127
- package/dist/tracing-DPMidF_r.cjs.map +0 -1
- package/dist/types-DMuSQeLL.d.cts.map +0 -1
- package/dist/types-DMuSQeLL.d.mts.map +0 -1
- package/dist/worker.cjs +0 -191
- package/dist/worker.cjs.map +0 -1
- package/dist/worker.d.cts +0 -171
- package/dist/worker.d.cts.map +0 -1
- package/dist/worker.d.mts +0 -171
- package/dist/worker.d.mts.map +0 -1
- package/dist/worker.mjs +0 -190
- package/dist/worker.mjs.map +0 -1
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ConstructType, __commonJS, __toESM } from "./Construct-BWF5HxaM.mjs";
|
|
2
|
+
import { Function as Function$1 } from "./functions-EqTloHjo.mjs";
|
|
3
3
|
import { convertSchemaWithComponents, convertStandardSchemaToJsonSchema } from "@geekmidas/schema/conversion";
|
|
4
4
|
import { buildOpenApiSchema } from "@geekmidas/schema/openapi";
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import { getCookie } from "hono/cookie";
|
|
6
|
+
|
|
7
|
+
//#region ../../node_modules/.pnpm/lodash.set@4.3.2/node_modules/lodash.set/index.js
|
|
8
|
+
var require_lodash$1 = __commonJS({ "../../node_modules/.pnpm/lodash.set@4.3.2/node_modules/lodash.set/index.js"(exports, module) {
|
|
7
9
|
/**
|
|
8
10
|
* lodash (Custom Build) <https://lodash.com/>
|
|
9
11
|
* Build: `lodash modularize exports="npm" -o ./`
|
|
@@ -12,942 +14,987 @@ var require_lodash_pick = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
12
14
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
13
15
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
14
16
|
*/
|
|
17
|
+
/** Used as the `TypeError` message for "Functions" methods. */
|
|
18
|
+
var FUNC_ERROR_TEXT = "Expected a function";
|
|
19
|
+
/** Used to stand-in for `undefined` hash values. */
|
|
20
|
+
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
15
21
|
/** Used as references for various `Number` constants. */
|
|
16
|
-
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
22
|
+
var INFINITY$1 = Infinity, MAX_SAFE_INTEGER$1 = 9007199254740991;
|
|
17
23
|
/** `Object#toString` result references. */
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
var
|
|
21
|
-
|
|
24
|
+
var funcTag$1 = "[object Function]", genTag$1 = "[object GeneratorFunction]", symbolTag$1 = "[object Symbol]";
|
|
25
|
+
/** Used to match property names within property paths. */
|
|
26
|
+
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/, reLeadingDot = /^\./, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
27
|
+
/**
|
|
28
|
+
* Used to match `RegExp`
|
|
29
|
+
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
30
|
+
*/
|
|
31
|
+
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
32
|
+
/** Used to match backslashes in property paths. */
|
|
33
|
+
var reEscapeChar = /\\(\\)?/g;
|
|
34
|
+
/** Used to detect host constructors (Safari). */
|
|
35
|
+
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
36
|
+
/** Used to detect unsigned integer values. */
|
|
37
|
+
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
22
38
|
/** Detect free variable `global` from Node.js. */
|
|
23
|
-
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
39
|
+
var freeGlobal$1 = typeof global == "object" && global && global.Object === Object && global;
|
|
24
40
|
/** Detect free variable `self`. */
|
|
25
|
-
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
41
|
+
var freeSelf$1 = typeof self == "object" && self && self.Object === Object && self;
|
|
26
42
|
/** Used as a reference to the global object. */
|
|
27
|
-
var root = freeGlobal || freeSelf || Function("return this")();
|
|
43
|
+
var root$1 = freeGlobal$1 || freeSelf$1 || Function("return this")();
|
|
28
44
|
/**
|
|
29
|
-
*
|
|
30
|
-
* with the `this` binding of `thisArg` and the arguments of `args`.
|
|
45
|
+
* Gets the value at `key` of `object`.
|
|
31
46
|
*
|
|
32
47
|
* @private
|
|
33
|
-
* @param {
|
|
34
|
-
* @param {
|
|
35
|
-
* @
|
|
36
|
-
* @returns {*} Returns the result of `func`.
|
|
48
|
+
* @param {Object} [object] The object to query.
|
|
49
|
+
* @param {string} key The key of the property to get.
|
|
50
|
+
* @returns {*} Returns the property value.
|
|
37
51
|
*/
|
|
38
|
-
function
|
|
39
|
-
|
|
40
|
-
case 0: return func.call(thisArg);
|
|
41
|
-
case 1: return func.call(thisArg, args[0]);
|
|
42
|
-
case 2: return func.call(thisArg, args[0], args[1]);
|
|
43
|
-
case 3: return func.call(thisArg, args[0], args[1], args[2]);
|
|
44
|
-
}
|
|
45
|
-
return func.apply(thisArg, args);
|
|
52
|
+
function getValue(object, key) {
|
|
53
|
+
return object == null ? void 0 : object[key];
|
|
46
54
|
}
|
|
47
55
|
/**
|
|
48
|
-
*
|
|
49
|
-
* shorthands.
|
|
56
|
+
* Checks if `value` is a host object in IE < 9.
|
|
50
57
|
*
|
|
51
58
|
* @private
|
|
52
|
-
* @param {
|
|
53
|
-
* @
|
|
54
|
-
* @returns {Array} Returns the new mapped array.
|
|
59
|
+
* @param {*} value The value to check.
|
|
60
|
+
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
|
|
55
61
|
*/
|
|
56
|
-
function
|
|
57
|
-
var
|
|
58
|
-
|
|
62
|
+
function isHostObject(value) {
|
|
63
|
+
var result = false;
|
|
64
|
+
if (value != null && typeof value.toString != "function") try {
|
|
65
|
+
result = !!(value + "");
|
|
66
|
+
} catch (e) {}
|
|
59
67
|
return result;
|
|
60
68
|
}
|
|
61
|
-
/**
|
|
62
|
-
* Appends the elements of `values` to `array`.
|
|
63
|
-
*
|
|
64
|
-
* @private
|
|
65
|
-
* @param {Array} array The array to modify.
|
|
66
|
-
* @param {Array} values The values to append.
|
|
67
|
-
* @returns {Array} Returns `array`.
|
|
68
|
-
*/
|
|
69
|
-
function arrayPush(array, values) {
|
|
70
|
-
var index = -1, length = values.length, offset = array.length;
|
|
71
|
-
while (++index < length) array[offset + index] = values[index];
|
|
72
|
-
return array;
|
|
73
|
-
}
|
|
74
69
|
/** Used for built-in method references. */
|
|
75
|
-
var objectProto = Object.prototype;
|
|
70
|
+
var arrayProto = Array.prototype, funcProto = Function.prototype, objectProto$1 = Object.prototype;
|
|
71
|
+
/** Used to detect overreaching core-js shims. */
|
|
72
|
+
var coreJsData = root$1["__core-js_shared__"];
|
|
73
|
+
/** Used to detect methods masquerading as native. */
|
|
74
|
+
var maskSrcKey = function() {
|
|
75
|
+
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
|
|
76
|
+
return uid ? "Symbol(src)_1." + uid : "";
|
|
77
|
+
}();
|
|
78
|
+
/** Used to resolve the decompiled source of functions. */
|
|
79
|
+
var funcToString = funcProto.toString;
|
|
76
80
|
/** Used to check objects for own properties. */
|
|
77
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
81
|
+
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
78
82
|
/**
|
|
79
83
|
* Used to resolve the
|
|
80
84
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
81
85
|
* of values.
|
|
82
86
|
*/
|
|
83
|
-
var objectToString = objectProto.toString;
|
|
87
|
+
var objectToString$1 = objectProto$1.toString;
|
|
88
|
+
/** Used to detect if a method is native. */
|
|
89
|
+
var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty$1).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
|
|
84
90
|
/** Built-in value references. */
|
|
85
|
-
var Symbol = root.Symbol;
|
|
86
|
-
var
|
|
87
|
-
|
|
88
|
-
var
|
|
91
|
+
var Symbol$1 = root$1.Symbol, splice = arrayProto.splice;
|
|
92
|
+
var Map$1 = getNative(root$1, "Map"), nativeCreate = getNative(Object, "create");
|
|
93
|
+
/** Used to convert symbols to primitives and strings. */
|
|
94
|
+
var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0;
|
|
89
95
|
/**
|
|
90
|
-
*
|
|
96
|
+
* Creates a hash object.
|
|
91
97
|
*
|
|
92
98
|
* @private
|
|
93
|
-
* @
|
|
94
|
-
* @param {
|
|
95
|
-
* @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
|
|
96
|
-
* @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
|
|
97
|
-
* @param {Array} [result=[]] The initial result value.
|
|
98
|
-
* @returns {Array} Returns the new flattened array.
|
|
99
|
+
* @constructor
|
|
100
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
99
101
|
*/
|
|
100
|
-
function
|
|
101
|
-
var index = -1, length =
|
|
102
|
-
|
|
103
|
-
result || (result = []);
|
|
102
|
+
function Hash(entries) {
|
|
103
|
+
var index = -1, length = entries ? entries.length : 0;
|
|
104
|
+
this.clear();
|
|
104
105
|
while (++index < length) {
|
|
105
|
-
var
|
|
106
|
-
|
|
107
|
-
if (depth > 1) baseFlatten(value, depth - 1, predicate, isStrict, result);
|
|
108
|
-
else arrayPush(result, value);
|
|
109
|
-
} else if (!isStrict) result[result.length] = value;
|
|
106
|
+
var entry = entries[index];
|
|
107
|
+
this.set(entry[0], entry[1]);
|
|
110
108
|
}
|
|
111
|
-
return result;
|
|
112
109
|
}
|
|
113
110
|
/**
|
|
114
|
-
*
|
|
115
|
-
* property identifiers.
|
|
111
|
+
* Removes all key-value entries from the hash.
|
|
116
112
|
*
|
|
117
113
|
* @private
|
|
118
|
-
* @
|
|
119
|
-
* @
|
|
120
|
-
* @returns {Object} Returns the new object.
|
|
114
|
+
* @name clear
|
|
115
|
+
* @memberOf Hash
|
|
121
116
|
*/
|
|
122
|
-
function
|
|
123
|
-
|
|
124
|
-
return basePickBy(object, props, function(value, key) {
|
|
125
|
-
return key in object;
|
|
126
|
-
});
|
|
117
|
+
function hashClear() {
|
|
118
|
+
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
|
127
119
|
}
|
|
128
120
|
/**
|
|
129
|
-
*
|
|
121
|
+
* Removes `key` and its value from the hash.
|
|
130
122
|
*
|
|
131
123
|
* @private
|
|
132
|
-
* @
|
|
133
|
-
* @
|
|
134
|
-
* @param {
|
|
135
|
-
* @
|
|
124
|
+
* @name delete
|
|
125
|
+
* @memberOf Hash
|
|
126
|
+
* @param {Object} hash The hash to modify.
|
|
127
|
+
* @param {string} key The key of the value to remove.
|
|
128
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
136
129
|
*/
|
|
137
|
-
function
|
|
138
|
-
|
|
139
|
-
while (++index < length) {
|
|
140
|
-
var key = props[index], value = object[key];
|
|
141
|
-
if (predicate(value, key)) result[key] = value;
|
|
142
|
-
}
|
|
143
|
-
return result;
|
|
130
|
+
function hashDelete(key) {
|
|
131
|
+
return this.has(key) && delete this.__data__[key];
|
|
144
132
|
}
|
|
145
133
|
/**
|
|
146
|
-
*
|
|
134
|
+
* Gets the hash value for `key`.
|
|
147
135
|
*
|
|
148
136
|
* @private
|
|
149
|
-
* @
|
|
150
|
-
* @
|
|
151
|
-
* @
|
|
137
|
+
* @name get
|
|
138
|
+
* @memberOf Hash
|
|
139
|
+
* @param {string} key The key of the value to get.
|
|
140
|
+
* @returns {*} Returns the entry value.
|
|
152
141
|
*/
|
|
153
|
-
function
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
var
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
while (++index < start) otherArgs[index] = args[index];
|
|
161
|
-
otherArgs[start] = array;
|
|
162
|
-
return apply(func, this, otherArgs);
|
|
163
|
-
};
|
|
142
|
+
function hashGet(key) {
|
|
143
|
+
var data = this.__data__;
|
|
144
|
+
if (nativeCreate) {
|
|
145
|
+
var result = data[key];
|
|
146
|
+
return result === HASH_UNDEFINED ? void 0 : result;
|
|
147
|
+
}
|
|
148
|
+
return hasOwnProperty$1.call(data, key) ? data[key] : void 0;
|
|
164
149
|
}
|
|
165
150
|
/**
|
|
166
|
-
* Checks if
|
|
151
|
+
* Checks if a hash value for `key` exists.
|
|
167
152
|
*
|
|
168
153
|
* @private
|
|
169
|
-
* @
|
|
170
|
-
* @
|
|
154
|
+
* @name has
|
|
155
|
+
* @memberOf Hash
|
|
156
|
+
* @param {string} key The key of the entry to check.
|
|
157
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
171
158
|
*/
|
|
172
|
-
function
|
|
173
|
-
|
|
159
|
+
function hashHas(key) {
|
|
160
|
+
var data = this.__data__;
|
|
161
|
+
return nativeCreate ? data[key] !== void 0 : hasOwnProperty$1.call(data, key);
|
|
174
162
|
}
|
|
175
163
|
/**
|
|
176
|
-
*
|
|
164
|
+
* Sets the hash `key` to `value`.
|
|
177
165
|
*
|
|
178
166
|
* @private
|
|
179
|
-
* @
|
|
180
|
-
* @
|
|
167
|
+
* @name set
|
|
168
|
+
* @memberOf Hash
|
|
169
|
+
* @param {string} key The key of the value to set.
|
|
170
|
+
* @param {*} value The value to set.
|
|
171
|
+
* @returns {Object} Returns the hash instance.
|
|
181
172
|
*/
|
|
182
|
-
function
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
return
|
|
173
|
+
function hashSet(key, value) {
|
|
174
|
+
var data = this.__data__;
|
|
175
|
+
data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
|
|
176
|
+
return this;
|
|
186
177
|
}
|
|
178
|
+
Hash.prototype.clear = hashClear;
|
|
179
|
+
Hash.prototype["delete"] = hashDelete;
|
|
180
|
+
Hash.prototype.get = hashGet;
|
|
181
|
+
Hash.prototype.has = hashHas;
|
|
182
|
+
Hash.prototype.set = hashSet;
|
|
187
183
|
/**
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
* @static
|
|
191
|
-
* @memberOf _
|
|
192
|
-
* @since 0.1.0
|
|
193
|
-
* @category Lang
|
|
194
|
-
* @param {*} value The value to check.
|
|
195
|
-
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
196
|
-
* else `false`.
|
|
197
|
-
* @example
|
|
198
|
-
*
|
|
199
|
-
* _.isArguments(function() { return arguments; }());
|
|
200
|
-
* // => true
|
|
184
|
+
* Creates an list cache object.
|
|
201
185
|
*
|
|
202
|
-
*
|
|
203
|
-
*
|
|
186
|
+
* @private
|
|
187
|
+
* @constructor
|
|
188
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
204
189
|
*/
|
|
205
|
-
function
|
|
206
|
-
|
|
190
|
+
function ListCache(entries) {
|
|
191
|
+
var index = -1, length = entries ? entries.length : 0;
|
|
192
|
+
this.clear();
|
|
193
|
+
while (++index < length) {
|
|
194
|
+
var entry = entries[index];
|
|
195
|
+
this.set(entry[0], entry[1]);
|
|
196
|
+
}
|
|
207
197
|
}
|
|
208
198
|
/**
|
|
209
|
-
*
|
|
210
|
-
*
|
|
211
|
-
* @static
|
|
212
|
-
* @memberOf _
|
|
213
|
-
* @since 0.1.0
|
|
214
|
-
* @category Lang
|
|
215
|
-
* @param {*} value The value to check.
|
|
216
|
-
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
217
|
-
* @example
|
|
218
|
-
*
|
|
219
|
-
* _.isArray([1, 2, 3]);
|
|
220
|
-
* // => true
|
|
221
|
-
*
|
|
222
|
-
* _.isArray(document.body.children);
|
|
223
|
-
* // => false
|
|
224
|
-
*
|
|
225
|
-
* _.isArray('abc');
|
|
226
|
-
* // => false
|
|
199
|
+
* Removes all key-value entries from the list cache.
|
|
227
200
|
*
|
|
228
|
-
*
|
|
229
|
-
*
|
|
201
|
+
* @private
|
|
202
|
+
* @name clear
|
|
203
|
+
* @memberOf ListCache
|
|
230
204
|
*/
|
|
231
|
-
|
|
205
|
+
function listCacheClear() {
|
|
206
|
+
this.__data__ = [];
|
|
207
|
+
}
|
|
232
208
|
/**
|
|
233
|
-
*
|
|
234
|
-
* not a function and has a `value.length` that's an integer greater than or
|
|
235
|
-
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
|
|
236
|
-
*
|
|
237
|
-
* @static
|
|
238
|
-
* @memberOf _
|
|
239
|
-
* @since 4.0.0
|
|
240
|
-
* @category Lang
|
|
241
|
-
* @param {*} value The value to check.
|
|
242
|
-
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
|
243
|
-
* @example
|
|
244
|
-
*
|
|
245
|
-
* _.isArrayLike([1, 2, 3]);
|
|
246
|
-
* // => true
|
|
247
|
-
*
|
|
248
|
-
* _.isArrayLike(document.body.children);
|
|
249
|
-
* // => true
|
|
250
|
-
*
|
|
251
|
-
* _.isArrayLike('abc');
|
|
252
|
-
* // => true
|
|
209
|
+
* Removes `key` and its value from the list cache.
|
|
253
210
|
*
|
|
254
|
-
*
|
|
255
|
-
*
|
|
211
|
+
* @private
|
|
212
|
+
* @name delete
|
|
213
|
+
* @memberOf ListCache
|
|
214
|
+
* @param {string} key The key of the value to remove.
|
|
215
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
256
216
|
*/
|
|
257
|
-
function
|
|
258
|
-
|
|
217
|
+
function listCacheDelete(key) {
|
|
218
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
219
|
+
if (index < 0) return false;
|
|
220
|
+
var lastIndex = data.length - 1;
|
|
221
|
+
if (index == lastIndex) data.pop();
|
|
222
|
+
else splice.call(data, index, 1);
|
|
223
|
+
return true;
|
|
259
224
|
}
|
|
260
225
|
/**
|
|
261
|
-
*
|
|
262
|
-
* is an object.
|
|
263
|
-
*
|
|
264
|
-
* @static
|
|
265
|
-
* @memberOf _
|
|
266
|
-
* @since 4.0.0
|
|
267
|
-
* @category Lang
|
|
268
|
-
* @param {*} value The value to check.
|
|
269
|
-
* @returns {boolean} Returns `true` if `value` is an array-like object,
|
|
270
|
-
* else `false`.
|
|
271
|
-
* @example
|
|
272
|
-
*
|
|
273
|
-
* _.isArrayLikeObject([1, 2, 3]);
|
|
274
|
-
* // => true
|
|
275
|
-
*
|
|
276
|
-
* _.isArrayLikeObject(document.body.children);
|
|
277
|
-
* // => true
|
|
278
|
-
*
|
|
279
|
-
* _.isArrayLikeObject('abc');
|
|
280
|
-
* // => false
|
|
226
|
+
* Gets the list cache value for `key`.
|
|
281
227
|
*
|
|
282
|
-
*
|
|
283
|
-
*
|
|
228
|
+
* @private
|
|
229
|
+
* @name get
|
|
230
|
+
* @memberOf ListCache
|
|
231
|
+
* @param {string} key The key of the value to get.
|
|
232
|
+
* @returns {*} Returns the entry value.
|
|
284
233
|
*/
|
|
285
|
-
function
|
|
286
|
-
|
|
234
|
+
function listCacheGet(key) {
|
|
235
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
236
|
+
return index < 0 ? void 0 : data[index][1];
|
|
287
237
|
}
|
|
288
238
|
/**
|
|
289
|
-
* Checks if
|
|
290
|
-
*
|
|
291
|
-
* @static
|
|
292
|
-
* @memberOf _
|
|
293
|
-
* @since 0.1.0
|
|
294
|
-
* @category Lang
|
|
295
|
-
* @param {*} value The value to check.
|
|
296
|
-
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
297
|
-
* @example
|
|
298
|
-
*
|
|
299
|
-
* _.isFunction(_);
|
|
300
|
-
* // => true
|
|
239
|
+
* Checks if a list cache value for `key` exists.
|
|
301
240
|
*
|
|
302
|
-
*
|
|
303
|
-
*
|
|
241
|
+
* @private
|
|
242
|
+
* @name has
|
|
243
|
+
* @memberOf ListCache
|
|
244
|
+
* @param {string} key The key of the entry to check.
|
|
245
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
304
246
|
*/
|
|
305
|
-
function
|
|
306
|
-
|
|
307
|
-
return tag == funcTag || tag == genTag;
|
|
247
|
+
function listCacheHas(key) {
|
|
248
|
+
return assocIndexOf(this.__data__, key) > -1;
|
|
308
249
|
}
|
|
309
250
|
/**
|
|
310
|
-
*
|
|
311
|
-
*
|
|
312
|
-
* **Note:** This method is loosely based on
|
|
313
|
-
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
|
314
|
-
*
|
|
315
|
-
* @static
|
|
316
|
-
* @memberOf _
|
|
317
|
-
* @since 4.0.0
|
|
318
|
-
* @category Lang
|
|
319
|
-
* @param {*} value The value to check.
|
|
320
|
-
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
|
321
|
-
* @example
|
|
322
|
-
*
|
|
323
|
-
* _.isLength(3);
|
|
324
|
-
* // => true
|
|
325
|
-
*
|
|
326
|
-
* _.isLength(Number.MIN_VALUE);
|
|
327
|
-
* // => false
|
|
328
|
-
*
|
|
329
|
-
* _.isLength(Infinity);
|
|
330
|
-
* // => false
|
|
251
|
+
* Sets the list cache `key` to `value`.
|
|
331
252
|
*
|
|
332
|
-
*
|
|
333
|
-
*
|
|
253
|
+
* @private
|
|
254
|
+
* @name set
|
|
255
|
+
* @memberOf ListCache
|
|
256
|
+
* @param {string} key The key of the value to set.
|
|
257
|
+
* @param {*} value The value to set.
|
|
258
|
+
* @returns {Object} Returns the list cache instance.
|
|
334
259
|
*/
|
|
335
|
-
function
|
|
336
|
-
|
|
260
|
+
function listCacheSet(key, value) {
|
|
261
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
262
|
+
if (index < 0) data.push([key, value]);
|
|
263
|
+
else data[index][1] = value;
|
|
264
|
+
return this;
|
|
337
265
|
}
|
|
266
|
+
ListCache.prototype.clear = listCacheClear;
|
|
267
|
+
ListCache.prototype["delete"] = listCacheDelete;
|
|
268
|
+
ListCache.prototype.get = listCacheGet;
|
|
269
|
+
ListCache.prototype.has = listCacheHas;
|
|
270
|
+
ListCache.prototype.set = listCacheSet;
|
|
338
271
|
/**
|
|
339
|
-
*
|
|
340
|
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
341
|
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
342
|
-
*
|
|
343
|
-
* @static
|
|
344
|
-
* @memberOf _
|
|
345
|
-
* @since 0.1.0
|
|
346
|
-
* @category Lang
|
|
347
|
-
* @param {*} value The value to check.
|
|
348
|
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
349
|
-
* @example
|
|
350
|
-
*
|
|
351
|
-
* _.isObject({});
|
|
352
|
-
* // => true
|
|
353
|
-
*
|
|
354
|
-
* _.isObject([1, 2, 3]);
|
|
355
|
-
* // => true
|
|
356
|
-
*
|
|
357
|
-
* _.isObject(_.noop);
|
|
358
|
-
* // => true
|
|
272
|
+
* Creates a map cache object to store key-value pairs.
|
|
359
273
|
*
|
|
360
|
-
*
|
|
361
|
-
*
|
|
274
|
+
* @private
|
|
275
|
+
* @constructor
|
|
276
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
362
277
|
*/
|
|
363
|
-
function
|
|
364
|
-
var
|
|
365
|
-
|
|
278
|
+
function MapCache(entries) {
|
|
279
|
+
var index = -1, length = entries ? entries.length : 0;
|
|
280
|
+
this.clear();
|
|
281
|
+
while (++index < length) {
|
|
282
|
+
var entry = entries[index];
|
|
283
|
+
this.set(entry[0], entry[1]);
|
|
284
|
+
}
|
|
366
285
|
}
|
|
367
286
|
/**
|
|
368
|
-
*
|
|
369
|
-
* and has a `typeof` result of "object".
|
|
370
|
-
*
|
|
371
|
-
* @static
|
|
372
|
-
* @memberOf _
|
|
373
|
-
* @since 4.0.0
|
|
374
|
-
* @category Lang
|
|
375
|
-
* @param {*} value The value to check.
|
|
376
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
377
|
-
* @example
|
|
378
|
-
*
|
|
379
|
-
* _.isObjectLike({});
|
|
380
|
-
* // => true
|
|
381
|
-
*
|
|
382
|
-
* _.isObjectLike([1, 2, 3]);
|
|
383
|
-
* // => true
|
|
384
|
-
*
|
|
385
|
-
* _.isObjectLike(_.noop);
|
|
386
|
-
* // => false
|
|
287
|
+
* Removes all key-value entries from the map.
|
|
387
288
|
*
|
|
388
|
-
*
|
|
389
|
-
*
|
|
289
|
+
* @private
|
|
290
|
+
* @name clear
|
|
291
|
+
* @memberOf MapCache
|
|
390
292
|
*/
|
|
391
|
-
function
|
|
392
|
-
|
|
293
|
+
function mapCacheClear() {
|
|
294
|
+
this.__data__ = {
|
|
295
|
+
"hash": new Hash(),
|
|
296
|
+
"map": new (Map$1 || ListCache)(),
|
|
297
|
+
"string": new Hash()
|
|
298
|
+
};
|
|
393
299
|
}
|
|
394
300
|
/**
|
|
395
|
-
*
|
|
396
|
-
*
|
|
397
|
-
* @static
|
|
398
|
-
* @memberOf _
|
|
399
|
-
* @since 4.0.0
|
|
400
|
-
* @category Lang
|
|
401
|
-
* @param {*} value The value to check.
|
|
402
|
-
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
403
|
-
* @example
|
|
404
|
-
*
|
|
405
|
-
* _.isSymbol(Symbol.iterator);
|
|
406
|
-
* // => true
|
|
301
|
+
* Removes `key` and its value from the map.
|
|
407
302
|
*
|
|
408
|
-
*
|
|
409
|
-
*
|
|
303
|
+
* @private
|
|
304
|
+
* @name delete
|
|
305
|
+
* @memberOf MapCache
|
|
306
|
+
* @param {string} key The key of the value to remove.
|
|
307
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
410
308
|
*/
|
|
411
|
-
function
|
|
412
|
-
return
|
|
309
|
+
function mapCacheDelete(key) {
|
|
310
|
+
return getMapData(this, key)["delete"](key);
|
|
413
311
|
}
|
|
414
|
-
module.exports = baseRest(function(object, props) {
|
|
415
|
-
return object == null ? {} : basePick(object, arrayMap(baseFlatten(props, 1), toKey));
|
|
416
|
-
});
|
|
417
|
-
}));
|
|
418
|
-
//#endregion
|
|
419
|
-
//#region ../../node_modules/.pnpm/lodash.set@4.3.2/node_modules/lodash.set/index.js
|
|
420
|
-
var require_lodash_set = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
421
312
|
/**
|
|
422
|
-
*
|
|
423
|
-
*
|
|
424
|
-
*
|
|
425
|
-
*
|
|
426
|
-
*
|
|
427
|
-
*
|
|
313
|
+
* Gets the map value for `key`.
|
|
314
|
+
*
|
|
315
|
+
* @private
|
|
316
|
+
* @name get
|
|
317
|
+
* @memberOf MapCache
|
|
318
|
+
* @param {string} key The key of the value to get.
|
|
319
|
+
* @returns {*} Returns the entry value.
|
|
428
320
|
*/
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
433
|
-
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
434
|
-
/** `Object#toString` result references. */
|
|
435
|
-
var funcTag = "[object Function]";
|
|
436
|
-
var genTag = "[object GeneratorFunction]";
|
|
437
|
-
var symbolTag = "[object Symbol]";
|
|
438
|
-
/** Used to match property names within property paths. */
|
|
439
|
-
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
|
|
440
|
-
var reIsPlainProp = /^\w*$/;
|
|
441
|
-
var reLeadingDot = /^\./;
|
|
442
|
-
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
321
|
+
function mapCacheGet(key) {
|
|
322
|
+
return getMapData(this, key).get(key);
|
|
323
|
+
}
|
|
443
324
|
/**
|
|
444
|
-
*
|
|
445
|
-
*
|
|
325
|
+
* Checks if a map value for `key` exists.
|
|
326
|
+
*
|
|
327
|
+
* @private
|
|
328
|
+
* @name has
|
|
329
|
+
* @memberOf MapCache
|
|
330
|
+
* @param {string} key The key of the entry to check.
|
|
331
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
446
332
|
*/
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
/** Used to detect host constructors (Safari). */
|
|
451
|
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
452
|
-
/** Used to detect unsigned integer values. */
|
|
453
|
-
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
454
|
-
/** Detect free variable `global` from Node.js. */
|
|
455
|
-
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
456
|
-
/** Detect free variable `self`. */
|
|
457
|
-
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
458
|
-
/** Used as a reference to the global object. */
|
|
459
|
-
var root = freeGlobal || freeSelf || Function("return this")();
|
|
333
|
+
function mapCacheHas(key) {
|
|
334
|
+
return getMapData(this, key).has(key);
|
|
335
|
+
}
|
|
460
336
|
/**
|
|
461
|
-
*
|
|
337
|
+
* Sets the map `key` to `value`.
|
|
462
338
|
*
|
|
463
339
|
* @private
|
|
464
|
-
* @
|
|
465
|
-
* @
|
|
466
|
-
* @
|
|
340
|
+
* @name set
|
|
341
|
+
* @memberOf MapCache
|
|
342
|
+
* @param {string} key The key of the value to set.
|
|
343
|
+
* @param {*} value The value to set.
|
|
344
|
+
* @returns {Object} Returns the map cache instance.
|
|
467
345
|
*/
|
|
468
|
-
function
|
|
469
|
-
|
|
346
|
+
function mapCacheSet(key, value) {
|
|
347
|
+
getMapData(this, key).set(key, value);
|
|
348
|
+
return this;
|
|
470
349
|
}
|
|
350
|
+
MapCache.prototype.clear = mapCacheClear;
|
|
351
|
+
MapCache.prototype["delete"] = mapCacheDelete;
|
|
352
|
+
MapCache.prototype.get = mapCacheGet;
|
|
353
|
+
MapCache.prototype.has = mapCacheHas;
|
|
354
|
+
MapCache.prototype.set = mapCacheSet;
|
|
471
355
|
/**
|
|
472
|
-
*
|
|
356
|
+
* Assigns `value` to `key` of `object` if the existing value is not equivalent
|
|
357
|
+
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
358
|
+
* for equality comparisons.
|
|
473
359
|
*
|
|
474
360
|
* @private
|
|
475
|
-
* @param {
|
|
476
|
-
* @
|
|
361
|
+
* @param {Object} object The object to modify.
|
|
362
|
+
* @param {string} key The key of the property to assign.
|
|
363
|
+
* @param {*} value The value to assign.
|
|
477
364
|
*/
|
|
478
|
-
function
|
|
479
|
-
var
|
|
480
|
-
if (value
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
365
|
+
function assignValue(object, key, value) {
|
|
366
|
+
var objValue = object[key];
|
|
367
|
+
if (!(hasOwnProperty$1.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) object[key] = value;
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
371
|
+
*
|
|
372
|
+
* @private
|
|
373
|
+
* @param {Array} array The array to inspect.
|
|
374
|
+
* @param {*} key The key to search for.
|
|
375
|
+
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
376
|
+
*/
|
|
377
|
+
function assocIndexOf(array, key) {
|
|
378
|
+
var length = array.length;
|
|
379
|
+
while (length--) if (eq(array[length][0], key)) return length;
|
|
380
|
+
return -1;
|
|
484
381
|
}
|
|
485
|
-
/** Used for built-in method references. */
|
|
486
|
-
var arrayProto = Array.prototype;
|
|
487
|
-
var funcProto = Function.prototype;
|
|
488
|
-
var objectProto = Object.prototype;
|
|
489
|
-
/** Used to detect overreaching core-js shims. */
|
|
490
|
-
var coreJsData = root["__core-js_shared__"];
|
|
491
|
-
/** Used to detect methods masquerading as native. */
|
|
492
|
-
var maskSrcKey = function() {
|
|
493
|
-
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
|
|
494
|
-
return uid ? "Symbol(src)_1." + uid : "";
|
|
495
|
-
}();
|
|
496
|
-
/** Used to resolve the decompiled source of functions. */
|
|
497
|
-
var funcToString = funcProto.toString;
|
|
498
|
-
/** Used to check objects for own properties. */
|
|
499
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
500
382
|
/**
|
|
501
|
-
*
|
|
502
|
-
*
|
|
503
|
-
*
|
|
383
|
+
* The base implementation of `_.isNative` without bad shim checks.
|
|
384
|
+
*
|
|
385
|
+
* @private
|
|
386
|
+
* @param {*} value The value to check.
|
|
387
|
+
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
388
|
+
* else `false`.
|
|
504
389
|
*/
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
var splice = arrayProto.splice;
|
|
511
|
-
var Map = getNative(root, "Map");
|
|
512
|
-
var nativeCreate = getNative(Object, "create");
|
|
513
|
-
/** Used to convert symbols to primitives and strings. */
|
|
514
|
-
var symbolProto = Symbol ? Symbol.prototype : void 0;
|
|
515
|
-
var symbolToString = symbolProto ? symbolProto.toString : void 0;
|
|
390
|
+
function baseIsNative(value) {
|
|
391
|
+
if (!isObject$1(value) || isMasked(value)) return false;
|
|
392
|
+
var pattern = isFunction$1(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
|
|
393
|
+
return pattern.test(toSource(value));
|
|
394
|
+
}
|
|
516
395
|
/**
|
|
517
|
-
*
|
|
396
|
+
* The base implementation of `_.set`.
|
|
518
397
|
*
|
|
519
398
|
* @private
|
|
520
|
-
* @
|
|
521
|
-
* @param {Array}
|
|
399
|
+
* @param {Object} object The object to modify.
|
|
400
|
+
* @param {Array|string} path The path of the property to set.
|
|
401
|
+
* @param {*} value The value to set.
|
|
402
|
+
* @param {Function} [customizer] The function to customize path creation.
|
|
403
|
+
* @returns {Object} Returns `object`.
|
|
522
404
|
*/
|
|
523
|
-
function
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
405
|
+
function baseSet(object, path, value, customizer) {
|
|
406
|
+
if (!isObject$1(object)) return object;
|
|
407
|
+
path = isKey(path, object) ? [path] : castPath(path);
|
|
408
|
+
var index = -1, length = path.length, lastIndex = length - 1, nested = object;
|
|
409
|
+
while (nested != null && ++index < length) {
|
|
410
|
+
var key = toKey$1(path[index]), newValue = value;
|
|
411
|
+
if (index != lastIndex) {
|
|
412
|
+
var objValue = nested[key];
|
|
413
|
+
newValue = customizer ? customizer(objValue, key, nested) : void 0;
|
|
414
|
+
if (newValue === void 0) newValue = isObject$1(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
|
|
415
|
+
}
|
|
416
|
+
assignValue(nested, key, newValue);
|
|
417
|
+
nested = nested[key];
|
|
529
418
|
}
|
|
419
|
+
return object;
|
|
530
420
|
}
|
|
531
421
|
/**
|
|
532
|
-
*
|
|
422
|
+
* The base implementation of `_.toString` which doesn't convert nullish
|
|
423
|
+
* values to empty strings.
|
|
533
424
|
*
|
|
534
425
|
* @private
|
|
535
|
-
* @
|
|
536
|
-
* @
|
|
426
|
+
* @param {*} value The value to process.
|
|
427
|
+
* @returns {string} Returns the string.
|
|
537
428
|
*/
|
|
538
|
-
function
|
|
539
|
-
|
|
429
|
+
function baseToString(value) {
|
|
430
|
+
if (typeof value == "string") return value;
|
|
431
|
+
if (isSymbol$1(value)) return symbolToString ? symbolToString.call(value) : "";
|
|
432
|
+
var result = value + "";
|
|
433
|
+
return result == "0" && 1 / value == -INFINITY$1 ? "-0" : result;
|
|
540
434
|
}
|
|
541
435
|
/**
|
|
542
|
-
*
|
|
436
|
+
* Casts `value` to a path array if it's not one.
|
|
543
437
|
*
|
|
544
438
|
* @private
|
|
545
|
-
* @
|
|
546
|
-
* @
|
|
547
|
-
* @param {Object} hash The hash to modify.
|
|
548
|
-
* @param {string} key The key of the value to remove.
|
|
549
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
439
|
+
* @param {*} value The value to inspect.
|
|
440
|
+
* @returns {Array} Returns the cast property path array.
|
|
550
441
|
*/
|
|
551
|
-
function
|
|
552
|
-
return
|
|
442
|
+
function castPath(value) {
|
|
443
|
+
return isArray$1(value) ? value : stringToPath(value);
|
|
553
444
|
}
|
|
554
445
|
/**
|
|
555
|
-
* Gets the
|
|
446
|
+
* Gets the data for `map`.
|
|
556
447
|
*
|
|
557
448
|
* @private
|
|
558
|
-
* @
|
|
559
|
-
* @
|
|
560
|
-
* @
|
|
561
|
-
* @returns {*} Returns the entry value.
|
|
449
|
+
* @param {Object} map The map to query.
|
|
450
|
+
* @param {string} key The reference key.
|
|
451
|
+
* @returns {*} Returns the map data.
|
|
562
452
|
*/
|
|
563
|
-
function
|
|
564
|
-
var data =
|
|
565
|
-
|
|
566
|
-
var result = data[key];
|
|
567
|
-
return result === HASH_UNDEFINED ? void 0 : result;
|
|
568
|
-
}
|
|
569
|
-
return hasOwnProperty.call(data, key) ? data[key] : void 0;
|
|
453
|
+
function getMapData(map, key) {
|
|
454
|
+
var data = map.__data__;
|
|
455
|
+
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
570
456
|
}
|
|
571
457
|
/**
|
|
572
|
-
*
|
|
458
|
+
* Gets the native function at `key` of `object`.
|
|
573
459
|
*
|
|
574
460
|
* @private
|
|
575
|
-
* @
|
|
576
|
-
* @
|
|
577
|
-
* @
|
|
578
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
461
|
+
* @param {Object} object The object to query.
|
|
462
|
+
* @param {string} key The key of the method to get.
|
|
463
|
+
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
579
464
|
*/
|
|
580
|
-
function
|
|
581
|
-
var
|
|
582
|
-
return
|
|
465
|
+
function getNative(object, key) {
|
|
466
|
+
var value = getValue(object, key);
|
|
467
|
+
return baseIsNative(value) ? value : void 0;
|
|
583
468
|
}
|
|
584
469
|
/**
|
|
585
|
-
*
|
|
470
|
+
* Checks if `value` is a valid array-like index.
|
|
586
471
|
*
|
|
587
472
|
* @private
|
|
588
|
-
* @
|
|
589
|
-
* @
|
|
590
|
-
* @
|
|
591
|
-
* @param {*} value The value to set.
|
|
592
|
-
* @returns {Object} Returns the hash instance.
|
|
473
|
+
* @param {*} value The value to check.
|
|
474
|
+
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
475
|
+
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
593
476
|
*/
|
|
594
|
-
function
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
return this;
|
|
477
|
+
function isIndex(value, length) {
|
|
478
|
+
length = length == null ? MAX_SAFE_INTEGER$1 : length;
|
|
479
|
+
return !!length && (typeof value == "number" || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
|
|
598
480
|
}
|
|
599
|
-
Hash.prototype.clear = hashClear;
|
|
600
|
-
Hash.prototype["delete"] = hashDelete;
|
|
601
|
-
Hash.prototype.get = hashGet;
|
|
602
|
-
Hash.prototype.has = hashHas;
|
|
603
|
-
Hash.prototype.set = hashSet;
|
|
604
481
|
/**
|
|
605
|
-
*
|
|
482
|
+
* Checks if `value` is a property name and not a property path.
|
|
606
483
|
*
|
|
607
484
|
* @private
|
|
608
|
-
* @
|
|
609
|
-
* @param {
|
|
485
|
+
* @param {*} value The value to check.
|
|
486
|
+
* @param {Object} [object] The object to query keys on.
|
|
487
|
+
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
610
488
|
*/
|
|
611
|
-
function
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
this.set(entry[0], entry[1]);
|
|
617
|
-
}
|
|
489
|
+
function isKey(value, object) {
|
|
490
|
+
if (isArray$1(value)) return false;
|
|
491
|
+
var type = typeof value;
|
|
492
|
+
if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol$1(value)) return true;
|
|
493
|
+
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
|
|
618
494
|
}
|
|
619
495
|
/**
|
|
620
|
-
*
|
|
496
|
+
* Checks if `value` is suitable for use as unique object key.
|
|
621
497
|
*
|
|
622
498
|
* @private
|
|
623
|
-
* @
|
|
624
|
-
* @
|
|
499
|
+
* @param {*} value The value to check.
|
|
500
|
+
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|
625
501
|
*/
|
|
626
|
-
function
|
|
627
|
-
|
|
502
|
+
function isKeyable(value) {
|
|
503
|
+
var type = typeof value;
|
|
504
|
+
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
|
|
628
505
|
}
|
|
629
506
|
/**
|
|
630
|
-
*
|
|
507
|
+
* Checks if `func` has its source masked.
|
|
631
508
|
*
|
|
632
509
|
* @private
|
|
633
|
-
* @
|
|
634
|
-
* @
|
|
635
|
-
* @param {string} key The key of the value to remove.
|
|
636
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
510
|
+
* @param {Function} func The function to check.
|
|
511
|
+
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
637
512
|
*/
|
|
638
|
-
function
|
|
639
|
-
|
|
640
|
-
if (index < 0) return false;
|
|
641
|
-
if (index == data.length - 1) data.pop();
|
|
642
|
-
else splice.call(data, index, 1);
|
|
643
|
-
return true;
|
|
513
|
+
function isMasked(func) {
|
|
514
|
+
return !!maskSrcKey && maskSrcKey in func;
|
|
644
515
|
}
|
|
645
516
|
/**
|
|
646
|
-
*
|
|
517
|
+
* Converts `string` to a property path array.
|
|
647
518
|
*
|
|
648
519
|
* @private
|
|
649
|
-
* @
|
|
650
|
-
* @
|
|
651
|
-
* @param {string} key The key of the value to get.
|
|
652
|
-
* @returns {*} Returns the entry value.
|
|
520
|
+
* @param {string} string The string to convert.
|
|
521
|
+
* @returns {Array} Returns the property path array.
|
|
653
522
|
*/
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
523
|
+
var stringToPath = memoize(function(string) {
|
|
524
|
+
string = toString(string);
|
|
525
|
+
var result = [];
|
|
526
|
+
if (reLeadingDot.test(string)) result.push("");
|
|
527
|
+
string.replace(rePropName, function(match, number, quote, string$1) {
|
|
528
|
+
result.push(quote ? string$1.replace(reEscapeChar, "$1") : number || match);
|
|
529
|
+
});
|
|
530
|
+
return result;
|
|
531
|
+
});
|
|
658
532
|
/**
|
|
659
|
-
*
|
|
533
|
+
* Converts `value` to a string key if it's not a string or symbol.
|
|
660
534
|
*
|
|
661
535
|
* @private
|
|
662
|
-
* @
|
|
663
|
-
* @
|
|
664
|
-
* @param {string} key The key of the entry to check.
|
|
665
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
536
|
+
* @param {*} value The value to inspect.
|
|
537
|
+
* @returns {string|symbol} Returns the key.
|
|
666
538
|
*/
|
|
667
|
-
function
|
|
668
|
-
|
|
539
|
+
function toKey$1(value) {
|
|
540
|
+
if (typeof value == "string" || isSymbol$1(value)) return value;
|
|
541
|
+
var result = value + "";
|
|
542
|
+
return result == "0" && 1 / value == -INFINITY$1 ? "-0" : result;
|
|
669
543
|
}
|
|
670
544
|
/**
|
|
671
|
-
*
|
|
545
|
+
* Converts `func` to its source code.
|
|
672
546
|
*
|
|
673
547
|
* @private
|
|
674
|
-
* @
|
|
675
|
-
* @
|
|
676
|
-
* @param {string} key The key of the value to set.
|
|
677
|
-
* @param {*} value The value to set.
|
|
678
|
-
* @returns {Object} Returns the list cache instance.
|
|
548
|
+
* @param {Function} func The function to process.
|
|
549
|
+
* @returns {string} Returns the source code.
|
|
679
550
|
*/
|
|
680
|
-
function
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
551
|
+
function toSource(func) {
|
|
552
|
+
if (func != null) {
|
|
553
|
+
try {
|
|
554
|
+
return funcToString.call(func);
|
|
555
|
+
} catch (e) {}
|
|
556
|
+
try {
|
|
557
|
+
return func + "";
|
|
558
|
+
} catch (e) {}
|
|
559
|
+
}
|
|
560
|
+
return "";
|
|
685
561
|
}
|
|
686
|
-
ListCache.prototype.clear = listCacheClear;
|
|
687
|
-
ListCache.prototype["delete"] = listCacheDelete;
|
|
688
|
-
ListCache.prototype.get = listCacheGet;
|
|
689
|
-
ListCache.prototype.has = listCacheHas;
|
|
690
|
-
ListCache.prototype.set = listCacheSet;
|
|
691
562
|
/**
|
|
692
|
-
* Creates a
|
|
563
|
+
* Creates a function that memoizes the result of `func`. If `resolver` is
|
|
564
|
+
* provided, it determines the cache key for storing the result based on the
|
|
565
|
+
* arguments provided to the memoized function. By default, the first argument
|
|
566
|
+
* provided to the memoized function is used as the map cache key. The `func`
|
|
567
|
+
* is invoked with the `this` binding of the memoized function.
|
|
568
|
+
*
|
|
569
|
+
* **Note:** The cache is exposed as the `cache` property on the memoized
|
|
570
|
+
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
|
571
|
+
* constructor with one whose instances implement the
|
|
572
|
+
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
|
573
|
+
* method interface of `delete`, `get`, `has`, and `set`.
|
|
574
|
+
*
|
|
575
|
+
* @static
|
|
576
|
+
* @memberOf _
|
|
577
|
+
* @since 0.1.0
|
|
578
|
+
* @category Function
|
|
579
|
+
* @param {Function} func The function to have its output memoized.
|
|
580
|
+
* @param {Function} [resolver] The function to resolve the cache key.
|
|
581
|
+
* @returns {Function} Returns the new memoized function.
|
|
582
|
+
* @example
|
|
583
|
+
*
|
|
584
|
+
* var object = { 'a': 1, 'b': 2 };
|
|
585
|
+
* var other = { 'c': 3, 'd': 4 };
|
|
586
|
+
*
|
|
587
|
+
* var values = _.memoize(_.values);
|
|
588
|
+
* values(object);
|
|
589
|
+
* // => [1, 2]
|
|
590
|
+
*
|
|
591
|
+
* values(other);
|
|
592
|
+
* // => [3, 4]
|
|
693
593
|
*
|
|
694
|
-
*
|
|
695
|
-
*
|
|
696
|
-
*
|
|
697
|
-
*/
|
|
698
|
-
function MapCache(entries) {
|
|
699
|
-
var index = -1, length = entries ? entries.length : 0;
|
|
700
|
-
this.clear();
|
|
701
|
-
while (++index < length) {
|
|
702
|
-
var entry = entries[index];
|
|
703
|
-
this.set(entry[0], entry[1]);
|
|
704
|
-
}
|
|
705
|
-
}
|
|
706
|
-
/**
|
|
707
|
-
* Removes all key-value entries from the map.
|
|
594
|
+
* object.a = 2;
|
|
595
|
+
* values(object);
|
|
596
|
+
* // => [1, 2]
|
|
708
597
|
*
|
|
709
|
-
*
|
|
710
|
-
*
|
|
711
|
-
*
|
|
598
|
+
* // Modify the result cache.
|
|
599
|
+
* values.cache.set(object, ['a', 'b']);
|
|
600
|
+
* values(object);
|
|
601
|
+
* // => ['a', 'b']
|
|
602
|
+
*
|
|
603
|
+
* // Replace `_.memoize.Cache`.
|
|
604
|
+
* _.memoize.Cache = WeakMap;
|
|
712
605
|
*/
|
|
713
|
-
function
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
606
|
+
function memoize(func, resolver) {
|
|
607
|
+
if (typeof func != "function" || resolver && typeof resolver != "function") throw new TypeError(FUNC_ERROR_TEXT);
|
|
608
|
+
var memoized = function() {
|
|
609
|
+
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
|
|
610
|
+
if (cache.has(key)) return cache.get(key);
|
|
611
|
+
var result = func.apply(this, args);
|
|
612
|
+
memoized.cache = cache.set(key, result);
|
|
613
|
+
return result;
|
|
718
614
|
};
|
|
615
|
+
memoized.cache = new (memoize.Cache || MapCache)();
|
|
616
|
+
return memoized;
|
|
719
617
|
}
|
|
618
|
+
memoize.Cache = MapCache;
|
|
720
619
|
/**
|
|
721
|
-
*
|
|
620
|
+
* Performs a
|
|
621
|
+
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
622
|
+
* comparison between two values to determine if they are equivalent.
|
|
722
623
|
*
|
|
723
|
-
* @
|
|
724
|
-
* @
|
|
725
|
-
* @
|
|
726
|
-
* @
|
|
727
|
-
* @
|
|
624
|
+
* @static
|
|
625
|
+
* @memberOf _
|
|
626
|
+
* @since 4.0.0
|
|
627
|
+
* @category Lang
|
|
628
|
+
* @param {*} value The value to compare.
|
|
629
|
+
* @param {*} other The other value to compare.
|
|
630
|
+
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
631
|
+
* @example
|
|
632
|
+
*
|
|
633
|
+
* var object = { 'a': 1 };
|
|
634
|
+
* var other = { 'a': 1 };
|
|
635
|
+
*
|
|
636
|
+
* _.eq(object, object);
|
|
637
|
+
* // => true
|
|
638
|
+
*
|
|
639
|
+
* _.eq(object, other);
|
|
640
|
+
* // => false
|
|
641
|
+
*
|
|
642
|
+
* _.eq('a', 'a');
|
|
643
|
+
* // => true
|
|
644
|
+
*
|
|
645
|
+
* _.eq('a', Object('a'));
|
|
646
|
+
* // => false
|
|
647
|
+
*
|
|
648
|
+
* _.eq(NaN, NaN);
|
|
649
|
+
* // => true
|
|
728
650
|
*/
|
|
729
|
-
function
|
|
730
|
-
return
|
|
651
|
+
function eq(value, other) {
|
|
652
|
+
return value === other || value !== value && other !== other;
|
|
731
653
|
}
|
|
732
654
|
/**
|
|
733
|
-
*
|
|
655
|
+
* Checks if `value` is classified as an `Array` object.
|
|
734
656
|
*
|
|
735
|
-
* @
|
|
736
|
-
* @
|
|
737
|
-
* @
|
|
738
|
-
* @
|
|
739
|
-
* @
|
|
657
|
+
* @static
|
|
658
|
+
* @memberOf _
|
|
659
|
+
* @since 0.1.0
|
|
660
|
+
* @category Lang
|
|
661
|
+
* @param {*} value The value to check.
|
|
662
|
+
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
663
|
+
* @example
|
|
664
|
+
*
|
|
665
|
+
* _.isArray([1, 2, 3]);
|
|
666
|
+
* // => true
|
|
667
|
+
*
|
|
668
|
+
* _.isArray(document.body.children);
|
|
669
|
+
* // => false
|
|
670
|
+
*
|
|
671
|
+
* _.isArray('abc');
|
|
672
|
+
* // => false
|
|
673
|
+
*
|
|
674
|
+
* _.isArray(_.noop);
|
|
675
|
+
* // => false
|
|
740
676
|
*/
|
|
741
|
-
|
|
742
|
-
return getMapData(this, key).get(key);
|
|
743
|
-
}
|
|
677
|
+
var isArray$1 = Array.isArray;
|
|
744
678
|
/**
|
|
745
|
-
* Checks if
|
|
679
|
+
* Checks if `value` is classified as a `Function` object.
|
|
746
680
|
*
|
|
747
|
-
* @
|
|
748
|
-
* @
|
|
749
|
-
* @
|
|
750
|
-
* @
|
|
751
|
-
* @
|
|
681
|
+
* @static
|
|
682
|
+
* @memberOf _
|
|
683
|
+
* @since 0.1.0
|
|
684
|
+
* @category Lang
|
|
685
|
+
* @param {*} value The value to check.
|
|
686
|
+
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
687
|
+
* @example
|
|
688
|
+
*
|
|
689
|
+
* _.isFunction(_);
|
|
690
|
+
* // => true
|
|
691
|
+
*
|
|
692
|
+
* _.isFunction(/abc/);
|
|
693
|
+
* // => false
|
|
752
694
|
*/
|
|
753
|
-
function
|
|
754
|
-
|
|
695
|
+
function isFunction$1(value) {
|
|
696
|
+
var tag = isObject$1(value) ? objectToString$1.call(value) : "";
|
|
697
|
+
return tag == funcTag$1 || tag == genTag$1;
|
|
755
698
|
}
|
|
756
699
|
/**
|
|
757
|
-
*
|
|
700
|
+
* Checks if `value` is the
|
|
701
|
+
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
702
|
+
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
758
703
|
*
|
|
759
|
-
* @
|
|
760
|
-
* @
|
|
761
|
-
* @
|
|
762
|
-
* @
|
|
763
|
-
* @param {*} value The value to
|
|
764
|
-
* @returns {
|
|
704
|
+
* @static
|
|
705
|
+
* @memberOf _
|
|
706
|
+
* @since 0.1.0
|
|
707
|
+
* @category Lang
|
|
708
|
+
* @param {*} value The value to check.
|
|
709
|
+
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
710
|
+
* @example
|
|
711
|
+
*
|
|
712
|
+
* _.isObject({});
|
|
713
|
+
* // => true
|
|
714
|
+
*
|
|
715
|
+
* _.isObject([1, 2, 3]);
|
|
716
|
+
* // => true
|
|
717
|
+
*
|
|
718
|
+
* _.isObject(_.noop);
|
|
719
|
+
* // => true
|
|
720
|
+
*
|
|
721
|
+
* _.isObject(null);
|
|
722
|
+
* // => false
|
|
765
723
|
*/
|
|
766
|
-
function
|
|
767
|
-
|
|
768
|
-
return
|
|
724
|
+
function isObject$1(value) {
|
|
725
|
+
var type = typeof value;
|
|
726
|
+
return !!value && (type == "object" || type == "function");
|
|
769
727
|
}
|
|
770
|
-
MapCache.prototype.clear = mapCacheClear;
|
|
771
|
-
MapCache.prototype["delete"] = mapCacheDelete;
|
|
772
|
-
MapCache.prototype.get = mapCacheGet;
|
|
773
|
-
MapCache.prototype.has = mapCacheHas;
|
|
774
|
-
MapCache.prototype.set = mapCacheSet;
|
|
775
728
|
/**
|
|
776
|
-
*
|
|
777
|
-
*
|
|
778
|
-
* for equality comparisons.
|
|
729
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
730
|
+
* and has a `typeof` result of "object".
|
|
779
731
|
*
|
|
780
|
-
* @
|
|
781
|
-
* @
|
|
782
|
-
* @
|
|
783
|
-
* @
|
|
732
|
+
* @static
|
|
733
|
+
* @memberOf _
|
|
734
|
+
* @since 4.0.0
|
|
735
|
+
* @category Lang
|
|
736
|
+
* @param {*} value The value to check.
|
|
737
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
738
|
+
* @example
|
|
739
|
+
*
|
|
740
|
+
* _.isObjectLike({});
|
|
741
|
+
* // => true
|
|
742
|
+
*
|
|
743
|
+
* _.isObjectLike([1, 2, 3]);
|
|
744
|
+
* // => true
|
|
745
|
+
*
|
|
746
|
+
* _.isObjectLike(_.noop);
|
|
747
|
+
* // => false
|
|
748
|
+
*
|
|
749
|
+
* _.isObjectLike(null);
|
|
750
|
+
* // => false
|
|
784
751
|
*/
|
|
785
|
-
function
|
|
786
|
-
|
|
787
|
-
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) object[key] = value;
|
|
752
|
+
function isObjectLike$1(value) {
|
|
753
|
+
return !!value && typeof value == "object";
|
|
788
754
|
}
|
|
789
755
|
/**
|
|
790
|
-
*
|
|
756
|
+
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
791
757
|
*
|
|
792
|
-
* @
|
|
793
|
-
* @
|
|
794
|
-
* @
|
|
795
|
-
* @
|
|
758
|
+
* @static
|
|
759
|
+
* @memberOf _
|
|
760
|
+
* @since 4.0.0
|
|
761
|
+
* @category Lang
|
|
762
|
+
* @param {*} value The value to check.
|
|
763
|
+
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
764
|
+
* @example
|
|
765
|
+
*
|
|
766
|
+
* _.isSymbol(Symbol.iterator);
|
|
767
|
+
* // => true
|
|
768
|
+
*
|
|
769
|
+
* _.isSymbol('abc');
|
|
770
|
+
* // => false
|
|
796
771
|
*/
|
|
797
|
-
function
|
|
798
|
-
|
|
799
|
-
while (length--) if (eq(array[length][0], key)) return length;
|
|
800
|
-
return -1;
|
|
772
|
+
function isSymbol$1(value) {
|
|
773
|
+
return typeof value == "symbol" || isObjectLike$1(value) && objectToString$1.call(value) == symbolTag$1;
|
|
801
774
|
}
|
|
802
775
|
/**
|
|
803
|
-
*
|
|
776
|
+
* Converts `value` to a string. An empty string is returned for `null`
|
|
777
|
+
* and `undefined` values. The sign of `-0` is preserved.
|
|
804
778
|
*
|
|
805
|
-
* @
|
|
806
|
-
* @
|
|
807
|
-
* @
|
|
808
|
-
*
|
|
779
|
+
* @static
|
|
780
|
+
* @memberOf _
|
|
781
|
+
* @since 4.0.0
|
|
782
|
+
* @category Lang
|
|
783
|
+
* @param {*} value The value to process.
|
|
784
|
+
* @returns {string} Returns the string.
|
|
785
|
+
* @example
|
|
786
|
+
*
|
|
787
|
+
* _.toString(null);
|
|
788
|
+
* // => ''
|
|
789
|
+
*
|
|
790
|
+
* _.toString(-0);
|
|
791
|
+
* // => '-0'
|
|
792
|
+
*
|
|
793
|
+
* _.toString([1, 2, 3]);
|
|
794
|
+
* // => '1,2,3'
|
|
809
795
|
*/
|
|
810
|
-
function
|
|
811
|
-
|
|
812
|
-
return (isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor).test(toSource(value));
|
|
796
|
+
function toString(value) {
|
|
797
|
+
return value == null ? "" : baseToString(value);
|
|
813
798
|
}
|
|
814
799
|
/**
|
|
815
|
-
*
|
|
800
|
+
* Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
|
|
801
|
+
* it's created. Arrays are created for missing index properties while objects
|
|
802
|
+
* are created for all other missing properties. Use `_.setWith` to customize
|
|
803
|
+
* `path` creation.
|
|
816
804
|
*
|
|
817
|
-
*
|
|
805
|
+
* **Note:** This method mutates `object`.
|
|
806
|
+
*
|
|
807
|
+
* @static
|
|
808
|
+
* @memberOf _
|
|
809
|
+
* @since 3.7.0
|
|
810
|
+
* @category Object
|
|
818
811
|
* @param {Object} object The object to modify.
|
|
819
812
|
* @param {Array|string} path The path of the property to set.
|
|
820
813
|
* @param {*} value The value to set.
|
|
821
|
-
* @param {Function} [customizer] The function to customize path creation.
|
|
822
814
|
* @returns {Object} Returns `object`.
|
|
815
|
+
* @example
|
|
816
|
+
*
|
|
817
|
+
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
|
|
818
|
+
*
|
|
819
|
+
* _.set(object, 'a[0].b.c', 4);
|
|
820
|
+
* console.log(object.a[0].b.c);
|
|
821
|
+
* // => 4
|
|
822
|
+
*
|
|
823
|
+
* _.set(object, ['x', '0', 'y', 'z'], 5);
|
|
824
|
+
* console.log(object.x[0].y.z);
|
|
825
|
+
* // => 5
|
|
823
826
|
*/
|
|
824
|
-
function
|
|
825
|
-
|
|
826
|
-
path = isKey(path, object) ? [path] : castPath(path);
|
|
827
|
-
var index = -1, length = path.length, lastIndex = length - 1, nested = object;
|
|
828
|
-
while (nested != null && ++index < length) {
|
|
829
|
-
var key = toKey(path[index]), newValue = value;
|
|
830
|
-
if (index != lastIndex) {
|
|
831
|
-
var objValue = nested[key];
|
|
832
|
-
newValue = customizer ? customizer(objValue, key, nested) : void 0;
|
|
833
|
-
if (newValue === void 0) newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
|
|
834
|
-
}
|
|
835
|
-
assignValue(nested, key, newValue);
|
|
836
|
-
nested = nested[key];
|
|
837
|
-
}
|
|
838
|
-
return object;
|
|
827
|
+
function set$1(object, path, value) {
|
|
828
|
+
return object == null ? object : baseSet(object, path, value);
|
|
839
829
|
}
|
|
830
|
+
module.exports = set$1;
|
|
831
|
+
} });
|
|
832
|
+
|
|
833
|
+
//#endregion
|
|
834
|
+
//#region ../../node_modules/.pnpm/lodash.pick@4.4.0/node_modules/lodash.pick/index.js
|
|
835
|
+
var require_lodash = __commonJS({ "../../node_modules/.pnpm/lodash.pick@4.4.0/node_modules/lodash.pick/index.js"(exports, module) {
|
|
840
836
|
/**
|
|
841
|
-
*
|
|
842
|
-
*
|
|
843
|
-
*
|
|
844
|
-
*
|
|
845
|
-
*
|
|
846
|
-
*
|
|
837
|
+
* lodash (Custom Build) <https://lodash.com/>
|
|
838
|
+
* Build: `lodash modularize exports="npm" -o ./`
|
|
839
|
+
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
|
840
|
+
* Released under MIT license <https://lodash.com/license>
|
|
841
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
842
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
847
843
|
*/
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
844
|
+
/** Used as references for various `Number` constants. */
|
|
845
|
+
var INFINITY = Infinity, MAX_SAFE_INTEGER = 9007199254740991;
|
|
846
|
+
/** `Object#toString` result references. */
|
|
847
|
+
var argsTag = "[object Arguments]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", symbolTag = "[object Symbol]";
|
|
848
|
+
/** Detect free variable `global` from Node.js. */
|
|
849
|
+
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
850
|
+
/** Detect free variable `self`. */
|
|
851
|
+
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
852
|
+
/** Used as a reference to the global object. */
|
|
853
|
+
var root = freeGlobal || freeSelf || Function("return this")();
|
|
854
854
|
/**
|
|
855
|
-
*
|
|
855
|
+
* A faster alternative to `Function#apply`, this function invokes `func`
|
|
856
|
+
* with the `this` binding of `thisArg` and the arguments of `args`.
|
|
856
857
|
*
|
|
857
858
|
* @private
|
|
858
|
-
* @param {
|
|
859
|
-
* @
|
|
859
|
+
* @param {Function} func The function to invoke.
|
|
860
|
+
* @param {*} thisArg The `this` binding of `func`.
|
|
861
|
+
* @param {Array} args The arguments to invoke `func` with.
|
|
862
|
+
* @returns {*} Returns the result of `func`.
|
|
860
863
|
*/
|
|
861
|
-
function
|
|
862
|
-
|
|
864
|
+
function apply(func, thisArg, args) {
|
|
865
|
+
switch (args.length) {
|
|
866
|
+
case 0: return func.call(thisArg);
|
|
867
|
+
case 1: return func.call(thisArg, args[0]);
|
|
868
|
+
case 2: return func.call(thisArg, args[0], args[1]);
|
|
869
|
+
case 3: return func.call(thisArg, args[0], args[1], args[2]);
|
|
870
|
+
}
|
|
871
|
+
return func.apply(thisArg, args);
|
|
863
872
|
}
|
|
864
873
|
/**
|
|
865
|
-
*
|
|
874
|
+
* A specialized version of `_.map` for arrays without support for iteratee
|
|
875
|
+
* shorthands.
|
|
866
876
|
*
|
|
867
877
|
* @private
|
|
868
|
-
* @param {
|
|
869
|
-
* @param {
|
|
870
|
-
* @returns {
|
|
878
|
+
* @param {Array} [array] The array to iterate over.
|
|
879
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
880
|
+
* @returns {Array} Returns the new mapped array.
|
|
871
881
|
*/
|
|
872
|
-
function
|
|
873
|
-
var
|
|
874
|
-
|
|
882
|
+
function arrayMap(array, iteratee) {
|
|
883
|
+
var index = -1, length = array ? array.length : 0, result = Array(length);
|
|
884
|
+
while (++index < length) result[index] = iteratee(array[index], index, array);
|
|
885
|
+
return result;
|
|
875
886
|
}
|
|
876
887
|
/**
|
|
877
|
-
*
|
|
888
|
+
* Appends the elements of `values` to `array`.
|
|
878
889
|
*
|
|
879
890
|
* @private
|
|
880
|
-
* @param {
|
|
881
|
-
* @param {
|
|
882
|
-
* @returns {
|
|
891
|
+
* @param {Array} array The array to modify.
|
|
892
|
+
* @param {Array} values The values to append.
|
|
893
|
+
* @returns {Array} Returns `array`.
|
|
883
894
|
*/
|
|
884
|
-
function
|
|
885
|
-
var
|
|
886
|
-
|
|
895
|
+
function arrayPush(array, values) {
|
|
896
|
+
var index = -1, length = values.length, offset = array.length;
|
|
897
|
+
while (++index < length) array[offset + index] = values[index];
|
|
898
|
+
return array;
|
|
887
899
|
}
|
|
900
|
+
/** Used for built-in method references. */
|
|
901
|
+
var objectProto = Object.prototype;
|
|
902
|
+
/** Used to check objects for own properties. */
|
|
903
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
888
904
|
/**
|
|
889
|
-
*
|
|
905
|
+
* Used to resolve the
|
|
906
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
907
|
+
* of values.
|
|
908
|
+
*/
|
|
909
|
+
var objectToString = objectProto.toString;
|
|
910
|
+
/** Built-in value references. */
|
|
911
|
+
var Symbol = root.Symbol, propertyIsEnumerable = objectProto.propertyIsEnumerable, spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : void 0;
|
|
912
|
+
var nativeMax = Math.max;
|
|
913
|
+
/**
|
|
914
|
+
* The base implementation of `_.flatten` with support for restricting flattening.
|
|
890
915
|
*
|
|
891
916
|
* @private
|
|
892
|
-
* @param {
|
|
893
|
-
* @param {number}
|
|
894
|
-
* @
|
|
917
|
+
* @param {Array} array The array to flatten.
|
|
918
|
+
* @param {number} depth The maximum recursion depth.
|
|
919
|
+
* @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
|
|
920
|
+
* @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
|
|
921
|
+
* @param {Array} [result=[]] The initial result value.
|
|
922
|
+
* @returns {Array} Returns the new flattened array.
|
|
895
923
|
*/
|
|
896
|
-
function
|
|
897
|
-
|
|
898
|
-
|
|
924
|
+
function baseFlatten(array, depth, predicate, isStrict, result) {
|
|
925
|
+
var index = -1, length = array.length;
|
|
926
|
+
predicate || (predicate = isFlattenable);
|
|
927
|
+
result || (result = []);
|
|
928
|
+
while (++index < length) {
|
|
929
|
+
var value = array[index];
|
|
930
|
+
if (depth > 0 && predicate(value)) if (depth > 1) baseFlatten(value, depth - 1, predicate, isStrict, result);
|
|
931
|
+
else arrayPush(result, value);
|
|
932
|
+
else if (!isStrict) result[result.length] = value;
|
|
933
|
+
}
|
|
934
|
+
return result;
|
|
899
935
|
}
|
|
900
936
|
/**
|
|
901
|
-
*
|
|
937
|
+
* The base implementation of `_.pick` without support for individual
|
|
938
|
+
* property identifiers.
|
|
902
939
|
*
|
|
903
940
|
* @private
|
|
904
|
-
* @param {
|
|
905
|
-
* @param {
|
|
906
|
-
* @returns {
|
|
941
|
+
* @param {Object} object The source object.
|
|
942
|
+
* @param {string[]} props The property identifiers to pick.
|
|
943
|
+
* @returns {Object} Returns the new object.
|
|
907
944
|
*/
|
|
908
|
-
function
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
945
|
+
function basePick(object, props) {
|
|
946
|
+
object = Object(object);
|
|
947
|
+
return basePickBy(object, props, function(value, key) {
|
|
948
|
+
return key in object;
|
|
949
|
+
});
|
|
913
950
|
}
|
|
914
951
|
/**
|
|
915
|
-
*
|
|
952
|
+
* The base implementation of `_.pickBy` without support for iteratee shorthands.
|
|
916
953
|
*
|
|
917
954
|
* @private
|
|
918
|
-
* @param {
|
|
919
|
-
* @
|
|
955
|
+
* @param {Object} object The source object.
|
|
956
|
+
* @param {string[]} props The property identifiers to pick from.
|
|
957
|
+
* @param {Function} predicate The function invoked per property.
|
|
958
|
+
* @returns {Object} Returns the new object.
|
|
920
959
|
*/
|
|
921
|
-
function
|
|
922
|
-
var
|
|
923
|
-
|
|
960
|
+
function basePickBy(object, props, predicate) {
|
|
961
|
+
var index = -1, length = props.length, result = {};
|
|
962
|
+
while (++index < length) {
|
|
963
|
+
var key = props[index], value = object[key];
|
|
964
|
+
if (predicate(value, key)) result[key] = value;
|
|
965
|
+
}
|
|
966
|
+
return result;
|
|
924
967
|
}
|
|
925
968
|
/**
|
|
926
|
-
*
|
|
969
|
+
* The base implementation of `_.rest` which doesn't validate or coerce arguments.
|
|
927
970
|
*
|
|
928
971
|
* @private
|
|
929
|
-
* @param {Function} func The function to
|
|
930
|
-
* @
|
|
972
|
+
* @param {Function} func The function to apply a rest parameter to.
|
|
973
|
+
* @param {number} [start=func.length-1] The start position of the rest parameter.
|
|
974
|
+
* @returns {Function} Returns the new function.
|
|
931
975
|
*/
|
|
932
|
-
function
|
|
933
|
-
|
|
976
|
+
function baseRest(func, start) {
|
|
977
|
+
start = nativeMax(start === void 0 ? func.length - 1 : start, 0);
|
|
978
|
+
return function() {
|
|
979
|
+
var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length);
|
|
980
|
+
while (++index < length) array[index] = args[start + index];
|
|
981
|
+
index = -1;
|
|
982
|
+
var otherArgs = Array(start + 1);
|
|
983
|
+
while (++index < start) otherArgs[index] = args[index];
|
|
984
|
+
otherArgs[start] = array;
|
|
985
|
+
return apply(func, this, otherArgs);
|
|
986
|
+
};
|
|
934
987
|
}
|
|
935
988
|
/**
|
|
936
|
-
*
|
|
989
|
+
* Checks if `value` is a flattenable `arguments` object or array.
|
|
937
990
|
*
|
|
938
991
|
* @private
|
|
939
|
-
* @param {
|
|
940
|
-
* @returns {
|
|
992
|
+
* @param {*} value The value to check.
|
|
993
|
+
* @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
|
|
941
994
|
*/
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
if (reLeadingDot.test(string)) result.push("");
|
|
946
|
-
string.replace(rePropName, function(match, number, quote, string) {
|
|
947
|
-
result.push(quote ? string.replace(reEscapeChar, "$1") : number || match);
|
|
948
|
-
});
|
|
949
|
-
return result;
|
|
950
|
-
});
|
|
995
|
+
function isFlattenable(value) {
|
|
996
|
+
return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
|
|
997
|
+
}
|
|
951
998
|
/**
|
|
952
999
|
* Converts `value` to a string key if it's not a string or symbol.
|
|
953
1000
|
*
|
|
@@ -958,142 +1005,109 @@ var require_lodash_set = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
958
1005
|
function toKey(value) {
|
|
959
1006
|
if (typeof value == "string" || isSymbol(value)) return value;
|
|
960
1007
|
var result = value + "";
|
|
961
|
-
return result == "0" && 1 / value == -
|
|
1008
|
+
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
|
|
962
1009
|
}
|
|
963
1010
|
/**
|
|
964
|
-
*
|
|
1011
|
+
* Checks if `value` is likely an `arguments` object.
|
|
965
1012
|
*
|
|
966
|
-
* @
|
|
967
|
-
* @
|
|
968
|
-
* @
|
|
1013
|
+
* @static
|
|
1014
|
+
* @memberOf _
|
|
1015
|
+
* @since 0.1.0
|
|
1016
|
+
* @category Lang
|
|
1017
|
+
* @param {*} value The value to check.
|
|
1018
|
+
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
1019
|
+
* else `false`.
|
|
1020
|
+
* @example
|
|
1021
|
+
*
|
|
1022
|
+
* _.isArguments(function() { return arguments; }());
|
|
1023
|
+
* // => true
|
|
1024
|
+
*
|
|
1025
|
+
* _.isArguments([1, 2, 3]);
|
|
1026
|
+
* // => false
|
|
969
1027
|
*/
|
|
970
|
-
function
|
|
971
|
-
|
|
972
|
-
try {
|
|
973
|
-
return funcToString.call(func);
|
|
974
|
-
} catch (e) {}
|
|
975
|
-
try {
|
|
976
|
-
return func + "";
|
|
977
|
-
} catch (e) {}
|
|
978
|
-
}
|
|
979
|
-
return "";
|
|
1028
|
+
function isArguments(value) {
|
|
1029
|
+
return isArrayLikeObject(value) && hasOwnProperty.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString.call(value) == argsTag);
|
|
980
1030
|
}
|
|
981
1031
|
/**
|
|
982
|
-
*
|
|
983
|
-
* provided, it determines the cache key for storing the result based on the
|
|
984
|
-
* arguments provided to the memoized function. By default, the first argument
|
|
985
|
-
* provided to the memoized function is used as the map cache key. The `func`
|
|
986
|
-
* is invoked with the `this` binding of the memoized function.
|
|
987
|
-
*
|
|
988
|
-
* **Note:** The cache is exposed as the `cache` property on the memoized
|
|
989
|
-
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
|
990
|
-
* constructor with one whose instances implement the
|
|
991
|
-
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
|
992
|
-
* method interface of `delete`, `get`, `has`, and `set`.
|
|
1032
|
+
* Checks if `value` is classified as an `Array` object.
|
|
993
1033
|
*
|
|
994
1034
|
* @static
|
|
995
1035
|
* @memberOf _
|
|
996
1036
|
* @since 0.1.0
|
|
997
|
-
* @category
|
|
998
|
-
* @param {
|
|
999
|
-
* @
|
|
1000
|
-
* @returns {Function} Returns the new memoized function.
|
|
1037
|
+
* @category Lang
|
|
1038
|
+
* @param {*} value The value to check.
|
|
1039
|
+
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
1001
1040
|
* @example
|
|
1002
1041
|
*
|
|
1003
|
-
*
|
|
1004
|
-
*
|
|
1005
|
-
*
|
|
1006
|
-
* var values = _.memoize(_.values);
|
|
1007
|
-
* values(object);
|
|
1008
|
-
* // => [1, 2]
|
|
1009
|
-
*
|
|
1010
|
-
* values(other);
|
|
1011
|
-
* // => [3, 4]
|
|
1042
|
+
* _.isArray([1, 2, 3]);
|
|
1043
|
+
* // => true
|
|
1012
1044
|
*
|
|
1013
|
-
*
|
|
1014
|
-
*
|
|
1015
|
-
* // => [1, 2]
|
|
1045
|
+
* _.isArray(document.body.children);
|
|
1046
|
+
* // => false
|
|
1016
1047
|
*
|
|
1017
|
-
*
|
|
1018
|
-
*
|
|
1019
|
-
* values(object);
|
|
1020
|
-
* // => ['a', 'b']
|
|
1048
|
+
* _.isArray('abc');
|
|
1049
|
+
* // => false
|
|
1021
1050
|
*
|
|
1022
|
-
*
|
|
1023
|
-
*
|
|
1051
|
+
* _.isArray(_.noop);
|
|
1052
|
+
* // => false
|
|
1024
1053
|
*/
|
|
1025
|
-
|
|
1026
|
-
if (typeof func != "function" || resolver && typeof resolver != "function") throw new TypeError(FUNC_ERROR_TEXT);
|
|
1027
|
-
var memoized = function() {
|
|
1028
|
-
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
|
|
1029
|
-
if (cache.has(key)) return cache.get(key);
|
|
1030
|
-
var result = func.apply(this, args);
|
|
1031
|
-
memoized.cache = cache.set(key, result);
|
|
1032
|
-
return result;
|
|
1033
|
-
};
|
|
1034
|
-
memoized.cache = new (memoize.Cache || MapCache)();
|
|
1035
|
-
return memoized;
|
|
1036
|
-
}
|
|
1037
|
-
memoize.Cache = MapCache;
|
|
1054
|
+
var isArray = Array.isArray;
|
|
1038
1055
|
/**
|
|
1039
|
-
*
|
|
1040
|
-
*
|
|
1041
|
-
*
|
|
1056
|
+
* Checks if `value` is array-like. A value is considered array-like if it's
|
|
1057
|
+
* not a function and has a `value.length` that's an integer greater than or
|
|
1058
|
+
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
|
|
1042
1059
|
*
|
|
1043
1060
|
* @static
|
|
1044
1061
|
* @memberOf _
|
|
1045
1062
|
* @since 4.0.0
|
|
1046
1063
|
* @category Lang
|
|
1047
|
-
* @param {*} value The value to
|
|
1048
|
-
* @
|
|
1049
|
-
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
1064
|
+
* @param {*} value The value to check.
|
|
1065
|
+
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
|
1050
1066
|
* @example
|
|
1051
1067
|
*
|
|
1052
|
-
*
|
|
1053
|
-
* var other = { 'a': 1 };
|
|
1054
|
-
*
|
|
1055
|
-
* _.eq(object, object);
|
|
1068
|
+
* _.isArrayLike([1, 2, 3]);
|
|
1056
1069
|
* // => true
|
|
1057
1070
|
*
|
|
1058
|
-
* _.
|
|
1059
|
-
* // =>
|
|
1071
|
+
* _.isArrayLike(document.body.children);
|
|
1072
|
+
* // => true
|
|
1060
1073
|
*
|
|
1061
|
-
* _.
|
|
1074
|
+
* _.isArrayLike('abc');
|
|
1062
1075
|
* // => true
|
|
1063
1076
|
*
|
|
1064
|
-
* _.
|
|
1077
|
+
* _.isArrayLike(_.noop);
|
|
1065
1078
|
* // => false
|
|
1066
|
-
*
|
|
1067
|
-
* _.eq(NaN, NaN);
|
|
1068
|
-
* // => true
|
|
1069
1079
|
*/
|
|
1070
|
-
function
|
|
1071
|
-
return value
|
|
1080
|
+
function isArrayLike(value) {
|
|
1081
|
+
return value != null && isLength(value.length) && !isFunction(value);
|
|
1072
1082
|
}
|
|
1073
1083
|
/**
|
|
1074
|
-
*
|
|
1084
|
+
* This method is like `_.isArrayLike` except that it also checks if `value`
|
|
1085
|
+
* is an object.
|
|
1075
1086
|
*
|
|
1076
1087
|
* @static
|
|
1077
1088
|
* @memberOf _
|
|
1078
|
-
* @since 0.
|
|
1089
|
+
* @since 4.0.0
|
|
1079
1090
|
* @category Lang
|
|
1080
1091
|
* @param {*} value The value to check.
|
|
1081
|
-
* @returns {boolean} Returns `true` if `value` is an array,
|
|
1092
|
+
* @returns {boolean} Returns `true` if `value` is an array-like object,
|
|
1093
|
+
* else `false`.
|
|
1082
1094
|
* @example
|
|
1083
1095
|
*
|
|
1084
|
-
* _.
|
|
1096
|
+
* _.isArrayLikeObject([1, 2, 3]);
|
|
1085
1097
|
* // => true
|
|
1086
1098
|
*
|
|
1087
|
-
* _.
|
|
1088
|
-
* // =>
|
|
1099
|
+
* _.isArrayLikeObject(document.body.children);
|
|
1100
|
+
* // => true
|
|
1089
1101
|
*
|
|
1090
|
-
* _.
|
|
1102
|
+
* _.isArrayLikeObject('abc');
|
|
1091
1103
|
* // => false
|
|
1092
1104
|
*
|
|
1093
|
-
* _.
|
|
1105
|
+
* _.isArrayLikeObject(_.noop);
|
|
1094
1106
|
* // => false
|
|
1095
1107
|
*/
|
|
1096
|
-
|
|
1108
|
+
function isArrayLikeObject(value) {
|
|
1109
|
+
return isObjectLike(value) && isArrayLike(value);
|
|
1110
|
+
}
|
|
1097
1111
|
/**
|
|
1098
1112
|
* Checks if `value` is classified as a `Function` object.
|
|
1099
1113
|
*
|
|
@@ -1116,6 +1130,35 @@ var require_lodash_set = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1116
1130
|
return tag == funcTag || tag == genTag;
|
|
1117
1131
|
}
|
|
1118
1132
|
/**
|
|
1133
|
+
* Checks if `value` is a valid array-like length.
|
|
1134
|
+
*
|
|
1135
|
+
* **Note:** This method is loosely based on
|
|
1136
|
+
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
|
1137
|
+
*
|
|
1138
|
+
* @static
|
|
1139
|
+
* @memberOf _
|
|
1140
|
+
* @since 4.0.0
|
|
1141
|
+
* @category Lang
|
|
1142
|
+
* @param {*} value The value to check.
|
|
1143
|
+
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
|
1144
|
+
* @example
|
|
1145
|
+
*
|
|
1146
|
+
* _.isLength(3);
|
|
1147
|
+
* // => true
|
|
1148
|
+
*
|
|
1149
|
+
* _.isLength(Number.MIN_VALUE);
|
|
1150
|
+
* // => false
|
|
1151
|
+
*
|
|
1152
|
+
* _.isLength(Infinity);
|
|
1153
|
+
* // => false
|
|
1154
|
+
*
|
|
1155
|
+
* _.isLength('3');
|
|
1156
|
+
* // => false
|
|
1157
|
+
*/
|
|
1158
|
+
function isLength(value) {
|
|
1159
|
+
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
1160
|
+
}
|
|
1161
|
+
/**
|
|
1119
1162
|
* Checks if `value` is the
|
|
1120
1163
|
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
1121
1164
|
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
@@ -1192,105 +1235,32 @@ var require_lodash_set = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1192
1235
|
return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag;
|
|
1193
1236
|
}
|
|
1194
1237
|
/**
|
|
1195
|
-
*
|
|
1196
|
-
* and `undefined` values. The sign of `-0` is preserved.
|
|
1197
|
-
*
|
|
1198
|
-
* @static
|
|
1199
|
-
* @memberOf _
|
|
1200
|
-
* @since 4.0.0
|
|
1201
|
-
* @category Lang
|
|
1202
|
-
* @param {*} value The value to process.
|
|
1203
|
-
* @returns {string} Returns the string.
|
|
1204
|
-
* @example
|
|
1205
|
-
*
|
|
1206
|
-
* _.toString(null);
|
|
1207
|
-
* // => ''
|
|
1208
|
-
*
|
|
1209
|
-
* _.toString(-0);
|
|
1210
|
-
* // => '-0'
|
|
1211
|
-
*
|
|
1212
|
-
* _.toString([1, 2, 3]);
|
|
1213
|
-
* // => '1,2,3'
|
|
1214
|
-
*/
|
|
1215
|
-
function toString(value) {
|
|
1216
|
-
return value == null ? "" : baseToString(value);
|
|
1217
|
-
}
|
|
1218
|
-
/**
|
|
1219
|
-
* Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
|
|
1220
|
-
* it's created. Arrays are created for missing index properties while objects
|
|
1221
|
-
* are created for all other missing properties. Use `_.setWith` to customize
|
|
1222
|
-
* `path` creation.
|
|
1223
|
-
*
|
|
1224
|
-
* **Note:** This method mutates `object`.
|
|
1238
|
+
* Creates an object composed of the picked `object` properties.
|
|
1225
1239
|
*
|
|
1226
1240
|
* @static
|
|
1241
|
+
* @since 0.1.0
|
|
1227
1242
|
* @memberOf _
|
|
1228
|
-
* @since 3.7.0
|
|
1229
1243
|
* @category Object
|
|
1230
|
-
* @param {Object} object The object
|
|
1231
|
-
* @param {
|
|
1232
|
-
* @
|
|
1233
|
-
* @returns {Object} Returns `object`.
|
|
1244
|
+
* @param {Object} object The source object.
|
|
1245
|
+
* @param {...(string|string[])} [props] The property identifiers to pick.
|
|
1246
|
+
* @returns {Object} Returns the new object.
|
|
1234
1247
|
* @example
|
|
1235
1248
|
*
|
|
1236
|
-
* var object = { 'a':
|
|
1237
|
-
*
|
|
1238
|
-
* _.set(object, 'a[0].b.c', 4);
|
|
1239
|
-
* console.log(object.a[0].b.c);
|
|
1240
|
-
* // => 4
|
|
1249
|
+
* var object = { 'a': 1, 'b': '2', 'c': 3 };
|
|
1241
1250
|
*
|
|
1242
|
-
* _.
|
|
1243
|
-
*
|
|
1244
|
-
* // => 5
|
|
1251
|
+
* _.pick(object, ['a', 'c']);
|
|
1252
|
+
* // => { 'a': 1, 'c': 3 }
|
|
1245
1253
|
*/
|
|
1246
|
-
|
|
1247
|
-
return object == null ?
|
|
1248
|
-
}
|
|
1249
|
-
module.exports =
|
|
1250
|
-
})
|
|
1251
|
-
|
|
1252
|
-
//#region src/endpoints/sessionAuth.ts
|
|
1253
|
-
var import_lodash_pick = /* @__PURE__ */ __toESM(require_lodash_pick(), 1);
|
|
1254
|
-
var import_lodash_set = /* @__PURE__ */ __toESM(require_lodash_set(), 1);
|
|
1255
|
-
/**
|
|
1256
|
-
* What is forwarded to the auth server: the headers a session travels in, and
|
|
1257
|
-
* whose request it is — nothing else.
|
|
1258
|
-
*
|
|
1259
|
-
* The client's address goes with the session because the auth server
|
|
1260
|
-
* rate-limits by it, `/get-session` included. Without it every user's session
|
|
1261
|
-
* check arrived from the surface itself — one shared bucket, so enough
|
|
1262
|
-
* traffic from anyone turned every session check into a 429 — and in tests,
|
|
1263
|
-
* concurrent tests queued on the same rate-limit row.
|
|
1264
|
-
*/
|
|
1265
|
-
const SESSION_HEADERS = [
|
|
1266
|
-
"cookie",
|
|
1267
|
-
"authorization",
|
|
1268
|
-
"x-forwarded-for"
|
|
1269
|
-
];
|
|
1270
|
-
/** `auth` for one request on one surface. */
|
|
1271
|
-
function sessionAuth(surface, header) {
|
|
1272
|
-
return { async getSession() {
|
|
1273
|
-
const authenticator = surface?.auth;
|
|
1274
|
-
if (!surface || !authenticator) throw new NoAuthenticator(surface?.id);
|
|
1275
|
-
const headers = new Headers();
|
|
1276
|
-
for (const name of SESSION_HEADERS) {
|
|
1277
|
-
const value = header(name);
|
|
1278
|
-
if (value) headers.set(name, value);
|
|
1279
|
-
}
|
|
1280
|
-
return await authenticator.verify(headers, surface.envParser);
|
|
1281
|
-
} };
|
|
1282
|
-
}
|
|
1283
|
-
/** `auth.getSession()` was called on a surface that names no authenticator. */
|
|
1284
|
-
var NoAuthenticator = class extends Error {
|
|
1285
|
-
surface;
|
|
1286
|
-
constructor(surface) {
|
|
1287
|
-
super(`auth.getSession() needs an authenticator, and ${surface ? `the surface '${surface}'` : "this endpoint"} declares none: declare one on the surface with .auth(construct).`);
|
|
1288
|
-
this.surface = surface;
|
|
1289
|
-
this.name = "NoAuthenticator";
|
|
1290
|
-
}
|
|
1291
|
-
};
|
|
1254
|
+
var pick$1 = baseRest(function(object, props) {
|
|
1255
|
+
return object == null ? {} : basePick(object, arrayMap(baseFlatten(props, 1), toKey));
|
|
1256
|
+
});
|
|
1257
|
+
module.exports = pick$1;
|
|
1258
|
+
} });
|
|
1259
|
+
|
|
1292
1260
|
//#endregion
|
|
1293
1261
|
//#region src/endpoints/Endpoint.ts
|
|
1262
|
+
var import_lodash = __toESM(require_lodash(), 1);
|
|
1263
|
+
var import_lodash$1 = __toESM(require_lodash$1(), 1);
|
|
1294
1264
|
/**
|
|
1295
1265
|
* Represents an HTTP endpoint that can handle requests with type-safe input/output validation,
|
|
1296
1266
|
* dependency injection, session management, and authorization.
|
|
@@ -1322,14 +1292,6 @@ var Endpoint = class Endpoint extends Function$1 {
|
|
|
1322
1292
|
route;
|
|
1323
1293
|
/** The HTTP method for this endpoint */
|
|
1324
1294
|
method;
|
|
1325
|
-
/**
|
|
1326
|
-
* The surface that serves it, when it was built from one.
|
|
1327
|
-
*
|
|
1328
|
-
* Carries the env parser the adaptors need, so a generated handler needs no
|
|
1329
|
-
* import written for it — and the surface's id, so the build attributes the
|
|
1330
|
-
* route to the API that serves it rather than inferring it by exclusion.
|
|
1331
|
-
*/
|
|
1332
|
-
surface;
|
|
1333
1295
|
/** Optional description for OpenAPI documentation */
|
|
1334
1296
|
description;
|
|
1335
1297
|
/** Optional tags for OpenAPI documentation */
|
|
@@ -1342,22 +1304,10 @@ var Endpoint = class Endpoint extends Function$1 {
|
|
|
1342
1304
|
* Content-Type header instead of JSON-serializing.
|
|
1343
1305
|
*/
|
|
1344
1306
|
responseType;
|
|
1345
|
-
/**
|
|
1346
|
-
* This route's telemetry — `.telemetry({ ignore, attributes })` — read by
|
|
1347
|
-
* the build, which hands it to the request middleware.
|
|
1348
|
-
*/
|
|
1349
|
-
telemetry;
|
|
1350
1307
|
/** Default headers to apply to all responses */
|
|
1351
1308
|
defaultHeaders = {};
|
|
1352
1309
|
/** Function to extract session data from the request context */
|
|
1353
1310
|
getSession = () => ({});
|
|
1354
|
-
/**
|
|
1355
|
-
* Whether a session callback was given — `.session()` on the factory it was
|
|
1356
|
-
* built from. A generated handler reads the session only when it is, so
|
|
1357
|
-
* an endpoint with a session and no authorizer must say so: it used to be
|
|
1358
|
-
* handed `undefined` in a production build and its session in `gkm dev`.
|
|
1359
|
-
*/
|
|
1360
|
-
hasSession = false;
|
|
1361
1311
|
/** Function to determine if the request is authorized */
|
|
1362
1312
|
authorize = () => true;
|
|
1363
1313
|
/** Optional rate limiting configuration */
|
|
@@ -1523,11 +1473,12 @@ var Endpoint = class Endpoint extends Function$1 {
|
|
|
1523
1473
|
* @internal
|
|
1524
1474
|
*/
|
|
1525
1475
|
refineInput(ctx) {
|
|
1526
|
-
|
|
1476
|
+
const input = (0, import_lodash.default)(ctx, [
|
|
1527
1477
|
"body",
|
|
1528
1478
|
"query",
|
|
1529
1479
|
"params"
|
|
1530
1480
|
]);
|
|
1481
|
+
return input;
|
|
1531
1482
|
}
|
|
1532
1483
|
handler = (ctx, response) => {
|
|
1533
1484
|
for (const [key, value] of Object.entries(this.defaultHeaders)) response.header(key, value);
|
|
@@ -1550,7 +1501,7 @@ var Endpoint = class Endpoint extends Function$1 {
|
|
|
1550
1501
|
* @returns True if the object is an Endpoint
|
|
1551
1502
|
*/
|
|
1552
1503
|
static isEndpoint(obj) {
|
|
1553
|
-
return Boolean(obj && obj.__IS_FUNCTION__ === true && obj.type ===
|
|
1504
|
+
return Boolean(obj && obj.__IS_FUNCTION__ === true && obj.type === ConstructType.Endpoint);
|
|
1554
1505
|
}
|
|
1555
1506
|
/**
|
|
1556
1507
|
* Helper to check if response has metadata
|
|
@@ -1572,23 +1523,17 @@ var Endpoint = class Endpoint extends Function$1 {
|
|
|
1572
1523
|
* @returns OpenAPI route definition with operation details
|
|
1573
1524
|
*/
|
|
1574
1525
|
async toOpenApi3Route(componentCollector) {
|
|
1575
|
-
const status = String(this.status);
|
|
1576
1526
|
const operation = {
|
|
1577
1527
|
operationId: this.operationId,
|
|
1578
1528
|
...this.description && { description: this.description },
|
|
1579
1529
|
...this.tags && this.tags.length > 0 && { tags: this.tags },
|
|
1580
|
-
responses: {
|
|
1530
|
+
responses: { "200": { description: "Successful response" } }
|
|
1581
1531
|
};
|
|
1582
|
-
const scheme = this.authorizer?.securityScheme;
|
|
1583
|
-
if (this.authorizer && scheme && componentCollector) {
|
|
1584
|
-
componentCollector.addSecurityScheme(this.authorizer.name, scheme);
|
|
1585
|
-
operation.security = [{ [this.authorizer.name]: [] }];
|
|
1586
|
-
}
|
|
1587
1532
|
if (this.outputSchema) {
|
|
1588
1533
|
const responseSchema = await convertSchemaWithComponents(this.outputSchema, componentCollector);
|
|
1589
|
-
if (responseSchema) (0,
|
|
1534
|
+
if (responseSchema) (0, import_lodash$1.default)(operation, [
|
|
1590
1535
|
"responses",
|
|
1591
|
-
|
|
1536
|
+
"200",
|
|
1592
1537
|
"content",
|
|
1593
1538
|
this.responseType,
|
|
1594
1539
|
"schema"
|
|
@@ -1603,7 +1548,7 @@ var Endpoint = class Endpoint extends Function$1 {
|
|
|
1603
1548
|
"PATCH"
|
|
1604
1549
|
].includes(this.method) && "body" in this.input && this.input.body) {
|
|
1605
1550
|
const bodySchema = await convertSchemaWithComponents(this.input.body, componentCollector);
|
|
1606
|
-
if (bodySchema) (0,
|
|
1551
|
+
if (bodySchema) (0, import_lodash$1.default)(operation, ["requestBody"], {
|
|
1607
1552
|
required: true,
|
|
1608
1553
|
content: { "application/json": { schema: bodySchema } }
|
|
1609
1554
|
});
|
|
@@ -1651,8 +1596,8 @@ var Endpoint = class Endpoint extends Function$1 {
|
|
|
1651
1596
|
* @param options.status - Success HTTP status code (default: 200)
|
|
1652
1597
|
* @param options.authorizer - Optional authorizer configuration
|
|
1653
1598
|
*/
|
|
1654
|
-
constructor({ fn, method, route, description, tags, input, logger, output: outputSchema, services,
|
|
1655
|
-
super(fn, timeout,
|
|
1599
|
+
constructor({ fn, method, route, description, tags, input, logger, output: outputSchema, services, timeout, memorySize, getSession, authorize, rateLimit, status = SuccessStatus.OK, publisherService, events, authorizer, auditorStorageService, actorExtractor, audits, databaseService, rlsConfig, rlsBypass, responseType }) {
|
|
1600
|
+
super(fn, timeout, ConstructType.Endpoint, input, outputSchema, services, logger, publisherService, events, memorySize, auditorStorageService);
|
|
1656
1601
|
this.route = route;
|
|
1657
1602
|
this.method = method;
|
|
1658
1603
|
this.description = description;
|
|
@@ -1660,18 +1605,10 @@ var Endpoint = class Endpoint extends Function$1 {
|
|
|
1660
1605
|
this.status = status;
|
|
1661
1606
|
this.responseType = responseType ?? "application/json";
|
|
1662
1607
|
this.endpointFn = fn;
|
|
1663
|
-
if (
|
|
1664
|
-
if (getSession) {
|
|
1665
|
-
this.hasSession = true;
|
|
1666
|
-
this.getSession = (ctx) => getSession({
|
|
1667
|
-
...ctx,
|
|
1668
|
-
auth: sessionAuth(surface, ctx.header)
|
|
1669
|
-
});
|
|
1670
|
-
}
|
|
1608
|
+
if (getSession) this.getSession = getSession;
|
|
1671
1609
|
if (authorize) this.authorize = authorize;
|
|
1672
1610
|
if (rateLimit) this.rateLimit = rateLimit;
|
|
1673
1611
|
if (authorizer) this.authorizer = authorizer;
|
|
1674
|
-
this.surface = surface;
|
|
1675
1612
|
if (actorExtractor) this.actorExtractor = actorExtractor;
|
|
1676
1613
|
if (audits) this.audits = audits;
|
|
1677
1614
|
if (databaseService) this.databaseService = databaseService;
|
|
@@ -1723,7 +1660,196 @@ var ResponseBuilder = class {
|
|
|
1723
1660
|
return this.metadata;
|
|
1724
1661
|
}
|
|
1725
1662
|
};
|
|
1663
|
+
/**
|
|
1664
|
+
* HTTP success status codes that can be returned by endpoints.
|
|
1665
|
+
*/
|
|
1666
|
+
let SuccessStatus = /* @__PURE__ */ function(SuccessStatus$1) {
|
|
1667
|
+
/** Standard response for successful HTTP requests */
|
|
1668
|
+
SuccessStatus$1[SuccessStatus$1["OK"] = 200] = "OK";
|
|
1669
|
+
/** Request has been fulfilled and resulted in a new resource being created */
|
|
1670
|
+
SuccessStatus$1[SuccessStatus$1["Created"] = 201] = "Created";
|
|
1671
|
+
/** Request has been accepted for processing, but processing is not complete */
|
|
1672
|
+
SuccessStatus$1[SuccessStatus$1["Accepted"] = 202] = "Accepted";
|
|
1673
|
+
/** Server successfully processed the request but is not returning any content */
|
|
1674
|
+
SuccessStatus$1[SuccessStatus$1["NoContent"] = 204] = "NoContent";
|
|
1675
|
+
/** Server successfully processed the request and is not returning any content, client should reset the document view */
|
|
1676
|
+
SuccessStatus$1[SuccessStatus$1["ResetContent"] = 205] = "ResetContent";
|
|
1677
|
+
/** Server is delivering only part of the resource due to a range header */
|
|
1678
|
+
SuccessStatus$1[SuccessStatus$1["PartialContent"] = 206] = "PartialContent";
|
|
1679
|
+
return SuccessStatus$1;
|
|
1680
|
+
}({});
|
|
1681
|
+
|
|
1726
1682
|
//#endregion
|
|
1727
|
-
|
|
1683
|
+
//#region src/endpoints/lazyAccessors.ts
|
|
1684
|
+
/**
|
|
1685
|
+
* Create a lazy header accessor for Hono.
|
|
1686
|
+
* Uses `c.req.header(name)` for single lookups (native, case-insensitive).
|
|
1687
|
+
* Only calls `c.req.header()` to get all headers when needed.
|
|
1688
|
+
*/
|
|
1689
|
+
function createHonoHeaders(c) {
|
|
1690
|
+
let allHeaders = null;
|
|
1691
|
+
return (key) => {
|
|
1692
|
+
if (key !== void 0) return c.req.header(key);
|
|
1693
|
+
if (!allHeaders) allHeaders = c.req.header();
|
|
1694
|
+
return allHeaders;
|
|
1695
|
+
};
|
|
1696
|
+
}
|
|
1697
|
+
/**
|
|
1698
|
+
* Create a lazy cookie accessor for Hono.
|
|
1699
|
+
* Uses `getCookie(c, name)` for single lookups (native).
|
|
1700
|
+
* Only parses the cookie header when all cookies are requested.
|
|
1701
|
+
*/
|
|
1702
|
+
function createHonoCookies(c) {
|
|
1703
|
+
let allCookies = null;
|
|
1704
|
+
return (name) => {
|
|
1705
|
+
if (name !== void 0) return getCookie(c, name);
|
|
1706
|
+
if (!allCookies) {
|
|
1707
|
+
allCookies = {};
|
|
1708
|
+
const cookieHeader = c.req.header("cookie");
|
|
1709
|
+
if (cookieHeader) for (const part of cookieHeader.split(";")) {
|
|
1710
|
+
const trimmed = part.trim();
|
|
1711
|
+
const eqIndex = trimmed.indexOf("=");
|
|
1712
|
+
if (eqIndex > 0) {
|
|
1713
|
+
const key = trimmed.slice(0, eqIndex);
|
|
1714
|
+
const value = trimmed.slice(eqIndex + 1);
|
|
1715
|
+
allCookies[key] = value;
|
|
1716
|
+
}
|
|
1717
|
+
}
|
|
1718
|
+
}
|
|
1719
|
+
return allCookies;
|
|
1720
|
+
};
|
|
1721
|
+
}
|
|
1722
|
+
/**
|
|
1723
|
+
* Create a lazy header accessor for API Gateway events.
|
|
1724
|
+
* Handles case-insensitive lookups.
|
|
1725
|
+
*/
|
|
1726
|
+
function createApiGatewayHeaders(headers) {
|
|
1727
|
+
let normalizedHeaders = null;
|
|
1728
|
+
const normalize = () => {
|
|
1729
|
+
if (!normalizedHeaders) {
|
|
1730
|
+
normalizedHeaders = {};
|
|
1731
|
+
if (headers) {
|
|
1732
|
+
for (const [k, v] of Object.entries(headers)) if (v !== void 0) normalizedHeaders[k.toLowerCase()] = v;
|
|
1733
|
+
}
|
|
1734
|
+
}
|
|
1735
|
+
return normalizedHeaders;
|
|
1736
|
+
};
|
|
1737
|
+
return (key) => {
|
|
1738
|
+
if (key !== void 0) {
|
|
1739
|
+
if (headers) {
|
|
1740
|
+
const direct = headers[key] ?? headers[key.toLowerCase()];
|
|
1741
|
+
if (direct !== void 0) return direct;
|
|
1742
|
+
return normalize()[key.toLowerCase()];
|
|
1743
|
+
}
|
|
1744
|
+
return void 0;
|
|
1745
|
+
}
|
|
1746
|
+
return normalize();
|
|
1747
|
+
};
|
|
1748
|
+
}
|
|
1749
|
+
/**
|
|
1750
|
+
* Create a lazy cookie accessor for API Gateway events.
|
|
1751
|
+
* Decodes URL-encoded values to match browser behavior.
|
|
1752
|
+
*/
|
|
1753
|
+
function createApiGatewayCookies(cookies, cookieHeader) {
|
|
1754
|
+
let parsed = null;
|
|
1755
|
+
const parse = () => {
|
|
1756
|
+
if (!parsed) {
|
|
1757
|
+
parsed = {};
|
|
1758
|
+
if (cookies) for (const cookie of cookies) {
|
|
1759
|
+
const eqIndex = cookie.indexOf("=");
|
|
1760
|
+
if (eqIndex > 0) {
|
|
1761
|
+
const key = cookie.slice(0, eqIndex);
|
|
1762
|
+
const value = cookie.slice(eqIndex + 1);
|
|
1763
|
+
parsed[key] = decodeURIComponent(value);
|
|
1764
|
+
}
|
|
1765
|
+
}
|
|
1766
|
+
else if (cookieHeader) for (const part of cookieHeader.split(";")) {
|
|
1767
|
+
const trimmed = part.trim();
|
|
1768
|
+
const eqIndex = trimmed.indexOf("=");
|
|
1769
|
+
if (eqIndex > 0) {
|
|
1770
|
+
const key = trimmed.slice(0, eqIndex);
|
|
1771
|
+
const value = trimmed.slice(eqIndex + 1);
|
|
1772
|
+
parsed[key] = decodeURIComponent(value);
|
|
1773
|
+
}
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
return parsed;
|
|
1777
|
+
};
|
|
1778
|
+
return (name) => {
|
|
1779
|
+
if (name !== void 0) return parse()[name];
|
|
1780
|
+
return parse();
|
|
1781
|
+
};
|
|
1782
|
+
}
|
|
1783
|
+
/**
|
|
1784
|
+
* Create a lazy header accessor for plain object headers (test adaptor, etc).
|
|
1785
|
+
* Headers are already available as an object, just provide lazy access.
|
|
1786
|
+
*/
|
|
1787
|
+
function createObjectHeaders(headers) {
|
|
1788
|
+
let normalized = null;
|
|
1789
|
+
return (key) => {
|
|
1790
|
+
if (key !== void 0) {
|
|
1791
|
+
if (headers) {
|
|
1792
|
+
const direct = headers[key] ?? headers[key.toLowerCase()];
|
|
1793
|
+
if (direct !== void 0) return direct;
|
|
1794
|
+
}
|
|
1795
|
+
if (!normalized && headers) {
|
|
1796
|
+
normalized = {};
|
|
1797
|
+
for (const [k, v] of Object.entries(headers)) normalized[k.toLowerCase()] = v;
|
|
1798
|
+
}
|
|
1799
|
+
return normalized?.[key.toLowerCase()];
|
|
1800
|
+
}
|
|
1801
|
+
if (!normalized && headers) {
|
|
1802
|
+
normalized = {};
|
|
1803
|
+
for (const [k, v] of Object.entries(headers)) normalized[k.toLowerCase()] = v;
|
|
1804
|
+
}
|
|
1805
|
+
return normalized ?? {};
|
|
1806
|
+
};
|
|
1807
|
+
}
|
|
1808
|
+
/**
|
|
1809
|
+
* Create a lazy cookie accessor from a cookie header string.
|
|
1810
|
+
* Decodes URL-encoded values to match browser behavior.
|
|
1811
|
+
*/
|
|
1812
|
+
function createCookieHeaderAccessor(cookieHeader) {
|
|
1813
|
+
let parsed = null;
|
|
1814
|
+
const parse = () => {
|
|
1815
|
+
if (!parsed) {
|
|
1816
|
+
parsed = {};
|
|
1817
|
+
if (cookieHeader) for (const part of cookieHeader.split(";")) {
|
|
1818
|
+
const trimmed = part.trim();
|
|
1819
|
+
const eqIndex = trimmed.indexOf("=");
|
|
1820
|
+
if (eqIndex > 0) {
|
|
1821
|
+
const key = trimmed.slice(0, eqIndex);
|
|
1822
|
+
const value = trimmed.slice(eqIndex + 1);
|
|
1823
|
+
parsed[key] = decodeURIComponent(value);
|
|
1824
|
+
}
|
|
1825
|
+
}
|
|
1826
|
+
}
|
|
1827
|
+
return parsed;
|
|
1828
|
+
};
|
|
1829
|
+
return (name) => {
|
|
1830
|
+
if (name !== void 0) return parse()[name];
|
|
1831
|
+
return parse();
|
|
1832
|
+
};
|
|
1833
|
+
}
|
|
1834
|
+
/**
|
|
1835
|
+
* Create a no-op header accessor (for minimal endpoints that don't use headers).
|
|
1836
|
+
*/
|
|
1837
|
+
function createNoopHeaders() {
|
|
1838
|
+
return (key) => {
|
|
1839
|
+
if (key !== void 0) return void 0;
|
|
1840
|
+
return {};
|
|
1841
|
+
};
|
|
1842
|
+
}
|
|
1843
|
+
/**
|
|
1844
|
+
* Create a no-op cookie accessor (for minimal endpoints that don't use cookies).
|
|
1845
|
+
*/
|
|
1846
|
+
function createNoopCookies() {
|
|
1847
|
+
return (name) => {
|
|
1848
|
+
if (name !== void 0) return void 0;
|
|
1849
|
+
return {};
|
|
1850
|
+
};
|
|
1851
|
+
}
|
|
1728
1852
|
|
|
1729
|
-
//#
|
|
1853
|
+
//#endregion
|
|
1854
|
+
export { Endpoint, ResponseBuilder, createApiGatewayCookies, createApiGatewayHeaders, createCookieHeaderAccessor, createHonoCookies, createHonoHeaders, createNoopCookies, createNoopHeaders, createObjectHeaders, require_lodash$1 as require_lodash };
|
|
1855
|
+
//# sourceMappingURL=lazyAccessors-CCTK19xj.mjs.map
|