lakutata 2.0.96 → 2.0.98
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/com/cacher.cjs +31 -135
- package/com/cacher.mjs +23 -127
- package/com/database.cjs +24 -166
- package/com/database.mjs +24 -166
- package/com/docker.cjs +94 -276
- package/com/docker.mjs +39 -221
- package/com/entrypoint.cjs +33 -119
- package/com/entrypoint.mjs +20 -106
- package/com/logger.cjs +19 -123
- package/com/logger.mjs +19 -123
- package/com/monitor.cjs +24 -88
- package/com/monitor.mjs +20 -84
- package/decorator/asst.cjs +5 -7
- package/decorator/asst.mjs +5 -7
- package/decorator/ctrl.cjs +22 -58
- package/decorator/ctrl.mjs +10 -46
- package/decorator/di.cjs +12 -42
- package/decorator/di.mjs +8 -38
- package/decorator/dto.cjs +13 -43
- package/decorator/dto.mjs +9 -39
- package/decorator/orm.cjs +117 -113
- package/decorator/orm.mjs +71 -67
- package/dtos.cjs +8 -38
- package/dtos.mjs +8 -38
- package/helper.cjs +73 -127
- package/helper.mjs +12 -66
- package/lakutata.cjs +116 -328
- package/lakutata.mjs +60 -272
- package/orm.cjs +854 -173
- package/orm.mjs +866 -65
- package/package.json +1 -1
- package/provider/database.cjs +26 -166
- package/provider/database.mjs +26 -166
- package/provider/passwordHash.cjs +18 -82
- package/provider/passwordHash.mjs +18 -82
- package/src/components/Database.cjs +36 -178
- package/src/components/Database.mjs +68 -210
- package/src/components/Logger.cjs +50 -191
- package/src/components/Logger.mjs +46 -194
- package/src/components/cacher/Cacher.cjs +511 -174
- package/src/components/cacher/Cacher.mjs +502 -171
- package/src/components/cacher/adapters/CreateFileCacheAdapter.cjs +547 -35
- package/src/components/cacher/adapters/CreateFileCacheAdapter.mjs +530 -34
- package/src/components/cacher/adapters/CreateMemcacheCacheAdapter.cjs +17 -61
- package/src/components/cacher/adapters/CreateMemcacheCacheAdapter.mjs +19 -63
- package/src/components/cacher/adapters/CreateMongoCacheAdapter.cjs +21 -65
- package/src/components/cacher/adapters/CreateMongoCacheAdapter.mjs +22 -66
- package/src/components/cacher/adapters/CreateMysqlCacheAdapter.cjs +7 -45
- package/src/components/cacher/adapters/CreateMysqlCacheAdapter.mjs +18 -56
- package/src/components/cacher/adapters/CreatePostgresCacheAdapter.cjs +23 -67
- package/src/components/cacher/adapters/CreatePostgresCacheAdapter.mjs +23 -67
- package/src/components/cacher/adapters/CreateRedisCacheAdapter.cjs +6 -44
- package/src/components/cacher/adapters/CreateRedisCacheAdapter.mjs +27 -65
- package/src/components/cacher/adapters/CreateSqliteCacheAdapter.cjs +11 -55
- package/src/components/cacher/adapters/CreateSqliteCacheAdapter.mjs +18 -62
- package/src/components/cacher/exceptions/CacheDriverNotFoundException.cjs +4 -6
- package/src/components/cacher/exceptions/CacheDriverNotFoundException.mjs +4 -6
- package/src/components/cacher/interfaces/CacherOptions.cjs +1 -1
- package/src/components/cacher/interfaces/CacherOptions.mjs +1 -1
- package/src/components/cacher/lib/IsDriverPackageInstalled.cjs +4 -6
- package/src/components/cacher/lib/IsDriverPackageInstalled.mjs +4 -6
- package/src/components/cacher/options/FileCacheOptions.cjs +15 -45
- package/src/components/cacher/options/FileCacheOptions.mjs +15 -45
- package/src/components/cacher/options/MemcacheCacheOptions.cjs +16 -46
- package/src/components/cacher/options/MemcacheCacheOptions.mjs +17 -47
- package/src/components/cacher/options/MongoCacheOptions.cjs +9 -39
- package/src/components/cacher/options/MongoCacheOptions.mjs +18 -48
- package/src/components/cacher/options/MysqlCacheOptions.cjs +9 -39
- package/src/components/cacher/options/MysqlCacheOptions.mjs +19 -49
- package/src/components/cacher/options/PostgresCacheOptions.cjs +21 -51
- package/src/components/cacher/options/PostgresCacheOptions.mjs +20 -50
- package/src/components/cacher/options/RedisCacheOptions.cjs +26 -56
- package/src/components/cacher/options/RedisCacheOptions.mjs +9 -39
- package/src/components/cacher/options/SqliteCacheOptions.cjs +15 -45
- package/src/components/cacher/options/SqliteCacheOptions.mjs +14 -44
- package/src/components/cacher/types/CacheStoreOptions.cjs +1 -1
- package/src/components/cacher/types/CacheStoreOptions.mjs +1 -1
- package/src/components/docker/ConnectionOptionsBuilder.cjs +32 -214
- package/src/components/docker/ConnectionOptionsBuilder.mjs +37 -219
- package/src/components/docker/Docker.cjs +8727 -408
- package/src/components/docker/Docker.mjs +8903 -578
- package/src/components/docker/exceptions/DockerConnectionException.cjs +4 -6
- package/src/components/docker/exceptions/DockerConnectionException.mjs +4 -6
- package/src/components/docker/exceptions/DockerImageBuildException.cjs +4 -6
- package/src/components/docker/exceptions/DockerImageBuildException.mjs +4 -6
- package/src/components/docker/exceptions/DockerImageImportException.cjs +4 -6
- package/src/components/docker/exceptions/DockerImageImportException.mjs +4 -6
- package/src/components/docker/exceptions/DockerImageNotFoundException.cjs +4 -6
- package/src/components/docker/exceptions/DockerImageNotFoundException.mjs +4 -6
- package/src/components/docker/exceptions/DockerImagePullException.cjs +4 -6
- package/src/components/docker/exceptions/DockerImagePullException.mjs +4 -6
- package/src/components/docker/exceptions/DockerImagePushException.cjs +4 -6
- package/src/components/docker/exceptions/DockerImagePushException.mjs +4 -6
- package/src/components/docker/exceptions/DockerImageRepoTagNotFoundException.cjs +4 -6
- package/src/components/docker/exceptions/DockerImageRepoTagNotFoundException.mjs +4 -6
- package/src/components/docker/exceptions/DockerNetworkNotFoundException.cjs +4 -6
- package/src/components/docker/exceptions/DockerNetworkNotFoundException.mjs +4 -6
- package/src/components/docker/interfaces/IDockerConnectionOptions.cjs +1 -1
- package/src/components/docker/interfaces/IDockerConnectionOptions.mjs +1 -1
- package/src/components/docker/interfaces/IDockerHttpConnectionOptions.cjs +1 -1
- package/src/components/docker/interfaces/IDockerHttpConnectionOptions.mjs +1 -1
- package/src/components/docker/interfaces/IDockerHttpsConnectionOptions.cjs +1 -1
- package/src/components/docker/interfaces/IDockerHttpsConnectionOptions.mjs +1 -1
- package/src/components/docker/interfaces/IDockerKeyObject.cjs +1 -1
- package/src/components/docker/interfaces/IDockerKeyObject.mjs +1 -1
- package/src/components/docker/interfaces/IDockerSSHConnectionOptions.cjs +1 -1
- package/src/components/docker/interfaces/IDockerSSHConnectionOptions.mjs +1 -1
- package/src/components/docker/interfaces/IDockerSocketConnectionOptions.cjs +1 -1
- package/src/components/docker/interfaces/IDockerSocketConnectionOptions.mjs +1 -1
- package/src/components/docker/lib/DockerContainer.cjs +174 -330
- package/src/components/docker/lib/DockerContainer.mjs +184 -340
- package/src/components/docker/lib/DockerContainerTTY.cjs +52 -260
- package/src/components/docker/lib/DockerContainerTTY.mjs +48 -263
- package/src/components/docker/lib/DockerImage.cjs +69 -131
- package/src/components/docker/lib/DockerImage.mjs +54 -116
- package/src/components/docker/lib/ParseEnvToRecord.cjs +1 -1
- package/src/components/docker/lib/ParseEnvToRecord.mjs +1 -1
- package/src/components/docker/lib/ParseRepositoryTag.cjs +1 -1
- package/src/components/docker/lib/ParseRepositoryTag.mjs +1 -1
- package/src/components/docker/options/DockerPruneOptions.cjs +14 -44
- package/src/components/docker/options/DockerPruneOptions.mjs +15 -45
- package/src/components/docker/options/auth/DockerAuthOptions.cjs +9 -39
- package/src/components/docker/options/auth/DockerAuthOptions.mjs +15 -45
- package/src/components/docker/options/container/ContainerCommitOptions.cjs +12 -42
- package/src/components/docker/options/container/ContainerCommitOptions.mjs +12 -42
- package/src/components/docker/options/container/ContainerCreateTTYOptions.cjs +13 -43
- package/src/components/docker/options/container/ContainerCreateTTYOptions.mjs +12 -42
- package/src/components/docker/options/container/ContainerExecOptions.cjs +9 -39
- package/src/components/docker/options/container/ContainerExecOptions.mjs +11 -41
- package/src/components/docker/options/container/ContainerExportDirectoryOptions.cjs +13 -43
- package/src/components/docker/options/container/ContainerExportDirectoryOptions.mjs +12 -42
- package/src/components/docker/options/container/ContainerKillOptions.cjs +9 -39
- package/src/components/docker/options/container/ContainerKillOptions.mjs +12 -42
- package/src/components/docker/options/container/ContainerLogsOptions.cjs +15 -45
- package/src/components/docker/options/container/ContainerLogsOptions.mjs +15 -45
- package/src/components/docker/options/container/ContainerRemoveOptions.cjs +9 -39
- package/src/components/docker/options/container/ContainerRemoveOptions.mjs +12 -42
- package/src/components/docker/options/container/ContainerSettingOptions.cjs +9 -39
- package/src/components/docker/options/container/ContainerSettingOptions.mjs +43 -73
- package/src/components/docker/options/container/ContainerStopOptions.cjs +12 -42
- package/src/components/docker/options/container/ContainerStopOptions.mjs +9 -39
- package/src/components/docker/options/container/ContainerTTYConsoleSizeOptions.cjs +9 -39
- package/src/components/docker/options/container/ContainerTTYConsoleSizeOptions.mjs +12 -42
- package/src/components/docker/options/image/ImageBuildOptions.cjs +26 -56
- package/src/components/docker/options/image/ImageBuildOptions.mjs +25 -55
- package/src/components/docker/options/image/ImageExportOptions.cjs +14 -44
- package/src/components/docker/options/image/ImageExportOptions.mjs +14 -44
- package/src/components/docker/options/image/ImageImportOptions.cjs +13 -43
- package/src/components/docker/options/image/ImageImportOptions.mjs +12 -42
- package/src/components/docker/options/image/ImagePullOptions.cjs +9 -39
- package/src/components/docker/options/image/ImagePullOptions.mjs +16 -46
- package/src/components/docker/options/image/ImagePushOptions.cjs +15 -45
- package/src/components/docker/options/image/ImagePushOptions.mjs +15 -45
- package/src/components/docker/options/image/ImageRemoveOptions.cjs +12 -42
- package/src/components/docker/options/image/ImageRemoveOptions.mjs +13 -43
- package/src/components/docker/options/image/ImageTagOptions.cjs +9 -39
- package/src/components/docker/options/image/ImageTagOptions.mjs +12 -42
- package/src/components/docker/options/network/NetworkCreateOptions.cjs +9 -39
- package/src/components/docker/options/network/NetworkCreateOptions.mjs +20 -50
- package/src/components/docker/types/ContainerBind.cjs +1 -1
- package/src/components/docker/types/ContainerBind.mjs +1 -1
- package/src/components/docker/types/ContainerCapability.cjs +1 -1
- package/src/components/docker/types/ContainerCapability.mjs +1 -1
- package/src/components/docker/types/ContainerConfig.cjs +1 -1
- package/src/components/docker/types/ContainerConfig.mjs +1 -1
- package/src/components/docker/types/ContainerDevice.cjs +1 -1
- package/src/components/docker/types/ContainerDevice.mjs +1 -1
- package/src/components/docker/types/ContainerNetwork.cjs +1 -1
- package/src/components/docker/types/ContainerNetwork.mjs +1 -1
- package/src/components/docker/types/ContainerPort.cjs +1 -1
- package/src/components/docker/types/ContainerPort.mjs +1 -1
- package/src/components/docker/types/ContainerRestartPolicy.cjs +1 -1
- package/src/components/docker/types/ContainerRestartPolicy.mjs +1 -1
- package/src/components/docker/types/ContainerState.cjs +1 -1
- package/src/components/docker/types/ContainerState.mjs +1 -1
- package/src/components/docker/types/ContainerStats.cjs +1 -1
- package/src/components/docker/types/ContainerStats.mjs +1 -1
- package/src/components/docker/types/DockerOutputCallback.cjs +1 -1
- package/src/components/docker/types/DockerOutputCallback.mjs +1 -1
- package/src/components/docker/types/ImageConfig.cjs +1 -1
- package/src/components/docker/types/ImageConfig.mjs +1 -1
- package/src/components/docker/types/ImageExposePort.cjs +1 -1
- package/src/components/docker/types/ImageExposePort.mjs +1 -1
- package/src/components/docker/types/NetworkInfo.cjs +1 -1
- package/src/components/docker/types/NetworkInfo.mjs +1 -1
- package/src/components/entrypoint/Entrypoint.cjs +1961 -322
- package/src/components/entrypoint/Entrypoint.mjs +1928 -281
- package/src/components/entrypoint/exceptions/AccessDenyException.cjs +4 -6
- package/src/components/entrypoint/exceptions/AccessDenyException.mjs +4 -6
- package/src/components/entrypoint/exceptions/ControllerActionNotFoundException.cjs +4 -6
- package/src/components/entrypoint/exceptions/ControllerActionNotFoundException.mjs +4 -6
- package/src/components/entrypoint/exceptions/DuplicateActionNameException.cjs +4 -6
- package/src/components/entrypoint/exceptions/DuplicateActionNameException.mjs +4 -6
- package/src/components/entrypoint/exceptions/InvalidActionGroupException.cjs +4 -6
- package/src/components/entrypoint/exceptions/InvalidActionGroupException.mjs +4 -6
- package/src/components/entrypoint/lib/AccessControl.cjs +71 -133
- package/src/components/entrypoint/lib/AccessControl.mjs +75 -137
- package/src/components/entrypoint/lib/AccessControlRule.cjs +19 -81
- package/src/components/entrypoint/lib/AccessControlRule.mjs +23 -85
- package/src/components/entrypoint/lib/Controller.cjs +42 -104
- package/src/components/entrypoint/lib/Controller.mjs +43 -105
- package/src/components/monitor/AliveMonitor.cjs +40 -104
- package/src/components/monitor/AliveMonitor.mjs +50 -114
- package/src/components/monitor/CpuMonitor.cjs +40 -104
- package/src/components/monitor/CpuMonitor.mjs +48 -112
- package/src/components/monitor/EventLoopMonitor.cjs +19 -83
- package/src/components/monitor/EventLoopMonitor.mjs +24 -88
- package/src/components/monitor/HttpRequestMonitor.cjs +41 -105
- package/src/components/monitor/HttpRequestMonitor.mjs +45 -109
- package/src/components/monitor/MemoryMonitor.cjs +87 -151
- package/src/components/monitor/MemoryMonitor.mjs +71 -135
- package/src/components/monitor/interfaces/ICpuMonitorStatistics.cjs +1 -1
- package/src/components/monitor/interfaces/ICpuMonitorStatistics.mjs +1 -1
- package/src/components/monitor/interfaces/IEventLoopMonitorStatistics.cjs +1 -1
- package/src/components/monitor/interfaces/IEventLoopMonitorStatistics.mjs +1 -1
- package/src/components/monitor/interfaces/IHttpRequestMonitorStatistics.cjs +1 -1
- package/src/components/monitor/interfaces/IHttpRequestMonitorStatistics.mjs +1 -1
- package/src/components/monitor/interfaces/IMemoryMonitorStatistics.cjs +1 -1
- package/src/components/monitor/interfaces/IMemoryMonitorStatistics.mjs +1 -1
- package/src/components/monitor/interfaces/IMonitor.cjs +1 -1
- package/src/components/monitor/interfaces/IMonitor.mjs +1 -1
- package/src/constants/DIMetadataKey.cjs +3 -3
- package/src/constants/DIMetadataKey.mjs +3 -3
- package/src/constants/DTOMetadataKey.cjs +3 -3
- package/src/constants/DTOMetadataKey.mjs +3 -3
- package/src/decorators/asst/After.cjs +4 -6
- package/src/decorators/asst/After.mjs +5 -7
- package/src/decorators/asst/Before.cjs +4 -6
- package/src/decorators/asst/Before.mjs +5 -7
- package/src/decorators/ctrl/CLIAction.cjs +15 -51
- package/src/decorators/ctrl/CLIAction.mjs +19 -55
- package/src/decorators/ctrl/HTTPAction.cjs +15 -51
- package/src/decorators/ctrl/HTTPAction.mjs +19 -55
- package/src/decorators/ctrl/ServiceAction.cjs +15 -51
- package/src/decorators/ctrl/ServiceAction.mjs +18 -54
- package/src/decorators/ctrl/http/DELETE.cjs +12 -48
- package/src/decorators/ctrl/http/DELETE.mjs +14 -50
- package/src/decorators/ctrl/http/GET.cjs +12 -48
- package/src/decorators/ctrl/http/GET.mjs +14 -50
- package/src/decorators/ctrl/http/HEAD.cjs +12 -48
- package/src/decorators/ctrl/http/HEAD.mjs +14 -50
- package/src/decorators/ctrl/http/OPTIONS.cjs +12 -48
- package/src/decorators/ctrl/http/OPTIONS.mjs +14 -50
- package/src/decorators/ctrl/http/PATCH.cjs +12 -48
- package/src/decorators/ctrl/http/PATCH.mjs +14 -50
- package/src/decorators/ctrl/http/POST.cjs +12 -48
- package/src/decorators/ctrl/http/POST.mjs +14 -50
- package/src/decorators/ctrl/http/PUT.cjs +12 -48
- package/src/decorators/ctrl/http/PUT.mjs +14 -50
- package/src/decorators/di/Autoload.cjs +3 -3
- package/src/decorators/di/Autoload.mjs +3 -3
- package/src/decorators/di/Configurable.cjs +10 -40
- package/src/decorators/di/Configurable.mjs +12 -42
- package/src/decorators/di/Inject.cjs +20 -50
- package/src/decorators/di/Inject.mjs +25 -55
- package/src/decorators/di/Lifetime.cjs +5 -7
- package/src/decorators/di/Lifetime.mjs +15 -17
- package/src/decorators/dto/Accept.cjs +10 -40
- package/src/decorators/dto/Accept.mjs +13 -43
- package/src/decorators/dto/Expect.cjs +11 -41
- package/src/decorators/dto/Expect.mjs +13 -43
- package/src/decorators/dto/IndexSignature.cjs +10 -40
- package/src/decorators/dto/IndexSignature.mjs +13 -43
- package/src/decorators/dto/Return.cjs +10 -40
- package/src/decorators/dto/Return.mjs +13 -43
- package/src/decorators/orm/AfterInsert.cjs +17 -95
- package/src/decorators/orm/AfterInsert.mjs +17 -95
- package/src/decorators/orm/AfterLoad.cjs +17 -95
- package/src/decorators/orm/AfterLoad.mjs +17 -95
- package/src/decorators/orm/AfterRecover.cjs +17 -95
- package/src/decorators/orm/AfterRecover.mjs +17 -95
- package/src/decorators/orm/AfterRemove.cjs +17 -95
- package/src/decorators/orm/AfterRemove.mjs +17 -95
- package/src/decorators/orm/AfterSoftRemove.cjs +17 -95
- package/src/decorators/orm/AfterSoftRemove.mjs +17 -95
- package/src/decorators/orm/AfterUpdate.cjs +17 -95
- package/src/decorators/orm/AfterUpdate.mjs +17 -95
- package/src/decorators/orm/BeforeInsert.cjs +17 -95
- package/src/decorators/orm/BeforeInsert.mjs +17 -95
- package/src/decorators/orm/BeforeRecover.cjs +17 -95
- package/src/decorators/orm/BeforeRecover.mjs +17 -95
- package/src/decorators/orm/BeforeRemove.cjs +17 -95
- package/src/decorators/orm/BeforeRemove.mjs +17 -95
- package/src/decorators/orm/BeforeSoftRemove.cjs +17 -95
- package/src/decorators/orm/BeforeSoftRemove.mjs +17 -95
- package/src/decorators/orm/BeforeUpdate.cjs +17 -95
- package/src/decorators/orm/BeforeUpdate.mjs +17 -95
- package/src/decorators/orm/Check.cjs +17 -95
- package/src/decorators/orm/Check.mjs +17 -95
- package/src/decorators/orm/ChildEntity.cjs +17 -95
- package/src/decorators/orm/ChildEntity.mjs +17 -95
- package/src/decorators/orm/Column.cjs +17 -95
- package/src/decorators/orm/Column.mjs +17 -95
- package/src/decorators/orm/CreateDateColumn.cjs +17 -95
- package/src/decorators/orm/CreateDateColumn.mjs +17 -95
- package/src/decorators/orm/DeleteDateColumn.cjs +17 -95
- package/src/decorators/orm/DeleteDateColumn.mjs +17 -95
- package/src/decorators/orm/Entity.cjs +17 -95
- package/src/decorators/orm/Entity.mjs +17 -95
- package/src/decorators/orm/EventSubscriber.cjs +17 -95
- package/src/decorators/orm/EventSubscriber.mjs +17 -95
- package/src/decorators/orm/Exclusion.cjs +17 -95
- package/src/decorators/orm/Exclusion.mjs +17 -95
- package/src/decorators/orm/Generated.cjs +17 -95
- package/src/decorators/orm/Generated.mjs +17 -95
- package/src/decorators/orm/Index.cjs +17 -95
- package/src/decorators/orm/Index.mjs +17 -95
- package/src/decorators/orm/JoinColumn.cjs +17 -95
- package/src/decorators/orm/JoinColumn.mjs +17 -95
- package/src/decorators/orm/JoinTable.cjs +17 -95
- package/src/decorators/orm/JoinTable.mjs +17 -95
- package/src/decorators/orm/ManyToMany.cjs +17 -95
- package/src/decorators/orm/ManyToMany.mjs +17 -95
- package/src/decorators/orm/ManyToOne.cjs +17 -95
- package/src/decorators/orm/ManyToOne.mjs +17 -95
- package/src/decorators/orm/ObjectIdColumn.cjs +17 -95
- package/src/decorators/orm/ObjectIdColumn.mjs +17 -95
- package/src/decorators/orm/OneToMany.cjs +17 -95
- package/src/decorators/orm/OneToMany.mjs +17 -95
- package/src/decorators/orm/OneToOne.cjs +17 -95
- package/src/decorators/orm/OneToOne.mjs +17 -95
- package/src/decorators/orm/PrimaryColumn.cjs +17 -95
- package/src/decorators/orm/PrimaryColumn.mjs +17 -95
- package/src/decorators/orm/PrimaryGeneratedColumn.cjs +17 -95
- package/src/decorators/orm/PrimaryGeneratedColumn.mjs +17 -95
- package/src/decorators/orm/RelationId.cjs +17 -95
- package/src/decorators/orm/RelationId.mjs +17 -95
- package/src/decorators/orm/TableInheritance.cjs +17 -95
- package/src/decorators/orm/TableInheritance.mjs +17 -95
- package/src/decorators/orm/Tree.cjs +17 -95
- package/src/decorators/orm/Tree.mjs +17 -95
- package/src/decorators/orm/TreeChildren.cjs +17 -95
- package/src/decorators/orm/TreeChildren.mjs +17 -95
- package/src/decorators/orm/TreeLevelColumn.cjs +17 -95
- package/src/decorators/orm/TreeLevelColumn.mjs +17 -95
- package/src/decorators/orm/TreeParent.cjs +17 -95
- package/src/decorators/orm/TreeParent.mjs +17 -95
- package/src/decorators/orm/Unique.cjs +17 -95
- package/src/decorators/orm/Unique.mjs +17 -95
- package/src/decorators/orm/UpdateDateColumn.cjs +17 -95
- package/src/decorators/orm/UpdateDateColumn.mjs +17 -95
- package/src/decorators/orm/VersionColumn.cjs +17 -95
- package/src/decorators/orm/VersionColumn.mjs +17 -95
- package/src/decorators/orm/ViewColumn.cjs +17 -95
- package/src/decorators/orm/ViewColumn.mjs +17 -95
- package/src/decorators/orm/ViewEntity.cjs +17 -95
- package/src/decorators/orm/ViewEntity.mjs +17 -95
- package/src/decorators/orm/VirtualColumn.cjs +17 -95
- package/src/decorators/orm/VirtualColumn.mjs +17 -95
- package/src/dto/PaginationResultDTO.cjs +9 -39
- package/src/dto/PaginationResultDTO.mjs +18 -48
- package/src/dto/PaginationSearchDTO.cjs +9 -39
- package/src/dto/PaginationSearchDTO.mjs +13 -43
- package/src/exceptions/DestroyRuntimeContainerException.cjs +4 -6
- package/src/exceptions/DestroyRuntimeContainerException.mjs +4 -6
- package/src/exceptions/InvalidActionPatternDepthException.cjs +4 -6
- package/src/exceptions/InvalidActionPatternDepthException.mjs +4 -6
- package/src/exceptions/InvalidAssistantFunctionTypeException.cjs +4 -6
- package/src/exceptions/InvalidAssistantFunctionTypeException.mjs +4 -6
- package/src/exceptions/InvalidObjectTypeException.cjs +4 -6
- package/src/exceptions/InvalidObjectTypeException.mjs +4 -6
- package/src/exceptions/MethodNotFoundException.cjs +4 -6
- package/src/exceptions/MethodNotFoundException.mjs +4 -6
- package/src/exceptions/alias/AliasExistsException.cjs +4 -6
- package/src/exceptions/alias/AliasExistsException.mjs +6 -8
- package/src/exceptions/alias/AliasNotFoundException.cjs +4 -6
- package/src/exceptions/alias/AliasNotFoundException.mjs +4 -6
- package/src/exceptions/alias/InvalidAliasNameException.cjs +4 -6
- package/src/exceptions/alias/InvalidAliasNameException.mjs +4 -6
- package/src/exceptions/di/DependencyInjectionException.cjs +4 -6
- package/src/exceptions/di/DependencyInjectionException.mjs +4 -6
- package/src/exceptions/di/LifetimeLockedException.cjs +4 -6
- package/src/exceptions/di/LifetimeLockedException.mjs +4 -6
- package/src/exceptions/di/OverridableObjectTargetConfigNotFoundException.cjs +4 -6
- package/src/exceptions/di/OverridableObjectTargetConfigNotFoundException.mjs +4 -6
- package/src/exceptions/dto/InvalidMethodAcceptException.cjs +4 -6
- package/src/exceptions/dto/InvalidMethodAcceptException.mjs +4 -6
- package/src/exceptions/dto/InvalidMethodReturnException.cjs +4 -6
- package/src/exceptions/dto/InvalidMethodReturnException.mjs +4 -6
- package/src/exceptions/dto/InvalidValueException.cjs +4 -6
- package/src/exceptions/dto/InvalidValueException.mjs +4 -6
- package/src/interfaces/IBaseObjectConstructor.cjs +1 -1
- package/src/interfaces/IBaseObjectConstructor.mjs +1 -1
- package/src/interfaces/IConstructor.cjs +1 -1
- package/src/interfaces/IConstructor.mjs +1 -1
- package/src/interfaces/IPatRun.cjs +1 -1
- package/src/interfaces/IPatRun.mjs +1 -1
- package/src/lib/base/BaseObject.cjs +51 -259
- package/src/lib/base/BaseObject.mjs +41 -256
- package/src/lib/base/Context.cjs +11 -41
- package/src/lib/base/Context.mjs +23 -53
- package/src/lib/base/EventEmitter.cjs +1398 -47
- package/src/lib/base/EventEmitter.mjs +1397 -46
- package/src/lib/base/abstracts/Exception.cjs +12 -14
- package/src/lib/base/abstracts/Exception.mjs +4 -6
- package/src/lib/base/async-constructor/Append.cjs +1 -1
- package/src/lib/base/async-constructor/Append.mjs +1 -1
- package/src/lib/base/async-constructor/AsyncConstructor.cjs +1 -1
- package/src/lib/base/async-constructor/AsyncConstructor.mjs +1 -1
- package/src/lib/base/internal/ActionOptions.cjs +9 -39
- package/src/lib/base/internal/ActionOptions.mjs +9 -39
- package/src/lib/base/internal/ApplicationConfigLoader.cjs +54 -116
- package/src/lib/base/internal/ApplicationConfigLoader.mjs +54 -116
- package/src/lib/base/internal/BasicInfo.cjs +13 -15
- package/src/lib/base/internal/BasicInfo.mjs +15 -17
- package/src/lib/base/internal/CamelCase.cjs +1 -1
- package/src/lib/base/internal/CamelCase.mjs +1 -1
- package/src/lib/base/internal/ConfigurableRecordsInjection.cjs +3 -3
- package/src/lib/base/internal/ConfigurableRecordsInjection.mjs +3 -3
- package/src/lib/base/internal/ConstructorSymbol.cjs +3 -3
- package/src/lib/base/internal/ConstructorSymbol.mjs +3 -3
- package/src/lib/base/internal/ControllerEntrypoint.cjs +16 -24
- package/src/lib/base/internal/ControllerEntrypoint.mjs +39 -47
- package/src/lib/base/internal/DataValidator.cjs +203 -27
- package/src/lib/base/internal/DataValidator.mjs +203 -27
- package/src/lib/base/internal/DatabaseSymbol.cjs +1 -1
- package/src/lib/base/internal/DatabaseSymbol.mjs +1 -1
- package/src/lib/base/internal/FlexibleDTO.cjs +11 -41
- package/src/lib/base/internal/FlexibleDTO.mjs +13 -43
- package/src/lib/base/internal/GetActionDTOAndOptions.cjs +21 -51
- package/src/lib/base/internal/GetActionDTOAndOptions.mjs +23 -53
- package/src/lib/base/internal/IEEE754.cjs +1 -1
- package/src/lib/base/internal/IEEE754.mjs +1 -1
- package/src/lib/base/internal/MethodAssistantFunction.cjs +15 -17
- package/src/lib/base/internal/MethodAssistantFunction.mjs +8 -10
- package/src/lib/base/internal/MethodValidation.cjs +55 -85
- package/src/lib/base/internal/MethodValidation.mjs +42 -72
- package/src/lib/base/internal/ModuleConfigLoader.cjs +81 -143
- package/src/lib/base/internal/ModuleConfigLoader.mjs +76 -138
- package/src/lib/base/internal/ObjectConfiguration.cjs +26 -56
- package/src/lib/base/internal/ObjectConfiguration.mjs +25 -55
- package/src/lib/base/internal/ObjectContainer.cjs +3 -3
- package/src/lib/base/internal/ObjectContainer.mjs +3 -3
- package/src/lib/base/internal/ObjectInjection.cjs +3 -3
- package/src/lib/base/internal/ObjectInjection.mjs +3 -3
- package/src/lib/base/internal/ObjectLifetime.cjs +5 -7
- package/src/lib/base/internal/ObjectLifetime.mjs +12 -14
- package/src/lib/base/internal/ObjectSchemaValidation.cjs +23 -121
- package/src/lib/base/internal/ObjectSchemaValidation.mjs +14 -114
- package/src/lib/base/internal/ObjectType.cjs +27 -119
- package/src/lib/base/internal/ObjectType.mjs +20 -119
- package/src/lib/base/internal/ObjectWeakRefs.cjs +1 -1
- package/src/lib/base/internal/ObjectWeakRefs.mjs +1 -1
- package/src/lib/base/internal/PatternManager.cjs +831 -7
- package/src/lib/base/internal/PatternManager.mjs +835 -11
- package/src/lib/base/internal/StringifyPattern.cjs +5 -9
- package/src/lib/base/internal/StringifyPattern.mjs +5 -9
- package/src/lib/base/internal/ThrowWarning.cjs +1 -1
- package/src/lib/base/internal/ThrowWarning.mjs +1 -1
- package/src/lib/context/CLIContext.cjs +12 -42
- package/src/lib/context/CLIContext.mjs +15 -45
- package/src/lib/context/HTTPContext.cjs +15 -45
- package/src/lib/context/HTTPContext.mjs +14 -44
- package/src/lib/context/ServiceContext.cjs +12 -42
- package/src/lib/context/ServiceContext.mjs +18 -48
- package/src/lib/core/Alias.cjs +46 -48
- package/src/lib/core/Alias.mjs +24 -26
- package/src/lib/core/Application.cjs +486 -351
- package/src/lib/core/Application.mjs +531 -400
- package/src/lib/core/Component.cjs +24 -88
- package/src/lib/core/Component.mjs +28 -92
- package/src/lib/core/Container.cjs +50 -326
- package/src/lib/core/Container.mjs +45 -323
- package/src/lib/core/DTO.cjs +16 -194
- package/src/lib/core/DTO.mjs +12 -197
- package/src/lib/core/Module.cjs +39 -107
- package/src/lib/core/Module.mjs +53 -121
- package/src/lib/core/Provider.cjs +19 -81
- package/src/lib/core/Provider.mjs +25 -87
- package/src/lib/core/Time.cjs +52 -45
- package/src/lib/core/Time.mjs +52 -45
- package/src/lib/helpers/ArrayToSet.cjs +1 -1
- package/src/lib/helpers/ArrayToSet.mjs +1 -1
- package/src/lib/helpers/As.cjs +1 -1
- package/src/lib/helpers/As.mjs +1 -1
- package/src/lib/helpers/ConvertArrayLikeToIterable.cjs +1 -1
- package/src/lib/helpers/ConvertArrayLikeToIterable.mjs +1 -1
- package/src/lib/helpers/ConvertArrayLikeToStream.cjs +1 -1
- package/src/lib/helpers/ConvertArrayLikeToStream.mjs +1 -1
- package/src/lib/helpers/Delay.cjs +1 -1
- package/src/lib/helpers/Delay.mjs +1 -1
- package/src/lib/helpers/DevNull.cjs +1 -1
- package/src/lib/helpers/DevNull.mjs +1 -1
- package/src/lib/helpers/GetObjectNestingDepth.cjs +1 -1
- package/src/lib/helpers/GetObjectNestingDepth.mjs +1 -1
- package/src/lib/helpers/GetObjectPropertyPaths.cjs +1 -1
- package/src/lib/helpers/GetObjectPropertyPaths.mjs +1 -1
- package/src/lib/helpers/Glob.cjs +5502 -17
- package/src/lib/helpers/Glob.mjs +5472 -17
- package/src/lib/helpers/GraceExit.cjs +1 -1
- package/src/lib/helpers/GraceExit.mjs +1 -1
- package/src/lib/helpers/HexToIEEE754.cjs +1 -1
- package/src/lib/helpers/HexToIEEE754.mjs +1 -1
- package/src/lib/helpers/HexToSigned.cjs +1 -1
- package/src/lib/helpers/HexToSigned.mjs +1 -1
- package/src/lib/helpers/HexToUnsigned.cjs +1 -1
- package/src/lib/helpers/HexToUnsigned.mjs +1 -1
- package/src/lib/helpers/IEEE754ToHex.cjs +1 -1
- package/src/lib/helpers/IEEE754ToHex.mjs +1 -1
- package/src/lib/helpers/IPToolkit.cjs +1 -1
- package/src/lib/helpers/IPToolkit.mjs +1 -1
- package/src/lib/helpers/IsAbortError.cjs +1 -1
- package/src/lib/helpers/IsAbortError.mjs +1 -1
- package/src/lib/helpers/IsEmptyObject.cjs +1 -1
- package/src/lib/helpers/IsEmptyObject.mjs +1 -1
- package/src/lib/helpers/IsExists.cjs +1 -1
- package/src/lib/helpers/IsExists.mjs +1 -1
- package/src/lib/helpers/IsGlobString.cjs +4 -10
- package/src/lib/helpers/IsGlobString.mjs +3 -11
- package/src/lib/helpers/IsHtml.cjs +5 -5
- package/src/lib/helpers/IsHtml.mjs +6 -6
- package/src/lib/helpers/IsNativeFunction.cjs +1 -1
- package/src/lib/helpers/IsNativeFunction.mjs +1 -1
- package/src/lib/helpers/IsPath.cjs +1 -1
- package/src/lib/helpers/IsPath.mjs +1 -1
- package/src/lib/helpers/IsPromise.cjs +1 -1
- package/src/lib/helpers/IsPromise.mjs +1 -1
- package/src/lib/helpers/IsPromiseLike.cjs +1 -1
- package/src/lib/helpers/IsPromiseLike.mjs +1 -1
- package/src/lib/helpers/IsSymbol.cjs +10 -44
- package/src/lib/helpers/IsSymbol.mjs +9 -45
- package/src/lib/helpers/IsXML.cjs +1711 -6
- package/src/lib/helpers/IsXML.mjs +1712 -7
- package/src/lib/helpers/MD5.cjs +4 -4
- package/src/lib/helpers/MD5.mjs +4 -4
- package/src/lib/helpers/MergeArray.cjs +1 -1
- package/src/lib/helpers/MergeArray.mjs +1 -1
- package/src/lib/helpers/MergeMap.cjs +1 -1
- package/src/lib/helpers/MergeMap.mjs +1 -1
- package/src/lib/helpers/MergeSet.cjs +1 -1
- package/src/lib/helpers/MergeSet.mjs +1 -1
- package/src/lib/helpers/NoCase.cjs +1 -1
- package/src/lib/helpers/NoCase.mjs +1 -1
- package/src/lib/helpers/NonceStr.cjs +2 -6
- package/src/lib/helpers/NonceStr.mjs +4 -8
- package/src/lib/helpers/ObjectConstructor.cjs +1 -1
- package/src/lib/helpers/ObjectConstructor.mjs +1 -1
- package/src/lib/helpers/ObjectHash.cjs +405 -7
- package/src/lib/helpers/ObjectHash.mjs +399 -7
- package/src/lib/helpers/ObjectParentConstructor.cjs +1 -1
- package/src/lib/helpers/ObjectParentConstructor.mjs +1 -1
- package/src/lib/helpers/ObjectParentConstructors.cjs +1 -1
- package/src/lib/helpers/ObjectParentConstructors.mjs +1 -1
- package/src/lib/helpers/ObjectPath.cjs +1 -1
- package/src/lib/helpers/ObjectPath.mjs +1 -1
- package/src/lib/helpers/ObjectPrototype.cjs +1 -1
- package/src/lib/helpers/ObjectPrototype.mjs +1 -1
- package/src/lib/helpers/ObjectToMap.cjs +1 -1
- package/src/lib/helpers/ObjectToMap.mjs +1 -1
- package/src/lib/helpers/Paginator.cjs +1 -1
- package/src/lib/helpers/Paginator.mjs +1 -1
- package/src/lib/helpers/RandomString.cjs +172 -11
- package/src/lib/helpers/RandomString.mjs +166 -11
- package/src/lib/helpers/SHA1.cjs +4 -4
- package/src/lib/helpers/SHA1.mjs +4 -4
- package/src/lib/helpers/SHA256.cjs +4 -4
- package/src/lib/helpers/SHA256.mjs +4 -4
- package/src/lib/helpers/SetToArray.cjs +1 -1
- package/src/lib/helpers/SetToArray.mjs +1 -1
- package/src/lib/helpers/SignedToHex.cjs +1 -1
- package/src/lib/helpers/SignedToHex.mjs +1 -1
- package/src/lib/helpers/SortArray.cjs +2 -6
- package/src/lib/helpers/SortArray.mjs +7 -11
- package/src/lib/helpers/SortKeys.cjs +1 -1
- package/src/lib/helpers/SortKeys.mjs +1 -1
- package/src/lib/helpers/SortObject.cjs +1 -1
- package/src/lib/helpers/SortObject.mjs +1 -1
- package/src/lib/helpers/Statistics.cjs +2 -2
- package/src/lib/helpers/Statistics.mjs +2 -2
- package/src/lib/helpers/Templating.cjs +1 -1
- package/src/lib/helpers/Templating.mjs +1 -1
- package/src/lib/helpers/URLBuilder.cjs +417 -38
- package/src/lib/helpers/URLBuilder.mjs +417 -38
- package/src/lib/helpers/UUID.cjs +340 -22
- package/src/lib/helpers/UUID.mjs +340 -22
- package/src/lib/helpers/UniqueArray.cjs +1 -1
- package/src/lib/helpers/UniqueArray.mjs +1 -1
- package/src/lib/helpers/UnsignedToHex.cjs +1 -1
- package/src/lib/helpers/UnsignedToHex.mjs +1 -1
- package/src/lib/ioc/DependencyInjectionContainer.cjs +145 -197
- package/src/lib/ioc/DependencyInjectionContainer.mjs +102 -154
- package/src/lib/ioc/Errors.cjs +27 -57
- package/src/lib/ioc/Errors.mjs +25 -55
- package/src/lib/ioc/FunctionTokenizer.cjs +1 -1
- package/src/lib/ioc/FunctionTokenizer.mjs +1 -1
- package/src/lib/ioc/InjectionMode.cjs +1 -1
- package/src/lib/ioc/InjectionMode.mjs +1 -1
- package/src/lib/ioc/Lifetime.cjs +1 -1
- package/src/lib/ioc/Lifetime.mjs +1 -1
- package/src/lib/ioc/ListModules.cjs +5811 -99
- package/src/lib/ioc/ListModules.mjs +5779 -79
- package/src/lib/ioc/LoadModules.cjs +63 -93
- package/src/lib/ioc/LoadModules.mjs +65 -95
- package/src/lib/ioc/ParamParser.cjs +1 -1
- package/src/lib/ioc/ParamParser.mjs +1 -1
- package/src/lib/ioc/Resolvers.cjs +42 -72
- package/src/lib/ioc/Resolvers.mjs +44 -74
- package/src/lib/ioc/Utils.cjs +28 -58
- package/src/lib/ioc/Utils.mjs +34 -64
- package/src/lib/validation/VLD.cjs +11342 -98
- package/src/lib/validation/VLD.mjs +11298 -80
- package/src/lib/validation/interfaces/AlternativesSchema.cjs +1 -1
- package/src/lib/validation/interfaces/AlternativesSchema.mjs +1 -1
- package/src/lib/validation/interfaces/AnySchema.cjs +1 -1
- package/src/lib/validation/interfaces/AnySchema.mjs +1 -1
- package/src/lib/validation/interfaces/ArraySchema.cjs +1 -1
- package/src/lib/validation/interfaces/ArraySchema.mjs +1 -1
- package/src/lib/validation/interfaces/Base64Options.cjs +1 -1
- package/src/lib/validation/interfaces/Base64Options.mjs +1 -1
- package/src/lib/validation/interfaces/BaseValidationOptions.cjs +1 -1
- package/src/lib/validation/interfaces/BaseValidationOptions.mjs +1 -1
- package/src/lib/validation/interfaces/BigIntSchema.cjs +1 -1
- package/src/lib/validation/interfaces/BigIntSchema.mjs +1 -1
- package/src/lib/validation/interfaces/BinarySchema.cjs +1 -1
- package/src/lib/validation/interfaces/BinarySchema.mjs +1 -1
- package/src/lib/validation/interfaces/BooleanSchema.cjs +1 -1
- package/src/lib/validation/interfaces/BooleanSchema.mjs +1 -1
- package/src/lib/validation/interfaces/CustomHelpers.cjs +1 -1
- package/src/lib/validation/interfaces/CustomHelpers.mjs +1 -1
- package/src/lib/validation/interfaces/DataUriOptions.cjs +1 -1
- package/src/lib/validation/interfaces/DataUriOptions.mjs +1 -1
- package/src/lib/validation/interfaces/DateSchema.cjs +1 -1
- package/src/lib/validation/interfaces/DateSchema.mjs +1 -1
- package/src/lib/validation/interfaces/DependencyOptions.cjs +1 -1
- package/src/lib/validation/interfaces/DependencyOptions.mjs +1 -1
- package/src/lib/validation/interfaces/DomainOptions.cjs +1 -1
- package/src/lib/validation/interfaces/DomainOptions.mjs +1 -1
- package/src/lib/validation/interfaces/EmailOptions.cjs +1 -1
- package/src/lib/validation/interfaces/EmailOptions.mjs +1 -1
- package/src/lib/validation/interfaces/ErrorFormattingOptions.cjs +1 -1
- package/src/lib/validation/interfaces/ErrorFormattingOptions.mjs +1 -1
- package/src/lib/validation/interfaces/ErrorReport.cjs +1 -1
- package/src/lib/validation/interfaces/ErrorReport.mjs +1 -1
- package/src/lib/validation/interfaces/ErrorValidationOptions.cjs +1 -1
- package/src/lib/validation/interfaces/ErrorValidationOptions.mjs +1 -1
- package/src/lib/validation/interfaces/ExtensionFlag.cjs +1 -1
- package/src/lib/validation/interfaces/ExtensionFlag.mjs +1 -1
- package/src/lib/validation/interfaces/ExternalHelpers.cjs +1 -1
- package/src/lib/validation/interfaces/ExternalHelpers.mjs +1 -1
- package/src/lib/validation/interfaces/FunctionSchema.cjs +1 -1
- package/src/lib/validation/interfaces/FunctionSchema.mjs +1 -1
- package/src/lib/validation/interfaces/GuidOptions.cjs +1 -1
- package/src/lib/validation/interfaces/GuidOptions.mjs +1 -1
- package/src/lib/validation/interfaces/HexOptions.cjs +1 -1
- package/src/lib/validation/interfaces/HexOptions.mjs +1 -1
- package/src/lib/validation/interfaces/HierarchySeparatorOptions.cjs +1 -1
- package/src/lib/validation/interfaces/HierarchySeparatorOptions.mjs +1 -1
- package/src/lib/validation/interfaces/IpOptions.cjs +1 -1
- package/src/lib/validation/interfaces/IpOptions.mjs +1 -1
- package/src/lib/validation/interfaces/LanguageMessageTemplate.cjs +1 -1
- package/src/lib/validation/interfaces/LanguageMessageTemplate.mjs +1 -1
- package/src/lib/validation/interfaces/LinkSchema.cjs +1 -1
- package/src/lib/validation/interfaces/LinkSchema.mjs +1 -1
- package/src/lib/validation/interfaces/NumberSchema.cjs +1 -1
- package/src/lib/validation/interfaces/NumberSchema.mjs +1 -1
- package/src/lib/validation/interfaces/ObjectPatternOptions.cjs +1 -1
- package/src/lib/validation/interfaces/ObjectPatternOptions.mjs +1 -1
- package/src/lib/validation/interfaces/ObjectSchema.cjs +1 -1
- package/src/lib/validation/interfaces/ObjectSchema.mjs +1 -1
- package/src/lib/validation/interfaces/Reference.cjs +1 -1
- package/src/lib/validation/interfaces/Reference.mjs +1 -1
- package/src/lib/validation/interfaces/ReferenceOptions.cjs +1 -1
- package/src/lib/validation/interfaces/ReferenceOptions.mjs +1 -1
- package/src/lib/validation/interfaces/RenameOptions.cjs +1 -1
- package/src/lib/validation/interfaces/RenameOptions.mjs +1 -1
- package/src/lib/validation/interfaces/State.cjs +1 -1
- package/src/lib/validation/interfaces/State.mjs +1 -1
- package/src/lib/validation/interfaces/StringRegexOptions.cjs +1 -1
- package/src/lib/validation/interfaces/StringRegexOptions.mjs +1 -1
- package/src/lib/validation/interfaces/StringSchema.cjs +1 -1
- package/src/lib/validation/interfaces/StringSchema.mjs +1 -1
- package/src/lib/validation/interfaces/SwitchCases.cjs +1 -1
- package/src/lib/validation/interfaces/SwitchCases.mjs +1 -1
- package/src/lib/validation/interfaces/SwitchDefault.cjs +1 -1
- package/src/lib/validation/interfaces/SwitchDefault.mjs +1 -1
- package/src/lib/validation/interfaces/SymbolSchema.cjs +1 -1
- package/src/lib/validation/interfaces/SymbolSchema.mjs +1 -1
- package/src/lib/validation/interfaces/TopLevelDomainOptions.cjs +1 -1
- package/src/lib/validation/interfaces/TopLevelDomainOptions.mjs +1 -1
- package/src/lib/validation/interfaces/UriOptions.cjs +1 -1
- package/src/lib/validation/interfaces/UriOptions.mjs +1 -1
- package/src/lib/validation/interfaces/ValidationOptions.cjs +1 -1
- package/src/lib/validation/interfaces/ValidationOptions.mjs +1 -1
- package/src/lib/validation/interfaces/WhenOptions.cjs +1 -1
- package/src/lib/validation/interfaces/WhenOptions.mjs +1 -1
- package/src/lib/validation/interfaces/WhenSchemaOptions.cjs +1 -1
- package/src/lib/validation/interfaces/WhenSchemaOptions.mjs +1 -1
- package/src/lib/validation/types/CustomValidator.cjs +1 -1
- package/src/lib/validation/types/CustomValidator.mjs +1 -1
- package/src/lib/validation/types/ExtensionBoundSchema.cjs +1 -1
- package/src/lib/validation/types/ExtensionBoundSchema.mjs +1 -1
- package/src/lib/validation/types/ExternalValidationFunction.cjs +1 -1
- package/src/lib/validation/types/ExternalValidationFunction.mjs +1 -1
- package/src/lib/validation/types/IsNonPrimitiveSubsetUnion.cjs +1 -1
- package/src/lib/validation/types/IsNonPrimitiveSubsetUnion.mjs +1 -1
- package/src/lib/validation/types/IsPrimitiveSubset.cjs +1 -1
- package/src/lib/validation/types/IsPrimitiveSubset.mjs +1 -1
- package/src/lib/validation/types/IsUnion.cjs +1 -1
- package/src/lib/validation/types/IsUnion.mjs +1 -1
- package/src/lib/validation/types/LanguageMessages.cjs +1 -1
- package/src/lib/validation/types/LanguageMessages.mjs +1 -1
- package/src/lib/validation/types/NoNestedArrays.cjs +1 -1
- package/src/lib/validation/types/NoNestedArrays.mjs +1 -1
- package/src/lib/validation/types/NullableType.cjs +1 -1
- package/src/lib/validation/types/NullableType.mjs +1 -1
- package/src/lib/validation/types/ObjectPropertiesSchema.cjs +1 -1
- package/src/lib/validation/types/ObjectPropertiesSchema.mjs +1 -1
- package/src/lib/validation/types/PartialSchemaMap.cjs +1 -1
- package/src/lib/validation/types/PartialSchemaMap.mjs +1 -1
- package/src/lib/validation/types/PresenceMode.cjs +1 -1
- package/src/lib/validation/types/PresenceMode.mjs +1 -1
- package/src/lib/validation/types/Primitives.cjs +1 -1
- package/src/lib/validation/types/Primitives.mjs +1 -1
- package/src/lib/validation/types/Schema.cjs +1 -1
- package/src/lib/validation/types/Schema.mjs +1 -1
- package/src/lib/validation/types/SchemaFunction.cjs +1 -1
- package/src/lib/validation/types/SchemaFunction.mjs +1 -1
- package/src/lib/validation/types/SchemaLike.cjs +1 -1
- package/src/lib/validation/types/SchemaLike.mjs +1 -1
- package/src/lib/validation/types/SchemaLikeWithoutArray.cjs +1 -1
- package/src/lib/validation/types/SchemaLikeWithoutArray.mjs +1 -1
- package/src/lib/validation/types/SchemaMap.cjs +1 -1
- package/src/lib/validation/types/SchemaMap.mjs +1 -1
- package/src/lib/validation/types/StrictSchemaMap.cjs +1 -1
- package/src/lib/validation/types/StrictSchemaMap.mjs +1 -1
- package/src/lib/validation/types/Types.cjs +1 -1
- package/src/lib/validation/types/Types.mjs +1 -1
- package/src/lib/validation/types/UnwrapSchemaLikeWithoutArray.cjs +1 -1
- package/src/lib/validation/types/UnwrapSchemaLikeWithoutArray.mjs +1 -1
- package/src/options/ApplicationOptions.cjs +22 -84
- package/src/options/ApplicationOptions.mjs +25 -87
- package/src/options/LoadAnonymousObjectOptions.cjs +20 -82
- package/src/options/LoadAnonymousObjectOptions.mjs +22 -84
- package/src/options/LoadNamedObjectOptions.cjs +20 -82
- package/src/options/LoadNamedObjectOptions.mjs +22 -84
- package/src/options/LoadObjectOptions.cjs +23 -96
- package/src/options/LoadObjectOptions.mjs +18 -98
- package/src/options/ModuleLoadObjectsOptions.cjs +20 -82
- package/src/options/ModuleLoadObjectsOptions.mjs +20 -82
- package/src/options/ModuleOptions.cjs +26 -88
- package/src/options/ModuleOptions.mjs +25 -87
- package/src/options/OverridableNamedObjectOptions.cjs +20 -82
- package/src/options/OverridableNamedObjectOptions.mjs +23 -85
- package/src/options/OverridableObjectOptions.cjs +20 -82
- package/src/options/OverridableObjectOptions.mjs +22 -84
- package/src/providers/Database.cjs +41 -181
- package/src/providers/Database.mjs +74 -214
- package/src/providers/PasswordHash.cjs +541 -89
- package/src/providers/PasswordHash.mjs +535 -89
- package/src/providers/migration/GenerateMigration.cjs +37 -389
- package/src/providers/migration/GenerateMigration.mjs +33 -386
- package/src/types/ActionPattern.cjs +1 -1
- package/src/types/ActionPattern.mjs +1 -1
- package/src/types/ClassDecorator.cjs +1 -1
- package/src/types/ClassDecorator.mjs +1 -1
- package/src/types/ComponentOptions.cjs +1 -1
- package/src/types/ComponentOptions.mjs +1 -1
- package/src/types/JSONSchema.cjs +1 -1
- package/src/types/JSONSchema.mjs +1 -1
- package/src/types/MethodDecorator.cjs +1 -1
- package/src/types/MethodDecorator.mjs +1 -1
- package/src/types/ModuleOptions.cjs +1 -1
- package/src/types/ModuleOptions.mjs +1 -1
- package/src/types/ObjectOptions.cjs +1 -1
- package/src/types/ObjectOptions.mjs +1 -1
- package/src/types/ParameterDecorator.cjs +1 -1
- package/src/types/ParameterDecorator.mjs +1 -1
- package/src/types/PropertyDecorator.cjs +1 -1
- package/src/types/PropertyDecorator.mjs +1 -1
- package/src/types/ProviderOptions.cjs +1 -1
- package/src/types/ProviderOptions.mjs +1 -1
- package/vendor/Package.internal.1.cjs +938 -206
- package/vendor/Package.internal.1.mjs +938 -202
- package/vendor/Package.internal.10.cjs +17 -227
- package/vendor/Package.internal.10.mjs +18 -226
- package/vendor/Package.internal.11.cjs +15 -1608
- package/vendor/Package.internal.11.mjs +16 -1579
- package/vendor/Package.internal.12.cjs +13 -12547
- package/vendor/Package.internal.12.mjs +14 -12530
- package/vendor/Package.internal.13.cjs +22 -357
- package/vendor/Package.internal.13.mjs +23 -358
- package/vendor/Package.internal.14.cjs +17 -786
- package/vendor/Package.internal.14.mjs +18 -787
- package/vendor/Package.internal.15.cjs +18 -72
- package/vendor/Package.internal.15.mjs +19 -71
- package/vendor/Package.internal.16.cjs +13 -977
- package/vendor/Package.internal.16.mjs +14 -966
- package/vendor/Package.internal.17.cjs +19 -43
- package/vendor/Package.internal.17.mjs +20 -44
- package/vendor/Package.internal.18.cjs +16 -262
- package/vendor/Package.internal.18.mjs +17 -263
- package/vendor/Package.internal.19.cjs +16 -428
- package/vendor/Package.internal.19.mjs +17 -429
- package/vendor/Package.internal.2.cjs +29 -86
- package/vendor/Package.internal.2.mjs +30 -83
- package/vendor/Package.internal.20.cjs +18 -556
- package/vendor/Package.internal.20.mjs +19 -551
- package/vendor/Package.internal.21.cjs +19 -400
- package/vendor/Package.internal.21.mjs +20 -401
- package/vendor/Package.internal.22.cjs +56 -913
- package/vendor/Package.internal.22.mjs +57 -908
- package/vendor/Package.internal.23.cjs +15 -218
- package/vendor/Package.internal.23.mjs +17 -220
- package/vendor/Package.internal.24.cjs +16 -990
- package/vendor/Package.internal.24.mjs +17 -991
- package/vendor/Package.internal.25.cjs +32 -9
- package/vendor/Package.internal.25.mjs +33 -8
- package/vendor/Package.internal.26.cjs +15 -121
- package/vendor/Package.internal.26.mjs +16 -120
- package/vendor/Package.internal.27.cjs +18 -139
- package/vendor/Package.internal.27.mjs +19 -138
- package/vendor/Package.internal.28.cjs +21 -5
- package/vendor/Package.internal.28.mjs +22 -4
- package/vendor/Package.internal.29.cjs +36 -19
- package/vendor/Package.internal.29.mjs +37 -18
- package/vendor/Package.internal.3.cjs +532 -14232
- package/vendor/Package.internal.3.mjs +529 -14211
- package/vendor/Package.internal.30.cjs +22 -474
- package/vendor/Package.internal.30.mjs +23 -469
- package/vendor/Package.internal.31.cjs +21 -74
- package/vendor/Package.internal.31.mjs +24 -71
- package/vendor/Package.internal.310.cjs +10 -0
- package/vendor/Package.internal.310.mjs +8 -0
- package/vendor/Package.internal.32.cjs +40 -2
- package/vendor/Package.internal.32.mjs +42 -2
- package/vendor/Package.internal.33.cjs +34 -35
- package/vendor/Package.internal.33.mjs +35 -34
- package/vendor/Package.internal.34.cjs +20 -21
- package/vendor/Package.internal.34.mjs +21 -20
- package/vendor/Package.internal.35.cjs +29 -10
- package/vendor/Package.internal.35.mjs +30 -9
- package/vendor/Package.internal.36.cjs +39 -188
- package/vendor/Package.internal.36.mjs +42 -191
- package/vendor/Package.internal.37.cjs +43 -59
- package/vendor/Package.internal.37.mjs +46 -60
- package/vendor/Package.internal.38.cjs +43 -158
- package/vendor/Package.internal.38.mjs +44 -159
- package/vendor/Package.internal.39.cjs +19 -2070
- package/vendor/Package.internal.39.mjs +20 -2065
- package/vendor/Package.internal.4.cjs +463 -961
- package/vendor/Package.internal.4.mjs +444 -960
- package/vendor/Package.internal.40.cjs +16 -512
- package/vendor/Package.internal.40.mjs +17 -505
- package/vendor/Package.internal.41.cjs +15 -412
- package/vendor/Package.internal.41.mjs +16 -407
- package/vendor/Package.internal.42.cjs +21 -2356
- package/vendor/Package.internal.42.mjs +22 -2345
- package/vendor/Package.internal.43.cjs +17 -56
- package/vendor/Package.internal.43.mjs +18 -63
- package/vendor/Package.internal.44.cjs +25 -146
- package/vendor/Package.internal.44.mjs +26 -145
- package/vendor/Package.internal.45.cjs +31 -626
- package/vendor/Package.internal.45.mjs +33 -628
- package/vendor/Package.internal.46.cjs +16 -238
- package/vendor/Package.internal.46.mjs +17 -239
- package/vendor/Package.internal.47.cjs +16 -220
- package/vendor/Package.internal.47.mjs +17 -215
- package/vendor/Package.internal.48.cjs +23 -2
- package/vendor/Package.internal.48.mjs +25 -2
- package/vendor/Package.internal.49.cjs +24 -355
- package/vendor/Package.internal.49.mjs +27 -352
- package/vendor/Package.internal.5.cjs +4275 -340
- package/vendor/Package.internal.5.mjs +4274 -341
- package/vendor/Package.internal.50.cjs +30 -30
- package/vendor/Package.internal.50.mjs +32 -30
- package/vendor/Package.internal.51.cjs +48322 -38
- package/vendor/Package.internal.51.mjs +48282 -38
- package/vendor/Package.internal.510.cjs +154 -0
- package/vendor/Package.internal.510.mjs +142 -0
- package/vendor/Package.internal.511.cjs +168 -0
- package/vendor/Package.internal.511.mjs +156 -0
- package/vendor/Package.internal.512.cjs +6 -0
- package/vendor/Package.internal.512.mjs +6 -0
- package/vendor/Package.internal.513.cjs +192 -0
- package/vendor/Package.internal.513.mjs +180 -0
- package/vendor/Package.internal.52.cjs +676 -16
- package/vendor/Package.internal.52.mjs +672 -16
- package/vendor/{Package.internal.180.cjs → Package.internal.522.cjs} +1 -1
- package/vendor/{Package.internal.180.mjs → Package.internal.522.mjs} +2 -2
- package/vendor/Package.internal.53.cjs +7094 -63
- package/vendor/Package.internal.53.mjs +7067 -60
- package/vendor/Package.internal.54.cjs +183 -77
- package/vendor/Package.internal.54.mjs +184 -78
- package/vendor/Package.internal.542.cjs +171 -0
- package/vendor/Package.internal.542.mjs +153 -0
- package/vendor/Package.internal.55.cjs +3982 -56
- package/vendor/Package.internal.55.mjs +3995 -47
- package/vendor/Package.internal.552.cjs +49615 -0
- package/vendor/Package.internal.552.mjs +49572 -0
- package/vendor/Package.internal.56.cjs +838 -20
- package/vendor/Package.internal.56.mjs +839 -19
- package/vendor/Package.internal.57.cjs +14762 -322
- package/vendor/Package.internal.57.mjs +14740 -325
- package/vendor/Package.internal.58.cjs +136 -2
- package/vendor/Package.internal.58.mjs +126 -2
- package/vendor/Package.internal.59.cjs +323 -188
- package/vendor/Package.internal.59.mjs +319 -188
- package/vendor/Package.internal.6.cjs +4 -6109
- package/vendor/Package.internal.6.mjs +4 -6103
- package/vendor/Package.internal.7.cjs +6543 -494
- package/vendor/Package.internal.7.mjs +6531 -494
- package/vendor/Package.internal.8.cjs +152 -33
- package/vendor/Package.internal.8.mjs +152 -31
- package/vendor/Package.internal.9.cjs +16 -2160
- package/vendor/Package.internal.9.mjs +17 -2133
- package/vendor/TypeDef.internal.96.d.ts +28 -22
- package/vendor/Package.internal.100.cjs +0 -69
- package/vendor/Package.internal.100.mjs +0 -67
- package/vendor/Package.internal.101.cjs +0 -123
- package/vendor/Package.internal.101.mjs +0 -121
- package/vendor/Package.internal.102.cjs +0 -16
- package/vendor/Package.internal.102.mjs +0 -8
- package/vendor/Package.internal.103.cjs +0 -4
- package/vendor/Package.internal.103.mjs +0 -2
- package/vendor/Package.internal.104.cjs +0 -4
- package/vendor/Package.internal.104.mjs +0 -2
- package/vendor/Package.internal.105.cjs +0 -112
- package/vendor/Package.internal.105.mjs +0 -98
- package/vendor/Package.internal.106.cjs +0 -88
- package/vendor/Package.internal.106.mjs +0 -84
- package/vendor/Package.internal.107.cjs +0 -58
- package/vendor/Package.internal.107.mjs +0 -52
- package/vendor/Package.internal.108.cjs +0 -20
- package/vendor/Package.internal.108.mjs +0 -18
- package/vendor/Package.internal.109.cjs +0 -96
- package/vendor/Package.internal.109.mjs +0 -96
- package/vendor/Package.internal.110.cjs +0 -113
- package/vendor/Package.internal.110.mjs +0 -113
- package/vendor/Package.internal.111.cjs +0 -2176
- package/vendor/Package.internal.111.mjs +0 -2174
- package/vendor/Package.internal.112.cjs +0 -2466
- package/vendor/Package.internal.112.mjs +0 -2434
- package/vendor/Package.internal.113.cjs +0 -1306
- package/vendor/Package.internal.113.mjs +0 -1292
- package/vendor/Package.internal.114.cjs +0 -33
- package/vendor/Package.internal.114.mjs +0 -31
- package/vendor/Package.internal.115.cjs +0 -20
- package/vendor/Package.internal.115.mjs +0 -18
- package/vendor/Package.internal.116.cjs +0 -21
- package/vendor/Package.internal.116.mjs +0 -21
- package/vendor/Package.internal.117.cjs +0 -52
- package/vendor/Package.internal.117.mjs +0 -52
- package/vendor/Package.internal.118.cjs +0 -141
- package/vendor/Package.internal.118.mjs +0 -141
- package/vendor/Package.internal.119.cjs +0 -2
- package/vendor/Package.internal.119.mjs +0 -1
- package/vendor/Package.internal.120.cjs +0 -6
- package/vendor/Package.internal.120.mjs +0 -4
- package/vendor/Package.internal.121.cjs +0 -4
- package/vendor/Package.internal.121.mjs +0 -2
- package/vendor/Package.internal.122.cjs +0 -4
- package/vendor/Package.internal.122.mjs +0 -2
- package/vendor/Package.internal.123.cjs +0 -4
- package/vendor/Package.internal.123.mjs +0 -2
- package/vendor/Package.internal.124.cjs +0 -49
- package/vendor/Package.internal.124.mjs +0 -47
- package/vendor/Package.internal.125.cjs +0 -14
- package/vendor/Package.internal.125.mjs +0 -14
- package/vendor/Package.internal.126.cjs +0 -12
- package/vendor/Package.internal.126.mjs +0 -12
- package/vendor/Package.internal.127.cjs +0 -20
- package/vendor/Package.internal.127.mjs +0 -18
- package/vendor/Package.internal.128.cjs +0 -118
- package/vendor/Package.internal.128.mjs +0 -116
- package/vendor/Package.internal.129.cjs +0 -18
- package/vendor/Package.internal.129.mjs +0 -16
- package/vendor/Package.internal.130.cjs +0 -19
- package/vendor/Package.internal.130.mjs +0 -17
- package/vendor/Package.internal.131.cjs +0 -8876
- package/vendor/Package.internal.131.mjs +0 -8874
- package/vendor/Package.internal.132.cjs +0 -899
- package/vendor/Package.internal.132.mjs +0 -897
- package/vendor/Package.internal.133.cjs +0 -6769
- package/vendor/Package.internal.133.mjs +0 -6775
- package/vendor/Package.internal.134.cjs +0 -473
- package/vendor/Package.internal.134.mjs +0 -459
- package/vendor/Package.internal.135.cjs +0 -617
- package/vendor/Package.internal.135.mjs +0 -611
- package/vendor/Package.internal.136.cjs +0 -97
- package/vendor/Package.internal.136.mjs +0 -89
- package/vendor/Package.internal.137.cjs +0 -4
- package/vendor/Package.internal.137.mjs +0 -2
- package/vendor/Package.internal.138.cjs +0 -3753
- package/vendor/Package.internal.138.mjs +0 -3751
- package/vendor/Package.internal.139.cjs +0 -561
- package/vendor/Package.internal.139.mjs +0 -559
- package/vendor/Package.internal.140.cjs +0 -4
- package/vendor/Package.internal.140.mjs +0 -2
- package/vendor/Package.internal.141.cjs +0 -4
- package/vendor/Package.internal.141.mjs +0 -2
- package/vendor/Package.internal.142.cjs +0 -4
- package/vendor/Package.internal.142.mjs +0 -2
- package/vendor/Package.internal.143.cjs +0 -4
- package/vendor/Package.internal.143.mjs +0 -2
- package/vendor/Package.internal.144.cjs +0 -4
- package/vendor/Package.internal.144.mjs +0 -2
- package/vendor/Package.internal.145.cjs +0 -4
- package/vendor/Package.internal.145.mjs +0 -2
- package/vendor/Package.internal.146.cjs +0 -4
- package/vendor/Package.internal.146.mjs +0 -2
- package/vendor/Package.internal.147.cjs +0 -4
- package/vendor/Package.internal.147.mjs +0 -2
- package/vendor/Package.internal.148.cjs +0 -4
- package/vendor/Package.internal.148.mjs +0 -2
- package/vendor/Package.internal.149.cjs +0 -4
- package/vendor/Package.internal.149.mjs +0 -2
- package/vendor/Package.internal.150.cjs +0 -4
- package/vendor/Package.internal.150.mjs +0 -2
- package/vendor/Package.internal.151.cjs +0 -408
- package/vendor/Package.internal.151.mjs +0 -400
- package/vendor/Package.internal.152.cjs +0 -104
- package/vendor/Package.internal.152.mjs +0 -104
- package/vendor/Package.internal.153.cjs +0 -27
- package/vendor/Package.internal.153.mjs +0 -27
- package/vendor/Package.internal.154.cjs +0 -4
- package/vendor/Package.internal.154.mjs +0 -2
- package/vendor/Package.internal.155.cjs +0 -4
- package/vendor/Package.internal.155.mjs +0 -2
- package/vendor/Package.internal.156.cjs +0 -723
- package/vendor/Package.internal.156.mjs +0 -723
- package/vendor/Package.internal.157.cjs +0 -1548
- package/vendor/Package.internal.157.mjs +0 -1540
- package/vendor/Package.internal.158.cjs +0 -364
- package/vendor/Package.internal.158.mjs +0 -364
- package/vendor/Package.internal.159.cjs +0 -107
- package/vendor/Package.internal.159.mjs +0 -107
- package/vendor/Package.internal.160.cjs +0 -636
- package/vendor/Package.internal.160.mjs +0 -622
- package/vendor/Package.internal.161.cjs +0 -543
- package/vendor/Package.internal.161.mjs +0 -533
- package/vendor/Package.internal.162.cjs +0 -605
- package/vendor/Package.internal.162.mjs +0 -605
- package/vendor/Package.internal.163.cjs +0 -139
- package/vendor/Package.internal.163.mjs +0 -131
- package/vendor/Package.internal.164.cjs +0 -119
- package/vendor/Package.internal.164.mjs +0 -111
- package/vendor/Package.internal.165.cjs +0 -1224
- package/vendor/Package.internal.165.mjs +0 -1214
- package/vendor/Package.internal.166.cjs +0 -90
- package/vendor/Package.internal.166.mjs +0 -98
- package/vendor/Package.internal.167.cjs +0 -4
- package/vendor/Package.internal.167.mjs +0 -2
- package/vendor/Package.internal.168.cjs +0 -4
- package/vendor/Package.internal.168.mjs +0 -2
- package/vendor/Package.internal.169.cjs +0 -55
- package/vendor/Package.internal.169.mjs +0 -55
- package/vendor/Package.internal.170.cjs +0 -10
- package/vendor/Package.internal.170.mjs +0 -10
- package/vendor/Package.internal.171.cjs +0 -12
- package/vendor/Package.internal.171.mjs +0 -6
- package/vendor/Package.internal.172.cjs +0 -165
- package/vendor/Package.internal.172.mjs +0 -163
- package/vendor/Package.internal.173.cjs +0 -23
- package/vendor/Package.internal.173.mjs +0 -15
- package/vendor/Package.internal.174.cjs +0 -251
- package/vendor/Package.internal.174.mjs +0 -249
- package/vendor/Package.internal.175.cjs +0 -949
- package/vendor/Package.internal.175.mjs +0 -947
- package/vendor/Package.internal.176.cjs +0 -27
- package/vendor/Package.internal.176.mjs +0 -27
- package/vendor/Package.internal.177.cjs +0 -80
- package/vendor/Package.internal.177.mjs +0 -72
- package/vendor/Package.internal.178.cjs +0 -655
- package/vendor/Package.internal.178.mjs +0 -653
- package/vendor/Package.internal.179.cjs +0 -77
- package/vendor/Package.internal.179.mjs +0 -75
- package/vendor/Package.internal.181.cjs +0 -70
- package/vendor/Package.internal.181.mjs +0 -68
- package/vendor/Package.internal.182.cjs +0 -112
- package/vendor/Package.internal.182.mjs +0 -110
- package/vendor/Package.internal.183.cjs +0 -102
- package/vendor/Package.internal.183.mjs +0 -100
- package/vendor/Package.internal.184.cjs +0 -45450
- package/vendor/Package.internal.184.mjs +0 -45432
- package/vendor/Package.internal.185.cjs +0 -8
- package/vendor/Package.internal.185.mjs +0 -6
- package/vendor/Package.internal.186.cjs +0 -30
- package/vendor/Package.internal.186.mjs +0 -28
- package/vendor/Package.internal.187.cjs +0 -317
- package/vendor/Package.internal.187.mjs +0 -315
- package/vendor/Package.internal.188.cjs +0 -943
- package/vendor/Package.internal.188.mjs +0 -951
- package/vendor/Package.internal.189.cjs +0 -1090
- package/vendor/Package.internal.189.mjs +0 -1090
- package/vendor/Package.internal.190.cjs +0 -165
- package/vendor/Package.internal.190.mjs +0 -165
- package/vendor/Package.internal.191.cjs +0 -15
- package/vendor/Package.internal.191.mjs +0 -13
- package/vendor/Package.internal.192.cjs +0 -14
- package/vendor/Package.internal.192.mjs +0 -12
- package/vendor/Package.internal.193.cjs +0 -49
- package/vendor/Package.internal.193.mjs +0 -47
- package/vendor/Package.internal.194.cjs +0 -493
- package/vendor/Package.internal.194.mjs +0 -471
- package/vendor/Package.internal.195.cjs +0 -4
- package/vendor/Package.internal.195.mjs +0 -2
- package/vendor/Package.internal.196.cjs +0 -4
- package/vendor/Package.internal.196.mjs +0 -2
- package/vendor/Package.internal.197.cjs +0 -4
- package/vendor/Package.internal.197.mjs +0 -2
- package/vendor/Package.internal.198.cjs +0 -4
- package/vendor/Package.internal.198.mjs +0 -2
- package/vendor/Package.internal.199.cjs +0 -4
- package/vendor/Package.internal.199.mjs +0 -2
- package/vendor/Package.internal.200.cjs +0 -4
- package/vendor/Package.internal.200.mjs +0 -2
- package/vendor/Package.internal.201.cjs +0 -4
- package/vendor/Package.internal.201.mjs +0 -2
- package/vendor/Package.internal.202.cjs +0 -4
- package/vendor/Package.internal.202.mjs +0 -2
- package/vendor/Package.internal.60.cjs +0 -27
- package/vendor/Package.internal.60.mjs +0 -27
- package/vendor/Package.internal.61.cjs +0 -4
- package/vendor/Package.internal.61.mjs +0 -2
- package/vendor/Package.internal.62.cjs +0 -200
- package/vendor/Package.internal.62.mjs +0 -200
- package/vendor/Package.internal.63.cjs +0 -4019
- package/vendor/Package.internal.63.mjs +0 -4027
- package/vendor/Package.internal.64.cjs +0 -4
- package/vendor/Package.internal.64.mjs +0 -2
- package/vendor/Package.internal.65.cjs +0 -321
- package/vendor/Package.internal.65.mjs +0 -321
- package/vendor/Package.internal.66.cjs +0 -365
- package/vendor/Package.internal.66.mjs +0 -363
- package/vendor/Package.internal.67.cjs +0 -403
- package/vendor/Package.internal.67.mjs +0 -395
- package/vendor/Package.internal.68.cjs +0 -127
- package/vendor/Package.internal.68.mjs +0 -125
- package/vendor/Package.internal.69.cjs +0 -31
- package/vendor/Package.internal.69.mjs +0 -29
- package/vendor/Package.internal.70.cjs +0 -87
- package/vendor/Package.internal.70.mjs +0 -85
- package/vendor/Package.internal.71.cjs +0 -61
- package/vendor/Package.internal.71.mjs +0 -59
- package/vendor/Package.internal.72.cjs +0 -34
- package/vendor/Package.internal.72.mjs +0 -32
- package/vendor/Package.internal.73.cjs +0 -4
- package/vendor/Package.internal.73.mjs +0 -2
- package/vendor/Package.internal.74.cjs +0 -684
- package/vendor/Package.internal.74.mjs +0 -662
- package/vendor/Package.internal.75.cjs +0 -13896
- package/vendor/Package.internal.75.mjs +0 -13870
- package/vendor/Package.internal.76.cjs +0 -37
- package/vendor/Package.internal.76.mjs +0 -31
- package/vendor/Package.internal.77.cjs +0 -4077
- package/vendor/Package.internal.77.mjs +0 -4077
- package/vendor/Package.internal.78.cjs +0 -1664
- package/vendor/Package.internal.78.mjs +0 -1664
- package/vendor/Package.internal.79.cjs +0 -259
- package/vendor/Package.internal.79.mjs +0 -257
- package/vendor/Package.internal.80.cjs +0 -4964
- package/vendor/Package.internal.80.mjs +0 -4948
- package/vendor/Package.internal.81.cjs +0 -1239
- package/vendor/Package.internal.81.mjs +0 -1225
- package/vendor/Package.internal.82.cjs +0 -340
- package/vendor/Package.internal.82.mjs +0 -326
- package/vendor/Package.internal.83.cjs +0 -34
- package/vendor/Package.internal.83.mjs +0 -32
- package/vendor/Package.internal.84.cjs +0 -88
- package/vendor/Package.internal.84.mjs +0 -88
- package/vendor/Package.internal.85.cjs +0 -55
- package/vendor/Package.internal.85.mjs +0 -55
- package/vendor/Package.internal.86.cjs +0 -15
- package/vendor/Package.internal.86.mjs +0 -13
- package/vendor/Package.internal.87.cjs +0 -1355
- package/vendor/Package.internal.87.mjs +0 -1355
- package/vendor/Package.internal.88.cjs +0 -12
- package/vendor/Package.internal.88.mjs +0 -6
- package/vendor/Package.internal.89.cjs +0 -4
- package/vendor/Package.internal.89.mjs +0 -2
- package/vendor/Package.internal.90.cjs +0 -351
- package/vendor/Package.internal.90.mjs +0 -351
- package/vendor/Package.internal.91.cjs +0 -80
- package/vendor/Package.internal.91.mjs +0 -80
- package/vendor/Package.internal.92.cjs +0 -1445
- package/vendor/Package.internal.92.mjs +0 -1433
- package/vendor/Package.internal.93.cjs +0 -144
- package/vendor/Package.internal.93.mjs +0 -142
- package/vendor/Package.internal.94.cjs +0 -1822
- package/vendor/Package.internal.94.mjs +0 -1814
- package/vendor/Package.internal.95.cjs +0 -130
- package/vendor/Package.internal.95.mjs +0 -124
- package/vendor/Package.internal.96.cjs +0 -208
- package/vendor/Package.internal.96.mjs +0 -208
- package/vendor/Package.internal.97.cjs +0 -1641
- package/vendor/Package.internal.97.mjs +0 -1641
- package/vendor/Package.internal.98.cjs +0 -74
- package/vendor/Package.internal.98.mjs +0 -74
- package/vendor/Package.internal.99.cjs +0 -28
- package/vendor/Package.internal.99.mjs +0 -28
|
@@ -1,1641 +0,0 @@
|
|
|
1
|
-
/* Build Date: Mon Nov 24 2025 18:02:01 GMT+0800 (China Standard Time) */
|
|
2
|
-
"use strict";
|
|
3
|
-
|
|
4
|
-
const t = require("./Package.internal.98.cjs");
|
|
5
|
-
|
|
6
|
-
var e = {};
|
|
7
|
-
|
|
8
|
-
var i = {};
|
|
9
|
-
|
|
10
|
-
(function(t) {
|
|
11
|
-
const e = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
|
|
12
|
-
const i = e + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
|
|
13
|
-
const n = "[" + e + "][" + i + "]*";
|
|
14
|
-
const s = new RegExp("^" + n + "$");
|
|
15
|
-
const r = function(t, e) {
|
|
16
|
-
const i = [];
|
|
17
|
-
let n = e.exec(t);
|
|
18
|
-
while (n) {
|
|
19
|
-
const s = [];
|
|
20
|
-
s.startIndex = e.lastIndex - n[0].length;
|
|
21
|
-
const r = n.length;
|
|
22
|
-
for (let t = 0; t < r; t++) {
|
|
23
|
-
s.push(n[t]);
|
|
24
|
-
}
|
|
25
|
-
i.push(s);
|
|
26
|
-
n = e.exec(t);
|
|
27
|
-
}
|
|
28
|
-
return i;
|
|
29
|
-
};
|
|
30
|
-
const o = function(t) {
|
|
31
|
-
const e = s.exec(t);
|
|
32
|
-
return !(e === null || typeof e === "undefined");
|
|
33
|
-
};
|
|
34
|
-
t.isExist = function(t) {
|
|
35
|
-
return typeof t !== "undefined";
|
|
36
|
-
};
|
|
37
|
-
t.isEmptyObject = function(t) {
|
|
38
|
-
return Object.keys(t).length === 0;
|
|
39
|
-
};
|
|
40
|
-
t.merge = function(t, e, i) {
|
|
41
|
-
if (e) {
|
|
42
|
-
const n = Object.keys(e);
|
|
43
|
-
const s = n.length;
|
|
44
|
-
for (let r = 0; r < s; r++) {
|
|
45
|
-
if (i === "strict") {
|
|
46
|
-
t[n[r]] = [ e[n[r]] ];
|
|
47
|
-
} else {
|
|
48
|
-
t[n[r]] = e[n[r]];
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
t.getValue = function(e) {
|
|
54
|
-
if (t.isExist(e)) {
|
|
55
|
-
return e;
|
|
56
|
-
} else {
|
|
57
|
-
return "";
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
t.isName = o;
|
|
61
|
-
t.getAllMatches = r;
|
|
62
|
-
t.nameRegexp = n;
|
|
63
|
-
})(i);
|
|
64
|
-
|
|
65
|
-
const n = i;
|
|
66
|
-
|
|
67
|
-
const s = {
|
|
68
|
-
allowBooleanAttributes: false,
|
|
69
|
-
unpairedTags: []
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
e.validate = function(t, e) {
|
|
73
|
-
e = Object.assign({}, s, e);
|
|
74
|
-
const i = [];
|
|
75
|
-
let n = false;
|
|
76
|
-
let l = false;
|
|
77
|
-
if (t[0] === "\ufeff") {
|
|
78
|
-
t = t.substr(1);
|
|
79
|
-
}
|
|
80
|
-
for (let s = 0; s < t.length; s++) {
|
|
81
|
-
if (t[s] === "<" && t[s + 1] === "?") {
|
|
82
|
-
s += 2;
|
|
83
|
-
s = o(t, s);
|
|
84
|
-
if (s.err) return s;
|
|
85
|
-
} else if (t[s] === "<") {
|
|
86
|
-
let u = s;
|
|
87
|
-
s++;
|
|
88
|
-
if (t[s] === "!") {
|
|
89
|
-
s = a(t, s);
|
|
90
|
-
continue;
|
|
91
|
-
} else {
|
|
92
|
-
let c = false;
|
|
93
|
-
if (t[s] === "/") {
|
|
94
|
-
c = true;
|
|
95
|
-
s++;
|
|
96
|
-
}
|
|
97
|
-
let d = "";
|
|
98
|
-
for (;s < t.length && t[s] !== ">" && t[s] !== " " && t[s] !== "\t" && t[s] !== "\n" && t[s] !== "\r"; s++) {
|
|
99
|
-
d += t[s];
|
|
100
|
-
}
|
|
101
|
-
d = d.trim();
|
|
102
|
-
if (d[d.length - 1] === "/") {
|
|
103
|
-
d = d.substring(0, d.length - 1);
|
|
104
|
-
s--;
|
|
105
|
-
}
|
|
106
|
-
if (!x(d)) {
|
|
107
|
-
let e;
|
|
108
|
-
if (d.trim().length === 0) {
|
|
109
|
-
e = "Invalid space after '<'.";
|
|
110
|
-
} else {
|
|
111
|
-
e = "Tag '" + d + "' is an invalid name.";
|
|
112
|
-
}
|
|
113
|
-
return g("InvalidTag", e, N(t, s));
|
|
114
|
-
}
|
|
115
|
-
const m = f(t, s);
|
|
116
|
-
if (m === false) {
|
|
117
|
-
return g("InvalidAttr", "Attributes for '" + d + "' have open quote.", N(t, s));
|
|
118
|
-
}
|
|
119
|
-
let b = m.value;
|
|
120
|
-
s = m.index;
|
|
121
|
-
if (b[b.length - 1] === "/") {
|
|
122
|
-
const i = s - b.length;
|
|
123
|
-
b = b.substring(0, b.length - 1);
|
|
124
|
-
const r = h(b, e);
|
|
125
|
-
if (r === true) {
|
|
126
|
-
n = true;
|
|
127
|
-
} else {
|
|
128
|
-
return g(r.err.code, r.err.msg, N(t, i + r.err.line));
|
|
129
|
-
}
|
|
130
|
-
} else if (c) {
|
|
131
|
-
if (!m.tagClosed) {
|
|
132
|
-
return g("InvalidTag", "Closing tag '" + d + "' doesn't have proper closing.", N(t, s));
|
|
133
|
-
} else if (b.trim().length > 0) {
|
|
134
|
-
return g("InvalidTag", "Closing tag '" + d + "' can't have attributes or invalid starting.", N(t, u));
|
|
135
|
-
} else if (i.length === 0) {
|
|
136
|
-
return g("InvalidTag", "Closing tag '" + d + "' has not been opened.", N(t, u));
|
|
137
|
-
} else {
|
|
138
|
-
const e = i.pop();
|
|
139
|
-
if (d !== e.tagName) {
|
|
140
|
-
let i = N(t, e.tagStartPos);
|
|
141
|
-
return g("InvalidTag", "Expected closing tag '" + e.tagName + "' (opened in line " + i.line + ", col " + i.col + ") instead of closing tag '" + d + "'.", N(t, u));
|
|
142
|
-
}
|
|
143
|
-
if (i.length == 0) {
|
|
144
|
-
l = true;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
} else {
|
|
148
|
-
const r = h(b, e);
|
|
149
|
-
if (r !== true) {
|
|
150
|
-
return g(r.err.code, r.err.msg, N(t, s - b.length + r.err.line));
|
|
151
|
-
}
|
|
152
|
-
if (l === true) {
|
|
153
|
-
return g("InvalidXml", "Multiple possible root nodes found.", N(t, s));
|
|
154
|
-
} else if (e.unpairedTags.indexOf(d) !== -1) ; else {
|
|
155
|
-
i.push({
|
|
156
|
-
tagName: d,
|
|
157
|
-
tagStartPos: u
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
n = true;
|
|
161
|
-
}
|
|
162
|
-
for (s++; s < t.length; s++) {
|
|
163
|
-
if (t[s] === "<") {
|
|
164
|
-
if (t[s + 1] === "!") {
|
|
165
|
-
s++;
|
|
166
|
-
s = a(t, s);
|
|
167
|
-
continue;
|
|
168
|
-
} else if (t[s + 1] === "?") {
|
|
169
|
-
s = o(t, ++s);
|
|
170
|
-
if (s.err) return s;
|
|
171
|
-
} else {
|
|
172
|
-
break;
|
|
173
|
-
}
|
|
174
|
-
} else if (t[s] === "&") {
|
|
175
|
-
const e = p(t, s);
|
|
176
|
-
if (e == -1) return g("InvalidChar", "char '&' is not expected.", N(t, s));
|
|
177
|
-
s = e;
|
|
178
|
-
} else {
|
|
179
|
-
if (l === true && !r(t[s])) {
|
|
180
|
-
return g("InvalidXml", "Extra text at the end", N(t, s));
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
if (t[s] === "<") {
|
|
185
|
-
s--;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
} else {
|
|
189
|
-
if (r(t[s])) {
|
|
190
|
-
continue;
|
|
191
|
-
}
|
|
192
|
-
return g("InvalidChar", "char '" + t[s] + "' is not expected.", N(t, s));
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
if (!n) {
|
|
196
|
-
return g("InvalidXml", "Start tag expected.", 1);
|
|
197
|
-
} else if (i.length == 1) {
|
|
198
|
-
return g("InvalidTag", "Unclosed tag '" + i[0].tagName + "'.", N(t, i[0].tagStartPos));
|
|
199
|
-
} else if (i.length > 0) {
|
|
200
|
-
return g("InvalidXml", "Invalid '" + JSON.stringify(i.map(t => t.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", {
|
|
201
|
-
line: 1,
|
|
202
|
-
col: 1
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
return true;
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
function r(t) {
|
|
209
|
-
return t === " " || t === "\t" || t === "\n" || t === "\r";
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
function o(t, e) {
|
|
213
|
-
const i = e;
|
|
214
|
-
for (;e < t.length; e++) {
|
|
215
|
-
if (t[e] == "?" || t[e] == " ") {
|
|
216
|
-
const n = t.substr(i, e - i);
|
|
217
|
-
if (e > 5 && n === "xml") {
|
|
218
|
-
return g("InvalidXml", "XML declaration allowed only at the start of the document.", N(t, e));
|
|
219
|
-
} else if (t[e] == "?" && t[e + 1] == ">") {
|
|
220
|
-
e++;
|
|
221
|
-
break;
|
|
222
|
-
} else {
|
|
223
|
-
continue;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
return e;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
function a(t, e) {
|
|
231
|
-
if (t.length > e + 5 && t[e + 1] === "-" && t[e + 2] === "-") {
|
|
232
|
-
for (e += 3; e < t.length; e++) {
|
|
233
|
-
if (t[e] === "-" && t[e + 1] === "-" && t[e + 2] === ">") {
|
|
234
|
-
e += 2;
|
|
235
|
-
break;
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
} else if (t.length > e + 8 && t[e + 1] === "D" && t[e + 2] === "O" && t[e + 3] === "C" && t[e + 4] === "T" && t[e + 5] === "Y" && t[e + 6] === "P" && t[e + 7] === "E") {
|
|
239
|
-
let i = 1;
|
|
240
|
-
for (e += 8; e < t.length; e++) {
|
|
241
|
-
if (t[e] === "<") {
|
|
242
|
-
i++;
|
|
243
|
-
} else if (t[e] === ">") {
|
|
244
|
-
i--;
|
|
245
|
-
if (i === 0) {
|
|
246
|
-
break;
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
} else if (t.length > e + 9 && t[e + 1] === "[" && t[e + 2] === "C" && t[e + 3] === "D" && t[e + 4] === "A" && t[e + 5] === "T" && t[e + 6] === "A" && t[e + 7] === "[") {
|
|
251
|
-
for (e += 8; e < t.length; e++) {
|
|
252
|
-
if (t[e] === "]" && t[e + 1] === "]" && t[e + 2] === ">") {
|
|
253
|
-
e += 2;
|
|
254
|
-
break;
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
return e;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
const l = '"';
|
|
262
|
-
|
|
263
|
-
const u = "'";
|
|
264
|
-
|
|
265
|
-
function f(t, e) {
|
|
266
|
-
let i = "";
|
|
267
|
-
let n = "";
|
|
268
|
-
let s = false;
|
|
269
|
-
for (;e < t.length; e++) {
|
|
270
|
-
if (t[e] === l || t[e] === u) {
|
|
271
|
-
if (n === "") {
|
|
272
|
-
n = t[e];
|
|
273
|
-
} else if (n !== t[e]) ; else {
|
|
274
|
-
n = "";
|
|
275
|
-
}
|
|
276
|
-
} else if (t[e] === ">") {
|
|
277
|
-
if (n === "") {
|
|
278
|
-
s = true;
|
|
279
|
-
break;
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
i += t[e];
|
|
283
|
-
}
|
|
284
|
-
if (n !== "") {
|
|
285
|
-
return false;
|
|
286
|
-
}
|
|
287
|
-
return {
|
|
288
|
-
value: i,
|
|
289
|
-
index: e,
|
|
290
|
-
tagClosed: s
|
|
291
|
-
};
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
const c = new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?", "g");
|
|
295
|
-
|
|
296
|
-
function h(t, e) {
|
|
297
|
-
const i = n.getAllMatches(t, c);
|
|
298
|
-
const s = {};
|
|
299
|
-
for (let t = 0; t < i.length; t++) {
|
|
300
|
-
if (i[t][1].length === 0) {
|
|
301
|
-
return g("InvalidAttr", "Attribute '" + i[t][2] + "' has no space in starting.", b(i[t]));
|
|
302
|
-
} else if (i[t][3] !== undefined && i[t][4] === undefined) {
|
|
303
|
-
return g("InvalidAttr", "Attribute '" + i[t][2] + "' is without value.", b(i[t]));
|
|
304
|
-
} else if (i[t][3] === undefined && !e.allowBooleanAttributes) {
|
|
305
|
-
return g("InvalidAttr", "boolean attribute '" + i[t][2] + "' is not allowed.", b(i[t]));
|
|
306
|
-
}
|
|
307
|
-
const n = i[t][2];
|
|
308
|
-
if (!m(n)) {
|
|
309
|
-
return g("InvalidAttr", "Attribute '" + n + "' is an invalid name.", b(i[t]));
|
|
310
|
-
}
|
|
311
|
-
if (!s.hasOwnProperty(n)) {
|
|
312
|
-
s[n] = 1;
|
|
313
|
-
} else {
|
|
314
|
-
return g("InvalidAttr", "Attribute '" + n + "' is repeated.", b(i[t]));
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
return true;
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
function d(t, e) {
|
|
321
|
-
let i = /\d/;
|
|
322
|
-
if (t[e] === "x") {
|
|
323
|
-
e++;
|
|
324
|
-
i = /[\da-fA-F]/;
|
|
325
|
-
}
|
|
326
|
-
for (;e < t.length; e++) {
|
|
327
|
-
if (t[e] === ";") return e;
|
|
328
|
-
if (!t[e].match(i)) break;
|
|
329
|
-
}
|
|
330
|
-
return -1;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
function p(t, e) {
|
|
334
|
-
e++;
|
|
335
|
-
if (t[e] === ";") return -1;
|
|
336
|
-
if (t[e] === "#") {
|
|
337
|
-
e++;
|
|
338
|
-
return d(t, e);
|
|
339
|
-
}
|
|
340
|
-
let i = 0;
|
|
341
|
-
for (;e < t.length; e++, i++) {
|
|
342
|
-
if (t[e].match(/\w/) && i < 20) continue;
|
|
343
|
-
if (t[e] === ";") break;
|
|
344
|
-
return -1;
|
|
345
|
-
}
|
|
346
|
-
return e;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
function g(t, e, i) {
|
|
350
|
-
return {
|
|
351
|
-
err: {
|
|
352
|
-
code: t,
|
|
353
|
-
msg: e,
|
|
354
|
-
line: i.line || i,
|
|
355
|
-
col: i.col
|
|
356
|
-
}
|
|
357
|
-
};
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
function m(t) {
|
|
361
|
-
return n.isName(t);
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
function x(t) {
|
|
365
|
-
return n.isName(t);
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
function N(t, e) {
|
|
369
|
-
const i = t.substring(0, e).split(/\r?\n/);
|
|
370
|
-
return {
|
|
371
|
-
line: i.length,
|
|
372
|
-
col: i[i.length - 1].length + 1
|
|
373
|
-
};
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
function b(t) {
|
|
377
|
-
return t.startIndex + t[1].length;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
var E = {};
|
|
381
|
-
|
|
382
|
-
const v = {
|
|
383
|
-
preserveOrder: false,
|
|
384
|
-
attributeNamePrefix: "@_",
|
|
385
|
-
attributesGroupName: false,
|
|
386
|
-
textNodeName: "#text",
|
|
387
|
-
ignoreAttributes: true,
|
|
388
|
-
removeNSPrefix: false,
|
|
389
|
-
allowBooleanAttributes: false,
|
|
390
|
-
parseTagValue: true,
|
|
391
|
-
parseAttributeValue: false,
|
|
392
|
-
trimValues: true,
|
|
393
|
-
cdataPropName: false,
|
|
394
|
-
numberParseOptions: {
|
|
395
|
-
hex: true,
|
|
396
|
-
leadingZeros: true,
|
|
397
|
-
eNotation: true
|
|
398
|
-
},
|
|
399
|
-
tagValueProcessor: function(t, e) {
|
|
400
|
-
return e;
|
|
401
|
-
},
|
|
402
|
-
attributeValueProcessor: function(t, e) {
|
|
403
|
-
return e;
|
|
404
|
-
},
|
|
405
|
-
stopNodes: [],
|
|
406
|
-
alwaysCreateTextNode: false,
|
|
407
|
-
isArray: () => false,
|
|
408
|
-
commentPropName: false,
|
|
409
|
-
unpairedTags: [],
|
|
410
|
-
processEntities: true,
|
|
411
|
-
htmlEntities: false,
|
|
412
|
-
ignoreDeclaration: false,
|
|
413
|
-
ignorePiTags: false,
|
|
414
|
-
transformTagName: false,
|
|
415
|
-
transformAttributeName: false,
|
|
416
|
-
updateTag: function(t, e, i) {
|
|
417
|
-
return t;
|
|
418
|
-
}
|
|
419
|
-
};
|
|
420
|
-
|
|
421
|
-
const y = function(t) {
|
|
422
|
-
return Object.assign({}, v, t);
|
|
423
|
-
};
|
|
424
|
-
|
|
425
|
-
E.buildOptions = y;
|
|
426
|
-
|
|
427
|
-
E.defaultOptions = v;
|
|
428
|
-
|
|
429
|
-
class XmlNode {
|
|
430
|
-
constructor(t) {
|
|
431
|
-
this.tagname = t;
|
|
432
|
-
this.child = [];
|
|
433
|
-
this[":@"] = {};
|
|
434
|
-
}
|
|
435
|
-
add(t, e) {
|
|
436
|
-
if (t === "__proto__") t = "#__proto__";
|
|
437
|
-
this.child.push({
|
|
438
|
-
[t]: e
|
|
439
|
-
});
|
|
440
|
-
}
|
|
441
|
-
addChild(t) {
|
|
442
|
-
if (t.tagname === "__proto__") t.tagname = "#__proto__";
|
|
443
|
-
if (t[":@"] && Object.keys(t[":@"]).length > 0) {
|
|
444
|
-
this.child.push({
|
|
445
|
-
[t.tagname]: t.child,
|
|
446
|
-
[":@"]: t[":@"]
|
|
447
|
-
});
|
|
448
|
-
} else {
|
|
449
|
-
this.child.push({
|
|
450
|
-
[t.tagname]: t.child
|
|
451
|
-
});
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
var T = XmlNode;
|
|
457
|
-
|
|
458
|
-
const O = i;
|
|
459
|
-
|
|
460
|
-
function P(t, e) {
|
|
461
|
-
const i = {};
|
|
462
|
-
if (t[e + 3] === "O" && t[e + 4] === "C" && t[e + 5] === "T" && t[e + 6] === "Y" && t[e + 7] === "P" && t[e + 8] === "E") {
|
|
463
|
-
e = e + 9;
|
|
464
|
-
let n = 1;
|
|
465
|
-
let s = false, r = false;
|
|
466
|
-
let o = "";
|
|
467
|
-
for (;e < t.length; e++) {
|
|
468
|
-
if (t[e] === "<" && !r) {
|
|
469
|
-
if (s && C(t, e)) {
|
|
470
|
-
e += 7;
|
|
471
|
-
let n, s;
|
|
472
|
-
[n, s, e] = A(t, e + 1);
|
|
473
|
-
if (s.indexOf("&") === -1) i[j(n)] = {
|
|
474
|
-
regx: RegExp(`&${n};`, "g"),
|
|
475
|
-
val: s
|
|
476
|
-
};
|
|
477
|
-
} else if (s && I(t, e)) e += 8; else if (s && S(t, e)) e += 8; else if (s && V(t, e)) e += 9; else if (w) r = true; else throw new Error("Invalid DOCTYPE");
|
|
478
|
-
n++;
|
|
479
|
-
o = "";
|
|
480
|
-
} else if (t[e] === ">") {
|
|
481
|
-
if (r) {
|
|
482
|
-
if (t[e - 1] === "-" && t[e - 2] === "-") {
|
|
483
|
-
r = false;
|
|
484
|
-
n--;
|
|
485
|
-
}
|
|
486
|
-
} else {
|
|
487
|
-
n--;
|
|
488
|
-
}
|
|
489
|
-
if (n === 0) {
|
|
490
|
-
break;
|
|
491
|
-
}
|
|
492
|
-
} else if (t[e] === "[") {
|
|
493
|
-
s = true;
|
|
494
|
-
} else {
|
|
495
|
-
o += t[e];
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
if (n !== 0) {
|
|
499
|
-
throw new Error(`Unclosed DOCTYPE`);
|
|
500
|
-
}
|
|
501
|
-
} else {
|
|
502
|
-
throw new Error(`Invalid Tag instead of DOCTYPE`);
|
|
503
|
-
}
|
|
504
|
-
return {
|
|
505
|
-
entities: i,
|
|
506
|
-
i: e
|
|
507
|
-
};
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
function A(t, e) {
|
|
511
|
-
let i = "";
|
|
512
|
-
for (;e < t.length && (t[e] !== "'" && t[e] !== '"'); e++) {
|
|
513
|
-
i += t[e];
|
|
514
|
-
}
|
|
515
|
-
i = i.trim();
|
|
516
|
-
if (i.indexOf(" ") !== -1) throw new Error("External entites are not supported");
|
|
517
|
-
const n = t[e++];
|
|
518
|
-
let s = "";
|
|
519
|
-
for (;e < t.length && t[e] !== n; e++) {
|
|
520
|
-
s += t[e];
|
|
521
|
-
}
|
|
522
|
-
return [ i, s, e ];
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
function w(t, e) {
|
|
526
|
-
if (t[e + 1] === "!" && t[e + 2] === "-" && t[e + 3] === "-") return true;
|
|
527
|
-
return false;
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
function C(t, e) {
|
|
531
|
-
if (t[e + 1] === "!" && t[e + 2] === "E" && t[e + 3] === "N" && t[e + 4] === "T" && t[e + 5] === "I" && t[e + 6] === "T" && t[e + 7] === "Y") return true;
|
|
532
|
-
return false;
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
function I(t, e) {
|
|
536
|
-
if (t[e + 1] === "!" && t[e + 2] === "E" && t[e + 3] === "L" && t[e + 4] === "E" && t[e + 5] === "M" && t[e + 6] === "E" && t[e + 7] === "N" && t[e + 8] === "T") return true;
|
|
537
|
-
return false;
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
function S(t, e) {
|
|
541
|
-
if (t[e + 1] === "!" && t[e + 2] === "A" && t[e + 3] === "T" && t[e + 4] === "T" && t[e + 5] === "L" && t[e + 6] === "I" && t[e + 7] === "S" && t[e + 8] === "T") return true;
|
|
542
|
-
return false;
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
function V(t, e) {
|
|
546
|
-
if (t[e + 1] === "!" && t[e + 2] === "N" && t[e + 3] === "O" && t[e + 4] === "T" && t[e + 5] === "A" && t[e + 6] === "T" && t[e + 7] === "I" && t[e + 8] === "O" && t[e + 9] === "N") return true;
|
|
547
|
-
return false;
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
function j(t) {
|
|
551
|
-
if (O.isName(t)) return t; else throw new Error(`Invalid entity name ${t}`);
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
var k = P;
|
|
555
|
-
|
|
556
|
-
function F(t) {
|
|
557
|
-
if (typeof t === "function") {
|
|
558
|
-
return t;
|
|
559
|
-
}
|
|
560
|
-
if (Array.isArray(t)) {
|
|
561
|
-
return e => {
|
|
562
|
-
for (const i of t) {
|
|
563
|
-
if (typeof i === "string" && e === i) {
|
|
564
|
-
return true;
|
|
565
|
-
}
|
|
566
|
-
if (i instanceof RegExp && i.test(e)) {
|
|
567
|
-
return true;
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
};
|
|
571
|
-
}
|
|
572
|
-
return () => false;
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
var $ = F;
|
|
576
|
-
|
|
577
|
-
const _ = i;
|
|
578
|
-
|
|
579
|
-
const D = T;
|
|
580
|
-
|
|
581
|
-
const L = k;
|
|
582
|
-
|
|
583
|
-
const M = t.strnum;
|
|
584
|
-
|
|
585
|
-
const B = $;
|
|
586
|
-
|
|
587
|
-
let X = class OrderedObjParser {
|
|
588
|
-
constructor(t) {
|
|
589
|
-
this.options = t;
|
|
590
|
-
this.currentNode = null;
|
|
591
|
-
this.tagsNodeStack = [];
|
|
592
|
-
this.docTypeEntities = {};
|
|
593
|
-
this.lastEntities = {
|
|
594
|
-
apos: {
|
|
595
|
-
regex: /&(apos|#39|#x27);/g,
|
|
596
|
-
val: "'"
|
|
597
|
-
},
|
|
598
|
-
gt: {
|
|
599
|
-
regex: /&(gt|#62|#x3E);/g,
|
|
600
|
-
val: ">"
|
|
601
|
-
},
|
|
602
|
-
lt: {
|
|
603
|
-
regex: /&(lt|#60|#x3C);/g,
|
|
604
|
-
val: "<"
|
|
605
|
-
},
|
|
606
|
-
quot: {
|
|
607
|
-
regex: /&(quot|#34|#x22);/g,
|
|
608
|
-
val: '"'
|
|
609
|
-
}
|
|
610
|
-
};
|
|
611
|
-
this.ampEntity = {
|
|
612
|
-
regex: /&(amp|#38|#x26);/g,
|
|
613
|
-
val: "&"
|
|
614
|
-
};
|
|
615
|
-
this.htmlEntities = {
|
|
616
|
-
space: {
|
|
617
|
-
regex: /&(nbsp|#160);/g,
|
|
618
|
-
val: " "
|
|
619
|
-
},
|
|
620
|
-
cent: {
|
|
621
|
-
regex: /&(cent|#162);/g,
|
|
622
|
-
val: "¢"
|
|
623
|
-
},
|
|
624
|
-
pound: {
|
|
625
|
-
regex: /&(pound|#163);/g,
|
|
626
|
-
val: "£"
|
|
627
|
-
},
|
|
628
|
-
yen: {
|
|
629
|
-
regex: /&(yen|#165);/g,
|
|
630
|
-
val: "¥"
|
|
631
|
-
},
|
|
632
|
-
euro: {
|
|
633
|
-
regex: /&(euro|#8364);/g,
|
|
634
|
-
val: "€"
|
|
635
|
-
},
|
|
636
|
-
copyright: {
|
|
637
|
-
regex: /&(copy|#169);/g,
|
|
638
|
-
val: "©"
|
|
639
|
-
},
|
|
640
|
-
reg: {
|
|
641
|
-
regex: /&(reg|#174);/g,
|
|
642
|
-
val: "®"
|
|
643
|
-
},
|
|
644
|
-
inr: {
|
|
645
|
-
regex: /&(inr|#8377);/g,
|
|
646
|
-
val: "₹"
|
|
647
|
-
},
|
|
648
|
-
num_dec: {
|
|
649
|
-
regex: /&#([0-9]{1,7});/g,
|
|
650
|
-
val: (t, e) => String.fromCharCode(Number.parseInt(e, 10))
|
|
651
|
-
},
|
|
652
|
-
num_hex: {
|
|
653
|
-
regex: /&#x([0-9a-fA-F]{1,6});/g,
|
|
654
|
-
val: (t, e) => String.fromCharCode(Number.parseInt(e, 16))
|
|
655
|
-
}
|
|
656
|
-
};
|
|
657
|
-
this.addExternalEntities = G;
|
|
658
|
-
this.parseXml = W;
|
|
659
|
-
this.parseTextData = R;
|
|
660
|
-
this.resolveNameSpace = U;
|
|
661
|
-
this.buildAttributesMap = q;
|
|
662
|
-
this.isItStopNode = H;
|
|
663
|
-
this.replaceEntitiesValue = z;
|
|
664
|
-
this.readStopNodeData = et;
|
|
665
|
-
this.saveTextToParentTag = J;
|
|
666
|
-
this.addChild = Z;
|
|
667
|
-
this.ignoreAttributesFn = B(this.options.ignoreAttributes);
|
|
668
|
-
}
|
|
669
|
-
};
|
|
670
|
-
|
|
671
|
-
function G(t) {
|
|
672
|
-
const e = Object.keys(t);
|
|
673
|
-
for (let i = 0; i < e.length; i++) {
|
|
674
|
-
const n = e[i];
|
|
675
|
-
this.lastEntities[n] = {
|
|
676
|
-
regex: new RegExp("&" + n + ";", "g"),
|
|
677
|
-
val: t[n]
|
|
678
|
-
};
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
function R(t, e, i, n, s, r, o) {
|
|
683
|
-
if (t !== undefined) {
|
|
684
|
-
if (this.options.trimValues && !n) {
|
|
685
|
-
t = t.trim();
|
|
686
|
-
}
|
|
687
|
-
if (t.length > 0) {
|
|
688
|
-
if (!o) t = this.replaceEntitiesValue(t);
|
|
689
|
-
const n = this.options.tagValueProcessor(e, t, i, s, r);
|
|
690
|
-
if (n === null || n === undefined) {
|
|
691
|
-
return t;
|
|
692
|
-
} else if (typeof n !== typeof t || n !== t) {
|
|
693
|
-
return n;
|
|
694
|
-
} else if (this.options.trimValues) {
|
|
695
|
-
return it(t, this.options.parseTagValue, this.options.numberParseOptions);
|
|
696
|
-
} else {
|
|
697
|
-
const e = t.trim();
|
|
698
|
-
if (e === t) {
|
|
699
|
-
return it(t, this.options.parseTagValue, this.options.numberParseOptions);
|
|
700
|
-
} else {
|
|
701
|
-
return t;
|
|
702
|
-
}
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
function U(t) {
|
|
709
|
-
if (this.options.removeNSPrefix) {
|
|
710
|
-
const e = t.split(":");
|
|
711
|
-
const i = t.charAt(0) === "/" ? "/" : "";
|
|
712
|
-
if (e[0] === "xmlns") {
|
|
713
|
-
return "";
|
|
714
|
-
}
|
|
715
|
-
if (e.length === 2) {
|
|
716
|
-
t = i + e[1];
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
return t;
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
const Y = new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?", "gm");
|
|
723
|
-
|
|
724
|
-
function q(t, e, i) {
|
|
725
|
-
if (this.options.ignoreAttributes !== true && typeof t === "string") {
|
|
726
|
-
const i = _.getAllMatches(t, Y);
|
|
727
|
-
const n = i.length;
|
|
728
|
-
const s = {};
|
|
729
|
-
for (let t = 0; t < n; t++) {
|
|
730
|
-
const n = this.resolveNameSpace(i[t][1]);
|
|
731
|
-
if (this.ignoreAttributesFn(n, e)) {
|
|
732
|
-
continue;
|
|
733
|
-
}
|
|
734
|
-
let r = i[t][4];
|
|
735
|
-
let o = this.options.attributeNamePrefix + n;
|
|
736
|
-
if (n.length) {
|
|
737
|
-
if (this.options.transformAttributeName) {
|
|
738
|
-
o = this.options.transformAttributeName(o);
|
|
739
|
-
}
|
|
740
|
-
if (o === "__proto__") o = "#__proto__";
|
|
741
|
-
if (r !== undefined) {
|
|
742
|
-
if (this.options.trimValues) {
|
|
743
|
-
r = r.trim();
|
|
744
|
-
}
|
|
745
|
-
r = this.replaceEntitiesValue(r);
|
|
746
|
-
const t = this.options.attributeValueProcessor(n, r, e);
|
|
747
|
-
if (t === null || t === undefined) {
|
|
748
|
-
s[o] = r;
|
|
749
|
-
} else if (typeof t !== typeof r || t !== r) {
|
|
750
|
-
s[o] = t;
|
|
751
|
-
} else {
|
|
752
|
-
s[o] = it(r, this.options.parseAttributeValue, this.options.numberParseOptions);
|
|
753
|
-
}
|
|
754
|
-
} else if (this.options.allowBooleanAttributes) {
|
|
755
|
-
s[o] = true;
|
|
756
|
-
}
|
|
757
|
-
}
|
|
758
|
-
}
|
|
759
|
-
if (!Object.keys(s).length) {
|
|
760
|
-
return;
|
|
761
|
-
}
|
|
762
|
-
if (this.options.attributesGroupName) {
|
|
763
|
-
const t = {};
|
|
764
|
-
t[this.options.attributesGroupName] = s;
|
|
765
|
-
return t;
|
|
766
|
-
}
|
|
767
|
-
return s;
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
const W = function(t) {
|
|
772
|
-
t = t.replace(/\r\n?/g, "\n");
|
|
773
|
-
const e = new D("!xml");
|
|
774
|
-
let i = e;
|
|
775
|
-
let n = "";
|
|
776
|
-
let s = "";
|
|
777
|
-
for (let r = 0; r < t.length; r++) {
|
|
778
|
-
const o = t[r];
|
|
779
|
-
if (o === "<") {
|
|
780
|
-
if (t[r + 1] === "/") {
|
|
781
|
-
const e = Q(t, ">", r, "Closing Tag is not closed.");
|
|
782
|
-
let o = t.substring(r + 2, e).trim();
|
|
783
|
-
if (this.options.removeNSPrefix) {
|
|
784
|
-
const t = o.indexOf(":");
|
|
785
|
-
if (t !== -1) {
|
|
786
|
-
o = o.substr(t + 1);
|
|
787
|
-
}
|
|
788
|
-
}
|
|
789
|
-
if (this.options.transformTagName) {
|
|
790
|
-
o = this.options.transformTagName(o);
|
|
791
|
-
}
|
|
792
|
-
if (i) {
|
|
793
|
-
n = this.saveTextToParentTag(n, i, s);
|
|
794
|
-
}
|
|
795
|
-
const a = s.substring(s.lastIndexOf(".") + 1);
|
|
796
|
-
if (o && this.options.unpairedTags.indexOf(o) !== -1) {
|
|
797
|
-
throw new Error(`Unpaired tag can not be used as closing tag: </${o}>`);
|
|
798
|
-
}
|
|
799
|
-
let l = 0;
|
|
800
|
-
if (a && this.options.unpairedTags.indexOf(a) !== -1) {
|
|
801
|
-
l = s.lastIndexOf(".", s.lastIndexOf(".") - 1);
|
|
802
|
-
this.tagsNodeStack.pop();
|
|
803
|
-
} else {
|
|
804
|
-
l = s.lastIndexOf(".");
|
|
805
|
-
}
|
|
806
|
-
s = s.substring(0, l);
|
|
807
|
-
i = this.tagsNodeStack.pop();
|
|
808
|
-
n = "";
|
|
809
|
-
r = e;
|
|
810
|
-
} else if (t[r + 1] === "?") {
|
|
811
|
-
let e = tt(t, r, false, "?>");
|
|
812
|
-
if (!e) throw new Error("Pi Tag is not closed.");
|
|
813
|
-
n = this.saveTextToParentTag(n, i, s);
|
|
814
|
-
if (this.options.ignoreDeclaration && e.tagName === "?xml" || this.options.ignorePiTags) ; else {
|
|
815
|
-
const t = new D(e.tagName);
|
|
816
|
-
t.add(this.options.textNodeName, "");
|
|
817
|
-
if (e.tagName !== e.tagExp && e.attrExpPresent) {
|
|
818
|
-
t[":@"] = this.buildAttributesMap(e.tagExp, s, e.tagName);
|
|
819
|
-
}
|
|
820
|
-
this.addChild(i, t, s);
|
|
821
|
-
}
|
|
822
|
-
r = e.closeIndex + 1;
|
|
823
|
-
} else if (t.substr(r + 1, 3) === "!--") {
|
|
824
|
-
const e = Q(t, "--\x3e", r + 4, "Comment is not closed.");
|
|
825
|
-
if (this.options.commentPropName) {
|
|
826
|
-
const o = t.substring(r + 4, e - 2);
|
|
827
|
-
n = this.saveTextToParentTag(n, i, s);
|
|
828
|
-
i.add(this.options.commentPropName, [ {
|
|
829
|
-
[this.options.textNodeName]: o
|
|
830
|
-
} ]);
|
|
831
|
-
}
|
|
832
|
-
r = e;
|
|
833
|
-
} else if (t.substr(r + 1, 2) === "!D") {
|
|
834
|
-
const e = L(t, r);
|
|
835
|
-
this.docTypeEntities = e.entities;
|
|
836
|
-
r = e.i;
|
|
837
|
-
} else if (t.substr(r + 1, 2) === "![") {
|
|
838
|
-
const e = Q(t, "]]>", r, "CDATA is not closed.") - 2;
|
|
839
|
-
const o = t.substring(r + 9, e);
|
|
840
|
-
n = this.saveTextToParentTag(n, i, s);
|
|
841
|
-
let a = this.parseTextData(o, i.tagname, s, true, false, true, true);
|
|
842
|
-
if (a == undefined) a = "";
|
|
843
|
-
if (this.options.cdataPropName) {
|
|
844
|
-
i.add(this.options.cdataPropName, [ {
|
|
845
|
-
[this.options.textNodeName]: o
|
|
846
|
-
} ]);
|
|
847
|
-
} else {
|
|
848
|
-
i.add(this.options.textNodeName, a);
|
|
849
|
-
}
|
|
850
|
-
r = e + 2;
|
|
851
|
-
} else {
|
|
852
|
-
let o = tt(t, r, this.options.removeNSPrefix);
|
|
853
|
-
let a = o.tagName;
|
|
854
|
-
const l = o.rawTagName;
|
|
855
|
-
let u = o.tagExp;
|
|
856
|
-
let f = o.attrExpPresent;
|
|
857
|
-
let c = o.closeIndex;
|
|
858
|
-
if (this.options.transformTagName) {
|
|
859
|
-
a = this.options.transformTagName(a);
|
|
860
|
-
}
|
|
861
|
-
if (i && n) {
|
|
862
|
-
if (i.tagname !== "!xml") {
|
|
863
|
-
n = this.saveTextToParentTag(n, i, s, false);
|
|
864
|
-
}
|
|
865
|
-
}
|
|
866
|
-
const h = i;
|
|
867
|
-
if (h && this.options.unpairedTags.indexOf(h.tagname) !== -1) {
|
|
868
|
-
i = this.tagsNodeStack.pop();
|
|
869
|
-
s = s.substring(0, s.lastIndexOf("."));
|
|
870
|
-
}
|
|
871
|
-
if (a !== e.tagname) {
|
|
872
|
-
s += s ? "." + a : a;
|
|
873
|
-
}
|
|
874
|
-
if (this.isItStopNode(this.options.stopNodes, s, a)) {
|
|
875
|
-
let e = "";
|
|
876
|
-
if (u.length > 0 && u.lastIndexOf("/") === u.length - 1) {
|
|
877
|
-
if (a[a.length - 1] === "/") {
|
|
878
|
-
a = a.substr(0, a.length - 1);
|
|
879
|
-
s = s.substr(0, s.length - 1);
|
|
880
|
-
u = a;
|
|
881
|
-
} else {
|
|
882
|
-
u = u.substr(0, u.length - 1);
|
|
883
|
-
}
|
|
884
|
-
r = o.closeIndex;
|
|
885
|
-
} else if (this.options.unpairedTags.indexOf(a) !== -1) {
|
|
886
|
-
r = o.closeIndex;
|
|
887
|
-
} else {
|
|
888
|
-
const i = this.readStopNodeData(t, l, c + 1);
|
|
889
|
-
if (!i) throw new Error(`Unexpected end of ${l}`);
|
|
890
|
-
r = i.i;
|
|
891
|
-
e = i.tagContent;
|
|
892
|
-
}
|
|
893
|
-
const n = new D(a);
|
|
894
|
-
if (a !== u && f) {
|
|
895
|
-
n[":@"] = this.buildAttributesMap(u, s, a);
|
|
896
|
-
}
|
|
897
|
-
if (e) {
|
|
898
|
-
e = this.parseTextData(e, a, s, true, f, true, true);
|
|
899
|
-
}
|
|
900
|
-
s = s.substr(0, s.lastIndexOf("."));
|
|
901
|
-
n.add(this.options.textNodeName, e);
|
|
902
|
-
this.addChild(i, n, s);
|
|
903
|
-
} else {
|
|
904
|
-
if (u.length > 0 && u.lastIndexOf("/") === u.length - 1) {
|
|
905
|
-
if (a[a.length - 1] === "/") {
|
|
906
|
-
a = a.substr(0, a.length - 1);
|
|
907
|
-
s = s.substr(0, s.length - 1);
|
|
908
|
-
u = a;
|
|
909
|
-
} else {
|
|
910
|
-
u = u.substr(0, u.length - 1);
|
|
911
|
-
}
|
|
912
|
-
if (this.options.transformTagName) {
|
|
913
|
-
a = this.options.transformTagName(a);
|
|
914
|
-
}
|
|
915
|
-
const t = new D(a);
|
|
916
|
-
if (a !== u && f) {
|
|
917
|
-
t[":@"] = this.buildAttributesMap(u, s, a);
|
|
918
|
-
}
|
|
919
|
-
this.addChild(i, t, s);
|
|
920
|
-
s = s.substr(0, s.lastIndexOf("."));
|
|
921
|
-
} else {
|
|
922
|
-
const t = new D(a);
|
|
923
|
-
this.tagsNodeStack.push(i);
|
|
924
|
-
if (a !== u && f) {
|
|
925
|
-
t[":@"] = this.buildAttributesMap(u, s, a);
|
|
926
|
-
}
|
|
927
|
-
this.addChild(i, t, s);
|
|
928
|
-
i = t;
|
|
929
|
-
}
|
|
930
|
-
n = "";
|
|
931
|
-
r = c;
|
|
932
|
-
}
|
|
933
|
-
}
|
|
934
|
-
} else {
|
|
935
|
-
n += t[r];
|
|
936
|
-
}
|
|
937
|
-
}
|
|
938
|
-
return e.child;
|
|
939
|
-
};
|
|
940
|
-
|
|
941
|
-
function Z(t, e, i) {
|
|
942
|
-
const n = this.options.updateTag(e.tagname, i, e[":@"]);
|
|
943
|
-
if (n === false) ; else if (typeof n === "string") {
|
|
944
|
-
e.tagname = n;
|
|
945
|
-
t.addChild(e);
|
|
946
|
-
} else {
|
|
947
|
-
t.addChild(e);
|
|
948
|
-
}
|
|
949
|
-
}
|
|
950
|
-
|
|
951
|
-
const z = function(t) {
|
|
952
|
-
if (this.options.processEntities) {
|
|
953
|
-
for (let e in this.docTypeEntities) {
|
|
954
|
-
const i = this.docTypeEntities[e];
|
|
955
|
-
t = t.replace(i.regx, i.val);
|
|
956
|
-
}
|
|
957
|
-
for (let e in this.lastEntities) {
|
|
958
|
-
const i = this.lastEntities[e];
|
|
959
|
-
t = t.replace(i.regex, i.val);
|
|
960
|
-
}
|
|
961
|
-
if (this.options.htmlEntities) {
|
|
962
|
-
for (let e in this.htmlEntities) {
|
|
963
|
-
const i = this.htmlEntities[e];
|
|
964
|
-
t = t.replace(i.regex, i.val);
|
|
965
|
-
}
|
|
966
|
-
}
|
|
967
|
-
t = t.replace(this.ampEntity.regex, this.ampEntity.val);
|
|
968
|
-
}
|
|
969
|
-
return t;
|
|
970
|
-
};
|
|
971
|
-
|
|
972
|
-
function J(t, e, i, n) {
|
|
973
|
-
if (t) {
|
|
974
|
-
if (n === undefined) n = e.child.length === 0;
|
|
975
|
-
t = this.parseTextData(t, e.tagname, i, false, e[":@"] ? Object.keys(e[":@"]).length !== 0 : false, n);
|
|
976
|
-
if (t !== undefined && t !== "") e.add(this.options.textNodeName, t);
|
|
977
|
-
t = "";
|
|
978
|
-
}
|
|
979
|
-
return t;
|
|
980
|
-
}
|
|
981
|
-
|
|
982
|
-
function H(t, e, i) {
|
|
983
|
-
const n = "*." + i;
|
|
984
|
-
for (const i in t) {
|
|
985
|
-
const s = t[i];
|
|
986
|
-
if (n === s || e === s) return true;
|
|
987
|
-
}
|
|
988
|
-
return false;
|
|
989
|
-
}
|
|
990
|
-
|
|
991
|
-
function K(t, e, i = ">") {
|
|
992
|
-
let n;
|
|
993
|
-
let s = "";
|
|
994
|
-
for (let r = e; r < t.length; r++) {
|
|
995
|
-
let e = t[r];
|
|
996
|
-
if (n) {
|
|
997
|
-
if (e === n) n = "";
|
|
998
|
-
} else if (e === '"' || e === "'") {
|
|
999
|
-
n = e;
|
|
1000
|
-
} else if (e === i[0]) {
|
|
1001
|
-
if (i[1]) {
|
|
1002
|
-
if (t[r + 1] === i[1]) {
|
|
1003
|
-
return {
|
|
1004
|
-
data: s,
|
|
1005
|
-
index: r
|
|
1006
|
-
};
|
|
1007
|
-
}
|
|
1008
|
-
} else {
|
|
1009
|
-
return {
|
|
1010
|
-
data: s,
|
|
1011
|
-
index: r
|
|
1012
|
-
};
|
|
1013
|
-
}
|
|
1014
|
-
} else if (e === "\t") {
|
|
1015
|
-
e = " ";
|
|
1016
|
-
}
|
|
1017
|
-
s += e;
|
|
1018
|
-
}
|
|
1019
|
-
}
|
|
1020
|
-
|
|
1021
|
-
function Q(t, e, i, n) {
|
|
1022
|
-
const s = t.indexOf(e, i);
|
|
1023
|
-
if (s === -1) {
|
|
1024
|
-
throw new Error(n);
|
|
1025
|
-
} else {
|
|
1026
|
-
return s + e.length - 1;
|
|
1027
|
-
}
|
|
1028
|
-
}
|
|
1029
|
-
|
|
1030
|
-
function tt(t, e, i, n = ">") {
|
|
1031
|
-
const s = K(t, e + 1, n);
|
|
1032
|
-
if (!s) return;
|
|
1033
|
-
let r = s.data;
|
|
1034
|
-
const o = s.index;
|
|
1035
|
-
const a = r.search(/\s/);
|
|
1036
|
-
let l = r;
|
|
1037
|
-
let u = true;
|
|
1038
|
-
if (a !== -1) {
|
|
1039
|
-
l = r.substring(0, a);
|
|
1040
|
-
r = r.substring(a + 1).trimStart();
|
|
1041
|
-
}
|
|
1042
|
-
const f = l;
|
|
1043
|
-
if (i) {
|
|
1044
|
-
const t = l.indexOf(":");
|
|
1045
|
-
if (t !== -1) {
|
|
1046
|
-
l = l.substr(t + 1);
|
|
1047
|
-
u = l !== s.data.substr(t + 1);
|
|
1048
|
-
}
|
|
1049
|
-
}
|
|
1050
|
-
return {
|
|
1051
|
-
tagName: l,
|
|
1052
|
-
tagExp: r,
|
|
1053
|
-
closeIndex: o,
|
|
1054
|
-
attrExpPresent: u,
|
|
1055
|
-
rawTagName: f
|
|
1056
|
-
};
|
|
1057
|
-
}
|
|
1058
|
-
|
|
1059
|
-
function et(t, e, i) {
|
|
1060
|
-
const n = i;
|
|
1061
|
-
let s = 1;
|
|
1062
|
-
for (;i < t.length; i++) {
|
|
1063
|
-
if (t[i] === "<") {
|
|
1064
|
-
if (t[i + 1] === "/") {
|
|
1065
|
-
const r = Q(t, ">", i, `${e} is not closed`);
|
|
1066
|
-
let o = t.substring(i + 2, r).trim();
|
|
1067
|
-
if (o === e) {
|
|
1068
|
-
s--;
|
|
1069
|
-
if (s === 0) {
|
|
1070
|
-
return {
|
|
1071
|
-
tagContent: t.substring(n, i),
|
|
1072
|
-
i: r
|
|
1073
|
-
};
|
|
1074
|
-
}
|
|
1075
|
-
}
|
|
1076
|
-
i = r;
|
|
1077
|
-
} else if (t[i + 1] === "?") {
|
|
1078
|
-
const e = Q(t, "?>", i + 1, "StopNode is not closed.");
|
|
1079
|
-
i = e;
|
|
1080
|
-
} else if (t.substr(i + 1, 3) === "!--") {
|
|
1081
|
-
const e = Q(t, "--\x3e", i + 3, "StopNode is not closed.");
|
|
1082
|
-
i = e;
|
|
1083
|
-
} else if (t.substr(i + 1, 2) === "![") {
|
|
1084
|
-
const e = Q(t, "]]>", i, "StopNode is not closed.") - 2;
|
|
1085
|
-
i = e;
|
|
1086
|
-
} else {
|
|
1087
|
-
const n = tt(t, i, ">");
|
|
1088
|
-
if (n) {
|
|
1089
|
-
const t = n && n.tagName;
|
|
1090
|
-
if (t === e && n.tagExp[n.tagExp.length - 1] !== "/") {
|
|
1091
|
-
s++;
|
|
1092
|
-
}
|
|
1093
|
-
i = n.closeIndex;
|
|
1094
|
-
}
|
|
1095
|
-
}
|
|
1096
|
-
}
|
|
1097
|
-
}
|
|
1098
|
-
}
|
|
1099
|
-
|
|
1100
|
-
function it(t, e, i) {
|
|
1101
|
-
if (e && typeof t === "string") {
|
|
1102
|
-
const e = t.trim();
|
|
1103
|
-
if (e === "true") return true; else if (e === "false") return false; else return M(t, i);
|
|
1104
|
-
} else {
|
|
1105
|
-
if (_.isExist(t)) {
|
|
1106
|
-
return t;
|
|
1107
|
-
} else {
|
|
1108
|
-
return "";
|
|
1109
|
-
}
|
|
1110
|
-
}
|
|
1111
|
-
}
|
|
1112
|
-
|
|
1113
|
-
var nt = X;
|
|
1114
|
-
|
|
1115
|
-
var st = {};
|
|
1116
|
-
|
|
1117
|
-
function rt(t, e) {
|
|
1118
|
-
return ot(t, e);
|
|
1119
|
-
}
|
|
1120
|
-
|
|
1121
|
-
function ot(t, e, i) {
|
|
1122
|
-
let n;
|
|
1123
|
-
const s = {};
|
|
1124
|
-
for (let r = 0; r < t.length; r++) {
|
|
1125
|
-
const o = t[r];
|
|
1126
|
-
const a = at(o);
|
|
1127
|
-
let l = "";
|
|
1128
|
-
if (i === undefined) l = a; else l = i + "." + a;
|
|
1129
|
-
if (a === e.textNodeName) {
|
|
1130
|
-
if (n === undefined) n = o[a]; else n += "" + o[a];
|
|
1131
|
-
} else if (a === undefined) {
|
|
1132
|
-
continue;
|
|
1133
|
-
} else if (o[a]) {
|
|
1134
|
-
let t = ot(o[a], e, l);
|
|
1135
|
-
const i = ut(t, e);
|
|
1136
|
-
if (o[":@"]) {
|
|
1137
|
-
lt(t, o[":@"], l, e);
|
|
1138
|
-
} else if (Object.keys(t).length === 1 && t[e.textNodeName] !== undefined && !e.alwaysCreateTextNode) {
|
|
1139
|
-
t = t[e.textNodeName];
|
|
1140
|
-
} else if (Object.keys(t).length === 0) {
|
|
1141
|
-
if (e.alwaysCreateTextNode) t[e.textNodeName] = ""; else t = "";
|
|
1142
|
-
}
|
|
1143
|
-
if (s[a] !== undefined && s.hasOwnProperty(a)) {
|
|
1144
|
-
if (!Array.isArray(s[a])) {
|
|
1145
|
-
s[a] = [ s[a] ];
|
|
1146
|
-
}
|
|
1147
|
-
s[a].push(t);
|
|
1148
|
-
} else {
|
|
1149
|
-
if (e.isArray(a, l, i)) {
|
|
1150
|
-
s[a] = [ t ];
|
|
1151
|
-
} else {
|
|
1152
|
-
s[a] = t;
|
|
1153
|
-
}
|
|
1154
|
-
}
|
|
1155
|
-
}
|
|
1156
|
-
}
|
|
1157
|
-
if (typeof n === "string") {
|
|
1158
|
-
if (n.length > 0) s[e.textNodeName] = n;
|
|
1159
|
-
} else if (n !== undefined) s[e.textNodeName] = n;
|
|
1160
|
-
return s;
|
|
1161
|
-
}
|
|
1162
|
-
|
|
1163
|
-
function at(t) {
|
|
1164
|
-
const e = Object.keys(t);
|
|
1165
|
-
for (let t = 0; t < e.length; t++) {
|
|
1166
|
-
const i = e[t];
|
|
1167
|
-
if (i !== ":@") return i;
|
|
1168
|
-
}
|
|
1169
|
-
}
|
|
1170
|
-
|
|
1171
|
-
function lt(t, e, i, n) {
|
|
1172
|
-
if (e) {
|
|
1173
|
-
const s = Object.keys(e);
|
|
1174
|
-
const r = s.length;
|
|
1175
|
-
for (let o = 0; o < r; o++) {
|
|
1176
|
-
const r = s[o];
|
|
1177
|
-
if (n.isArray(r, i + "." + r, true, true)) {
|
|
1178
|
-
t[r] = [ e[r] ];
|
|
1179
|
-
} else {
|
|
1180
|
-
t[r] = e[r];
|
|
1181
|
-
}
|
|
1182
|
-
}
|
|
1183
|
-
}
|
|
1184
|
-
}
|
|
1185
|
-
|
|
1186
|
-
function ut(t, e) {
|
|
1187
|
-
const {textNodeName: i} = e;
|
|
1188
|
-
const n = Object.keys(t).length;
|
|
1189
|
-
if (n === 0) {
|
|
1190
|
-
return true;
|
|
1191
|
-
}
|
|
1192
|
-
if (n === 1 && (t[i] || typeof t[i] === "boolean" || t[i] === 0)) {
|
|
1193
|
-
return true;
|
|
1194
|
-
}
|
|
1195
|
-
return false;
|
|
1196
|
-
}
|
|
1197
|
-
|
|
1198
|
-
st.prettify = rt;
|
|
1199
|
-
|
|
1200
|
-
const {buildOptions: ft} = E;
|
|
1201
|
-
|
|
1202
|
-
const ct = nt;
|
|
1203
|
-
|
|
1204
|
-
const {prettify: ht} = st;
|
|
1205
|
-
|
|
1206
|
-
const dt = e;
|
|
1207
|
-
|
|
1208
|
-
let pt = class XMLParser {
|
|
1209
|
-
constructor(t) {
|
|
1210
|
-
this.externalEntities = {};
|
|
1211
|
-
this.options = ft(t);
|
|
1212
|
-
}
|
|
1213
|
-
parse(t, e) {
|
|
1214
|
-
if (typeof t === "string") ; else if (t.toString) {
|
|
1215
|
-
t = t.toString();
|
|
1216
|
-
} else {
|
|
1217
|
-
throw new Error("XML data is accepted in String or Bytes[] form.");
|
|
1218
|
-
}
|
|
1219
|
-
if (e) {
|
|
1220
|
-
if (e === true) e = {};
|
|
1221
|
-
const i = dt.validate(t, e);
|
|
1222
|
-
if (i !== true) {
|
|
1223
|
-
throw Error(`${i.err.msg}:${i.err.line}:${i.err.col}`);
|
|
1224
|
-
}
|
|
1225
|
-
}
|
|
1226
|
-
const i = new ct(this.options);
|
|
1227
|
-
i.addExternalEntities(this.externalEntities);
|
|
1228
|
-
const n = i.parseXml(t);
|
|
1229
|
-
if (this.options.preserveOrder || n === undefined) return n; else return ht(n, this.options);
|
|
1230
|
-
}
|
|
1231
|
-
addEntity(t, e) {
|
|
1232
|
-
if (e.indexOf("&") !== -1) {
|
|
1233
|
-
throw new Error("Entity value can't have '&'");
|
|
1234
|
-
} else if (t.indexOf("&") !== -1 || t.indexOf(";") !== -1) {
|
|
1235
|
-
throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");
|
|
1236
|
-
} else if (e === "&") {
|
|
1237
|
-
throw new Error("An entity with value '&' is not permitted");
|
|
1238
|
-
} else {
|
|
1239
|
-
this.externalEntities[t] = e;
|
|
1240
|
-
}
|
|
1241
|
-
}
|
|
1242
|
-
};
|
|
1243
|
-
|
|
1244
|
-
var gt = pt;
|
|
1245
|
-
|
|
1246
|
-
const mt = "\n";
|
|
1247
|
-
|
|
1248
|
-
function xt(t, e) {
|
|
1249
|
-
let i = "";
|
|
1250
|
-
if (e.format && e.indentBy.length > 0) {
|
|
1251
|
-
i = mt;
|
|
1252
|
-
}
|
|
1253
|
-
return Nt(t, e, "", i);
|
|
1254
|
-
}
|
|
1255
|
-
|
|
1256
|
-
function Nt(t, e, i, n) {
|
|
1257
|
-
let s = "";
|
|
1258
|
-
let r = false;
|
|
1259
|
-
for (let o = 0; o < t.length; o++) {
|
|
1260
|
-
const a = t[o];
|
|
1261
|
-
const l = bt(a);
|
|
1262
|
-
if (l === undefined) continue;
|
|
1263
|
-
let u = "";
|
|
1264
|
-
if (i.length === 0) u = l; else u = `${i}.${l}`;
|
|
1265
|
-
if (l === e.textNodeName) {
|
|
1266
|
-
let t = a[l];
|
|
1267
|
-
if (!vt(u, e)) {
|
|
1268
|
-
t = e.tagValueProcessor(l, t);
|
|
1269
|
-
t = yt(t, e);
|
|
1270
|
-
}
|
|
1271
|
-
if (r) {
|
|
1272
|
-
s += n;
|
|
1273
|
-
}
|
|
1274
|
-
s += t;
|
|
1275
|
-
r = false;
|
|
1276
|
-
continue;
|
|
1277
|
-
} else if (l === e.cdataPropName) {
|
|
1278
|
-
if (r) {
|
|
1279
|
-
s += n;
|
|
1280
|
-
}
|
|
1281
|
-
s += `<![CDATA[${a[l][0][e.textNodeName]}]]>`;
|
|
1282
|
-
r = false;
|
|
1283
|
-
continue;
|
|
1284
|
-
} else if (l === e.commentPropName) {
|
|
1285
|
-
s += n + `\x3c!--${a[l][0][e.textNodeName]}--\x3e`;
|
|
1286
|
-
r = true;
|
|
1287
|
-
continue;
|
|
1288
|
-
} else if (l[0] === "?") {
|
|
1289
|
-
const t = Et(a[":@"], e);
|
|
1290
|
-
const i = l === "?xml" ? "" : n;
|
|
1291
|
-
let o = a[l][0][e.textNodeName];
|
|
1292
|
-
o = o.length !== 0 ? " " + o : "";
|
|
1293
|
-
s += i + `<${l}${o}${t}?>`;
|
|
1294
|
-
r = true;
|
|
1295
|
-
continue;
|
|
1296
|
-
}
|
|
1297
|
-
let f = n;
|
|
1298
|
-
if (f !== "") {
|
|
1299
|
-
f += e.indentBy;
|
|
1300
|
-
}
|
|
1301
|
-
const c = Et(a[":@"], e);
|
|
1302
|
-
const h = n + `<${l}${c}`;
|
|
1303
|
-
const d = Nt(a[l], e, u, f);
|
|
1304
|
-
if (e.unpairedTags.indexOf(l) !== -1) {
|
|
1305
|
-
if (e.suppressUnpairedNode) s += h + ">"; else s += h + "/>";
|
|
1306
|
-
} else if ((!d || d.length === 0) && e.suppressEmptyNode) {
|
|
1307
|
-
s += h + "/>";
|
|
1308
|
-
} else if (d && d.endsWith(">")) {
|
|
1309
|
-
s += h + `>${d}${n}</${l}>`;
|
|
1310
|
-
} else {
|
|
1311
|
-
s += h + ">";
|
|
1312
|
-
if (d && n !== "" && (d.includes("/>") || d.includes("</"))) {
|
|
1313
|
-
s += n + e.indentBy + d + n;
|
|
1314
|
-
} else {
|
|
1315
|
-
s += d;
|
|
1316
|
-
}
|
|
1317
|
-
s += `</${l}>`;
|
|
1318
|
-
}
|
|
1319
|
-
r = true;
|
|
1320
|
-
}
|
|
1321
|
-
return s;
|
|
1322
|
-
}
|
|
1323
|
-
|
|
1324
|
-
function bt(t) {
|
|
1325
|
-
const e = Object.keys(t);
|
|
1326
|
-
for (let i = 0; i < e.length; i++) {
|
|
1327
|
-
const n = e[i];
|
|
1328
|
-
if (!t.hasOwnProperty(n)) continue;
|
|
1329
|
-
if (n !== ":@") return n;
|
|
1330
|
-
}
|
|
1331
|
-
}
|
|
1332
|
-
|
|
1333
|
-
function Et(t, e) {
|
|
1334
|
-
let i = "";
|
|
1335
|
-
if (t && !e.ignoreAttributes) {
|
|
1336
|
-
for (let n in t) {
|
|
1337
|
-
if (!t.hasOwnProperty(n)) continue;
|
|
1338
|
-
let s = e.attributeValueProcessor(n, t[n]);
|
|
1339
|
-
s = yt(s, e);
|
|
1340
|
-
if (s === true && e.suppressBooleanAttributes) {
|
|
1341
|
-
i += ` ${n.substr(e.attributeNamePrefix.length)}`;
|
|
1342
|
-
} else {
|
|
1343
|
-
i += ` ${n.substr(e.attributeNamePrefix.length)}="${s}"`;
|
|
1344
|
-
}
|
|
1345
|
-
}
|
|
1346
|
-
}
|
|
1347
|
-
return i;
|
|
1348
|
-
}
|
|
1349
|
-
|
|
1350
|
-
function vt(t, e) {
|
|
1351
|
-
t = t.substr(0, t.length - e.textNodeName.length - 1);
|
|
1352
|
-
let i = t.substr(t.lastIndexOf(".") + 1);
|
|
1353
|
-
for (let n in e.stopNodes) {
|
|
1354
|
-
if (e.stopNodes[n] === t || e.stopNodes[n] === "*." + i) return true;
|
|
1355
|
-
}
|
|
1356
|
-
return false;
|
|
1357
|
-
}
|
|
1358
|
-
|
|
1359
|
-
function yt(t, e) {
|
|
1360
|
-
if (t && t.length > 0 && e.processEntities) {
|
|
1361
|
-
for (let i = 0; i < e.entities.length; i++) {
|
|
1362
|
-
const n = e.entities[i];
|
|
1363
|
-
t = t.replace(n.regex, n.val);
|
|
1364
|
-
}
|
|
1365
|
-
}
|
|
1366
|
-
return t;
|
|
1367
|
-
}
|
|
1368
|
-
|
|
1369
|
-
var Tt = xt;
|
|
1370
|
-
|
|
1371
|
-
const Ot = Tt;
|
|
1372
|
-
|
|
1373
|
-
const Pt = $;
|
|
1374
|
-
|
|
1375
|
-
const At = {
|
|
1376
|
-
attributeNamePrefix: "@_",
|
|
1377
|
-
attributesGroupName: false,
|
|
1378
|
-
textNodeName: "#text",
|
|
1379
|
-
ignoreAttributes: true,
|
|
1380
|
-
cdataPropName: false,
|
|
1381
|
-
format: false,
|
|
1382
|
-
indentBy: " ",
|
|
1383
|
-
suppressEmptyNode: false,
|
|
1384
|
-
suppressUnpairedNode: true,
|
|
1385
|
-
suppressBooleanAttributes: true,
|
|
1386
|
-
tagValueProcessor: function(t, e) {
|
|
1387
|
-
return e;
|
|
1388
|
-
},
|
|
1389
|
-
attributeValueProcessor: function(t, e) {
|
|
1390
|
-
return e;
|
|
1391
|
-
},
|
|
1392
|
-
preserveOrder: false,
|
|
1393
|
-
commentPropName: false,
|
|
1394
|
-
unpairedTags: [],
|
|
1395
|
-
entities: [ {
|
|
1396
|
-
regex: new RegExp("&", "g"),
|
|
1397
|
-
val: "&"
|
|
1398
|
-
}, {
|
|
1399
|
-
regex: new RegExp(">", "g"),
|
|
1400
|
-
val: ">"
|
|
1401
|
-
}, {
|
|
1402
|
-
regex: new RegExp("<", "g"),
|
|
1403
|
-
val: "<"
|
|
1404
|
-
}, {
|
|
1405
|
-
regex: new RegExp("'", "g"),
|
|
1406
|
-
val: "'"
|
|
1407
|
-
}, {
|
|
1408
|
-
regex: new RegExp('"', "g"),
|
|
1409
|
-
val: """
|
|
1410
|
-
} ],
|
|
1411
|
-
processEntities: true,
|
|
1412
|
-
stopNodes: [],
|
|
1413
|
-
oneListGroup: false
|
|
1414
|
-
};
|
|
1415
|
-
|
|
1416
|
-
function wt(t) {
|
|
1417
|
-
this.options = Object.assign({}, At, t);
|
|
1418
|
-
if (this.options.ignoreAttributes === true || this.options.attributesGroupName) {
|
|
1419
|
-
this.isAttribute = function() {
|
|
1420
|
-
return false;
|
|
1421
|
-
};
|
|
1422
|
-
} else {
|
|
1423
|
-
this.ignoreAttributesFn = Pt(this.options.ignoreAttributes);
|
|
1424
|
-
this.attrPrefixLen = this.options.attributeNamePrefix.length;
|
|
1425
|
-
this.isAttribute = St;
|
|
1426
|
-
}
|
|
1427
|
-
this.processTextOrObjNode = Ct;
|
|
1428
|
-
if (this.options.format) {
|
|
1429
|
-
this.indentate = It;
|
|
1430
|
-
this.tagEndChar = ">\n";
|
|
1431
|
-
this.newLine = "\n";
|
|
1432
|
-
} else {
|
|
1433
|
-
this.indentate = function() {
|
|
1434
|
-
return "";
|
|
1435
|
-
};
|
|
1436
|
-
this.tagEndChar = ">";
|
|
1437
|
-
this.newLine = "";
|
|
1438
|
-
}
|
|
1439
|
-
}
|
|
1440
|
-
|
|
1441
|
-
wt.prototype.build = function(t) {
|
|
1442
|
-
if (this.options.preserveOrder) {
|
|
1443
|
-
return Ot(t, this.options);
|
|
1444
|
-
} else {
|
|
1445
|
-
if (Array.isArray(t) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1) {
|
|
1446
|
-
t = {
|
|
1447
|
-
[this.options.arrayNodeName]: t
|
|
1448
|
-
};
|
|
1449
|
-
}
|
|
1450
|
-
return this.j2x(t, 0, []).val;
|
|
1451
|
-
}
|
|
1452
|
-
};
|
|
1453
|
-
|
|
1454
|
-
wt.prototype.j2x = function(t, e, i) {
|
|
1455
|
-
let n = "";
|
|
1456
|
-
let s = "";
|
|
1457
|
-
const r = i.join(".");
|
|
1458
|
-
for (let o in t) {
|
|
1459
|
-
if (!Object.prototype.hasOwnProperty.call(t, o)) continue;
|
|
1460
|
-
if (typeof t[o] === "undefined") {
|
|
1461
|
-
if (this.isAttribute(o)) {
|
|
1462
|
-
s += "";
|
|
1463
|
-
}
|
|
1464
|
-
} else if (t[o] === null) {
|
|
1465
|
-
if (this.isAttribute(o)) {
|
|
1466
|
-
s += "";
|
|
1467
|
-
} else if (o === this.options.cdataPropName) {
|
|
1468
|
-
s += "";
|
|
1469
|
-
} else if (o[0] === "?") {
|
|
1470
|
-
s += this.indentate(e) + "<" + o + "?" + this.tagEndChar;
|
|
1471
|
-
} else {
|
|
1472
|
-
s += this.indentate(e) + "<" + o + "/" + this.tagEndChar;
|
|
1473
|
-
}
|
|
1474
|
-
} else if (t[o] instanceof Date) {
|
|
1475
|
-
s += this.buildTextValNode(t[o], o, "", e);
|
|
1476
|
-
} else if (typeof t[o] !== "object") {
|
|
1477
|
-
const i = this.isAttribute(o);
|
|
1478
|
-
if (i && !this.ignoreAttributesFn(i, r)) {
|
|
1479
|
-
n += this.buildAttrPairStr(i, "" + t[o]);
|
|
1480
|
-
} else if (!i) {
|
|
1481
|
-
if (o === this.options.textNodeName) {
|
|
1482
|
-
let e = this.options.tagValueProcessor(o, "" + t[o]);
|
|
1483
|
-
s += this.replaceEntitiesValue(e);
|
|
1484
|
-
} else {
|
|
1485
|
-
s += this.buildTextValNode(t[o], o, "", e);
|
|
1486
|
-
}
|
|
1487
|
-
}
|
|
1488
|
-
} else if (Array.isArray(t[o])) {
|
|
1489
|
-
const n = t[o].length;
|
|
1490
|
-
let r = "";
|
|
1491
|
-
let a = "";
|
|
1492
|
-
for (let l = 0; l < n; l++) {
|
|
1493
|
-
const n = t[o][l];
|
|
1494
|
-
if (typeof n === "undefined") ; else if (n === null) {
|
|
1495
|
-
if (o[0] === "?") s += this.indentate(e) + "<" + o + "?" + this.tagEndChar; else s += this.indentate(e) + "<" + o + "/" + this.tagEndChar;
|
|
1496
|
-
} else if (typeof n === "object") {
|
|
1497
|
-
if (this.options.oneListGroup) {
|
|
1498
|
-
const t = this.j2x(n, e + 1, i.concat(o));
|
|
1499
|
-
r += t.val;
|
|
1500
|
-
if (this.options.attributesGroupName && n.hasOwnProperty(this.options.attributesGroupName)) {
|
|
1501
|
-
a += t.attrStr;
|
|
1502
|
-
}
|
|
1503
|
-
} else {
|
|
1504
|
-
r += this.processTextOrObjNode(n, o, e, i);
|
|
1505
|
-
}
|
|
1506
|
-
} else {
|
|
1507
|
-
if (this.options.oneListGroup) {
|
|
1508
|
-
let t = this.options.tagValueProcessor(o, n);
|
|
1509
|
-
t = this.replaceEntitiesValue(t);
|
|
1510
|
-
r += t;
|
|
1511
|
-
} else {
|
|
1512
|
-
r += this.buildTextValNode(n, o, "", e);
|
|
1513
|
-
}
|
|
1514
|
-
}
|
|
1515
|
-
}
|
|
1516
|
-
if (this.options.oneListGroup) {
|
|
1517
|
-
r = this.buildObjectNode(r, o, a, e);
|
|
1518
|
-
}
|
|
1519
|
-
s += r;
|
|
1520
|
-
} else {
|
|
1521
|
-
if (this.options.attributesGroupName && o === this.options.attributesGroupName) {
|
|
1522
|
-
const e = Object.keys(t[o]);
|
|
1523
|
-
const i = e.length;
|
|
1524
|
-
for (let s = 0; s < i; s++) {
|
|
1525
|
-
n += this.buildAttrPairStr(e[s], "" + t[o][e[s]]);
|
|
1526
|
-
}
|
|
1527
|
-
} else {
|
|
1528
|
-
s += this.processTextOrObjNode(t[o], o, e, i);
|
|
1529
|
-
}
|
|
1530
|
-
}
|
|
1531
|
-
}
|
|
1532
|
-
return {
|
|
1533
|
-
attrStr: n,
|
|
1534
|
-
val: s
|
|
1535
|
-
};
|
|
1536
|
-
};
|
|
1537
|
-
|
|
1538
|
-
wt.prototype.buildAttrPairStr = function(t, e) {
|
|
1539
|
-
e = this.options.attributeValueProcessor(t, "" + e);
|
|
1540
|
-
e = this.replaceEntitiesValue(e);
|
|
1541
|
-
if (this.options.suppressBooleanAttributes && e === "true") {
|
|
1542
|
-
return " " + t;
|
|
1543
|
-
} else return " " + t + '="' + e + '"';
|
|
1544
|
-
};
|
|
1545
|
-
|
|
1546
|
-
function Ct(t, e, i, n) {
|
|
1547
|
-
const s = this.j2x(t, i + 1, n.concat(e));
|
|
1548
|
-
if (t[this.options.textNodeName] !== undefined && Object.keys(t).length === 1) {
|
|
1549
|
-
return this.buildTextValNode(t[this.options.textNodeName], e, s.attrStr, i);
|
|
1550
|
-
} else {
|
|
1551
|
-
return this.buildObjectNode(s.val, e, s.attrStr, i);
|
|
1552
|
-
}
|
|
1553
|
-
}
|
|
1554
|
-
|
|
1555
|
-
wt.prototype.buildObjectNode = function(t, e, i, n) {
|
|
1556
|
-
if (t === "") {
|
|
1557
|
-
if (e[0] === "?") return this.indentate(n) + "<" + e + i + "?" + this.tagEndChar; else {
|
|
1558
|
-
return this.indentate(n) + "<" + e + i + this.closeTag(e) + this.tagEndChar;
|
|
1559
|
-
}
|
|
1560
|
-
} else {
|
|
1561
|
-
let s = "</" + e + this.tagEndChar;
|
|
1562
|
-
let r = "";
|
|
1563
|
-
if (e[0] === "?") {
|
|
1564
|
-
r = "?";
|
|
1565
|
-
s = "";
|
|
1566
|
-
}
|
|
1567
|
-
if ((i || i === "") && t.indexOf("<") === -1) {
|
|
1568
|
-
return this.indentate(n) + "<" + e + i + r + ">" + t + s;
|
|
1569
|
-
} else if (this.options.commentPropName !== false && e === this.options.commentPropName && r.length === 0) {
|
|
1570
|
-
return this.indentate(n) + `\x3c!--${t}--\x3e` + this.newLine;
|
|
1571
|
-
} else {
|
|
1572
|
-
return this.indentate(n) + "<" + e + i + r + this.tagEndChar + t + this.indentate(n) + s;
|
|
1573
|
-
}
|
|
1574
|
-
}
|
|
1575
|
-
};
|
|
1576
|
-
|
|
1577
|
-
wt.prototype.closeTag = function(t) {
|
|
1578
|
-
let e = "";
|
|
1579
|
-
if (this.options.unpairedTags.indexOf(t) !== -1) {
|
|
1580
|
-
if (!this.options.suppressUnpairedNode) e = "/";
|
|
1581
|
-
} else if (this.options.suppressEmptyNode) {
|
|
1582
|
-
e = "/";
|
|
1583
|
-
} else {
|
|
1584
|
-
e = `></${t}`;
|
|
1585
|
-
}
|
|
1586
|
-
return e;
|
|
1587
|
-
};
|
|
1588
|
-
|
|
1589
|
-
wt.prototype.buildTextValNode = function(t, e, i, n) {
|
|
1590
|
-
if (this.options.cdataPropName !== false && e === this.options.cdataPropName) {
|
|
1591
|
-
return this.indentate(n) + `<![CDATA[${t}]]>` + this.newLine;
|
|
1592
|
-
} else if (this.options.commentPropName !== false && e === this.options.commentPropName) {
|
|
1593
|
-
return this.indentate(n) + `\x3c!--${t}--\x3e` + this.newLine;
|
|
1594
|
-
} else if (e[0] === "?") {
|
|
1595
|
-
return this.indentate(n) + "<" + e + i + "?" + this.tagEndChar;
|
|
1596
|
-
} else {
|
|
1597
|
-
let s = this.options.tagValueProcessor(e, t);
|
|
1598
|
-
s = this.replaceEntitiesValue(s);
|
|
1599
|
-
if (s === "") {
|
|
1600
|
-
return this.indentate(n) + "<" + e + i + this.closeTag(e) + this.tagEndChar;
|
|
1601
|
-
} else {
|
|
1602
|
-
return this.indentate(n) + "<" + e + i + ">" + s + "</" + e + this.tagEndChar;
|
|
1603
|
-
}
|
|
1604
|
-
}
|
|
1605
|
-
};
|
|
1606
|
-
|
|
1607
|
-
wt.prototype.replaceEntitiesValue = function(t) {
|
|
1608
|
-
if (t && t.length > 0 && this.options.processEntities) {
|
|
1609
|
-
for (let e = 0; e < this.options.entities.length; e++) {
|
|
1610
|
-
const i = this.options.entities[e];
|
|
1611
|
-
t = t.replace(i.regex, i.val);
|
|
1612
|
-
}
|
|
1613
|
-
}
|
|
1614
|
-
return t;
|
|
1615
|
-
};
|
|
1616
|
-
|
|
1617
|
-
function It(t) {
|
|
1618
|
-
return this.options.indentBy.repeat(t);
|
|
1619
|
-
}
|
|
1620
|
-
|
|
1621
|
-
function St(t) {
|
|
1622
|
-
if (t.startsWith(this.options.attributeNamePrefix) && t !== this.options.textNodeName) {
|
|
1623
|
-
return t.substr(this.attrPrefixLen);
|
|
1624
|
-
} else {
|
|
1625
|
-
return false;
|
|
1626
|
-
}
|
|
1627
|
-
}
|
|
1628
|
-
|
|
1629
|
-
var Vt = wt;
|
|
1630
|
-
|
|
1631
|
-
const jt = e;
|
|
1632
|
-
|
|
1633
|
-
const kt = gt;
|
|
1634
|
-
|
|
1635
|
-
const Ft = Vt;
|
|
1636
|
-
|
|
1637
|
-
exports.fxp = {
|
|
1638
|
-
XMLParser: kt,
|
|
1639
|
-
XMLValidator: jt,
|
|
1640
|
-
XMLBuilder: Ft
|
|
1641
|
-
};
|