From 692a4d2db0860e98a90b71d4b792399462962200 Mon Sep 17 00:00:00 2001 From: Robin Berjon Date: Mon, 2 Dec 2024 17:15:57 +0100 Subject: [PATCH] ooooops --- bsky-comments.js | 3 --- bsky-comments.min.js | 3 --- bsky-comments.min.js.map | 4 ++-- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/bsky-comments.js b/bsky-comments.js index eddcbe3..80f153e 100644 --- a/bsky-comments.js +++ b/bsky-comments.js @@ -152,9 +152,6 @@ class BskyPost extends LitElement {
${textContent}
${ embeds || nothing } -
- -
diff --git a/bsky-comments.min.js b/bsky-comments.min.js index 7c50b8c..a3c3659 100644 --- a/bsky-comments.min.js +++ b/bsky-comments.min.js @@ -44895,9 +44895,6 @@ var BskyPost = class extends r4 {
${textContent}
${embeds || E} -
- -
diff --git a/bsky-comments.min.js.map b/bsky-comments.min.js.map index c2800f0..b90f368 100644 --- a/bsky-comments.min.js.map +++ b/bsky-comments.min.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["node_modules/zod/lib/helpers/util.js", "node_modules/zod/lib/ZodError.js", "node_modules/zod/lib/locales/en.js", "node_modules/zod/lib/errors.js", "node_modules/zod/lib/helpers/parseUtil.js", "node_modules/zod/lib/helpers/typeAliases.js", "node_modules/zod/lib/helpers/errorUtil.js", "node_modules/zod/lib/types.js", "node_modules/zod/lib/external.js", "node_modules/zod/lib/index.js", "node_modules/@atproto/syntax/src/handle.ts", "node_modules/@atproto/syntax/src/did.ts", "node_modules/@atproto/syntax/src/nsid.ts", "node_modules/@atproto/syntax/src/aturi_validation.ts", "node_modules/@atproto/syntax/src/aturi.ts", "node_modules/@atproto/syntax/src/tid.ts", "node_modules/@atproto/syntax/src/recordkey.ts", "node_modules/@atproto/syntax/src/datetime.ts", "node_modules/@atproto/syntax/src/index.ts", "node_modules/@atproto/lexicon/src/util.ts", "node_modules/@atproto/lexicon/src/types.ts", "node_modules/@atproto/common-web/src/check.ts", "node_modules/@atproto/common-web/src/util.ts", "node_modules/@atproto/common-web/src/arrays.ts", "node_modules/@atproto/common-web/src/async.ts", "node_modules/@atproto/common-web/src/tid.ts", "node_modules/multiformats/esm/vendor/varint.js", "node_modules/multiformats/esm/src/varint.js", "node_modules/multiformats/esm/src/bytes.js", "node_modules/multiformats/esm/src/hashes/digest.js", "node_modules/multiformats/esm/vendor/base-x.js", "node_modules/multiformats/esm/src/bases/base.js", "node_modules/multiformats/esm/src/bases/base58.js", "node_modules/multiformats/esm/src/bases/base32.js", "node_modules/multiformats/esm/src/cid.js", "node_modules/uint8arrays/esm/src/compare.js", "node_modules/uint8arrays/esm/src/concat.js", "node_modules/uint8arrays/esm/src/equals.js", "node_modules/multiformats/esm/src/bases/identity.js", "node_modules/multiformats/esm/src/bases/base2.js", "node_modules/multiformats/esm/src/bases/base8.js", "node_modules/multiformats/esm/src/bases/base10.js", "node_modules/multiformats/esm/src/bases/base16.js", "node_modules/multiformats/esm/src/bases/base36.js", "node_modules/multiformats/esm/src/bases/base64.js", "node_modules/multiformats/esm/src/bases/base256emoji.js", "node_modules/multiformats/esm/src/hashes/hasher.js", "node_modules/multiformats/esm/src/hashes/sha2-browser.js", "node_modules/multiformats/esm/src/hashes/identity.js", "node_modules/multiformats/esm/src/codecs/raw.js", "node_modules/multiformats/esm/src/codecs/json.js", "node_modules/multiformats/esm/src/index.js", "node_modules/multiformats/esm/src/basics.js", "node_modules/uint8arrays/esm/src/util/bases.js", "node_modules/uint8arrays/esm/src/from-string.js", "node_modules/uint8arrays/esm/src/to-string.js", "node_modules/uint8arrays/esm/src/xor.js", "node_modules/uint8arrays/esm/src/index.js", "node_modules/@atproto/common-web/src/ipld.ts", "node_modules/@atproto/common-web/src/retry.ts", "node_modules/@atproto/common-web/src/types.ts", "node_modules/@atproto/common-web/src/times.ts", "node_modules/graphemer/lib/boundaries.js", "node_modules/graphemer/lib/GraphemerHelper.js", "node_modules/graphemer/lib/GraphemerIterator.js", "node_modules/graphemer/lib/Graphemer.js", "node_modules/graphemer/lib/index.js", "node_modules/@atproto/common-web/src/strings.ts", "node_modules/@atproto/common-web/src/did-doc.ts", "node_modules/@atproto/common-web/src/index.ts", "node_modules/@atproto/lexicon/src/blob-refs.ts", "node_modules/@atproto/lexicon/src/validators/blob.ts", "node_modules/iso-datestring-validator/dist/index.js", "node_modules/@atproto/lexicon/src/validators/formats.ts", "node_modules/@atproto/lexicon/src/validators/primitives.ts", "node_modules/@atproto/lexicon/src/validators/complex.ts", "node_modules/@atproto/lexicon/src/validators/xrpc.ts", "node_modules/@atproto/lexicon/src/validation.ts", "node_modules/@atproto/lexicon/src/lexicons.ts", "node_modules/@atproto/lexicon/src/serialize.ts", "node_modules/@atproto/lexicon/src/index.ts", "node_modules/@atproto/api/src/client/lexicons.ts", "node_modules/@atproto/api/dist/types.js", "node_modules/@atproto/api/src/const.ts", "node_modules/@atproto/api/src/util.ts", "node_modules/@atproto/xrpc/src/types.ts", "node_modules/@atproto/xrpc/src/util.ts", "node_modules/@atproto/xrpc/src/fetch-handler.ts", "node_modules/@atproto/xrpc/src/xrpc-client.ts", "node_modules/@atproto/xrpc/src/client.ts", "node_modules/@atproto/xrpc/src/index.ts", "node_modules/@atproto/api/src/client/util.ts", "node_modules/@atproto/api/src/client/types/com/atproto/repo/applyWrites.ts", "node_modules/@atproto/api/src/client/types/com/atproto/repo/createRecord.ts", "node_modules/@atproto/api/src/client/types/com/atproto/repo/deleteRecord.ts", "node_modules/@atproto/api/src/client/types/com/atproto/repo/getRecord.ts", "node_modules/@atproto/api/src/client/types/com/atproto/repo/putRecord.ts", "node_modules/@atproto/api/src/client/types/com/atproto/server/confirmEmail.ts", "node_modules/@atproto/api/src/client/types/com/atproto/server/createAccount.ts", "node_modules/@atproto/api/src/client/types/com/atproto/server/createAppPassword.ts", "node_modules/@atproto/api/src/client/types/com/atproto/server/createSession.ts", "node_modules/@atproto/api/src/client/types/com/atproto/server/deleteAccount.ts", "node_modules/@atproto/api/src/client/types/com/atproto/server/getAccountInviteCodes.ts", "node_modules/@atproto/api/src/client/types/com/atproto/server/getServiceAuth.ts", "node_modules/@atproto/api/src/client/types/com/atproto/server/listAppPasswords.ts", "node_modules/@atproto/api/src/client/types/com/atproto/server/refreshSession.ts", "node_modules/@atproto/api/src/client/types/com/atproto/server/resetPassword.ts", "node_modules/@atproto/api/src/client/types/com/atproto/server/updateEmail.ts", "node_modules/@atproto/api/src/client/types/com/atproto/sync/getBlob.ts", "node_modules/@atproto/api/src/client/types/com/atproto/sync/getBlocks.ts", "node_modules/@atproto/api/src/client/types/com/atproto/sync/getHead.ts", "node_modules/@atproto/api/src/client/types/com/atproto/sync/getLatestCommit.ts", "node_modules/@atproto/api/src/client/types/com/atproto/sync/getRecord.ts", "node_modules/@atproto/api/src/client/types/com/atproto/sync/getRepo.ts", "node_modules/@atproto/api/src/client/types/com/atproto/sync/getRepoStatus.ts", "node_modules/@atproto/api/src/client/types/com/atproto/sync/listBlobs.ts", "node_modules/@atproto/api/src/client/types/app/bsky/feed/getActorLikes.ts", "node_modules/@atproto/api/src/client/types/app/bsky/feed/getAuthorFeed.ts", "node_modules/@atproto/api/src/client/types/app/bsky/feed/getFeed.ts", "node_modules/@atproto/api/src/client/types/app/bsky/feed/getFeedSkeleton.ts", "node_modules/@atproto/api/src/client/types/app/bsky/feed/getListFeed.ts", "node_modules/@atproto/api/src/client/types/app/bsky/feed/getPostThread.ts", "node_modules/@atproto/api/src/client/types/app/bsky/feed/searchPosts.ts", "node_modules/@atproto/api/src/client/types/app/bsky/graph/getRelationships.ts", "node_modules/@atproto/api/src/client/types/app/bsky/unspecced/searchActorsSkeleton.ts", "node_modules/@atproto/api/src/client/types/app/bsky/unspecced/searchPostsSkeleton.ts", "node_modules/@atproto/api/src/client/types/app/bsky/unspecced/searchStarterPacksSkeleton.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/communication/createTemplate.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/communication/updateTemplate.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/moderation/emitEvent.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/moderation/getRecord.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/moderation/getRepo.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/set/deleteSet.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/set/deleteValues.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/set/getValues.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/team/addMember.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/team/deleteMember.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/team/updateMember.ts", "node_modules/@atproto/api/src/client/types/com/atproto/admin/defs.ts", "node_modules/@atproto/api/src/client/types/com/atproto/admin/deleteAccount.ts", "node_modules/@atproto/api/src/client/types/com/atproto/admin/disableAccountInvites.ts", "node_modules/@atproto/api/src/client/types/com/atproto/admin/disableInviteCodes.ts", "node_modules/@atproto/api/src/client/types/com/atproto/admin/enableAccountInvites.ts", "node_modules/@atproto/api/src/client/types/com/atproto/admin/getAccountInfo.ts", "node_modules/@atproto/api/src/client/types/com/atproto/admin/getAccountInfos.ts", "node_modules/@atproto/api/src/client/types/com/atproto/admin/getInviteCodes.ts", "node_modules/@atproto/api/src/client/types/com/atproto/admin/getSubjectStatus.ts", "node_modules/@atproto/api/src/client/types/com/atproto/admin/searchAccounts.ts", "node_modules/@atproto/api/src/client/types/com/atproto/admin/sendEmail.ts", "node_modules/@atproto/api/src/client/types/com/atproto/admin/updateAccountEmail.ts", "node_modules/@atproto/api/src/client/types/com/atproto/admin/updateAccountHandle.ts", "node_modules/@atproto/api/src/client/types/com/atproto/admin/updateAccountPassword.ts", "node_modules/@atproto/api/src/client/types/com/atproto/admin/updateSubjectStatus.ts", "node_modules/@atproto/api/src/client/types/com/atproto/identity/getRecommendedDidCredentials.ts", "node_modules/@atproto/api/src/client/types/com/atproto/identity/requestPlcOperationSignature.ts", "node_modules/@atproto/api/src/client/types/com/atproto/identity/resolveHandle.ts", "node_modules/@atproto/api/src/client/types/com/atproto/identity/signPlcOperation.ts", "node_modules/@atproto/api/src/client/types/com/atproto/identity/submitPlcOperation.ts", "node_modules/@atproto/api/src/client/types/com/atproto/identity/updateHandle.ts", "node_modules/@atproto/api/src/client/types/com/atproto/label/defs.ts", "node_modules/@atproto/api/src/client/types/com/atproto/label/queryLabels.ts", "node_modules/@atproto/api/src/client/types/com/atproto/label/subscribeLabels.ts", "node_modules/@atproto/api/src/client/types/com/atproto/moderation/createReport.ts", "node_modules/@atproto/api/src/client/types/com/atproto/moderation/defs.ts", "node_modules/@atproto/api/src/client/types/com/atproto/repo/defs.ts", "node_modules/@atproto/api/src/client/types/com/atproto/repo/describeRepo.ts", "node_modules/@atproto/api/src/client/types/com/atproto/repo/importRepo.ts", "node_modules/@atproto/api/src/client/types/com/atproto/repo/listMissingBlobs.ts", "node_modules/@atproto/api/src/client/types/com/atproto/repo/listRecords.ts", "node_modules/@atproto/api/src/client/types/com/atproto/repo/strongRef.ts", "node_modules/@atproto/api/src/client/types/com/atproto/repo/uploadBlob.ts", "node_modules/@atproto/api/src/client/types/com/atproto/server/activateAccount.ts", "node_modules/@atproto/api/src/client/types/com/atproto/server/checkAccountStatus.ts", "node_modules/@atproto/api/src/client/types/com/atproto/server/createInviteCode.ts", "node_modules/@atproto/api/src/client/types/com/atproto/server/createInviteCodes.ts", "node_modules/@atproto/api/src/client/types/com/atproto/server/deactivateAccount.ts", "node_modules/@atproto/api/src/client/types/com/atproto/server/defs.ts", "node_modules/@atproto/api/src/client/types/com/atproto/server/deleteSession.ts", "node_modules/@atproto/api/src/client/types/com/atproto/server/describeServer.ts", "node_modules/@atproto/api/src/client/types/com/atproto/server/getSession.ts", "node_modules/@atproto/api/src/client/types/com/atproto/server/requestAccountDelete.ts", "node_modules/@atproto/api/src/client/types/com/atproto/server/requestEmailConfirmation.ts", "node_modules/@atproto/api/src/client/types/com/atproto/server/requestEmailUpdate.ts", "node_modules/@atproto/api/src/client/types/com/atproto/server/requestPasswordReset.ts", "node_modules/@atproto/api/src/client/types/com/atproto/server/reserveSigningKey.ts", "node_modules/@atproto/api/src/client/types/com/atproto/server/revokeAppPassword.ts", "node_modules/@atproto/api/src/client/types/com/atproto/sync/getCheckout.ts", "node_modules/@atproto/api/src/client/types/com/atproto/sync/listRepos.ts", "node_modules/@atproto/api/src/client/types/com/atproto/sync/notifyOfUpdate.ts", "node_modules/@atproto/api/src/client/types/com/atproto/sync/requestCrawl.ts", "node_modules/@atproto/api/src/client/types/com/atproto/sync/subscribeRepos.ts", "node_modules/@atproto/api/src/client/types/com/atproto/temp/addReservedHandle.ts", "node_modules/@atproto/api/src/client/types/com/atproto/temp/checkSignupQueue.ts", "node_modules/@atproto/api/src/client/types/com/atproto/temp/fetchLabels.ts", "node_modules/@atproto/api/src/client/types/com/atproto/temp/requestPhoneVerification.ts", "node_modules/@atproto/api/src/client/types/app/bsky/actor/defs.ts", "node_modules/@atproto/api/src/client/types/app/bsky/actor/getPreferences.ts", "node_modules/@atproto/api/src/client/types/app/bsky/actor/getProfile.ts", "node_modules/@atproto/api/src/client/types/app/bsky/actor/getProfiles.ts", "node_modules/@atproto/api/src/client/types/app/bsky/actor/getSuggestions.ts", "node_modules/@atproto/api/src/client/types/app/bsky/actor/profile.ts", "node_modules/@atproto/api/src/client/types/app/bsky/actor/putPreferences.ts", "node_modules/@atproto/api/src/client/types/app/bsky/actor/searchActors.ts", "node_modules/@atproto/api/src/client/types/app/bsky/actor/searchActorsTypeahead.ts", "node_modules/@atproto/api/src/client/types/app/bsky/embed/defs.ts", "node_modules/@atproto/api/src/client/types/app/bsky/embed/external.ts", "node_modules/@atproto/api/src/client/types/app/bsky/embed/images.ts", "node_modules/@atproto/api/src/client/types/app/bsky/embed/record.ts", "node_modules/@atproto/api/src/client/types/app/bsky/embed/recordWithMedia.ts", "node_modules/@atproto/api/src/client/types/app/bsky/embed/video.ts", "node_modules/@atproto/api/src/client/types/app/bsky/feed/defs.ts", "node_modules/@atproto/api/src/client/types/app/bsky/feed/describeFeedGenerator.ts", "node_modules/@atproto/api/src/client/types/app/bsky/feed/generator.ts", "node_modules/@atproto/api/src/client/types/app/bsky/feed/getActorFeeds.ts", "node_modules/@atproto/api/src/client/types/app/bsky/feed/getFeedGenerator.ts", "node_modules/@atproto/api/src/client/types/app/bsky/feed/getFeedGenerators.ts", "node_modules/@atproto/api/src/client/types/app/bsky/feed/getLikes.ts", "node_modules/@atproto/api/src/client/types/app/bsky/feed/getPosts.ts", "node_modules/@atproto/api/src/client/types/app/bsky/feed/getQuotes.ts", "node_modules/@atproto/api/src/client/types/app/bsky/feed/getRepostedBy.ts", "node_modules/@atproto/api/src/client/types/app/bsky/feed/getSuggestedFeeds.ts", "node_modules/@atproto/api/src/client/types/app/bsky/feed/getTimeline.ts", "node_modules/@atproto/api/src/client/types/app/bsky/feed/like.ts", "node_modules/@atproto/api/src/client/types/app/bsky/feed/post.ts", "node_modules/@atproto/api/src/client/types/app/bsky/feed/postgate.ts", "node_modules/@atproto/api/src/client/types/app/bsky/feed/repost.ts", "node_modules/@atproto/api/src/client/types/app/bsky/feed/sendInteractions.ts", "node_modules/@atproto/api/src/client/types/app/bsky/feed/threadgate.ts", "node_modules/@atproto/api/src/client/types/app/bsky/graph/block.ts", "node_modules/@atproto/api/src/client/types/app/bsky/graph/defs.ts", "node_modules/@atproto/api/src/client/types/app/bsky/graph/follow.ts", "node_modules/@atproto/api/src/client/types/app/bsky/graph/getActorStarterPacks.ts", "node_modules/@atproto/api/src/client/types/app/bsky/graph/getBlocks.ts", "node_modules/@atproto/api/src/client/types/app/bsky/graph/getFollowers.ts", "node_modules/@atproto/api/src/client/types/app/bsky/graph/getFollows.ts", "node_modules/@atproto/api/src/client/types/app/bsky/graph/getKnownFollowers.ts", "node_modules/@atproto/api/src/client/types/app/bsky/graph/getList.ts", "node_modules/@atproto/api/src/client/types/app/bsky/graph/getListBlocks.ts", "node_modules/@atproto/api/src/client/types/app/bsky/graph/getListMutes.ts", "node_modules/@atproto/api/src/client/types/app/bsky/graph/getLists.ts", "node_modules/@atproto/api/src/client/types/app/bsky/graph/getMutes.ts", "node_modules/@atproto/api/src/client/types/app/bsky/graph/getStarterPack.ts", "node_modules/@atproto/api/src/client/types/app/bsky/graph/getStarterPacks.ts", "node_modules/@atproto/api/src/client/types/app/bsky/graph/getSuggestedFollowsByActor.ts", "node_modules/@atproto/api/src/client/types/app/bsky/graph/list.ts", "node_modules/@atproto/api/src/client/types/app/bsky/graph/listblock.ts", "node_modules/@atproto/api/src/client/types/app/bsky/graph/listitem.ts", "node_modules/@atproto/api/src/client/types/app/bsky/graph/muteActor.ts", "node_modules/@atproto/api/src/client/types/app/bsky/graph/muteActorList.ts", "node_modules/@atproto/api/src/client/types/app/bsky/graph/muteThread.ts", "node_modules/@atproto/api/src/client/types/app/bsky/graph/searchStarterPacks.ts", "node_modules/@atproto/api/src/client/types/app/bsky/graph/starterpack.ts", "node_modules/@atproto/api/src/client/types/app/bsky/graph/unmuteActor.ts", "node_modules/@atproto/api/src/client/types/app/bsky/graph/unmuteActorList.ts", "node_modules/@atproto/api/src/client/types/app/bsky/graph/unmuteThread.ts", "node_modules/@atproto/api/src/client/types/app/bsky/labeler/defs.ts", "node_modules/@atproto/api/src/client/types/app/bsky/labeler/getServices.ts", "node_modules/@atproto/api/src/client/types/app/bsky/labeler/service.ts", "node_modules/@atproto/api/src/client/types/app/bsky/notification/getUnreadCount.ts", "node_modules/@atproto/api/src/client/types/app/bsky/notification/listNotifications.ts", "node_modules/@atproto/api/src/client/types/app/bsky/notification/putPreferences.ts", "node_modules/@atproto/api/src/client/types/app/bsky/notification/registerPush.ts", "node_modules/@atproto/api/src/client/types/app/bsky/notification/updateSeen.ts", "node_modules/@atproto/api/src/client/types/app/bsky/richtext/facet.ts", "node_modules/@atproto/api/src/client/types/app/bsky/unspecced/defs.ts", "node_modules/@atproto/api/src/client/types/app/bsky/unspecced/getConfig.ts", "node_modules/@atproto/api/src/client/types/app/bsky/unspecced/getPopularFeedGenerators.ts", "node_modules/@atproto/api/src/client/types/app/bsky/unspecced/getSuggestionsSkeleton.ts", "node_modules/@atproto/api/src/client/types/app/bsky/unspecced/getTaggedSuggestions.ts", "node_modules/@atproto/api/src/client/types/app/bsky/video/defs.ts", "node_modules/@atproto/api/src/client/types/app/bsky/video/getJobStatus.ts", "node_modules/@atproto/api/src/client/types/app/bsky/video/getUploadLimits.ts", "node_modules/@atproto/api/src/client/types/app/bsky/video/uploadVideo.ts", "node_modules/@atproto/api/src/client/types/chat/bsky/actor/declaration.ts", "node_modules/@atproto/api/src/client/types/chat/bsky/actor/defs.ts", "node_modules/@atproto/api/src/client/types/chat/bsky/actor/deleteAccount.ts", "node_modules/@atproto/api/src/client/types/chat/bsky/actor/exportAccountData.ts", "node_modules/@atproto/api/src/client/types/chat/bsky/convo/defs.ts", "node_modules/@atproto/api/src/client/types/chat/bsky/convo/deleteMessageForSelf.ts", "node_modules/@atproto/api/src/client/types/chat/bsky/convo/getConvo.ts", "node_modules/@atproto/api/src/client/types/chat/bsky/convo/getConvoForMembers.ts", "node_modules/@atproto/api/src/client/types/chat/bsky/convo/getLog.ts", "node_modules/@atproto/api/src/client/types/chat/bsky/convo/getMessages.ts", "node_modules/@atproto/api/src/client/types/chat/bsky/convo/leaveConvo.ts", "node_modules/@atproto/api/src/client/types/chat/bsky/convo/listConvos.ts", "node_modules/@atproto/api/src/client/types/chat/bsky/convo/muteConvo.ts", "node_modules/@atproto/api/src/client/types/chat/bsky/convo/sendMessage.ts", "node_modules/@atproto/api/src/client/types/chat/bsky/convo/sendMessageBatch.ts", "node_modules/@atproto/api/src/client/types/chat/bsky/convo/unmuteConvo.ts", "node_modules/@atproto/api/src/client/types/chat/bsky/convo/updateRead.ts", "node_modules/@atproto/api/src/client/types/chat/bsky/moderation/getActorMetadata.ts", "node_modules/@atproto/api/src/client/types/chat/bsky/moderation/getMessageContext.ts", "node_modules/@atproto/api/src/client/types/chat/bsky/moderation/updateActorAccess.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/communication/defs.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/communication/deleteTemplate.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/communication/listTemplates.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/moderation/defs.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/moderation/getEvent.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/moderation/getRecords.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/moderation/getRepos.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/moderation/queryEvents.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/moderation/queryStatuses.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/moderation/searchRepos.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/server/getConfig.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/set/addValues.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/set/defs.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/set/querySets.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/set/upsertSet.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/setting/defs.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/setting/listOptions.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/setting/removeOptions.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/setting/upsertOption.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/signature/defs.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/signature/findCorrelation.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/signature/findRelatedAccounts.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/signature/searchAccounts.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/team/defs.ts", "node_modules/@atproto/api/src/client/types/tools/ozone/team/listMembers.ts", "node_modules/@atproto/api/src/client/index.ts", "node_modules/@atproto/api/src/rich-text/unicode.ts", "node_modules/@atproto/api/src/rich-text/sanitization.ts", "node_modules/tlds/index.json", "node_modules/@atproto/api/src/rich-text/util.ts", "node_modules/@atproto/api/src/rich-text/detection.ts", "node_modules/@atproto/api/src/rich-text/rich-text.ts", "node_modules/@atproto/api/src/moderation/types.ts", "node_modules/@atproto/api/src/moderation/ui.ts", "node_modules/@atproto/api/src/moderation/const/labels.ts", "node_modules/@atproto/api/src/moderation/decision.ts", "node_modules/@atproto/api/src/moderation/subjects/account.ts", "node_modules/@atproto/api/src/moderation/subjects/profile.ts", "node_modules/@atproto/api/src/moderation/subjects/notification.ts", "node_modules/@atproto/api/src/moderation/mutewords.ts", "node_modules/@atproto/api/src/moderation/subjects/post.ts", "node_modules/@atproto/api/src/moderation/subjects/feed-generator.ts", "node_modules/@atproto/api/src/moderation/subjects/user-list.ts", "node_modules/@atproto/api/src/moderation/util.ts", "node_modules/@atproto/api/src/moderation/index.ts", "node_modules/@atproto/api/src/mocker.ts", "node_modules/await-lock/src/AwaitLock.ts", "node_modules/@atproto/api/src/agent.ts", "node_modules/@atproto/api/src/atp-agent.ts", "node_modules/@atproto/api/src/bsky-agent.ts", "node_modules/@atproto/api/src/index.ts", "node_modules/@lit/reactive-element/src/css-tag.ts", "node_modules/@lit/reactive-element/src/reactive-element.ts", "node_modules/lit-html/src/lit-html.ts", "node_modules/lit-element/src/lit-element.ts", "bsky-comments.js"], - "sourcesContent": ["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getParsedType = exports.ZodParsedType = exports.objectUtil = exports.util = void 0;\nvar util;\n(function (util) {\n util.assertEqual = (val) => val;\n function assertIs(_arg) { }\n util.assertIs = assertIs;\n function assertNever(_x) {\n throw new Error();\n }\n util.assertNever = assertNever;\n util.arrayToEnum = (items) => {\n const obj = {};\n for (const item of items) {\n obj[item] = item;\n }\n return obj;\n };\n util.getValidEnumValues = (obj) => {\n const validKeys = util.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== \"number\");\n const filtered = {};\n for (const k of validKeys) {\n filtered[k] = obj[k];\n }\n return util.objectValues(filtered);\n };\n util.objectValues = (obj) => {\n return util.objectKeys(obj).map(function (e) {\n return obj[e];\n });\n };\n util.objectKeys = typeof Object.keys === \"function\" // eslint-disable-line ban/ban\n ? (obj) => Object.keys(obj) // eslint-disable-line ban/ban\n : (object) => {\n const keys = [];\n for (const key in object) {\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n keys.push(key);\n }\n }\n return keys;\n };\n util.find = (arr, checker) => {\n for (const item of arr) {\n if (checker(item))\n return item;\n }\n return undefined;\n };\n util.isInteger = typeof Number.isInteger === \"function\"\n ? (val) => Number.isInteger(val) // eslint-disable-line ban/ban\n : (val) => typeof val === \"number\" && isFinite(val) && Math.floor(val) === val;\n function joinValues(array, separator = \" | \") {\n return array\n .map((val) => (typeof val === \"string\" ? `'${val}'` : val))\n .join(separator);\n }\n util.joinValues = joinValues;\n util.jsonStringifyReplacer = (_, value) => {\n if (typeof value === \"bigint\") {\n return value.toString();\n }\n return value;\n };\n})(util = exports.util || (exports.util = {}));\nvar objectUtil;\n(function (objectUtil) {\n objectUtil.mergeShapes = (first, second) => {\n return {\n ...first,\n ...second, // second overwrites first\n };\n };\n})(objectUtil = exports.objectUtil || (exports.objectUtil = {}));\nexports.ZodParsedType = util.arrayToEnum([\n \"string\",\n \"nan\",\n \"number\",\n \"integer\",\n \"float\",\n \"boolean\",\n \"date\",\n \"bigint\",\n \"symbol\",\n \"function\",\n \"undefined\",\n \"null\",\n \"array\",\n \"object\",\n \"unknown\",\n \"promise\",\n \"void\",\n \"never\",\n \"map\",\n \"set\",\n]);\nconst getParsedType = (data) => {\n const t = typeof data;\n switch (t) {\n case \"undefined\":\n return exports.ZodParsedType.undefined;\n case \"string\":\n return exports.ZodParsedType.string;\n case \"number\":\n return isNaN(data) ? exports.ZodParsedType.nan : exports.ZodParsedType.number;\n case \"boolean\":\n return exports.ZodParsedType.boolean;\n case \"function\":\n return exports.ZodParsedType.function;\n case \"bigint\":\n return exports.ZodParsedType.bigint;\n case \"symbol\":\n return exports.ZodParsedType.symbol;\n case \"object\":\n if (Array.isArray(data)) {\n return exports.ZodParsedType.array;\n }\n if (data === null) {\n return exports.ZodParsedType.null;\n }\n if (data.then &&\n typeof data.then === \"function\" &&\n data.catch &&\n typeof data.catch === \"function\") {\n return exports.ZodParsedType.promise;\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return exports.ZodParsedType.map;\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return exports.ZodParsedType.set;\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return exports.ZodParsedType.date;\n }\n return exports.ZodParsedType.object;\n default:\n return exports.ZodParsedType.unknown;\n }\n};\nexports.getParsedType = getParsedType;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ZodError = exports.quotelessJson = exports.ZodIssueCode = void 0;\nconst util_1 = require(\"./helpers/util\");\nexports.ZodIssueCode = util_1.util.arrayToEnum([\n \"invalid_type\",\n \"invalid_literal\",\n \"custom\",\n \"invalid_union\",\n \"invalid_union_discriminator\",\n \"invalid_enum_value\",\n \"unrecognized_keys\",\n \"invalid_arguments\",\n \"invalid_return_type\",\n \"invalid_date\",\n \"invalid_string\",\n \"too_small\",\n \"too_big\",\n \"invalid_intersection_types\",\n \"not_multiple_of\",\n \"not_finite\",\n]);\nconst quotelessJson = (obj) => {\n const json = JSON.stringify(obj, null, 2);\n return json.replace(/\"([^\"]+)\":/g, \"$1:\");\n};\nexports.quotelessJson = quotelessJson;\nclass ZodError extends Error {\n constructor(issues) {\n super();\n this.issues = [];\n this.addIssue = (sub) => {\n this.issues = [...this.issues, sub];\n };\n this.addIssues = (subs = []) => {\n this.issues = [...this.issues, ...subs];\n };\n const actualProto = new.target.prototype;\n if (Object.setPrototypeOf) {\n // eslint-disable-next-line ban/ban\n Object.setPrototypeOf(this, actualProto);\n }\n else {\n this.__proto__ = actualProto;\n }\n this.name = \"ZodError\";\n this.issues = issues;\n }\n get errors() {\n return this.issues;\n }\n format(_mapper) {\n const mapper = _mapper ||\n function (issue) {\n return issue.message;\n };\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\") {\n issue.unionErrors.map(processError);\n }\n else if (issue.code === \"invalid_return_type\") {\n processError(issue.returnTypeError);\n }\n else if (issue.code === \"invalid_arguments\") {\n processError(issue.argumentsError);\n }\n else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n }\n else {\n let curr = fieldErrors;\n let i = 0;\n while (i < issue.path.length) {\n const el = issue.path[i];\n const terminal = i === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n // if (typeof el === \"string\") {\n // curr[el] = curr[el] || { _errors: [] };\n // } else if (typeof el === \"number\") {\n // const errorArray: any = [];\n // errorArray._errors = [];\n // curr[el] = curr[el] || errorArray;\n // }\n }\n else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i++;\n }\n }\n }\n };\n processError(this);\n return fieldErrors;\n }\n static assert(value) {\n if (!(value instanceof ZodError)) {\n throw new Error(`Not a ZodError: ${value}`);\n }\n }\n toString() {\n return this.message;\n }\n get message() {\n return JSON.stringify(this.issues, util_1.util.jsonStringifyReplacer, 2);\n }\n get isEmpty() {\n return this.issues.length === 0;\n }\n flatten(mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of this.issues) {\n if (sub.path.length > 0) {\n fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n fieldErrors[sub.path[0]].push(mapper(sub));\n }\n else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n }\n get formErrors() {\n return this.flatten();\n }\n}\nexports.ZodError = ZodError;\nZodError.create = (issues) => {\n const error = new ZodError(issues);\n return error;\n};\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst util_1 = require(\"../helpers/util\");\nconst ZodError_1 = require(\"../ZodError\");\nconst errorMap = (issue, _ctx) => {\n let message;\n switch (issue.code) {\n case ZodError_1.ZodIssueCode.invalid_type:\n if (issue.received === util_1.ZodParsedType.undefined) {\n message = \"Required\";\n }\n else {\n message = `Expected ${issue.expected}, received ${issue.received}`;\n }\n break;\n case ZodError_1.ZodIssueCode.invalid_literal:\n message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util_1.util.jsonStringifyReplacer)}`;\n break;\n case ZodError_1.ZodIssueCode.unrecognized_keys:\n message = `Unrecognized key(s) in object: ${util_1.util.joinValues(issue.keys, \", \")}`;\n break;\n case ZodError_1.ZodIssueCode.invalid_union:\n message = `Invalid input`;\n break;\n case ZodError_1.ZodIssueCode.invalid_union_discriminator:\n message = `Invalid discriminator value. Expected ${util_1.util.joinValues(issue.options)}`;\n break;\n case ZodError_1.ZodIssueCode.invalid_enum_value:\n message = `Invalid enum value. Expected ${util_1.util.joinValues(issue.options)}, received '${issue.received}'`;\n break;\n case ZodError_1.ZodIssueCode.invalid_arguments:\n message = `Invalid function arguments`;\n break;\n case ZodError_1.ZodIssueCode.invalid_return_type:\n message = `Invalid function return type`;\n break;\n case ZodError_1.ZodIssueCode.invalid_date:\n message = `Invalid date`;\n break;\n case ZodError_1.ZodIssueCode.invalid_string:\n if (typeof issue.validation === \"object\") {\n if (\"includes\" in issue.validation) {\n message = `Invalid input: must include \"${issue.validation.includes}\"`;\n if (typeof issue.validation.position === \"number\") {\n message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;\n }\n }\n else if (\"startsWith\" in issue.validation) {\n message = `Invalid input: must start with \"${issue.validation.startsWith}\"`;\n }\n else if (\"endsWith\" in issue.validation) {\n message = `Invalid input: must end with \"${issue.validation.endsWith}\"`;\n }\n else {\n util_1.util.assertNever(issue.validation);\n }\n }\n else if (issue.validation !== \"regex\") {\n message = `Invalid ${issue.validation}`;\n }\n else {\n message = \"Invalid\";\n }\n break;\n case ZodError_1.ZodIssueCode.too_small:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact\n ? `exactly equal to `\n : issue.inclusive\n ? `greater than or equal to `\n : `greater than `}${issue.minimum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact\n ? `exactly equal to `\n : issue.inclusive\n ? `greater than or equal to `\n : `greater than `}${new Date(Number(issue.minimum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodError_1.ZodIssueCode.too_big:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact\n ? `exactly`\n : issue.inclusive\n ? `less than or equal to`\n : `less than`} ${issue.maximum}`;\n else if (issue.type === \"bigint\")\n message = `BigInt must be ${issue.exact\n ? `exactly`\n : issue.inclusive\n ? `less than or equal to`\n : `less than`} ${issue.maximum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact\n ? `exactly`\n : issue.inclusive\n ? `smaller than or equal to`\n : `smaller than`} ${new Date(Number(issue.maximum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodError_1.ZodIssueCode.custom:\n message = `Invalid input`;\n break;\n case ZodError_1.ZodIssueCode.invalid_intersection_types:\n message = `Intersection results could not be merged`;\n break;\n case ZodError_1.ZodIssueCode.not_multiple_of:\n message = `Number must be a multiple of ${issue.multipleOf}`;\n break;\n case ZodError_1.ZodIssueCode.not_finite:\n message = \"Number must be finite\";\n break;\n default:\n message = _ctx.defaultError;\n util_1.util.assertNever(issue);\n }\n return { message };\n};\nexports.default = errorMap;\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getErrorMap = exports.setErrorMap = exports.defaultErrorMap = void 0;\nconst en_1 = __importDefault(require(\"./locales/en\"));\nexports.defaultErrorMap = en_1.default;\nlet overrideErrorMap = en_1.default;\nfunction setErrorMap(map) {\n overrideErrorMap = map;\n}\nexports.setErrorMap = setErrorMap;\nfunction getErrorMap() {\n return overrideErrorMap;\n}\nexports.getErrorMap = getErrorMap;\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isAsync = exports.isValid = exports.isDirty = exports.isAborted = exports.OK = exports.DIRTY = exports.INVALID = exports.ParseStatus = exports.addIssueToContext = exports.EMPTY_PATH = exports.makeIssue = void 0;\nconst errors_1 = require(\"../errors\");\nconst en_1 = __importDefault(require(\"../locales/en\"));\nconst makeIssue = (params) => {\n const { data, path, errorMaps, issueData } = params;\n const fullPath = [...path, ...(issueData.path || [])];\n const fullIssue = {\n ...issueData,\n path: fullPath,\n };\n if (issueData.message !== undefined) {\n return {\n ...issueData,\n path: fullPath,\n message: issueData.message,\n };\n }\n let errorMessage = \"\";\n const maps = errorMaps\n .filter((m) => !!m)\n .slice()\n .reverse();\n for (const map of maps) {\n errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;\n }\n return {\n ...issueData,\n path: fullPath,\n message: errorMessage,\n };\n};\nexports.makeIssue = makeIssue;\nexports.EMPTY_PATH = [];\nfunction addIssueToContext(ctx, issueData) {\n const overrideMap = (0, errors_1.getErrorMap)();\n const issue = (0, exports.makeIssue)({\n issueData: issueData,\n data: ctx.data,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n ctx.schemaErrorMap,\n overrideMap,\n overrideMap === en_1.default ? undefined : en_1.default, // then global default map\n ].filter((x) => !!x),\n });\n ctx.common.issues.push(issue);\n}\nexports.addIssueToContext = addIssueToContext;\nclass ParseStatus {\n constructor() {\n this.value = \"valid\";\n }\n dirty() {\n if (this.value === \"valid\")\n this.value = \"dirty\";\n }\n abort() {\n if (this.value !== \"aborted\")\n this.value = \"aborted\";\n }\n static mergeArray(status, results) {\n const arrayValue = [];\n for (const s of results) {\n if (s.status === \"aborted\")\n return exports.INVALID;\n if (s.status === \"dirty\")\n status.dirty();\n arrayValue.push(s.value);\n }\n return { status: status.value, value: arrayValue };\n }\n static async mergeObjectAsync(status, pairs) {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n syncPairs.push({\n key,\n value,\n });\n }\n return ParseStatus.mergeObjectSync(status, syncPairs);\n }\n static mergeObjectSync(status, pairs) {\n const finalObject = {};\n for (const pair of pairs) {\n const { key, value } = pair;\n if (key.status === \"aborted\")\n return exports.INVALID;\n if (value.status === \"aborted\")\n return exports.INVALID;\n if (key.status === \"dirty\")\n status.dirty();\n if (value.status === \"dirty\")\n status.dirty();\n if (key.value !== \"__proto__\" &&\n (typeof value.value !== \"undefined\" || pair.alwaysSet)) {\n finalObject[key.value] = value.value;\n }\n }\n return { status: status.value, value: finalObject };\n }\n}\nexports.ParseStatus = ParseStatus;\nexports.INVALID = Object.freeze({\n status: \"aborted\",\n});\nconst DIRTY = (value) => ({ status: \"dirty\", value });\nexports.DIRTY = DIRTY;\nconst OK = (value) => ({ status: \"valid\", value });\nexports.OK = OK;\nconst isAborted = (x) => x.status === \"aborted\";\nexports.isAborted = isAborted;\nconst isDirty = (x) => x.status === \"dirty\";\nexports.isDirty = isDirty;\nconst isValid = (x) => x.status === \"valid\";\nexports.isValid = isValid;\nconst isAsync = (x) => typeof Promise !== \"undefined\" && x instanceof Promise;\nexports.isAsync = isAsync;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.errorUtil = void 0;\nvar errorUtil;\n(function (errorUtil) {\n errorUtil.errToObj = (message) => typeof message === \"string\" ? { message } : message || {};\n errorUtil.toString = (message) => typeof message === \"string\" ? message : message === null || message === void 0 ? void 0 : message.message;\n})(errorUtil = exports.errorUtil || (exports.errorUtil = {}));\n", "\"use strict\";\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar _ZodEnum_cache, _ZodNativeEnum_cache;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.boolean = exports.bigint = exports.array = exports.any = exports.coerce = exports.ZodFirstPartyTypeKind = exports.late = exports.ZodSchema = exports.Schema = exports.custom = exports.ZodReadonly = exports.ZodPipeline = exports.ZodBranded = exports.BRAND = exports.ZodNaN = exports.ZodCatch = exports.ZodDefault = exports.ZodNullable = exports.ZodOptional = exports.ZodTransformer = exports.ZodEffects = exports.ZodPromise = exports.ZodNativeEnum = exports.ZodEnum = exports.ZodLiteral = exports.ZodLazy = exports.ZodFunction = exports.ZodSet = exports.ZodMap = exports.ZodRecord = exports.ZodTuple = exports.ZodIntersection = exports.ZodDiscriminatedUnion = exports.ZodUnion = exports.ZodObject = exports.ZodArray = exports.ZodVoid = exports.ZodNever = exports.ZodUnknown = exports.ZodAny = exports.ZodNull = exports.ZodUndefined = exports.ZodSymbol = exports.ZodDate = exports.ZodBoolean = exports.ZodBigInt = exports.ZodNumber = exports.ZodString = exports.datetimeRegex = exports.ZodType = void 0;\nexports.NEVER = exports.void = exports.unknown = exports.union = exports.undefined = exports.tuple = exports.transformer = exports.symbol = exports.string = exports.strictObject = exports.set = exports.record = exports.promise = exports.preprocess = exports.pipeline = exports.ostring = exports.optional = exports.onumber = exports.oboolean = exports.object = exports.number = exports.nullable = exports.null = exports.never = exports.nativeEnum = exports.nan = exports.map = exports.literal = exports.lazy = exports.intersection = exports.instanceof = exports.function = exports.enum = exports.effect = exports.discriminatedUnion = exports.date = void 0;\nconst errors_1 = require(\"./errors\");\nconst errorUtil_1 = require(\"./helpers/errorUtil\");\nconst parseUtil_1 = require(\"./helpers/parseUtil\");\nconst util_1 = require(\"./helpers/util\");\nconst ZodError_1 = require(\"./ZodError\");\nclass ParseInputLazyPath {\n constructor(parent, value, path, key) {\n this._cachedPath = [];\n this.parent = parent;\n this.data = value;\n this._path = path;\n this._key = key;\n }\n get path() {\n if (!this._cachedPath.length) {\n if (this._key instanceof Array) {\n this._cachedPath.push(...this._path, ...this._key);\n }\n else {\n this._cachedPath.push(...this._path, this._key);\n }\n }\n return this._cachedPath;\n }\n}\nconst handleResult = (ctx, result) => {\n if ((0, parseUtil_1.isValid)(result)) {\n return { success: true, data: result.value };\n }\n else {\n if (!ctx.common.issues.length) {\n throw new Error(\"Validation failed but no issues detected.\");\n }\n return {\n success: false,\n get error() {\n if (this._error)\n return this._error;\n const error = new ZodError_1.ZodError(ctx.common.issues);\n this._error = error;\n return this._error;\n },\n };\n }\n};\nfunction processCreateParams(params) {\n if (!params)\n return {};\n const { errorMap, invalid_type_error, required_error, description } = params;\n if (errorMap && (invalid_type_error || required_error)) {\n throw new Error(`Can't use \"invalid_type_error\" or \"required_error\" in conjunction with custom error map.`);\n }\n if (errorMap)\n return { errorMap: errorMap, description };\n const customMap = (iss, ctx) => {\n var _a, _b;\n const { message } = params;\n if (iss.code === \"invalid_enum_value\") {\n return { message: message !== null && message !== void 0 ? message : ctx.defaultError };\n }\n if (typeof ctx.data === \"undefined\") {\n return { message: (_a = message !== null && message !== void 0 ? message : required_error) !== null && _a !== void 0 ? _a : ctx.defaultError };\n }\n if (iss.code !== \"invalid_type\")\n return { message: ctx.defaultError };\n return { message: (_b = message !== null && message !== void 0 ? message : invalid_type_error) !== null && _b !== void 0 ? _b : ctx.defaultError };\n };\n return { errorMap: customMap, description };\n}\nclass ZodType {\n constructor(def) {\n /** Alias of safeParseAsync */\n this.spa = this.safeParseAsync;\n this._def = def;\n this.parse = this.parse.bind(this);\n this.safeParse = this.safeParse.bind(this);\n this.parseAsync = this.parseAsync.bind(this);\n this.safeParseAsync = this.safeParseAsync.bind(this);\n this.spa = this.spa.bind(this);\n this.refine = this.refine.bind(this);\n this.refinement = this.refinement.bind(this);\n this.superRefine = this.superRefine.bind(this);\n this.optional = this.optional.bind(this);\n this.nullable = this.nullable.bind(this);\n this.nullish = this.nullish.bind(this);\n this.array = this.array.bind(this);\n this.promise = this.promise.bind(this);\n this.or = this.or.bind(this);\n this.and = this.and.bind(this);\n this.transform = this.transform.bind(this);\n this.brand = this.brand.bind(this);\n this.default = this.default.bind(this);\n this.catch = this.catch.bind(this);\n this.describe = this.describe.bind(this);\n this.pipe = this.pipe.bind(this);\n this.readonly = this.readonly.bind(this);\n this.isNullable = this.isNullable.bind(this);\n this.isOptional = this.isOptional.bind(this);\n }\n get description() {\n return this._def.description;\n }\n _getType(input) {\n return (0, util_1.getParsedType)(input.data);\n }\n _getOrReturnCtx(input, ctx) {\n return (ctx || {\n common: input.parent.common,\n data: input.data,\n parsedType: (0, util_1.getParsedType)(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent,\n });\n }\n _processInputParams(input) {\n return {\n status: new parseUtil_1.ParseStatus(),\n ctx: {\n common: input.parent.common,\n data: input.data,\n parsedType: (0, util_1.getParsedType)(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent,\n },\n };\n }\n _parseSync(input) {\n const result = this._parse(input);\n if ((0, parseUtil_1.isAsync)(result)) {\n throw new Error(\"Synchronous parse encountered promise.\");\n }\n return result;\n }\n _parseAsync(input) {\n const result = this._parse(input);\n return Promise.resolve(result);\n }\n parse(data, params) {\n const result = this.safeParse(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n safeParse(data, params) {\n var _a;\n const ctx = {\n common: {\n issues: [],\n async: (_a = params === null || params === void 0 ? void 0 : params.async) !== null && _a !== void 0 ? _a : false,\n contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,\n },\n path: (params === null || params === void 0 ? void 0 : params.path) || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: (0, util_1.getParsedType)(data),\n };\n const result = this._parseSync({ data, path: ctx.path, parent: ctx });\n return handleResult(ctx, result);\n }\n async parseAsync(data, params) {\n const result = await this.safeParseAsync(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n async safeParseAsync(data, params) {\n const ctx = {\n common: {\n issues: [],\n contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,\n async: true,\n },\n path: (params === null || params === void 0 ? void 0 : params.path) || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: (0, util_1.getParsedType)(data),\n };\n const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx });\n const result = await ((0, parseUtil_1.isAsync)(maybeAsyncResult)\n ? maybeAsyncResult\n : Promise.resolve(maybeAsyncResult));\n return handleResult(ctx, result);\n }\n refine(check, message) {\n const getIssueProperties = (val) => {\n if (typeof message === \"string\" || typeof message === \"undefined\") {\n return { message };\n }\n else if (typeof message === \"function\") {\n return message(val);\n }\n else {\n return message;\n }\n };\n return this._refinement((val, ctx) => {\n const result = check(val);\n const setError = () => ctx.addIssue({\n code: ZodError_1.ZodIssueCode.custom,\n ...getIssueProperties(val),\n });\n if (typeof Promise !== \"undefined\" && result instanceof Promise) {\n return result.then((data) => {\n if (!data) {\n setError();\n return false;\n }\n else {\n return true;\n }\n });\n }\n if (!result) {\n setError();\n return false;\n }\n else {\n return true;\n }\n });\n }\n refinement(check, refinementData) {\n return this._refinement((val, ctx) => {\n if (!check(val)) {\n ctx.addIssue(typeof refinementData === \"function\"\n ? refinementData(val, ctx)\n : refinementData);\n return false;\n }\n else {\n return true;\n }\n });\n }\n _refinement(refinement) {\n return new ZodEffects({\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"refinement\", refinement },\n });\n }\n superRefine(refinement) {\n return this._refinement(refinement);\n }\n optional() {\n return ZodOptional.create(this, this._def);\n }\n nullable() {\n return ZodNullable.create(this, this._def);\n }\n nullish() {\n return this.nullable().optional();\n }\n array() {\n return ZodArray.create(this, this._def);\n }\n promise() {\n return ZodPromise.create(this, this._def);\n }\n or(option) {\n return ZodUnion.create([this, option], this._def);\n }\n and(incoming) {\n return ZodIntersection.create(this, incoming, this._def);\n }\n transform(transform) {\n return new ZodEffects({\n ...processCreateParams(this._def),\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"transform\", transform },\n });\n }\n default(def) {\n const defaultValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodDefault({\n ...processCreateParams(this._def),\n innerType: this,\n defaultValue: defaultValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodDefault,\n });\n }\n brand() {\n return new ZodBranded({\n typeName: ZodFirstPartyTypeKind.ZodBranded,\n type: this,\n ...processCreateParams(this._def),\n });\n }\n catch(def) {\n const catchValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodCatch({\n ...processCreateParams(this._def),\n innerType: this,\n catchValue: catchValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodCatch,\n });\n }\n describe(description) {\n const This = this.constructor;\n return new This({\n ...this._def,\n description,\n });\n }\n pipe(target) {\n return ZodPipeline.create(this, target);\n }\n readonly() {\n return ZodReadonly.create(this);\n }\n isOptional() {\n return this.safeParse(undefined).success;\n }\n isNullable() {\n return this.safeParse(null).success;\n }\n}\nexports.ZodType = ZodType;\nexports.Schema = ZodType;\nexports.ZodSchema = ZodType;\nconst cuidRegex = /^c[^\\s-]{8,}$/i;\nconst cuid2Regex = /^[0-9a-z]+$/;\nconst ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/;\n// const uuidRegex =\n// /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i;\nconst uuidRegex = /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/i;\nconst nanoidRegex = /^[a-z0-9_-]{21}$/i;\nconst durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\\d+Y)|(?:[-+]?\\d+[.,]\\d+Y$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:(?:[-+]?\\d+W)|(?:[-+]?\\d+[.,]\\d+W$))?(?:(?:[-+]?\\d+D)|(?:[-+]?\\d+[.,]\\d+D$))?(?:T(?=[\\d+-])(?:(?:[-+]?\\d+H)|(?:[-+]?\\d+[.,]\\d+H$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:[-+]?\\d+(?:[.,]\\d+)?S)?)??$/;\n// from https://stackoverflow.com/a/46181/1550155\n// old version: too slow, didn't support unicode\n// const emailRegex = /^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))$/i;\n//old email regex\n// const emailRegex = /^(([^<>()[\\].,;:\\s@\"]+(\\.[^<>()[\\].,;:\\s@\"]+)*)|(\".+\"))@((?!-)([^<>()[\\].,;:\\s@\"]+\\.)+[^<>()[\\].,;:\\s@\"]{1,})[^-<>()[\\].,;:\\s@\"]$/i;\n// eslint-disable-next-line\n// const emailRegex =\n// /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\])|(\\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\\.[A-Za-z]{2,})+))$/;\n// const emailRegex =\n// /^[a-zA-Z0-9\\.\\!\\#\\$\\%\\&\\'\\*\\+\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~\\-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n// const emailRegex =\n// /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$/i;\nconst emailRegex = /^(?!\\.)(?!.*\\.\\.)([A-Z0-9_'+\\-\\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\\-]*\\.)+[A-Z]{2,}$/i;\n// const emailRegex =\n// /^[a-z0-9.!#$%&\u2019*+/=?^_`{|}~-]+@[a-z0-9-]+(?:\\.[a-z0-9\\-]+)*$/i;\n// from https://thekevinscott.com/emojis-in-javascript/#writing-a-regular-expression\nconst _emojiRegex = `^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$`;\nlet emojiRegex;\n// faster, simpler, safer\nconst ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;\nconst ipv6Regex = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;\n// https://stackoverflow.com/questions/7860392/determine-if-string-is-in-base64-using-javascript\nconst base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;\n// simple\n// const dateRegexSource = `\\\\d{4}-\\\\d{2}-\\\\d{2}`;\n// no leap year validation\n// const dateRegexSource = `\\\\d{4}-((0[13578]|10|12)-31|(0[13-9]|1[0-2])-30|(0[1-9]|1[0-2])-(0[1-9]|1\\\\d|2\\\\d))`;\n// with leap year validation\nconst dateRegexSource = `((\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\\\d|30)|(02)-(0[1-9]|1\\\\d|2[0-8])))`;\nconst dateRegex = new RegExp(`^${dateRegexSource}$`);\nfunction timeRegexSource(args) {\n // let regex = `\\\\d{2}:\\\\d{2}:\\\\d{2}`;\n let regex = `([01]\\\\d|2[0-3]):[0-5]\\\\d:[0-5]\\\\d`;\n if (args.precision) {\n regex = `${regex}\\\\.\\\\d{${args.precision}}`;\n }\n else if (args.precision == null) {\n regex = `${regex}(\\\\.\\\\d+)?`;\n }\n return regex;\n}\nfunction timeRegex(args) {\n return new RegExp(`^${timeRegexSource(args)}$`);\n}\n// Adapted from https://stackoverflow.com/a/3143231\nfunction datetimeRegex(args) {\n let regex = `${dateRegexSource}T${timeRegexSource(args)}`;\n const opts = [];\n opts.push(args.local ? `Z?` : `Z`);\n if (args.offset)\n opts.push(`([+-]\\\\d{2}:?\\\\d{2})`);\n regex = `${regex}(${opts.join(\"|\")})`;\n return new RegExp(`^${regex}$`);\n}\nexports.datetimeRegex = datetimeRegex;\nfunction isValidIP(ip, version) {\n if ((version === \"v4\" || !version) && ipv4Regex.test(ip)) {\n return true;\n }\n if ((version === \"v6\" || !version) && ipv6Regex.test(ip)) {\n return true;\n }\n return false;\n}\nclass ZodString extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = String(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_1.ZodParsedType.string) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.string,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n const status = new parseUtil_1.ParseStatus();\n let ctx = undefined;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.length < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n if (input.data.length > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"length\") {\n const tooBig = input.data.length > check.value;\n const tooSmall = input.data.length < check.value;\n if (tooBig || tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n if (tooBig) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message,\n });\n }\n else if (tooSmall) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message,\n });\n }\n status.dirty();\n }\n }\n else if (check.kind === \"email\") {\n if (!emailRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"email\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"emoji\") {\n if (!emojiRegex) {\n emojiRegex = new RegExp(_emojiRegex, \"u\");\n }\n if (!emojiRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"emoji\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"uuid\") {\n if (!uuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"uuid\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"nanoid\") {\n if (!nanoidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"nanoid\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"cuid\") {\n if (!cuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"cuid\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"cuid2\") {\n if (!cuid2Regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"cuid2\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"ulid\") {\n if (!ulidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"ulid\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"url\") {\n try {\n new URL(input.data);\n }\n catch (_a) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"url\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"regex\") {\n check.regex.lastIndex = 0;\n const testResult = check.regex.test(input.data);\n if (!testResult) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"regex\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"trim\") {\n input.data = input.data.trim();\n }\n else if (check.kind === \"includes\") {\n if (!input.data.includes(check.value, check.position)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_string,\n validation: { includes: check.value, position: check.position },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"toLowerCase\") {\n input.data = input.data.toLowerCase();\n }\n else if (check.kind === \"toUpperCase\") {\n input.data = input.data.toUpperCase();\n }\n else if (check.kind === \"startsWith\") {\n if (!input.data.startsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_string,\n validation: { startsWith: check.value },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"endsWith\") {\n if (!input.data.endsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_string,\n validation: { endsWith: check.value },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"datetime\") {\n const regex = datetimeRegex(check);\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_string,\n validation: \"datetime\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"date\") {\n const regex = dateRegex;\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_string,\n validation: \"date\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"time\") {\n const regex = timeRegex(check);\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_string,\n validation: \"time\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"duration\") {\n if (!durationRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"duration\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"ip\") {\n if (!isValidIP(input.data, check.version)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"ip\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"base64\") {\n if (!base64Regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"base64\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util_1.util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n _regex(regex, validation, message) {\n return this.refinement((data) => regex.test(data), {\n validation,\n code: ZodError_1.ZodIssueCode.invalid_string,\n ...errorUtil_1.errorUtil.errToObj(message),\n });\n }\n _addCheck(check) {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n email(message) {\n return this._addCheck({ kind: \"email\", ...errorUtil_1.errorUtil.errToObj(message) });\n }\n url(message) {\n return this._addCheck({ kind: \"url\", ...errorUtil_1.errorUtil.errToObj(message) });\n }\n emoji(message) {\n return this._addCheck({ kind: \"emoji\", ...errorUtil_1.errorUtil.errToObj(message) });\n }\n uuid(message) {\n return this._addCheck({ kind: \"uuid\", ...errorUtil_1.errorUtil.errToObj(message) });\n }\n nanoid(message) {\n return this._addCheck({ kind: \"nanoid\", ...errorUtil_1.errorUtil.errToObj(message) });\n }\n cuid(message) {\n return this._addCheck({ kind: \"cuid\", ...errorUtil_1.errorUtil.errToObj(message) });\n }\n cuid2(message) {\n return this._addCheck({ kind: \"cuid2\", ...errorUtil_1.errorUtil.errToObj(message) });\n }\n ulid(message) {\n return this._addCheck({ kind: \"ulid\", ...errorUtil_1.errorUtil.errToObj(message) });\n }\n base64(message) {\n return this._addCheck({ kind: \"base64\", ...errorUtil_1.errorUtil.errToObj(message) });\n }\n ip(options) {\n return this._addCheck({ kind: \"ip\", ...errorUtil_1.errorUtil.errToObj(options) });\n }\n datetime(options) {\n var _a, _b;\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"datetime\",\n precision: null,\n offset: false,\n local: false,\n message: options,\n });\n }\n return this._addCheck({\n kind: \"datetime\",\n precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === \"undefined\" ? null : options === null || options === void 0 ? void 0 : options.precision,\n offset: (_a = options === null || options === void 0 ? void 0 : options.offset) !== null && _a !== void 0 ? _a : false,\n local: (_b = options === null || options === void 0 ? void 0 : options.local) !== null && _b !== void 0 ? _b : false,\n ...errorUtil_1.errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),\n });\n }\n date(message) {\n return this._addCheck({ kind: \"date\", message });\n }\n time(options) {\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"time\",\n precision: null,\n message: options,\n });\n }\n return this._addCheck({\n kind: \"time\",\n precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === \"undefined\" ? null : options === null || options === void 0 ? void 0 : options.precision,\n ...errorUtil_1.errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),\n });\n }\n duration(message) {\n return this._addCheck({ kind: \"duration\", ...errorUtil_1.errorUtil.errToObj(message) });\n }\n regex(regex, message) {\n return this._addCheck({\n kind: \"regex\",\n regex: regex,\n ...errorUtil_1.errorUtil.errToObj(message),\n });\n }\n includes(value, options) {\n return this._addCheck({\n kind: \"includes\",\n value: value,\n position: options === null || options === void 0 ? void 0 : options.position,\n ...errorUtil_1.errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),\n });\n }\n startsWith(value, message) {\n return this._addCheck({\n kind: \"startsWith\",\n value: value,\n ...errorUtil_1.errorUtil.errToObj(message),\n });\n }\n endsWith(value, message) {\n return this._addCheck({\n kind: \"endsWith\",\n value: value,\n ...errorUtil_1.errorUtil.errToObj(message),\n });\n }\n min(minLength, message) {\n return this._addCheck({\n kind: \"min\",\n value: minLength,\n ...errorUtil_1.errorUtil.errToObj(message),\n });\n }\n max(maxLength, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxLength,\n ...errorUtil_1.errorUtil.errToObj(message),\n });\n }\n length(len, message) {\n return this._addCheck({\n kind: \"length\",\n value: len,\n ...errorUtil_1.errorUtil.errToObj(message),\n });\n }\n /**\n * @deprecated Use z.string().min(1) instead.\n * @see {@link ZodString.min}\n */\n nonempty(message) {\n return this.min(1, errorUtil_1.errorUtil.errToObj(message));\n }\n trim() {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"trim\" }],\n });\n }\n toLowerCase() {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toLowerCase\" }],\n });\n }\n toUpperCase() {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toUpperCase\" }],\n });\n }\n get isDatetime() {\n return !!this._def.checks.find((ch) => ch.kind === \"datetime\");\n }\n get isDate() {\n return !!this._def.checks.find((ch) => ch.kind === \"date\");\n }\n get isTime() {\n return !!this._def.checks.find((ch) => ch.kind === \"time\");\n }\n get isDuration() {\n return !!this._def.checks.find((ch) => ch.kind === \"duration\");\n }\n get isEmail() {\n return !!this._def.checks.find((ch) => ch.kind === \"email\");\n }\n get isURL() {\n return !!this._def.checks.find((ch) => ch.kind === \"url\");\n }\n get isEmoji() {\n return !!this._def.checks.find((ch) => ch.kind === \"emoji\");\n }\n get isUUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"uuid\");\n }\n get isNANOID() {\n return !!this._def.checks.find((ch) => ch.kind === \"nanoid\");\n }\n get isCUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid\");\n }\n get isCUID2() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid2\");\n }\n get isULID() {\n return !!this._def.checks.find((ch) => ch.kind === \"ulid\");\n }\n get isIP() {\n return !!this._def.checks.find((ch) => ch.kind === \"ip\");\n }\n get isBase64() {\n return !!this._def.checks.find((ch) => ch.kind === \"base64\");\n }\n get minLength() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxLength() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n}\nexports.ZodString = ZodString;\nZodString.create = (params) => {\n var _a;\n return new ZodString({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodString,\n coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,\n ...processCreateParams(params),\n });\n};\n// https://stackoverflow.com/questions/3966484/why-does-modulus-operator-return-fractional-number-in-javascript/31711034#31711034\nfunction floatSafeRemainder(val, step) {\n const valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n const stepDecCount = (step.toString().split(\".\")[1] || \"\").length;\n const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n const valInt = parseInt(val.toFixed(decCount).replace(\".\", \"\"));\n const stepInt = parseInt(step.toFixed(decCount).replace(\".\", \"\"));\n return (valInt % stepInt) / Math.pow(10, decCount);\n}\nclass ZodNumber extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n this.step = this.multipleOf;\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = Number(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_1.ZodParsedType.number) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.number,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n let ctx = undefined;\n const status = new parseUtil_1.ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"int\") {\n if (!util_1.util.isInteger(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: \"integer\",\n received: \"float\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"min\") {\n const tooSmall = check.inclusive\n ? input.data < check.value\n : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_small,\n minimum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n const tooBig = check.inclusive\n ? input.data > check.value\n : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_big,\n maximum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"multipleOf\") {\n if (floatSafeRemainder(input.data, check.value) !== 0) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"finite\") {\n if (!Number.isFinite(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.not_finite,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util_1.util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil_1.errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil_1.errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil_1.errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil_1.errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new ZodNumber({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil_1.errorUtil.toString(message),\n },\n ],\n });\n }\n _addCheck(check) {\n return new ZodNumber({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n int(message) {\n return this._addCheck({\n kind: \"int\",\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: false,\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: false,\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: true,\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: true,\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value: value,\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n finite(message) {\n return this._addCheck({\n kind: \"finite\",\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n safe(message) {\n return this._addCheck({\n kind: \"min\",\n inclusive: true,\n value: Number.MIN_SAFE_INTEGER,\n message: errorUtil_1.errorUtil.toString(message),\n })._addCheck({\n kind: \"max\",\n inclusive: true,\n value: Number.MAX_SAFE_INTEGER,\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n get isInt() {\n return !!this._def.checks.find((ch) => ch.kind === \"int\" ||\n (ch.kind === \"multipleOf\" && util_1.util.isInteger(ch.value)));\n }\n get isFinite() {\n let max = null, min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"finite\" ||\n ch.kind === \"int\" ||\n ch.kind === \"multipleOf\") {\n return true;\n }\n else if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n else if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return Number.isFinite(min) && Number.isFinite(max);\n }\n}\nexports.ZodNumber = ZodNumber;\nZodNumber.create = (params) => {\n return new ZodNumber({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodNumber,\n coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n ...processCreateParams(params),\n });\n};\nclass ZodBigInt extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = BigInt(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_1.ZodParsedType.bigint) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.bigint,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n let ctx = undefined;\n const status = new parseUtil_1.ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n const tooSmall = check.inclusive\n ? input.data < check.value\n : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_small,\n type: \"bigint\",\n minimum: check.value,\n inclusive: check.inclusive,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n const tooBig = check.inclusive\n ? input.data > check.value\n : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_big,\n type: \"bigint\",\n maximum: check.value,\n inclusive: check.inclusive,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"multipleOf\") {\n if (input.data % check.value !== BigInt(0)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util_1.util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil_1.errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil_1.errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil_1.errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil_1.errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new ZodBigInt({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil_1.errorUtil.toString(message),\n },\n ],\n });\n }\n _addCheck(check) {\n return new ZodBigInt({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value,\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n}\nexports.ZodBigInt = ZodBigInt;\nZodBigInt.create = (params) => {\n var _a;\n return new ZodBigInt({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodBigInt,\n coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,\n ...processCreateParams(params),\n });\n};\nclass ZodBoolean extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = Boolean(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_1.ZodParsedType.boolean) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.boolean,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n return (0, parseUtil_1.OK)(input.data);\n }\n}\nexports.ZodBoolean = ZodBoolean;\nZodBoolean.create = (params) => {\n return new ZodBoolean({\n typeName: ZodFirstPartyTypeKind.ZodBoolean,\n coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n ...processCreateParams(params),\n });\n};\nclass ZodDate extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = new Date(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_1.ZodParsedType.date) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.date,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n if (isNaN(input.data.getTime())) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_date,\n });\n return parseUtil_1.INVALID;\n }\n const status = new parseUtil_1.ParseStatus();\n let ctx = undefined;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.getTime() < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_small,\n message: check.message,\n inclusive: true,\n exact: false,\n minimum: check.value,\n type: \"date\",\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n if (input.data.getTime() > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_big,\n message: check.message,\n inclusive: true,\n exact: false,\n maximum: check.value,\n type: \"date\",\n });\n status.dirty();\n }\n }\n else {\n util_1.util.assertNever(check);\n }\n }\n return {\n status: status.value,\n value: new Date(input.data.getTime()),\n };\n }\n _addCheck(check) {\n return new ZodDate({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n min(minDate, message) {\n return this._addCheck({\n kind: \"min\",\n value: minDate.getTime(),\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n max(maxDate, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxDate.getTime(),\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n get minDate() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min != null ? new Date(min) : null;\n }\n get maxDate() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max != null ? new Date(max) : null;\n }\n}\nexports.ZodDate = ZodDate;\nZodDate.create = (params) => {\n return new ZodDate({\n checks: [],\n coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n typeName: ZodFirstPartyTypeKind.ZodDate,\n ...processCreateParams(params),\n });\n};\nclass ZodSymbol extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_1.ZodParsedType.symbol) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.symbol,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n return (0, parseUtil_1.OK)(input.data);\n }\n}\nexports.ZodSymbol = ZodSymbol;\nZodSymbol.create = (params) => {\n return new ZodSymbol({\n typeName: ZodFirstPartyTypeKind.ZodSymbol,\n ...processCreateParams(params),\n });\n};\nclass ZodUndefined extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_1.ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.undefined,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n return (0, parseUtil_1.OK)(input.data);\n }\n}\nexports.ZodUndefined = ZodUndefined;\nZodUndefined.create = (params) => {\n return new ZodUndefined({\n typeName: ZodFirstPartyTypeKind.ZodUndefined,\n ...processCreateParams(params),\n });\n};\nclass ZodNull extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_1.ZodParsedType.null) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.null,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n return (0, parseUtil_1.OK)(input.data);\n }\n}\nexports.ZodNull = ZodNull;\nZodNull.create = (params) => {\n return new ZodNull({\n typeName: ZodFirstPartyTypeKind.ZodNull,\n ...processCreateParams(params),\n });\n};\nclass ZodAny extends ZodType {\n constructor() {\n super(...arguments);\n // to prevent instances of other classes from extending ZodAny. this causes issues with catchall in ZodObject.\n this._any = true;\n }\n _parse(input) {\n return (0, parseUtil_1.OK)(input.data);\n }\n}\nexports.ZodAny = ZodAny;\nZodAny.create = (params) => {\n return new ZodAny({\n typeName: ZodFirstPartyTypeKind.ZodAny,\n ...processCreateParams(params),\n });\n};\nclass ZodUnknown extends ZodType {\n constructor() {\n super(...arguments);\n // required\n this._unknown = true;\n }\n _parse(input) {\n return (0, parseUtil_1.OK)(input.data);\n }\n}\nexports.ZodUnknown = ZodUnknown;\nZodUnknown.create = (params) => {\n return new ZodUnknown({\n typeName: ZodFirstPartyTypeKind.ZodUnknown,\n ...processCreateParams(params),\n });\n};\nclass ZodNever extends ZodType {\n _parse(input) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.never,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n}\nexports.ZodNever = ZodNever;\nZodNever.create = (params) => {\n return new ZodNever({\n typeName: ZodFirstPartyTypeKind.ZodNever,\n ...processCreateParams(params),\n });\n};\nclass ZodVoid extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_1.ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.void,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n return (0, parseUtil_1.OK)(input.data);\n }\n}\nexports.ZodVoid = ZodVoid;\nZodVoid.create = (params) => {\n return new ZodVoid({\n typeName: ZodFirstPartyTypeKind.ZodVoid,\n ...processCreateParams(params),\n });\n};\nclass ZodArray extends ZodType {\n _parse(input) {\n const { ctx, status } = this._processInputParams(input);\n const def = this._def;\n if (ctx.parsedType !== util_1.ZodParsedType.array) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.array,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n if (def.exactLength !== null) {\n const tooBig = ctx.data.length > def.exactLength.value;\n const tooSmall = ctx.data.length < def.exactLength.value;\n if (tooBig || tooSmall) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: tooBig ? ZodError_1.ZodIssueCode.too_big : ZodError_1.ZodIssueCode.too_small,\n minimum: (tooSmall ? def.exactLength.value : undefined),\n maximum: (tooBig ? def.exactLength.value : undefined),\n type: \"array\",\n inclusive: true,\n exact: true,\n message: def.exactLength.message,\n });\n status.dirty();\n }\n }\n if (def.minLength !== null) {\n if (ctx.data.length < def.minLength.value) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_small,\n minimum: def.minLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.minLength.message,\n });\n status.dirty();\n }\n }\n if (def.maxLength !== null) {\n if (ctx.data.length > def.maxLength.value) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_big,\n maximum: def.maxLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.maxLength.message,\n });\n status.dirty();\n }\n }\n if (ctx.common.async) {\n return Promise.all([...ctx.data].map((item, i) => {\n return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));\n })).then((result) => {\n return parseUtil_1.ParseStatus.mergeArray(status, result);\n });\n }\n const result = [...ctx.data].map((item, i) => {\n return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i));\n });\n return parseUtil_1.ParseStatus.mergeArray(status, result);\n }\n get element() {\n return this._def.type;\n }\n min(minLength, message) {\n return new ZodArray({\n ...this._def,\n minLength: { value: minLength, message: errorUtil_1.errorUtil.toString(message) },\n });\n }\n max(maxLength, message) {\n return new ZodArray({\n ...this._def,\n maxLength: { value: maxLength, message: errorUtil_1.errorUtil.toString(message) },\n });\n }\n length(len, message) {\n return new ZodArray({\n ...this._def,\n exactLength: { value: len, message: errorUtil_1.errorUtil.toString(message) },\n });\n }\n nonempty(message) {\n return this.min(1, message);\n }\n}\nexports.ZodArray = ZodArray;\nZodArray.create = (schema, params) => {\n return new ZodArray({\n type: schema,\n minLength: null,\n maxLength: null,\n exactLength: null,\n typeName: ZodFirstPartyTypeKind.ZodArray,\n ...processCreateParams(params),\n });\n};\nfunction deepPartialify(schema) {\n if (schema instanceof ZodObject) {\n const newShape = {};\n for (const key in schema.shape) {\n const fieldSchema = schema.shape[key];\n newShape[key] = ZodOptional.create(deepPartialify(fieldSchema));\n }\n return new ZodObject({\n ...schema._def,\n shape: () => newShape,\n });\n }\n else if (schema instanceof ZodArray) {\n return new ZodArray({\n ...schema._def,\n type: deepPartialify(schema.element),\n });\n }\n else if (schema instanceof ZodOptional) {\n return ZodOptional.create(deepPartialify(schema.unwrap()));\n }\n else if (schema instanceof ZodNullable) {\n return ZodNullable.create(deepPartialify(schema.unwrap()));\n }\n else if (schema instanceof ZodTuple) {\n return ZodTuple.create(schema.items.map((item) => deepPartialify(item)));\n }\n else {\n return schema;\n }\n}\nclass ZodObject extends ZodType {\n constructor() {\n super(...arguments);\n this._cached = null;\n /**\n * @deprecated In most cases, this is no longer needed - unknown properties are now silently stripped.\n * If you want to pass through unknown properties, use `.passthrough()` instead.\n */\n this.nonstrict = this.passthrough;\n // extend<\n // Augmentation extends ZodRawShape,\n // NewOutput extends util.flatten<{\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // }>,\n // NewInput extends util.flatten<{\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }>\n // >(\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape,\n // UnknownKeys,\n // Catchall,\n // NewOutput,\n // NewInput\n // > {\n // return new ZodObject({\n // ...this._def,\n // shape: () => ({\n // ...this._def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // }\n /**\n * @deprecated Use `.extend` instead\n * */\n this.augment = this.extend;\n }\n _getCached() {\n if (this._cached !== null)\n return this._cached;\n const shape = this._def.shape();\n const keys = util_1.util.objectKeys(shape);\n return (this._cached = { shape, keys });\n }\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_1.ZodParsedType.object) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.object,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n const { status, ctx } = this._processInputParams(input);\n const { shape, keys: shapeKeys } = this._getCached();\n const extraKeys = [];\n if (!(this._def.catchall instanceof ZodNever &&\n this._def.unknownKeys === \"strip\")) {\n for (const key in ctx.data) {\n if (!shapeKeys.includes(key)) {\n extraKeys.push(key);\n }\n }\n }\n const pairs = [];\n for (const key of shapeKeys) {\n const keyValidator = shape[key];\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),\n alwaysSet: key in ctx.data,\n });\n }\n if (this._def.catchall instanceof ZodNever) {\n const unknownKeys = this._def.unknownKeys;\n if (unknownKeys === \"passthrough\") {\n for (const key of extraKeys) {\n pairs.push({\n key: { status: \"valid\", value: key },\n value: { status: \"valid\", value: ctx.data[key] },\n });\n }\n }\n else if (unknownKeys === \"strict\") {\n if (extraKeys.length > 0) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.unrecognized_keys,\n keys: extraKeys,\n });\n status.dirty();\n }\n }\n else if (unknownKeys === \"strip\") {\n }\n else {\n throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);\n }\n }\n else {\n // run catchall validation\n const catchall = this._def.catchall;\n for (const key of extraKeys) {\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: catchall._parse(new ParseInputLazyPath(ctx, value, ctx.path, key) //, ctx.child(key), value, getParsedType(value)\n ),\n alwaysSet: key in ctx.data,\n });\n }\n }\n if (ctx.common.async) {\n return Promise.resolve()\n .then(async () => {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n syncPairs.push({\n key,\n value,\n alwaysSet: pair.alwaysSet,\n });\n }\n return syncPairs;\n })\n .then((syncPairs) => {\n return parseUtil_1.ParseStatus.mergeObjectSync(status, syncPairs);\n });\n }\n else {\n return parseUtil_1.ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get shape() {\n return this._def.shape();\n }\n strict(message) {\n errorUtil_1.errorUtil.errToObj;\n return new ZodObject({\n ...this._def,\n unknownKeys: \"strict\",\n ...(message !== undefined\n ? {\n errorMap: (issue, ctx) => {\n var _a, _b, _c, _d;\n const defaultError = (_c = (_b = (_a = this._def).errorMap) === null || _b === void 0 ? void 0 : _b.call(_a, issue, ctx).message) !== null && _c !== void 0 ? _c : ctx.defaultError;\n if (issue.code === \"unrecognized_keys\")\n return {\n message: (_d = errorUtil_1.errorUtil.errToObj(message).message) !== null && _d !== void 0 ? _d : defaultError,\n };\n return {\n message: defaultError,\n };\n },\n }\n : {}),\n });\n }\n strip() {\n return new ZodObject({\n ...this._def,\n unknownKeys: \"strip\",\n });\n }\n passthrough() {\n return new ZodObject({\n ...this._def,\n unknownKeys: \"passthrough\",\n });\n }\n // const AugmentFactory =\n // (def: Def) =>\n // (\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape, Augmentation>,\n // Def[\"unknownKeys\"],\n // Def[\"catchall\"]\n // > => {\n // return new ZodObject({\n // ...def,\n // shape: () => ({\n // ...def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // };\n extend(augmentation) {\n return new ZodObject({\n ...this._def,\n shape: () => ({\n ...this._def.shape(),\n ...augmentation,\n }),\n });\n }\n /**\n * Prior to zod@1.0.12 there was a bug in the\n * inferred type of merged objects. Please\n * upgrade if you are experiencing issues.\n */\n merge(merging) {\n const merged = new ZodObject({\n unknownKeys: merging._def.unknownKeys,\n catchall: merging._def.catchall,\n shape: () => ({\n ...this._def.shape(),\n ...merging._def.shape(),\n }),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n });\n return merged;\n }\n // merge<\n // Incoming extends AnyZodObject,\n // Augmentation extends Incoming[\"shape\"],\n // NewOutput extends {\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // },\n // NewInput extends {\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }\n // >(\n // merging: Incoming\n // ): ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"],\n // NewOutput,\n // NewInput\n // > {\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n setKey(key, schema) {\n return this.augment({ [key]: schema });\n }\n // merge(\n // merging: Incoming\n // ): //ZodObject = (merging) => {\n // ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"]\n // > {\n // // const mergedShape = objectUtil.mergeShapes(\n // // this._def.shape(),\n // // merging._def.shape()\n // // );\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n catchall(index) {\n return new ZodObject({\n ...this._def,\n catchall: index,\n });\n }\n pick(mask) {\n const shape = {};\n util_1.util.objectKeys(mask).forEach((key) => {\n if (mask[key] && this.shape[key]) {\n shape[key] = this.shape[key];\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => shape,\n });\n }\n omit(mask) {\n const shape = {};\n util_1.util.objectKeys(this.shape).forEach((key) => {\n if (!mask[key]) {\n shape[key] = this.shape[key];\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => shape,\n });\n }\n /**\n * @deprecated\n */\n deepPartial() {\n return deepPartialify(this);\n }\n partial(mask) {\n const newShape = {};\n util_1.util.objectKeys(this.shape).forEach((key) => {\n const fieldSchema = this.shape[key];\n if (mask && !mask[key]) {\n newShape[key] = fieldSchema;\n }\n else {\n newShape[key] = fieldSchema.optional();\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => newShape,\n });\n }\n required(mask) {\n const newShape = {};\n util_1.util.objectKeys(this.shape).forEach((key) => {\n if (mask && !mask[key]) {\n newShape[key] = this.shape[key];\n }\n else {\n const fieldSchema = this.shape[key];\n let newField = fieldSchema;\n while (newField instanceof ZodOptional) {\n newField = newField._def.innerType;\n }\n newShape[key] = newField;\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => newShape,\n });\n }\n keyof() {\n return createZodEnum(util_1.util.objectKeys(this.shape));\n }\n}\nexports.ZodObject = ZodObject;\nZodObject.create = (shape, params) => {\n return new ZodObject({\n shape: () => shape,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nZodObject.strictCreate = (shape, params) => {\n return new ZodObject({\n shape: () => shape,\n unknownKeys: \"strict\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nZodObject.lazycreate = (shape, params) => {\n return new ZodObject({\n shape,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nclass ZodUnion extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const options = this._def.options;\n function handleResults(results) {\n // return first issue-free validation if it exists\n for (const result of results) {\n if (result.result.status === \"valid\") {\n return result.result;\n }\n }\n for (const result of results) {\n if (result.result.status === \"dirty\") {\n // add issues from dirty option\n ctx.common.issues.push(...result.ctx.common.issues);\n return result.result;\n }\n }\n // return invalid\n const unionErrors = results.map((result) => new ZodError_1.ZodError(result.ctx.common.issues));\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_union,\n unionErrors,\n });\n return parseUtil_1.INVALID;\n }\n if (ctx.common.async) {\n return Promise.all(options.map(async (option) => {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n parent: null,\n };\n return {\n result: await option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx,\n }),\n ctx: childCtx,\n };\n })).then(handleResults);\n }\n else {\n let dirty = undefined;\n const issues = [];\n for (const option of options) {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n parent: null,\n };\n const result = option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx,\n });\n if (result.status === \"valid\") {\n return result;\n }\n else if (result.status === \"dirty\" && !dirty) {\n dirty = { result, ctx: childCtx };\n }\n if (childCtx.common.issues.length) {\n issues.push(childCtx.common.issues);\n }\n }\n if (dirty) {\n ctx.common.issues.push(...dirty.ctx.common.issues);\n return dirty.result;\n }\n const unionErrors = issues.map((issues) => new ZodError_1.ZodError(issues));\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_union,\n unionErrors,\n });\n return parseUtil_1.INVALID;\n }\n }\n get options() {\n return this._def.options;\n }\n}\nexports.ZodUnion = ZodUnion;\nZodUnion.create = (types, params) => {\n return new ZodUnion({\n options: types,\n typeName: ZodFirstPartyTypeKind.ZodUnion,\n ...processCreateParams(params),\n });\n};\n/////////////////////////////////////////////////////\n/////////////////////////////////////////////////////\n////////// //////////\n////////// ZodDiscriminatedUnion //////////\n////////// //////////\n/////////////////////////////////////////////////////\n/////////////////////////////////////////////////////\nconst getDiscriminator = (type) => {\n if (type instanceof ZodLazy) {\n return getDiscriminator(type.schema);\n }\n else if (type instanceof ZodEffects) {\n return getDiscriminator(type.innerType());\n }\n else if (type instanceof ZodLiteral) {\n return [type.value];\n }\n else if (type instanceof ZodEnum) {\n return type.options;\n }\n else if (type instanceof ZodNativeEnum) {\n // eslint-disable-next-line ban/ban\n return util_1.util.objectValues(type.enum);\n }\n else if (type instanceof ZodDefault) {\n return getDiscriminator(type._def.innerType);\n }\n else if (type instanceof ZodUndefined) {\n return [undefined];\n }\n else if (type instanceof ZodNull) {\n return [null];\n }\n else if (type instanceof ZodOptional) {\n return [undefined, ...getDiscriminator(type.unwrap())];\n }\n else if (type instanceof ZodNullable) {\n return [null, ...getDiscriminator(type.unwrap())];\n }\n else if (type instanceof ZodBranded) {\n return getDiscriminator(type.unwrap());\n }\n else if (type instanceof ZodReadonly) {\n return getDiscriminator(type.unwrap());\n }\n else if (type instanceof ZodCatch) {\n return getDiscriminator(type._def.innerType);\n }\n else {\n return [];\n }\n};\nclass ZodDiscriminatedUnion extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_1.ZodParsedType.object) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.object,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n const discriminator = this.discriminator;\n const discriminatorValue = ctx.data[discriminator];\n const option = this.optionsMap.get(discriminatorValue);\n if (!option) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_union_discriminator,\n options: Array.from(this.optionsMap.keys()),\n path: [discriminator],\n });\n return parseUtil_1.INVALID;\n }\n if (ctx.common.async) {\n return option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n }\n else {\n return option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n }\n }\n get discriminator() {\n return this._def.discriminator;\n }\n get options() {\n return this._def.options;\n }\n get optionsMap() {\n return this._def.optionsMap;\n }\n /**\n * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.\n * However, it only allows a union of objects, all of which need to share a discriminator property. This property must\n * have a different value for each object in the union.\n * @param discriminator the name of the discriminator property\n * @param types an array of object schemas\n * @param params\n */\n static create(discriminator, options, params) {\n // Get all the valid discriminator values\n const optionsMap = new Map();\n // try {\n for (const type of options) {\n const discriminatorValues = getDiscriminator(type.shape[discriminator]);\n if (!discriminatorValues.length) {\n throw new Error(`A discriminator value for key \\`${discriminator}\\` could not be extracted from all schema options`);\n }\n for (const value of discriminatorValues) {\n if (optionsMap.has(value)) {\n throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);\n }\n optionsMap.set(value, type);\n }\n }\n return new ZodDiscriminatedUnion({\n typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion,\n discriminator,\n options,\n optionsMap,\n ...processCreateParams(params),\n });\n }\n}\nexports.ZodDiscriminatedUnion = ZodDiscriminatedUnion;\nfunction mergeValues(a, b) {\n const aType = (0, util_1.getParsedType)(a);\n const bType = (0, util_1.getParsedType)(b);\n if (a === b) {\n return { valid: true, data: a };\n }\n else if (aType === util_1.ZodParsedType.object && bType === util_1.ZodParsedType.object) {\n const bKeys = util_1.util.objectKeys(b);\n const sharedKeys = util_1.util\n .objectKeys(a)\n .filter((key) => bKeys.indexOf(key) !== -1);\n const newObj = { ...a, ...b };\n for (const key of sharedKeys) {\n const sharedValue = mergeValues(a[key], b[key]);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newObj[key] = sharedValue.data;\n }\n return { valid: true, data: newObj };\n }\n else if (aType === util_1.ZodParsedType.array && bType === util_1.ZodParsedType.array) {\n if (a.length !== b.length) {\n return { valid: false };\n }\n const newArray = [];\n for (let index = 0; index < a.length; index++) {\n const itemA = a[index];\n const itemB = b[index];\n const sharedValue = mergeValues(itemA, itemB);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newArray.push(sharedValue.data);\n }\n return { valid: true, data: newArray };\n }\n else if (aType === util_1.ZodParsedType.date &&\n bType === util_1.ZodParsedType.date &&\n +a === +b) {\n return { valid: true, data: a };\n }\n else {\n return { valid: false };\n }\n}\nclass ZodIntersection extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const handleParsed = (parsedLeft, parsedRight) => {\n if ((0, parseUtil_1.isAborted)(parsedLeft) || (0, parseUtil_1.isAborted)(parsedRight)) {\n return parseUtil_1.INVALID;\n }\n const merged = mergeValues(parsedLeft.value, parsedRight.value);\n if (!merged.valid) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_intersection_types,\n });\n return parseUtil_1.INVALID;\n }\n if ((0, parseUtil_1.isDirty)(parsedLeft) || (0, parseUtil_1.isDirty)(parsedRight)) {\n status.dirty();\n }\n return { status: status.value, value: merged.data };\n };\n if (ctx.common.async) {\n return Promise.all([\n this._def.left._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }),\n this._def.right._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }),\n ]).then(([left, right]) => handleParsed(left, right));\n }\n else {\n return handleParsed(this._def.left._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }), this._def.right._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }));\n }\n }\n}\nexports.ZodIntersection = ZodIntersection;\nZodIntersection.create = (left, right, params) => {\n return new ZodIntersection({\n left: left,\n right: right,\n typeName: ZodFirstPartyTypeKind.ZodIntersection,\n ...processCreateParams(params),\n });\n};\nclass ZodTuple extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_1.ZodParsedType.array) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.array,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n if (ctx.data.length < this._def.items.length) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_small,\n minimum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\",\n });\n return parseUtil_1.INVALID;\n }\n const rest = this._def.rest;\n if (!rest && ctx.data.length > this._def.items.length) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_big,\n maximum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\",\n });\n status.dirty();\n }\n const items = [...ctx.data]\n .map((item, itemIndex) => {\n const schema = this._def.items[itemIndex] || this._def.rest;\n if (!schema)\n return null;\n return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));\n })\n .filter((x) => !!x); // filter nulls\n if (ctx.common.async) {\n return Promise.all(items).then((results) => {\n return parseUtil_1.ParseStatus.mergeArray(status, results);\n });\n }\n else {\n return parseUtil_1.ParseStatus.mergeArray(status, items);\n }\n }\n get items() {\n return this._def.items;\n }\n rest(rest) {\n return new ZodTuple({\n ...this._def,\n rest,\n });\n }\n}\nexports.ZodTuple = ZodTuple;\nZodTuple.create = (schemas, params) => {\n if (!Array.isArray(schemas)) {\n throw new Error(\"You must pass an array of schemas to z.tuple([ ... ])\");\n }\n return new ZodTuple({\n items: schemas,\n typeName: ZodFirstPartyTypeKind.ZodTuple,\n rest: null,\n ...processCreateParams(params),\n });\n};\nclass ZodRecord extends ZodType {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_1.ZodParsedType.object) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.object,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n const pairs = [];\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n for (const key in ctx.data) {\n pairs.push({\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),\n value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)),\n alwaysSet: key in ctx.data,\n });\n }\n if (ctx.common.async) {\n return parseUtil_1.ParseStatus.mergeObjectAsync(status, pairs);\n }\n else {\n return parseUtil_1.ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get element() {\n return this._def.valueType;\n }\n static create(first, second, third) {\n if (second instanceof ZodType) {\n return new ZodRecord({\n keyType: first,\n valueType: second,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(third),\n });\n }\n return new ZodRecord({\n keyType: ZodString.create(),\n valueType: first,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(second),\n });\n }\n}\nexports.ZodRecord = ZodRecord;\nclass ZodMap extends ZodType {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_1.ZodParsedType.map) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.map,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n const pairs = [...ctx.data.entries()].map(([key, value], index) => {\n return {\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index, \"key\"])),\n value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index, \"value\"])),\n };\n });\n if (ctx.common.async) {\n const finalMap = new Map();\n return Promise.resolve().then(async () => {\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return parseUtil_1.INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n });\n }\n else {\n const finalMap = new Map();\n for (const pair of pairs) {\n const key = pair.key;\n const value = pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return parseUtil_1.INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n }\n }\n}\nexports.ZodMap = ZodMap;\nZodMap.create = (keyType, valueType, params) => {\n return new ZodMap({\n valueType,\n keyType,\n typeName: ZodFirstPartyTypeKind.ZodMap,\n ...processCreateParams(params),\n });\n};\nclass ZodSet extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_1.ZodParsedType.set) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.set,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n const def = this._def;\n if (def.minSize !== null) {\n if (ctx.data.size < def.minSize.value) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_small,\n minimum: def.minSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.minSize.message,\n });\n status.dirty();\n }\n }\n if (def.maxSize !== null) {\n if (ctx.data.size > def.maxSize.value) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_big,\n maximum: def.maxSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.maxSize.message,\n });\n status.dirty();\n }\n }\n const valueType = this._def.valueType;\n function finalizeSet(elements) {\n const parsedSet = new Set();\n for (const element of elements) {\n if (element.status === \"aborted\")\n return parseUtil_1.INVALID;\n if (element.status === \"dirty\")\n status.dirty();\n parsedSet.add(element.value);\n }\n return { status: status.value, value: parsedSet };\n }\n const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i)));\n if (ctx.common.async) {\n return Promise.all(elements).then((elements) => finalizeSet(elements));\n }\n else {\n return finalizeSet(elements);\n }\n }\n min(minSize, message) {\n return new ZodSet({\n ...this._def,\n minSize: { value: minSize, message: errorUtil_1.errorUtil.toString(message) },\n });\n }\n max(maxSize, message) {\n return new ZodSet({\n ...this._def,\n maxSize: { value: maxSize, message: errorUtil_1.errorUtil.toString(message) },\n });\n }\n size(size, message) {\n return this.min(size, message).max(size, message);\n }\n nonempty(message) {\n return this.min(1, message);\n }\n}\nexports.ZodSet = ZodSet;\nZodSet.create = (valueType, params) => {\n return new ZodSet({\n valueType,\n minSize: null,\n maxSize: null,\n typeName: ZodFirstPartyTypeKind.ZodSet,\n ...processCreateParams(params),\n });\n};\nclass ZodFunction extends ZodType {\n constructor() {\n super(...arguments);\n this.validate = this.implement;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_1.ZodParsedType.function) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.function,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n function makeArgsIssue(args, error) {\n return (0, parseUtil_1.makeIssue)({\n data: args,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n ctx.schemaErrorMap,\n (0, errors_1.getErrorMap)(),\n errors_1.defaultErrorMap,\n ].filter((x) => !!x),\n issueData: {\n code: ZodError_1.ZodIssueCode.invalid_arguments,\n argumentsError: error,\n },\n });\n }\n function makeReturnsIssue(returns, error) {\n return (0, parseUtil_1.makeIssue)({\n data: returns,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n ctx.schemaErrorMap,\n (0, errors_1.getErrorMap)(),\n errors_1.defaultErrorMap,\n ].filter((x) => !!x),\n issueData: {\n code: ZodError_1.ZodIssueCode.invalid_return_type,\n returnTypeError: error,\n },\n });\n }\n const params = { errorMap: ctx.common.contextualErrorMap };\n const fn = ctx.data;\n if (this._def.returns instanceof ZodPromise) {\n // Would love a way to avoid disabling this rule, but we need\n // an alias (using an arrow function was what caused 2651).\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const me = this;\n return (0, parseUtil_1.OK)(async function (...args) {\n const error = new ZodError_1.ZodError([]);\n const parsedArgs = await me._def.args\n .parseAsync(args, params)\n .catch((e) => {\n error.addIssue(makeArgsIssue(args, e));\n throw error;\n });\n const result = await Reflect.apply(fn, this, parsedArgs);\n const parsedReturns = await me._def.returns._def.type\n .parseAsync(result, params)\n .catch((e) => {\n error.addIssue(makeReturnsIssue(result, e));\n throw error;\n });\n return parsedReturns;\n });\n }\n else {\n // Would love a way to avoid disabling this rule, but we need\n // an alias (using an arrow function was what caused 2651).\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const me = this;\n return (0, parseUtil_1.OK)(function (...args) {\n const parsedArgs = me._def.args.safeParse(args, params);\n if (!parsedArgs.success) {\n throw new ZodError_1.ZodError([makeArgsIssue(args, parsedArgs.error)]);\n }\n const result = Reflect.apply(fn, this, parsedArgs.data);\n const parsedReturns = me._def.returns.safeParse(result, params);\n if (!parsedReturns.success) {\n throw new ZodError_1.ZodError([makeReturnsIssue(result, parsedReturns.error)]);\n }\n return parsedReturns.data;\n });\n }\n }\n parameters() {\n return this._def.args;\n }\n returnType() {\n return this._def.returns;\n }\n args(...items) {\n return new ZodFunction({\n ...this._def,\n args: ZodTuple.create(items).rest(ZodUnknown.create()),\n });\n }\n returns(returnType) {\n return new ZodFunction({\n ...this._def,\n returns: returnType,\n });\n }\n implement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n strictImplement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n static create(args, returns, params) {\n return new ZodFunction({\n args: (args\n ? args\n : ZodTuple.create([]).rest(ZodUnknown.create())),\n returns: returns || ZodUnknown.create(),\n typeName: ZodFirstPartyTypeKind.ZodFunction,\n ...processCreateParams(params),\n });\n }\n}\nexports.ZodFunction = ZodFunction;\nclass ZodLazy extends ZodType {\n get schema() {\n return this._def.getter();\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const lazySchema = this._def.getter();\n return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx });\n }\n}\nexports.ZodLazy = ZodLazy;\nZodLazy.create = (getter, params) => {\n return new ZodLazy({\n getter: getter,\n typeName: ZodFirstPartyTypeKind.ZodLazy,\n ...processCreateParams(params),\n });\n};\nclass ZodLiteral extends ZodType {\n _parse(input) {\n if (input.data !== this._def.value) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n received: ctx.data,\n code: ZodError_1.ZodIssueCode.invalid_literal,\n expected: this._def.value,\n });\n return parseUtil_1.INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n get value() {\n return this._def.value;\n }\n}\nexports.ZodLiteral = ZodLiteral;\nZodLiteral.create = (value, params) => {\n return new ZodLiteral({\n value: value,\n typeName: ZodFirstPartyTypeKind.ZodLiteral,\n ...processCreateParams(params),\n });\n};\nfunction createZodEnum(values, params) {\n return new ZodEnum({\n values,\n typeName: ZodFirstPartyTypeKind.ZodEnum,\n ...processCreateParams(params),\n });\n}\nclass ZodEnum extends ZodType {\n constructor() {\n super(...arguments);\n _ZodEnum_cache.set(this, void 0);\n }\n _parse(input) {\n if (typeof input.data !== \"string\") {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n (0, parseUtil_1.addIssueToContext)(ctx, {\n expected: util_1.util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodError_1.ZodIssueCode.invalid_type,\n });\n return parseUtil_1.INVALID;\n }\n if (!__classPrivateFieldGet(this, _ZodEnum_cache, \"f\")) {\n __classPrivateFieldSet(this, _ZodEnum_cache, new Set(this._def.values), \"f\");\n }\n if (!__classPrivateFieldGet(this, _ZodEnum_cache, \"f\").has(input.data)) {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n (0, parseUtil_1.addIssueToContext)(ctx, {\n received: ctx.data,\n code: ZodError_1.ZodIssueCode.invalid_enum_value,\n options: expectedValues,\n });\n return parseUtil_1.INVALID;\n }\n return (0, parseUtil_1.OK)(input.data);\n }\n get options() {\n return this._def.values;\n }\n get enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Values() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n extract(values, newDef = this._def) {\n return ZodEnum.create(values, {\n ...this._def,\n ...newDef,\n });\n }\n exclude(values, newDef = this._def) {\n return ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), {\n ...this._def,\n ...newDef,\n });\n }\n}\nexports.ZodEnum = ZodEnum;\n_ZodEnum_cache = new WeakMap();\nZodEnum.create = createZodEnum;\nclass ZodNativeEnum extends ZodType {\n constructor() {\n super(...arguments);\n _ZodNativeEnum_cache.set(this, void 0);\n }\n _parse(input) {\n const nativeEnumValues = util_1.util.getValidEnumValues(this._def.values);\n const ctx = this._getOrReturnCtx(input);\n if (ctx.parsedType !== util_1.ZodParsedType.string &&\n ctx.parsedType !== util_1.ZodParsedType.number) {\n const expectedValues = util_1.util.objectValues(nativeEnumValues);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n expected: util_1.util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodError_1.ZodIssueCode.invalid_type,\n });\n return parseUtil_1.INVALID;\n }\n if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, \"f\")) {\n __classPrivateFieldSet(this, _ZodNativeEnum_cache, new Set(util_1.util.getValidEnumValues(this._def.values)), \"f\");\n }\n if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, \"f\").has(input.data)) {\n const expectedValues = util_1.util.objectValues(nativeEnumValues);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n received: ctx.data,\n code: ZodError_1.ZodIssueCode.invalid_enum_value,\n options: expectedValues,\n });\n return parseUtil_1.INVALID;\n }\n return (0, parseUtil_1.OK)(input.data);\n }\n get enum() {\n return this._def.values;\n }\n}\nexports.ZodNativeEnum = ZodNativeEnum;\n_ZodNativeEnum_cache = new WeakMap();\nZodNativeEnum.create = (values, params) => {\n return new ZodNativeEnum({\n values: values,\n typeName: ZodFirstPartyTypeKind.ZodNativeEnum,\n ...processCreateParams(params),\n });\n};\nclass ZodPromise extends ZodType {\n unwrap() {\n return this._def.type;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_1.ZodParsedType.promise &&\n ctx.common.async === false) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.promise,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n const promisified = ctx.parsedType === util_1.ZodParsedType.promise\n ? ctx.data\n : Promise.resolve(ctx.data);\n return (0, parseUtil_1.OK)(promisified.then((data) => {\n return this._def.type.parseAsync(data, {\n path: ctx.path,\n errorMap: ctx.common.contextualErrorMap,\n });\n }));\n }\n}\nexports.ZodPromise = ZodPromise;\nZodPromise.create = (schema, params) => {\n return new ZodPromise({\n type: schema,\n typeName: ZodFirstPartyTypeKind.ZodPromise,\n ...processCreateParams(params),\n });\n};\nclass ZodEffects extends ZodType {\n innerType() {\n return this._def.schema;\n }\n sourceType() {\n return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects\n ? this._def.schema.sourceType()\n : this._def.schema;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const effect = this._def.effect || null;\n const checkCtx = {\n addIssue: (arg) => {\n (0, parseUtil_1.addIssueToContext)(ctx, arg);\n if (arg.fatal) {\n status.abort();\n }\n else {\n status.dirty();\n }\n },\n get path() {\n return ctx.path;\n },\n };\n checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);\n if (effect.type === \"preprocess\") {\n const processed = effect.transform(ctx.data, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(processed).then(async (processed) => {\n if (status.value === \"aborted\")\n return parseUtil_1.INVALID;\n const result = await this._def.schema._parseAsync({\n data: processed,\n path: ctx.path,\n parent: ctx,\n });\n if (result.status === \"aborted\")\n return parseUtil_1.INVALID;\n if (result.status === \"dirty\")\n return (0, parseUtil_1.DIRTY)(result.value);\n if (status.value === \"dirty\")\n return (0, parseUtil_1.DIRTY)(result.value);\n return result;\n });\n }\n else {\n if (status.value === \"aborted\")\n return parseUtil_1.INVALID;\n const result = this._def.schema._parseSync({\n data: processed,\n path: ctx.path,\n parent: ctx,\n });\n if (result.status === \"aborted\")\n return parseUtil_1.INVALID;\n if (result.status === \"dirty\")\n return (0, parseUtil_1.DIRTY)(result.value);\n if (status.value === \"dirty\")\n return (0, parseUtil_1.DIRTY)(result.value);\n return result;\n }\n }\n if (effect.type === \"refinement\") {\n const executeRefinement = (acc) => {\n const result = effect.refinement(acc, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(result);\n }\n if (result instanceof Promise) {\n throw new Error(\"Async refinement encountered during synchronous parse operation. Use .parseAsync instead.\");\n }\n return acc;\n };\n if (ctx.common.async === false) {\n const inner = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inner.status === \"aborted\")\n return parseUtil_1.INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n // return value is ignored\n executeRefinement(inner.value);\n return { status: status.value, value: inner.value };\n }\n else {\n return this._def.schema\n ._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx })\n .then((inner) => {\n if (inner.status === \"aborted\")\n return parseUtil_1.INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n return executeRefinement(inner.value).then(() => {\n return { status: status.value, value: inner.value };\n });\n });\n }\n }\n if (effect.type === \"transform\") {\n if (ctx.common.async === false) {\n const base = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (!(0, parseUtil_1.isValid)(base))\n return base;\n const result = effect.transform(base.value, checkCtx);\n if (result instanceof Promise) {\n throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);\n }\n return { status: status.value, value: result };\n }\n else {\n return this._def.schema\n ._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx })\n .then((base) => {\n if (!(0, parseUtil_1.isValid)(base))\n return base;\n return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ status: status.value, value: result }));\n });\n }\n }\n util_1.util.assertNever(effect);\n }\n}\nexports.ZodEffects = ZodEffects;\nexports.ZodTransformer = ZodEffects;\nZodEffects.create = (schema, effect, params) => {\n return new ZodEffects({\n schema,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect,\n ...processCreateParams(params),\n });\n};\nZodEffects.createWithPreprocess = (preprocess, schema, params) => {\n return new ZodEffects({\n schema,\n effect: { type: \"preprocess\", transform: preprocess },\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n ...processCreateParams(params),\n });\n};\nclass ZodOptional extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === util_1.ZodParsedType.undefined) {\n return (0, parseUtil_1.OK)(undefined);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n}\nexports.ZodOptional = ZodOptional;\nZodOptional.create = (type, params) => {\n return new ZodOptional({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodOptional,\n ...processCreateParams(params),\n });\n};\nclass ZodNullable extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === util_1.ZodParsedType.null) {\n return (0, parseUtil_1.OK)(null);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n}\nexports.ZodNullable = ZodNullable;\nZodNullable.create = (type, params) => {\n return new ZodNullable({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodNullable,\n ...processCreateParams(params),\n });\n};\nclass ZodDefault extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n let data = ctx.data;\n if (ctx.parsedType === util_1.ZodParsedType.undefined) {\n data = this._def.defaultValue();\n }\n return this._def.innerType._parse({\n data,\n path: ctx.path,\n parent: ctx,\n });\n }\n removeDefault() {\n return this._def.innerType;\n }\n}\nexports.ZodDefault = ZodDefault;\nZodDefault.create = (type, params) => {\n return new ZodDefault({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodDefault,\n defaultValue: typeof params.default === \"function\"\n ? params.default\n : () => params.default,\n ...processCreateParams(params),\n });\n};\nclass ZodCatch extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n // newCtx is used to not collect issues from inner types in ctx\n const newCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n };\n const result = this._def.innerType._parse({\n data: newCtx.data,\n path: newCtx.path,\n parent: {\n ...newCtx,\n },\n });\n if ((0, parseUtil_1.isAsync)(result)) {\n return result.then((result) => {\n return {\n status: \"valid\",\n value: result.status === \"valid\"\n ? result.value\n : this._def.catchValue({\n get error() {\n return new ZodError_1.ZodError(newCtx.common.issues);\n },\n input: newCtx.data,\n }),\n };\n });\n }\n else {\n return {\n status: \"valid\",\n value: result.status === \"valid\"\n ? result.value\n : this._def.catchValue({\n get error() {\n return new ZodError_1.ZodError(newCtx.common.issues);\n },\n input: newCtx.data,\n }),\n };\n }\n }\n removeCatch() {\n return this._def.innerType;\n }\n}\nexports.ZodCatch = ZodCatch;\nZodCatch.create = (type, params) => {\n return new ZodCatch({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodCatch,\n catchValue: typeof params.catch === \"function\" ? params.catch : () => params.catch,\n ...processCreateParams(params),\n });\n};\nclass ZodNaN extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_1.ZodParsedType.nan) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.nan,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n}\nexports.ZodNaN = ZodNaN;\nZodNaN.create = (params) => {\n return new ZodNaN({\n typeName: ZodFirstPartyTypeKind.ZodNaN,\n ...processCreateParams(params),\n });\n};\nexports.BRAND = Symbol(\"zod_brand\");\nclass ZodBranded extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const data = ctx.data;\n return this._def.type._parse({\n data,\n path: ctx.path,\n parent: ctx,\n });\n }\n unwrap() {\n return this._def.type;\n }\n}\nexports.ZodBranded = ZodBranded;\nclass ZodPipeline extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.common.async) {\n const handleAsync = async () => {\n const inResult = await this._def.in._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inResult.status === \"aborted\")\n return parseUtil_1.INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return (0, parseUtil_1.DIRTY)(inResult.value);\n }\n else {\n return this._def.out._parseAsync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx,\n });\n }\n };\n return handleAsync();\n }\n else {\n const inResult = this._def.in._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inResult.status === \"aborted\")\n return parseUtil_1.INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return {\n status: \"dirty\",\n value: inResult.value,\n };\n }\n else {\n return this._def.out._parseSync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx,\n });\n }\n }\n }\n static create(a, b) {\n return new ZodPipeline({\n in: a,\n out: b,\n typeName: ZodFirstPartyTypeKind.ZodPipeline,\n });\n }\n}\nexports.ZodPipeline = ZodPipeline;\nclass ZodReadonly extends ZodType {\n _parse(input) {\n const result = this._def.innerType._parse(input);\n const freeze = (data) => {\n if ((0, parseUtil_1.isValid)(data)) {\n data.value = Object.freeze(data.value);\n }\n return data;\n };\n return (0, parseUtil_1.isAsync)(result)\n ? result.then((data) => freeze(data))\n : freeze(result);\n }\n unwrap() {\n return this._def.innerType;\n }\n}\nexports.ZodReadonly = ZodReadonly;\nZodReadonly.create = (type, params) => {\n return new ZodReadonly({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodReadonly,\n ...processCreateParams(params),\n });\n};\nfunction custom(check, params = {}, \n/**\n * @deprecated\n *\n * Pass `fatal` into the params object instead:\n *\n * ```ts\n * z.string().custom((val) => val.length > 5, { fatal: false })\n * ```\n *\n */\nfatal) {\n if (check)\n return ZodAny.create().superRefine((data, ctx) => {\n var _a, _b;\n if (!check(data)) {\n const p = typeof params === \"function\"\n ? params(data)\n : typeof params === \"string\"\n ? { message: params }\n : params;\n const _fatal = (_b = (_a = p.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;\n const p2 = typeof p === \"string\" ? { message: p } : p;\n ctx.addIssue({ code: \"custom\", ...p2, fatal: _fatal });\n }\n });\n return ZodAny.create();\n}\nexports.custom = custom;\nexports.late = {\n object: ZodObject.lazycreate,\n};\nvar ZodFirstPartyTypeKind;\n(function (ZodFirstPartyTypeKind) {\n ZodFirstPartyTypeKind[\"ZodString\"] = \"ZodString\";\n ZodFirstPartyTypeKind[\"ZodNumber\"] = \"ZodNumber\";\n ZodFirstPartyTypeKind[\"ZodNaN\"] = \"ZodNaN\";\n ZodFirstPartyTypeKind[\"ZodBigInt\"] = \"ZodBigInt\";\n ZodFirstPartyTypeKind[\"ZodBoolean\"] = \"ZodBoolean\";\n ZodFirstPartyTypeKind[\"ZodDate\"] = \"ZodDate\";\n ZodFirstPartyTypeKind[\"ZodSymbol\"] = \"ZodSymbol\";\n ZodFirstPartyTypeKind[\"ZodUndefined\"] = \"ZodUndefined\";\n ZodFirstPartyTypeKind[\"ZodNull\"] = \"ZodNull\";\n ZodFirstPartyTypeKind[\"ZodAny\"] = \"ZodAny\";\n ZodFirstPartyTypeKind[\"ZodUnknown\"] = \"ZodUnknown\";\n ZodFirstPartyTypeKind[\"ZodNever\"] = \"ZodNever\";\n ZodFirstPartyTypeKind[\"ZodVoid\"] = \"ZodVoid\";\n ZodFirstPartyTypeKind[\"ZodArray\"] = \"ZodArray\";\n ZodFirstPartyTypeKind[\"ZodObject\"] = \"ZodObject\";\n ZodFirstPartyTypeKind[\"ZodUnion\"] = \"ZodUnion\";\n ZodFirstPartyTypeKind[\"ZodDiscriminatedUnion\"] = \"ZodDiscriminatedUnion\";\n ZodFirstPartyTypeKind[\"ZodIntersection\"] = \"ZodIntersection\";\n ZodFirstPartyTypeKind[\"ZodTuple\"] = \"ZodTuple\";\n ZodFirstPartyTypeKind[\"ZodRecord\"] = \"ZodRecord\";\n ZodFirstPartyTypeKind[\"ZodMap\"] = \"ZodMap\";\n ZodFirstPartyTypeKind[\"ZodSet\"] = \"ZodSet\";\n ZodFirstPartyTypeKind[\"ZodFunction\"] = \"ZodFunction\";\n ZodFirstPartyTypeKind[\"ZodLazy\"] = \"ZodLazy\";\n ZodFirstPartyTypeKind[\"ZodLiteral\"] = \"ZodLiteral\";\n ZodFirstPartyTypeKind[\"ZodEnum\"] = \"ZodEnum\";\n ZodFirstPartyTypeKind[\"ZodEffects\"] = \"ZodEffects\";\n ZodFirstPartyTypeKind[\"ZodNativeEnum\"] = \"ZodNativeEnum\";\n ZodFirstPartyTypeKind[\"ZodOptional\"] = \"ZodOptional\";\n ZodFirstPartyTypeKind[\"ZodNullable\"] = \"ZodNullable\";\n ZodFirstPartyTypeKind[\"ZodDefault\"] = \"ZodDefault\";\n ZodFirstPartyTypeKind[\"ZodCatch\"] = \"ZodCatch\";\n ZodFirstPartyTypeKind[\"ZodPromise\"] = \"ZodPromise\";\n ZodFirstPartyTypeKind[\"ZodBranded\"] = \"ZodBranded\";\n ZodFirstPartyTypeKind[\"ZodPipeline\"] = \"ZodPipeline\";\n ZodFirstPartyTypeKind[\"ZodReadonly\"] = \"ZodReadonly\";\n})(ZodFirstPartyTypeKind = exports.ZodFirstPartyTypeKind || (exports.ZodFirstPartyTypeKind = {}));\n// requires TS 4.4+\nclass Class {\n constructor(..._) { }\n}\nconst instanceOfType = (\n// const instanceOfType = any>(\ncls, params = {\n message: `Input not instance of ${cls.name}`,\n}) => custom((data) => data instanceof cls, params);\nexports.instanceof = instanceOfType;\nconst stringType = ZodString.create;\nexports.string = stringType;\nconst numberType = ZodNumber.create;\nexports.number = numberType;\nconst nanType = ZodNaN.create;\nexports.nan = nanType;\nconst bigIntType = ZodBigInt.create;\nexports.bigint = bigIntType;\nconst booleanType = ZodBoolean.create;\nexports.boolean = booleanType;\nconst dateType = ZodDate.create;\nexports.date = dateType;\nconst symbolType = ZodSymbol.create;\nexports.symbol = symbolType;\nconst undefinedType = ZodUndefined.create;\nexports.undefined = undefinedType;\nconst nullType = ZodNull.create;\nexports.null = nullType;\nconst anyType = ZodAny.create;\nexports.any = anyType;\nconst unknownType = ZodUnknown.create;\nexports.unknown = unknownType;\nconst neverType = ZodNever.create;\nexports.never = neverType;\nconst voidType = ZodVoid.create;\nexports.void = voidType;\nconst arrayType = ZodArray.create;\nexports.array = arrayType;\nconst objectType = ZodObject.create;\nexports.object = objectType;\nconst strictObjectType = ZodObject.strictCreate;\nexports.strictObject = strictObjectType;\nconst unionType = ZodUnion.create;\nexports.union = unionType;\nconst discriminatedUnionType = ZodDiscriminatedUnion.create;\nexports.discriminatedUnion = discriminatedUnionType;\nconst intersectionType = ZodIntersection.create;\nexports.intersection = intersectionType;\nconst tupleType = ZodTuple.create;\nexports.tuple = tupleType;\nconst recordType = ZodRecord.create;\nexports.record = recordType;\nconst mapType = ZodMap.create;\nexports.map = mapType;\nconst setType = ZodSet.create;\nexports.set = setType;\nconst functionType = ZodFunction.create;\nexports.function = functionType;\nconst lazyType = ZodLazy.create;\nexports.lazy = lazyType;\nconst literalType = ZodLiteral.create;\nexports.literal = literalType;\nconst enumType = ZodEnum.create;\nexports.enum = enumType;\nconst nativeEnumType = ZodNativeEnum.create;\nexports.nativeEnum = nativeEnumType;\nconst promiseType = ZodPromise.create;\nexports.promise = promiseType;\nconst effectsType = ZodEffects.create;\nexports.effect = effectsType;\nexports.transformer = effectsType;\nconst optionalType = ZodOptional.create;\nexports.optional = optionalType;\nconst nullableType = ZodNullable.create;\nexports.nullable = nullableType;\nconst preprocessType = ZodEffects.createWithPreprocess;\nexports.preprocess = preprocessType;\nconst pipelineType = ZodPipeline.create;\nexports.pipeline = pipelineType;\nconst ostring = () => stringType().optional();\nexports.ostring = ostring;\nconst onumber = () => numberType().optional();\nexports.onumber = onumber;\nconst oboolean = () => booleanType().optional();\nexports.oboolean = oboolean;\nexports.coerce = {\n string: ((arg) => ZodString.create({ ...arg, coerce: true })),\n number: ((arg) => ZodNumber.create({ ...arg, coerce: true })),\n boolean: ((arg) => ZodBoolean.create({\n ...arg,\n coerce: true,\n })),\n bigint: ((arg) => ZodBigInt.create({ ...arg, coerce: true })),\n date: ((arg) => ZodDate.create({ ...arg, coerce: true })),\n};\nexports.NEVER = parseUtil_1.INVALID;\n", "\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./errors\"), exports);\n__exportStar(require(\"./helpers/parseUtil\"), exports);\n__exportStar(require(\"./helpers/typeAliases\"), exports);\n__exportStar(require(\"./helpers/util\"), exports);\n__exportStar(require(\"./types\"), exports);\n__exportStar(require(\"./ZodError\"), exports);\n", "\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.z = void 0;\nconst z = __importStar(require(\"./external\"));\nexports.z = z;\n__exportStar(require(\"./external\"), exports);\nexports.default = z;\n", "export const INVALID_HANDLE = 'handle.invalid'\n\n// Currently these are registration-time restrictions, not protocol-level\n// restrictions. We have a couple accounts in the wild that we need to clean up\n// before hard-disallow.\n// See also: https://en.wikipedia.org/wiki/Top-level_domain#Reserved_domains\nexport const DISALLOWED_TLDS = [\n '.local',\n '.arpa',\n '.invalid',\n '.localhost',\n '.internal',\n '.example',\n '.alt',\n // policy could concievably change on \".onion\" some day\n '.onion',\n // NOTE: .test is allowed in testing and devopment. In practical terms\n // \"should\" \"never\" actually resolve and get registered in production\n]\n\n// Handle constraints, in English:\n// - must be a possible domain name\n// - RFC-1035 is commonly referenced, but has been updated. eg, RFC-3696,\n// section 2. and RFC-3986, section 3. can now have leading numbers (eg,\n// 4chan.org)\n// - \"labels\" (sub-names) are made of ASCII letters, digits, hyphens\n// - can not start or end with a hyphen\n// - TLD (last component) should not start with a digit\n// - can't end with a hyphen (can end with digit)\n// - each segment must be between 1 and 63 characters (not including any periods)\n// - overall length can't be more than 253 characters\n// - separated by (ASCII) periods; does not start or end with period\n// - case insensitive\n// - domains (handles) are equal if they are the same lower-case\n// - punycode allowed for internationalization\n// - no whitespace, null bytes, joining chars, etc\n// - does not validate whether domain or TLD exists, or is a reserved or\n// special TLD (eg, .onion or .local)\n// - does not validate punycode\nexport const ensureValidHandle = (handle: string): void => {\n // check that all chars are boring ASCII\n if (!/^[a-zA-Z0-9.-]*$/.test(handle)) {\n throw new InvalidHandleError(\n 'Disallowed characters in handle (ASCII letters, digits, dashes, periods only)',\n )\n }\n\n if (handle.length > 253) {\n throw new InvalidHandleError('Handle is too long (253 chars max)')\n }\n const labels = handle.split('.')\n if (labels.length < 2) {\n throw new InvalidHandleError('Handle domain needs at least two parts')\n }\n for (let i = 0; i < labels.length; i++) {\n const l = labels[i]\n if (l.length < 1) {\n throw new InvalidHandleError('Handle parts can not be empty')\n }\n if (l.length > 63) {\n throw new InvalidHandleError('Handle part too long (max 63 chars)')\n }\n if (l.endsWith('-') || l.startsWith('-')) {\n throw new InvalidHandleError(\n 'Handle parts can not start or end with hyphens',\n )\n }\n if (i + 1 === labels.length && !/^[a-zA-Z]/.test(l)) {\n throw new InvalidHandleError(\n 'Handle final component (TLD) must start with ASCII letter',\n )\n }\n }\n}\n\n// simple regex translation of above constraints\nexport const ensureValidHandleRegex = (handle: string): void => {\n if (\n !/^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$/.test(\n handle,\n )\n ) {\n throw new InvalidHandleError(\"Handle didn't validate via regex\")\n }\n if (handle.length > 253) {\n throw new InvalidHandleError('Handle is too long (253 chars max)')\n }\n}\n\nexport const normalizeHandle = (handle: string): string => {\n return handle.toLowerCase()\n}\n\nexport const normalizeAndEnsureValidHandle = (handle: string): string => {\n const normalized = normalizeHandle(handle)\n ensureValidHandle(normalized)\n return normalized\n}\n\nexport const isValidHandle = (handle: string): boolean => {\n try {\n ensureValidHandle(handle)\n } catch (err) {\n if (err instanceof InvalidHandleError) {\n return false\n }\n throw err\n }\n\n return true\n}\n\nexport const isValidTld = (handle: string): boolean => {\n return !DISALLOWED_TLDS.some((domain) => handle.endsWith(domain))\n}\n\nexport class InvalidHandleError extends Error {}\nexport class ReservedHandleError extends Error {}\nexport class UnsupportedDomainError extends Error {}\nexport class DisallowedDomainError extends Error {}\n", "// Human-readable constraints:\n// - valid W3C DID (https://www.w3.org/TR/did-core/#did-syntax)\n// - entire URI is ASCII: [a-zA-Z0-9._:%-]\n// - always starts \"did:\" (lower-case)\n// - method name is one or more lower-case letters, followed by \":\"\n// - remaining identifier can have any of the above chars, but can not end in \":\"\n// - it seems that a bunch of \":\" can be included, and don't need spaces between\n// - \"%\" is used only for \"percent encoding\" and must be followed by two hex characters (and thus can't end in \"%\")\n// - query (\"?\") and fragment (\"#\") stuff is defined for \"DID URIs\", but not as part of identifier itself\n// - \"The current specification does not take a position on the maximum length of a DID\"\n// - in current atproto, only allowing did:plc and did:web. But not *forcing* this at lexicon layer\n// - hard length limit of 8KBytes\n// - not going to validate \"percent encoding\" here\nexport const ensureValidDid = (did: string): void => {\n if (!did.startsWith('did:')) {\n throw new InvalidDidError('DID requires \"did:\" prefix')\n }\n\n // check that all chars are boring ASCII\n if (!/^[a-zA-Z0-9._:%-]*$/.test(did)) {\n throw new InvalidDidError(\n 'Disallowed characters in DID (ASCII letters, digits, and a couple other characters only)',\n )\n }\n\n const { length, 1: method } = did.split(':')\n if (length < 3) {\n throw new InvalidDidError(\n 'DID requires prefix, method, and method-specific content',\n )\n }\n\n if (!/^[a-z]+$/.test(method)) {\n throw new InvalidDidError('DID method must be lower-case letters')\n }\n\n if (did.endsWith(':') || did.endsWith('%')) {\n throw new InvalidDidError('DID can not end with \":\" or \"%\"')\n }\n\n if (did.length > 2 * 1024) {\n throw new InvalidDidError('DID is too long (2048 chars max)')\n }\n}\n\nexport const ensureValidDidRegex = (did: string): void => {\n // simple regex to enforce most constraints via just regex and length.\n // hand wrote this regex based on above constraints\n if (!/^did:[a-z]+:[a-zA-Z0-9._:%-]*[a-zA-Z0-9._-]$/.test(did)) {\n throw new InvalidDidError(\"DID didn't validate via regex\")\n }\n\n if (did.length > 2 * 1024) {\n throw new InvalidDidError('DID is too long (2048 chars max)')\n }\n}\n\nexport class InvalidDidError extends Error {}\n", "/*\nGrammar:\n\nalpha = \"a\" / \"b\" / \"c\" / \"d\" / \"e\" / \"f\" / \"g\" / \"h\" / \"i\" / \"j\" / \"k\" / \"l\" / \"m\" / \"n\" / \"o\" / \"p\" / \"q\" / \"r\" / \"s\" / \"t\" / \"u\" / \"v\" / \"w\" / \"x\" / \"y\" / \"z\" / \"A\" / \"B\" / \"C\" / \"D\" / \"E\" / \"F\" / \"G\" / \"H\" / \"I\" / \"J\" / \"K\" / \"L\" / \"M\" / \"N\" / \"O\" / \"P\" / \"Q\" / \"R\" / \"S\" / \"T\" / \"U\" / \"V\" / \"W\" / \"X\" / \"Y\" / \"Z\"\nnumber = \"1\" / \"2\" / \"3\" / \"4\" / \"5\" / \"6\" / \"7\" / \"8\" / \"9\" / \"0\"\ndelim = \".\"\nsegment = alpha *( alpha / number / \"-\" )\nauthority = segment *( delim segment )\nname = alpha *( alpha )\nnsid = authority delim name\n\n*/\n\nexport class NSID {\n segments: string[] = []\n\n static parse(nsid: string): NSID {\n return new NSID(nsid)\n }\n\n static create(authority: string, name: string): NSID {\n const segments = [...authority.split('.').reverse(), name].join('.')\n return new NSID(segments)\n }\n\n static isValid(nsid: string): boolean {\n try {\n NSID.parse(nsid)\n return true\n } catch (e) {\n return false\n }\n }\n\n constructor(nsid: string) {\n ensureValidNsid(nsid)\n this.segments = nsid.split('.')\n }\n\n get authority() {\n return this.segments\n .slice(0, this.segments.length - 1)\n .reverse()\n .join('.')\n }\n\n get name() {\n return this.segments.at(this.segments.length - 1)\n }\n\n toString() {\n return this.segments.join('.')\n }\n}\n\n// Human readable constraints on NSID:\n// - a valid domain in reversed notation\n// - followed by an additional period-separated name, which is camel-case letters\nexport const ensureValidNsid = (nsid: string): void => {\n const toCheck = nsid\n\n // check that all chars are boring ASCII\n if (!/^[a-zA-Z0-9.-]*$/.test(toCheck)) {\n throw new InvalidNsidError(\n 'Disallowed characters in NSID (ASCII letters, digits, dashes, periods only)',\n )\n }\n\n if (toCheck.length > 253 + 1 + 63) {\n throw new InvalidNsidError('NSID is too long (317 chars max)')\n }\n const labels = toCheck.split('.')\n if (labels.length < 3) {\n throw new InvalidNsidError('NSID needs at least three parts')\n }\n for (let i = 0; i < labels.length; i++) {\n const l = labels[i]\n if (l.length < 1) {\n throw new InvalidNsidError('NSID parts can not be empty')\n }\n if (l.length > 63) {\n throw new InvalidNsidError('NSID part too long (max 63 chars)')\n }\n if (l.endsWith('-') || l.startsWith('-')) {\n throw new InvalidNsidError('NSID parts can not start or end with hyphen')\n }\n if (/^[0-9]/.test(l) && i === 0) {\n throw new InvalidNsidError('NSID first part may not start with a digit')\n }\n if (!/^[a-zA-Z]+$/.test(l) && i + 1 === labels.length) {\n throw new InvalidNsidError('NSID name part must be only letters')\n }\n }\n}\n\nexport const ensureValidNsidRegex = (nsid: string): void => {\n // simple regex to enforce most constraints via just regex and length.\n // hand wrote this regex based on above constraints\n if (\n !/^[a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(\\.[a-zA-Z]([a-zA-Z]{0,61}[a-zA-Z])?)$/.test(\n nsid,\n )\n ) {\n throw new InvalidNsidError(\"NSID didn't validate via regex\")\n }\n if (nsid.length > 253 + 1 + 63) {\n throw new InvalidNsidError('NSID is too long (317 chars max)')\n }\n}\n\nexport class InvalidNsidError extends Error {}\n", "import { ensureValidHandle, ensureValidHandleRegex } from './handle'\nimport { ensureValidDid, ensureValidDidRegex } from './did'\nimport { ensureValidNsid, ensureValidNsidRegex } from './nsid'\n\n// Human-readable constraints on ATURI:\n// - following regular URLs, a 8KByte hard total length limit\n// - follows ATURI docs on website\n// - all ASCII characters, no whitespace. non-ASCII could be URL-encoded\n// - starts \"at://\"\n// - \"authority\" is a valid DID or a valid handle\n// - optionally, follow \"authority\" with \"/\" and valid NSID as start of path\n// - optionally, if NSID given, follow that with \"/\" and rkey\n// - rkey path component can include URL-encoded (\"percent encoded\"), or:\n// ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\" / \":\" / \"@\" / \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\" / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n// [a-zA-Z0-9._~:@!$&'\\(\\)*+,;=-]\n// - rkey must have at least one char\n// - regardless of path component, a fragment can follow as \"#\" and then a JSON pointer (RFC-6901)\nexport const ensureValidAtUri = (uri: string) => {\n // JSON pointer is pretty different from rest of URI, so split that out first\n const uriParts = uri.split('#')\n if (uriParts.length > 2) {\n throw new Error('ATURI can have at most one \"#\", separating fragment out')\n }\n const fragmentPart = uriParts[1] || null\n uri = uriParts[0]\n\n // check that all chars are boring ASCII\n if (!/^[a-zA-Z0-9._~:@!$&')(*+,;=%/-]*$/.test(uri)) {\n throw new Error('Disallowed characters in ATURI (ASCII)')\n }\n\n const parts = uri.split('/')\n if (parts.length >= 3 && (parts[0] !== 'at:' || parts[1].length !== 0)) {\n throw new Error('ATURI must start with \"at://\"')\n }\n if (parts.length < 3) {\n throw new Error('ATURI requires at least method and authority sections')\n }\n\n try {\n if (parts[2].startsWith('did:')) {\n ensureValidDid(parts[2])\n } else {\n ensureValidHandle(parts[2])\n }\n } catch {\n throw new Error('ATURI authority must be a valid handle or DID')\n }\n\n if (parts.length >= 4) {\n if (parts[3].length === 0) {\n throw new Error(\n 'ATURI can not have a slash after authority without a path segment',\n )\n }\n try {\n ensureValidNsid(parts[3])\n } catch {\n throw new Error(\n 'ATURI requires first path segment (if supplied) to be valid NSID',\n )\n }\n }\n\n if (parts.length >= 5) {\n if (parts[4].length === 0) {\n throw new Error(\n 'ATURI can not have a slash after collection, unless record key is provided',\n )\n }\n // would validate rkey here, but there are basically no constraints!\n }\n\n if (parts.length >= 6) {\n throw new Error(\n 'ATURI path can have at most two parts, and no trailing slash',\n )\n }\n\n if (uriParts.length >= 2 && fragmentPart == null) {\n throw new Error('ATURI fragment must be non-empty and start with slash')\n }\n\n if (fragmentPart != null) {\n if (fragmentPart.length === 0 || fragmentPart[0] !== '/') {\n throw new Error('ATURI fragment must be non-empty and start with slash')\n }\n // NOTE: enforcing *some* checks here for sanity. Eg, at least no whitespace\n if (!/^\\/[a-zA-Z0-9._~:@!$&')(*+,;=%[\\]/-]*$/.test(fragmentPart)) {\n throw new Error('Disallowed characters in ATURI fragment (ASCII)')\n }\n }\n\n if (uri.length > 8 * 1024) {\n throw new Error('ATURI is far too long')\n }\n}\n\nexport const ensureValidAtUriRegex = (uri: string): void => {\n // simple regex to enforce most constraints via just regex and length.\n // hand wrote this regex based on above constraints. whew!\n const aturiRegex =\n /^at:\\/\\/(?[a-zA-Z0-9._:%-]+)(\\/(?[a-zA-Z0-9-.]+)(\\/(?[a-zA-Z0-9._~:@!$&%')(*+,;=-]+))?)?(#(?\\/[a-zA-Z0-9._~:@!$&%')(*+,;=\\-[\\]/\\\\]*))?$/\n const rm = uri.match(aturiRegex)\n if (!rm || !rm.groups) {\n throw new Error(\"ATURI didn't validate via regex\")\n }\n const groups = rm.groups\n\n try {\n ensureValidHandleRegex(groups.authority)\n } catch {\n try {\n ensureValidDidRegex(groups.authority)\n } catch {\n throw new Error('ATURI authority must be a valid handle or DID')\n }\n }\n\n if (groups.collection) {\n try {\n ensureValidNsidRegex(groups.collection)\n } catch {\n throw new Error('ATURI collection path segment must be a valid NSID')\n }\n }\n\n if (uri.length > 8 * 1024) {\n throw new Error('ATURI is far too long')\n }\n}\n", "export * from './aturi_validation'\n\nexport const ATP_URI_REGEX =\n // proto- --did-------------- --name---------------- --path---- --query-- --hash--\n /^(at:\\/\\/)?((?:did:[a-z0-9:%-]+)|(?:[a-z0-9][a-z0-9.:-]*))(\\/[^?#\\s]*)?(\\?[^#\\s]+)?(#[^\\s]+)?$/i\n// --path----- --query-- --hash--\nconst RELATIVE_REGEX = /^(\\/[^?#\\s]*)?(\\?[^#\\s]+)?(#[^\\s]+)?$/i\n\nexport class AtUri {\n hash: string\n host: string\n pathname: string\n searchParams: URLSearchParams\n\n constructor(uri: string, base?: string) {\n let parsed\n if (base) {\n parsed = parse(base)\n if (!parsed) {\n throw new Error(`Invalid at uri: ${base}`)\n }\n const relativep = parseRelative(uri)\n if (!relativep) {\n throw new Error(`Invalid path: ${uri}`)\n }\n Object.assign(parsed, relativep)\n } else {\n parsed = parse(uri)\n if (!parsed) {\n throw new Error(`Invalid at uri: ${uri}`)\n }\n }\n\n this.hash = parsed.hash\n this.host = parsed.host\n this.pathname = parsed.pathname\n this.searchParams = parsed.searchParams\n }\n\n static make(handleOrDid: string, collection?: string, rkey?: string) {\n let str = handleOrDid\n if (collection) str += '/' + collection\n if (rkey) str += '/' + rkey\n return new AtUri(str)\n }\n\n get protocol() {\n return 'at:'\n }\n\n get origin() {\n return `at://${this.host}`\n }\n\n get hostname() {\n return this.host\n }\n\n set hostname(v: string) {\n this.host = v\n }\n\n get search() {\n return this.searchParams.toString()\n }\n\n set search(v: string) {\n this.searchParams = new URLSearchParams(v)\n }\n\n get collection() {\n return this.pathname.split('/').filter(Boolean)[0] || ''\n }\n\n set collection(v: string) {\n const parts = this.pathname.split('/').filter(Boolean)\n parts[0] = v\n this.pathname = parts.join('/')\n }\n\n get rkey() {\n return this.pathname.split('/').filter(Boolean)[1] || ''\n }\n\n set rkey(v: string) {\n const parts = this.pathname.split('/').filter(Boolean)\n if (!parts[0]) parts[0] = 'undefined'\n parts[1] = v\n this.pathname = parts.join('/')\n }\n\n get href() {\n return this.toString()\n }\n\n toString() {\n let path = this.pathname || '/'\n if (!path.startsWith('/')) {\n path = `/${path}`\n }\n let qs = this.searchParams.toString()\n if (qs && !qs.startsWith('?')) {\n qs = `?${qs}`\n }\n let hash = this.hash\n if (hash && !hash.startsWith('#')) {\n hash = `#${hash}`\n }\n return `at://${this.host}${path}${qs}${hash}`\n }\n}\n\nfunction parse(str: string) {\n const match = ATP_URI_REGEX.exec(str)\n if (match) {\n return {\n hash: match[5] || '',\n host: match[2] || '',\n pathname: match[3] || '',\n searchParams: new URLSearchParams(match[4] || ''),\n }\n }\n return undefined\n}\n\nfunction parseRelative(str: string) {\n const match = RELATIVE_REGEX.exec(str)\n if (match) {\n return {\n hash: match[3] || '',\n pathname: match[1] || '',\n searchParams: new URLSearchParams(match[2] || ''),\n }\n }\n return undefined\n}\n", "export const ensureValidTid = (tid: string): void => {\n if (tid.length !== 13) {\n throw new InvalidTidError('TID must be 13 characters')\n }\n // simple regex to enforce most constraints via just regex and length.\n if (!/^[234567abcdefghij][234567abcdefghijklmnopqrstuvwxyz]{12}$/.test(tid)) {\n throw new InvalidTidError('TID syntax not valid (regex)')\n }\n}\n\nexport const isValidTid = (tid: string): boolean => {\n try {\n ensureValidTid(tid)\n } catch (err) {\n if (err instanceof InvalidTidError) {\n return false\n }\n throw err\n }\n\n return true\n}\n\nexport class InvalidTidError extends Error {}\n", "export const ensureValidRecordKey = (rkey: string): void => {\n if (rkey.length > 512 || rkey.length < 1) {\n throw new InvalidRecordKeyError('record key must be 1 to 512 characters')\n }\n // simple regex to enforce most constraints via just regex and length.\n if (!/^[a-zA-Z0-9_~.:-]{1,512}$/.test(rkey)) {\n throw new InvalidRecordKeyError('record key syntax not valid (regex)')\n }\n if (rkey === '.' || rkey === '..')\n throw new InvalidRecordKeyError('record key can not be \".\" or \"..\"')\n}\n\nexport const isValidRecordKey = (rkey: string): boolean => {\n try {\n ensureValidRecordKey(rkey)\n } catch (err) {\n if (err instanceof InvalidRecordKeyError) {\n return false\n }\n throw err\n }\n\n return true\n}\n\nexport class InvalidRecordKeyError extends Error {}\n", "/* Validates datetime string against atproto Lexicon 'datetime' format.\n * Syntax is described at: https://atproto.com/specs/lexicon#datetime\n */\nexport const ensureValidDatetime = (dtStr: string): void => {\n const date = new Date(dtStr)\n // must parse as ISO 8601; this also verifies semantics like month is not 13 or 00\n if (isNaN(date.getTime())) {\n throw new InvalidDatetimeError('datetime did not parse as ISO 8601')\n }\n if (date.toISOString().startsWith('-')) {\n throw new InvalidDatetimeError('datetime normalized to a negative time')\n }\n // regex and other checks for RFC-3339\n if (\n !/^[0-9]{4}-[01][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](.[0-9]{1,20})?(Z|([+-][0-2][0-9]:[0-5][0-9]))$/.test(\n dtStr,\n )\n ) {\n throw new InvalidDatetimeError(\"datetime didn't validate via regex\")\n }\n if (dtStr.length > 64) {\n throw new InvalidDatetimeError('datetime is too long (64 chars max)')\n }\n if (dtStr.endsWith('-00:00')) {\n throw new InvalidDatetimeError(\n 'datetime can not use \"-00:00\" for UTC timezone',\n )\n }\n if (dtStr.startsWith('000')) {\n throw new InvalidDatetimeError('datetime so close to year zero not allowed')\n }\n}\n\n/* Same logic as ensureValidDatetime(), but returns a boolean instead of throwing an exception.\n */\nexport const isValidDatetime = (dtStr: string): boolean => {\n try {\n ensureValidDatetime(dtStr)\n } catch (err) {\n if (err instanceof InvalidDatetimeError) {\n return false\n }\n throw err\n }\n\n return true\n}\n\n/* Takes a flexible datetime string and normalizes representation.\n *\n * This function will work with any valid atproto datetime (eg, anything which isValidDatetime() is true for). It *additionally* is more flexible about accepting datetimes that don't comply to RFC 3339, or are missing timezone information, and normalizing them to a valid datetime.\n *\n * One use-case is a consistent, sortable string. Another is to work with older invalid createdAt datetimes.\n *\n * Successful output will be a valid atproto datetime with millisecond precision (3 sub-second digits) and UTC timezone with trailing 'Z' syntax. Throws `InvalidDatetimeError` if the input string could not be parsed as a datetime, even with permissive parsing.\n *\n * Expected output format: YYYY-MM-DDTHH:mm:ss.sssZ\n */\nexport const normalizeDatetime = (dtStr: string): string => {\n if (isValidDatetime(dtStr)) {\n const outStr = new Date(dtStr).toISOString()\n if (isValidDatetime(outStr)) {\n return outStr\n }\n }\n\n // check if this permissive datetime is missing a timezone\n if (!/.*(([+-]\\d\\d:?\\d\\d)|[a-zA-Z])$/.test(dtStr)) {\n const date = new Date(dtStr + 'Z')\n if (!isNaN(date.getTime())) {\n const tzStr = date.toISOString()\n if (isValidDatetime(tzStr)) {\n return tzStr\n }\n }\n }\n\n // finally try parsing as simple datetime\n const date = new Date(dtStr)\n if (isNaN(date.getTime())) {\n throw new InvalidDatetimeError(\n 'datetime did not parse as any timestamp format',\n )\n }\n const isoStr = date.toISOString()\n if (isValidDatetime(isoStr)) {\n return isoStr\n } else {\n throw new InvalidDatetimeError(\n 'datetime normalized to invalid timestamp string',\n )\n }\n}\n\n/* Variant of normalizeDatetime() which always returns a valid datetime strings.\n *\n * If a InvalidDatetimeError is encountered, returns the UNIX epoch time as a UTC datetime (1970-01-01T00:00:00.000Z).\n */\nexport const normalizeDatetimeAlways = (dtStr: string): string => {\n try {\n return normalizeDatetime(dtStr)\n } catch (err) {\n if (err instanceof InvalidDatetimeError) {\n return new Date(0).toISOString()\n }\n throw err\n }\n}\n\n/* Indicates a datetime string did not pass full atproto Lexicon datetime string format checks.\n */\nexport class InvalidDatetimeError extends Error {}\n", "export * from './handle'\nexport * from './did'\nexport * from './nsid'\nexport * from './aturi'\nexport * from './tid'\nexport * from './recordkey'\nexport * from './datetime'\n", "import { z } from 'zod'\nimport { Lexicons } from './lexicons'\nimport { LexRefVariant, LexUserType } from './types'\n\nexport function toLexUri(str: string, baseUri?: string): string {\n if (str.split('#').length > 2) {\n throw new Error('Uri can only have one hash segment')\n }\n\n if (str.startsWith('lex:')) {\n return str\n }\n if (str.startsWith('#')) {\n if (!baseUri) {\n throw new Error(`Unable to resolve uri without anchor: ${str}`)\n }\n return `${baseUri}${str}`\n }\n return `lex:${str}`\n}\n\nexport function toConcreteTypes(\n lexicons: Lexicons,\n def: LexRefVariant | LexUserType,\n): LexUserType[] {\n if (def.type === 'ref') {\n return [lexicons.getDefOrThrow(def.ref)]\n } else if (def.type === 'union') {\n return def.refs.map((ref) => lexicons.getDefOrThrow(ref)).flat()\n } else {\n return [def]\n }\n}\n\nexport function requiredPropertiesRefinement<\n ObjectType extends {\n required?: string[]\n properties?: Record\n },\n>(object: ObjectType, ctx: z.RefinementCtx) {\n // Required fields check\n if (object.required === undefined) {\n return\n }\n\n if (!Array.isArray(object.required)) {\n ctx.addIssue({\n code: z.ZodIssueCode.invalid_type,\n received: typeof object.required,\n expected: 'array',\n })\n return\n }\n\n if (object.properties === undefined) {\n if (object.required.length > 0) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: `Required fields defined but no properties defined`,\n })\n }\n return\n }\n\n for (const field of object.required) {\n if (object.properties[field] === undefined) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: `Required field \"${field}\" not defined`,\n })\n }\n }\n}\n", "import { z } from 'zod'\nimport { NSID } from '@atproto/syntax'\nimport { requiredPropertiesRefinement } from './util'\n\n// primitives\n// =\n\nexport const lexBoolean = z\n .object({\n type: z.literal('boolean'),\n description: z.string().optional(),\n default: z.boolean().optional(),\n const: z.boolean().optional(),\n })\n .strict()\nexport type LexBoolean = z.infer\n\nexport const lexInteger = z\n .object({\n type: z.literal('integer'),\n description: z.string().optional(),\n default: z.number().int().optional(),\n minimum: z.number().int().optional(),\n maximum: z.number().int().optional(),\n enum: z.number().int().array().optional(),\n const: z.number().int().optional(),\n })\n .strict()\nexport type LexInteger = z.infer\n\nexport const lexStringFormat = z.enum([\n 'datetime',\n 'uri',\n 'at-uri',\n 'did',\n 'handle',\n 'at-identifier',\n 'nsid',\n 'cid',\n 'language',\n 'tid',\n 'record-key',\n])\nexport type LexStringFormat = z.infer\n\nexport const lexString = z\n .object({\n type: z.literal('string'),\n format: lexStringFormat.optional(),\n description: z.string().optional(),\n default: z.string().optional(),\n minLength: z.number().int().optional(),\n maxLength: z.number().int().optional(),\n minGraphemes: z.number().int().optional(),\n maxGraphemes: z.number().int().optional(),\n enum: z.string().array().optional(),\n const: z.string().optional(),\n knownValues: z.string().array().optional(),\n })\n .strict()\nexport type LexString = z.infer\n\nexport const lexUnknown = z\n .object({\n type: z.literal('unknown'),\n description: z.string().optional(),\n })\n .strict()\nexport type LexUnknown = z.infer\n\nexport const lexPrimitive = z.discriminatedUnion('type', [\n lexBoolean,\n lexInteger,\n lexString,\n lexUnknown,\n])\nexport type LexPrimitive = z.infer\n\n// ipld types\n// =\n\nexport const lexBytes = z\n .object({\n type: z.literal('bytes'),\n description: z.string().optional(),\n maxLength: z.number().optional(),\n minLength: z.number().optional(),\n })\n .strict()\nexport type LexBytes = z.infer\n\nexport const lexCidLink = z\n .object({\n type: z.literal('cid-link'),\n description: z.string().optional(),\n })\n .strict()\nexport type LexCidLink = z.infer\n\nexport const lexIpldType = z.discriminatedUnion('type', [lexBytes, lexCidLink])\nexport type LexIpldType = z.infer\n\n// references\n// =\n\nexport const lexRef = z\n .object({\n type: z.literal('ref'),\n description: z.string().optional(),\n ref: z.string(),\n })\n .strict()\nexport type LexRef = z.infer\n\nexport const lexRefUnion = z\n .object({\n type: z.literal('union'),\n description: z.string().optional(),\n refs: z.string().array(),\n closed: z.boolean().optional(),\n })\n .strict()\nexport type LexRefUnion = z.infer\n\nexport const lexRefVariant = z.discriminatedUnion('type', [lexRef, lexRefUnion])\nexport type LexRefVariant = z.infer\n\n// blobs\n// =\n\nexport const lexBlob = z\n .object({\n type: z.literal('blob'),\n description: z.string().optional(),\n accept: z.string().array().optional(),\n maxSize: z.number().optional(),\n })\n .strict()\nexport type LexBlob = z.infer\n\n// complex types\n// =\n\nexport const lexArray = z\n .object({\n type: z.literal('array'),\n description: z.string().optional(),\n items: z.discriminatedUnion('type', [\n // lexPrimitive\n lexBoolean,\n lexInteger,\n lexString,\n lexUnknown,\n // lexIpldType\n lexBytes,\n lexCidLink,\n // lexRefVariant\n lexRef,\n lexRefUnion,\n // other\n lexBlob,\n ]),\n minLength: z.number().int().optional(),\n maxLength: z.number().int().optional(),\n })\n .strict()\nexport type LexArray = z.infer\n\nexport const lexPrimitiveArray = lexArray.merge(\n z\n .object({\n items: lexPrimitive,\n })\n .strict(),\n)\nexport type LexPrimitiveArray = z.infer\n\nexport const lexToken = z\n .object({\n type: z.literal('token'),\n description: z.string().optional(),\n })\n .strict()\nexport type LexToken = z.infer\n\nexport const lexObject = z\n .object({\n type: z.literal('object'),\n description: z.string().optional(),\n required: z.string().array().optional(),\n nullable: z.string().array().optional(),\n properties: z.record(\n z.discriminatedUnion('type', [\n lexArray,\n\n // lexPrimitive\n lexBoolean,\n lexInteger,\n lexString,\n lexUnknown,\n // lexIpldType\n lexBytes,\n lexCidLink,\n // lexRefVariant\n lexRef,\n lexRefUnion,\n // other\n lexBlob,\n ]),\n ),\n })\n .strict()\n .superRefine(requiredPropertiesRefinement)\nexport type LexObject = z.infer\n\n// xrpc\n// =\n\nexport const lexXrpcParameters = z\n .object({\n type: z.literal('params'),\n description: z.string().optional(),\n required: z.string().array().optional(),\n properties: z.record(\n z.discriminatedUnion('type', [\n lexPrimitiveArray,\n\n // lexPrimitive\n lexBoolean,\n lexInteger,\n lexString,\n lexUnknown,\n ]),\n ),\n })\n .strict()\n .superRefine(requiredPropertiesRefinement)\nexport type LexXrpcParameters = z.infer\n\nexport const lexXrpcBody = z\n .object({\n description: z.string().optional(),\n encoding: z.string(),\n // @NOTE using discriminatedUnion with a refined schema requires zod >= 4\n schema: z.union([lexRefVariant, lexObject]).optional(),\n })\n .strict()\nexport type LexXrpcBody = z.infer\n\nexport const lexXrpcSubscriptionMessage = z\n .object({\n description: z.string().optional(),\n // @NOTE using discriminatedUnion with a refined schema requires zod >= 4\n schema: z.union([lexRefVariant, lexObject]).optional(),\n })\n .strict()\nexport type LexXrpcSubscriptionMessage = z.infer<\n typeof lexXrpcSubscriptionMessage\n>\n\nexport const lexXrpcError = z\n .object({\n name: z.string(),\n description: z.string().optional(),\n })\n .strict()\nexport type LexXrpcError = z.infer\n\nexport const lexXrpcQuery = z\n .object({\n type: z.literal('query'),\n description: z.string().optional(),\n parameters: lexXrpcParameters.optional(),\n output: lexXrpcBody.optional(),\n errors: lexXrpcError.array().optional(),\n })\n .strict()\nexport type LexXrpcQuery = z.infer\n\nexport const lexXrpcProcedure = z\n .object({\n type: z.literal('procedure'),\n description: z.string().optional(),\n parameters: lexXrpcParameters.optional(),\n input: lexXrpcBody.optional(),\n output: lexXrpcBody.optional(),\n errors: lexXrpcError.array().optional(),\n })\n .strict()\nexport type LexXrpcProcedure = z.infer\n\nexport const lexXrpcSubscription = z\n .object({\n type: z.literal('subscription'),\n description: z.string().optional(),\n parameters: lexXrpcParameters.optional(),\n message: lexXrpcSubscriptionMessage.optional(),\n errors: lexXrpcError.array().optional(),\n })\n .strict()\nexport type LexXrpcSubscription = z.infer\n\n// database\n// =\n\nexport const lexRecord = z\n .object({\n type: z.literal('record'),\n description: z.string().optional(),\n key: z.string().optional(),\n record: lexObject,\n })\n .strict()\nexport type LexRecord = z.infer\n\n// core\n// =\n\n// We need to use `z.custom` here because\n// lexXrpcProperty and lexObject are refined\n// `z.union` would work, but it's too slow\n// see #915 for details\nexport const lexUserType = z.custom<\n | LexRecord\n | LexXrpcQuery\n | LexXrpcProcedure\n | LexXrpcSubscription\n | LexBlob\n | LexArray\n | LexToken\n | LexObject\n | LexBoolean\n | LexInteger\n | LexString\n | LexBytes\n | LexCidLink\n | LexUnknown\n>(\n (val) => {\n if (!val || typeof val !== 'object') {\n return\n }\n\n if (val['type'] === undefined) {\n return\n }\n\n switch (val['type']) {\n case 'record':\n return lexRecord.parse(val)\n\n case 'query':\n return lexXrpcQuery.parse(val)\n case 'procedure':\n return lexXrpcProcedure.parse(val)\n case 'subscription':\n return lexXrpcSubscription.parse(val)\n\n case 'blob':\n return lexBlob.parse(val)\n\n case 'array':\n return lexArray.parse(val)\n case 'token':\n return lexToken.parse(val)\n case 'object':\n return lexObject.parse(val)\n\n case 'boolean':\n return lexBoolean.parse(val)\n case 'integer':\n return lexInteger.parse(val)\n case 'string':\n return lexString.parse(val)\n case 'bytes':\n return lexBytes.parse(val)\n case 'cid-link':\n return lexCidLink.parse(val)\n case 'unknown':\n return lexUnknown.parse(val)\n }\n },\n (val) => {\n if (!val || typeof val !== 'object') {\n return {\n message: 'Must be an object',\n fatal: true,\n }\n }\n\n if (val['type'] === undefined) {\n return {\n message: 'Must have a type',\n fatal: true,\n }\n }\n\n if (typeof val['type'] !== 'string') {\n return {\n message: 'Type property must be a string',\n fatal: true,\n }\n }\n\n return {\n message: `Invalid type: ${val['type']} must be one of: record, query, procedure, subscription, blob, array, token, object, boolean, integer, string, bytes, cid-link, unknown`,\n fatal: true,\n }\n },\n)\nexport type LexUserType = z.infer\n\nexport const lexiconDoc = z\n .object({\n lexicon: z.literal(1),\n id: z.string().refine((v: string) => NSID.isValid(v), {\n message: 'Must be a valid NSID',\n }),\n revision: z.number().optional(),\n description: z.string().optional(),\n defs: z.record(lexUserType),\n })\n .strict()\n .superRefine((doc, ctx) => {\n for (const defId in doc.defs) {\n const def = doc.defs[defId]\n if (\n defId !== 'main' &&\n (def.type === 'record' ||\n def.type === 'procedure' ||\n def.type === 'query' ||\n def.type === 'subscription')\n ) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: `Records, procedures, queries, and subscriptions must be the main definition.`,\n })\n }\n }\n })\nexport type LexiconDoc = z.infer\n\n// helpers\n// =\n\nexport function isValidLexiconDoc(v: unknown): v is LexiconDoc {\n return lexiconDoc.safeParse(v).success\n}\n\nexport function isObj(obj: unknown): obj is Record {\n return obj !== null && typeof obj === 'object'\n}\n\nexport function hasProp(\n data: object,\n prop: K,\n): data is Record {\n return prop in data\n}\n\nexport const discriminatedObject = z.object({ $type: z.string() })\nexport type DiscriminatedObject = z.infer\nexport function isDiscriminatedObject(\n value: unknown,\n): value is DiscriminatedObject {\n return discriminatedObject.safeParse(value).success\n}\n\nexport function parseLexiconDoc(v: unknown): LexiconDoc {\n lexiconDoc.parse(v)\n return v as LexiconDoc\n}\n\nexport type ValidationResult =\n | {\n success: true\n value: unknown\n }\n | {\n success: false\n error: ValidationError\n }\n\nexport class ValidationError extends Error {}\nexport class InvalidLexiconError extends Error {}\nexport class LexiconDefNotFoundError extends Error {}\n", "// Explicitly not using \"zod\" types here to avoid mismatching types due to\n// version differences.\n\nexport interface Checkable {\n parse: (obj: unknown) => T\n safeParse: (\n obj: unknown,\n ) => { success: true; data: T } | { success: false; error: Error }\n}\n\nexport interface Def {\n name: string\n schema: Checkable\n}\n\nexport const is = (obj: unknown, def: Checkable): obj is T => {\n return def.safeParse(obj).success\n}\n\nexport const create =\n (def: Checkable) =>\n (v: unknown): v is T =>\n def.safeParse(v).success\n\nexport const assure = (def: Checkable, obj: unknown): T => {\n return def.parse(obj)\n}\n\nexport const isObject = (obj: unknown): obj is Record => {\n return typeof obj === 'object' && obj !== null\n}\n", "export const noUndefinedVals = (\n obj: Record,\n): Record => {\n Object.keys(obj).forEach((k) => {\n if (obj[k] === undefined) {\n delete obj[k]\n }\n })\n return obj as Record\n}\n\nexport function omit<\n T extends undefined | Record,\n K extends keyof NonNullable,\n>(obj: T, keys: readonly K[]): T extends undefined ? undefined : Omit\nexport function omit(\n obj: Record,\n keys: readonly string[],\n): undefined | Record {\n if (!obj) return obj\n\n return Object.fromEntries(\n Object.entries(obj).filter((entry) => !keys.includes(entry[0])),\n )\n}\n\nexport const jitter = (maxMs: number) => {\n return Math.round((Math.random() - 0.5) * maxMs * 2)\n}\n\nexport const wait = (ms: number) => {\n return new Promise((res) => setTimeout(res, ms))\n}\n\nexport type BailableWait = {\n bail: () => void\n wait: () => Promise\n}\n\nexport const bailableWait = (ms: number): BailableWait => {\n let bail\n const waitPromise = new Promise((res) => {\n const timeout = setTimeout(res, ms)\n bail = () => {\n clearTimeout(timeout)\n res()\n }\n })\n return { bail, wait: () => waitPromise }\n}\n\nexport const flattenUint8Arrays = (arrs: Uint8Array[]): Uint8Array => {\n const length = arrs.reduce((acc, cur) => {\n return acc + cur.length\n }, 0)\n const flattened = new Uint8Array(length)\n let offset = 0\n arrs.forEach((arr) => {\n flattened.set(arr, offset)\n offset += arr.length\n })\n return flattened\n}\n\nexport const streamToBuffer = async (\n stream: AsyncIterable,\n): Promise => {\n const arrays: Uint8Array[] = []\n for await (const chunk of stream) {\n arrays.push(chunk)\n }\n return flattenUint8Arrays(arrays)\n}\n\nconst S32_CHAR = '234567abcdefghijklmnopqrstuvwxyz'\n\nexport const s32encode = (i: number): string => {\n let s = ''\n while (i) {\n const c = i % 32\n i = Math.floor(i / 32)\n s = S32_CHAR.charAt(c) + s\n }\n return s\n}\n\nexport const s32decode = (s: string): number => {\n let i = 0\n for (const c of s) {\n i = i * 32 + S32_CHAR.indexOf(c)\n }\n return i\n}\n\nexport const asyncFilter = async (\n arr: T[],\n fn: (t: T) => Promise,\n) => {\n const results = await Promise.all(arr.map((t) => fn(t)))\n return arr.filter((_, i) => results[i])\n}\n\nexport const isErrnoException = (\n err: unknown,\n): err is NodeJS.ErrnoException => {\n return !!err && err['code']\n}\n\nexport const errHasMsg = (err: unknown, msg: string): boolean => {\n return !!err && typeof err === 'object' && err['message'] === msg\n}\n\nexport const chunkArray = (arr: T[], chunkSize: number): T[][] => {\n return arr.reduce((acc, cur, i) => {\n const chunkI = Math.floor(i / chunkSize)\n if (!acc[chunkI]) {\n acc[chunkI] = []\n }\n acc[chunkI].push(cur)\n return acc\n }, [] as T[][])\n}\n\nexport const range = (num: number): number[] => {\n const nums: number[] = []\n for (let i = 0; i < num; i++) {\n nums.push(i)\n }\n return nums\n}\n\nexport const dedupeStrs = (strs: string[]): string[] => {\n return [...new Set(strs)]\n}\n\nexport const parseIntWithFallback = (\n value: string | undefined,\n fallback: T,\n): number | T => {\n const parsed = parseInt(value || '', 10)\n return isNaN(parsed) ? fallback : parsed\n}\n", "export const keyBy = (arr: T[], key: string): Record => {\n return arr.reduce(\n (acc, cur) => {\n acc[cur[key]] = cur\n return acc\n },\n {} as Record,\n )\n}\n\nexport const mapDefined = (\n arr: T[],\n fn: (obj: T) => S | undefined,\n): S[] => {\n const output: S[] = []\n for (const item of arr) {\n const val = fn(item)\n if (val !== undefined) {\n output.push(val)\n }\n }\n return output\n}\n", "import { bailableWait } from './util'\n\n// reads values from a generator into a list\n// breaks when isDone signals `true` AND `waitFor` completes OR when a max length is reached\n// NOTE: does not signal generator to close. it *will* continue to produce values\nexport const readFromGenerator = async (\n gen: AsyncGenerator,\n isDone: (last?: T) => Promise | boolean,\n waitFor: Promise = Promise.resolve(),\n maxLength = Number.MAX_SAFE_INTEGER,\n): Promise => {\n const evts: T[] = []\n let bail: undefined | (() => void)\n let hasBroke = false\n const awaitDone = async () => {\n if (await isDone(evts.at(-1))) {\n return true\n }\n const bailable = bailableWait(20)\n await bailable.wait()\n bail = bailable.bail\n if (hasBroke) return false\n return await awaitDone()\n }\n const breakOn: Promise = new Promise((resolve) => {\n waitFor.then(() => {\n awaitDone().then(() => resolve())\n })\n })\n\n try {\n while (evts.length < maxLength) {\n const maybeEvt = await Promise.race([gen.next(), breakOn])\n if (!maybeEvt) break\n const evt = maybeEvt as IteratorResult\n if (evt.done) break\n evts.push(evt.value)\n }\n } finally {\n hasBroke = true\n bail && bail()\n }\n return evts\n}\n\nexport type Deferrable = {\n resolve: () => void\n complete: Promise\n}\n\nexport const createDeferrable = (): Deferrable => {\n let resolve\n const promise: Promise = new Promise((res) => {\n resolve = () => res()\n })\n return { resolve, complete: promise }\n}\n\nexport const createDeferrables = (count: number): Deferrable[] => {\n const list: Deferrable[] = []\n for (let i = 0; i < count; i++) {\n list.push(createDeferrable())\n }\n return list\n}\n\nexport const allComplete = async (deferrables: Deferrable[]): Promise => {\n await Promise.all(deferrables.map((d) => d.complete))\n}\n\nexport class AsyncBuffer {\n private buffer: T[] = []\n private promise: Promise\n private resolve: () => void\n private closed = false\n private toThrow: unknown | undefined\n\n constructor(public maxSize?: number) {\n // Initializing to satisfy types/build, immediately reset by resetPromise()\n this.promise = Promise.resolve()\n this.resolve = () => null\n this.resetPromise()\n }\n\n get curr(): T[] {\n return this.buffer\n }\n\n get size(): number {\n return this.buffer.length\n }\n\n get isClosed(): boolean {\n return this.closed\n }\n\n resetPromise() {\n this.promise = new Promise((r) => (this.resolve = r))\n }\n\n push(item: T) {\n this.buffer.push(item)\n this.resolve()\n }\n\n pushMany(items: T[]) {\n items.forEach((i) => this.buffer.push(i))\n this.resolve()\n }\n\n async *events(): AsyncGenerator {\n while (true) {\n if (this.closed && this.buffer.length === 0) {\n if (this.toThrow) {\n throw this.toThrow\n } else {\n return\n }\n }\n await this.promise\n if (this.toThrow) {\n throw this.toThrow\n }\n if (this.maxSize && this.size > this.maxSize) {\n throw new AsyncBufferFullError(this.maxSize)\n }\n const [first, ...rest] = this.buffer\n if (first) {\n this.buffer = rest\n yield first\n } else {\n this.resetPromise()\n }\n }\n }\n\n throw(err: unknown) {\n this.toThrow = err\n this.closed = true\n this.resolve()\n }\n\n close() {\n this.closed = true\n this.resolve()\n }\n}\n\nexport class AsyncBufferFullError extends Error {\n constructor(maxSize: number) {\n super(`ReachedMaxBufferSize: ${maxSize}`)\n }\n}\n\nexport const handleAllSettledErrors = (\n results: PromiseSettledResult[],\n) => {\n const errors = results.filter(isRejected).map((res) => res.reason)\n if (errors.length === 0) {\n return\n }\n if (errors.length === 1) {\n throw errors[0]\n }\n throw new AggregateError(\n errors,\n 'Multiple errors: ' + errors.map((err) => err?.message).join('\\n'),\n )\n}\n\nconst isRejected = (\n result: PromiseSettledResult,\n): result is PromiseRejectedResult => {\n return result.status === 'rejected'\n}\n", "import { s32encode, s32decode } from './util'\n\nconst TID_LEN = 13\n\nlet lastTimestamp = 0\nlet timestampCount = 0\nlet clockid: number | null = null\n\nfunction dedash(str: string): string {\n return str.replaceAll('-', '')\n}\n\nexport class TID {\n str: string\n\n constructor(str: string) {\n const noDashes = dedash(str)\n if (noDashes.length !== TID_LEN) {\n throw new Error(`Poorly formatted TID: ${noDashes.length} length`)\n }\n this.str = noDashes\n }\n\n static next(prev?: TID): TID {\n // javascript does not have microsecond precision\n // instead, we append a counter to the timestamp to indicate if multiple timestamps were created within the same millisecond\n // take max of current time & last timestamp to prevent tids moving backwards if system clock drifts backwards\n const time = Math.max(Date.now(), lastTimestamp)\n if (time === lastTimestamp) {\n timestampCount++\n }\n lastTimestamp = time\n const timestamp = time * 1000 + timestampCount\n // the bottom 32 clock ids can be randomized & are not guaranteed to be collision resistant\n // we use the same clockid for all tids coming from this machine\n if (clockid === null) {\n clockid = Math.floor(Math.random() * 32)\n }\n const tid = TID.fromTime(timestamp, clockid)\n if (!prev || tid.newerThan(prev)) {\n return tid\n }\n return TID.fromTime(prev.timestamp() + 1, clockid)\n }\n\n static nextStr(prev?: string): string {\n return TID.next(prev ? new TID(prev) : undefined).toString()\n }\n\n static fromTime(timestamp: number, clockid: number): TID {\n // base32 encode with encoding variant sort (s32)\n const str = `${s32encode(timestamp)}${s32encode(clockid).padStart(2, '2')}`\n return new TID(str)\n }\n\n static fromStr(str: string): TID {\n return new TID(str)\n }\n\n static oldestFirst(a: TID, b: TID): number {\n return a.compareTo(b)\n }\n\n static newestFirst(a: TID, b: TID): number {\n return b.compareTo(a)\n }\n\n static is(str: string): boolean {\n return dedash(str).length === TID_LEN\n }\n\n timestamp(): number {\n return s32decode(this.str.slice(0, 11))\n }\n\n clockid(): number {\n return s32decode(this.str.slice(11, 13))\n }\n\n formatted(): string {\n const str = this.toString()\n return `${str.slice(0, 4)}-${str.slice(4, 7)}-${str.slice(\n 7,\n 11,\n )}-${str.slice(11, 13)}`\n }\n\n toString(): string {\n return this.str\n }\n\n // newer > older\n compareTo(other: TID): number {\n if (this.str > other.str) return 1\n if (this.str < other.str) return -1\n return 0\n }\n\n equals(other: TID): boolean {\n return this.str === other.str\n }\n\n newerThan(other: TID): boolean {\n return this.compareTo(other) > 0\n }\n\n olderThan(other: TID): boolean {\n return this.compareTo(other) < 0\n }\n}\n\nexport default TID\n", "var encode_1 = encode;\nvar MSB = 128, REST = 127, MSBALL = ~REST, INT = Math.pow(2, 31);\nfunction encode(num, out, offset) {\n out = out || [];\n offset = offset || 0;\n var oldOffset = offset;\n while (num >= INT) {\n out[offset++] = num & 255 | MSB;\n num /= 128;\n }\n while (num & MSBALL) {\n out[offset++] = num & 255 | MSB;\n num >>>= 7;\n }\n out[offset] = num | 0;\n encode.bytes = offset - oldOffset + 1;\n return out;\n}\nvar decode = read;\nvar MSB$1 = 128, REST$1 = 127;\nfunction read(buf, offset) {\n var res = 0, offset = offset || 0, shift = 0, counter = offset, b, l = buf.length;\n do {\n if (counter >= l) {\n read.bytes = 0;\n throw new RangeError('Could not decode varint');\n }\n b = buf[counter++];\n res += shift < 28 ? (b & REST$1) << shift : (b & REST$1) * Math.pow(2, shift);\n shift += 7;\n } while (b >= MSB$1);\n read.bytes = counter - offset;\n return res;\n}\nvar N1 = Math.pow(2, 7);\nvar N2 = Math.pow(2, 14);\nvar N3 = Math.pow(2, 21);\nvar N4 = Math.pow(2, 28);\nvar N5 = Math.pow(2, 35);\nvar N6 = Math.pow(2, 42);\nvar N7 = Math.pow(2, 49);\nvar N8 = Math.pow(2, 56);\nvar N9 = Math.pow(2, 63);\nvar length = function (value) {\n return value < N1 ? 1 : value < N2 ? 2 : value < N3 ? 3 : value < N4 ? 4 : value < N5 ? 5 : value < N6 ? 6 : value < N7 ? 7 : value < N8 ? 8 : value < N9 ? 9 : 10;\n};\nvar varint = {\n encode: encode_1,\n decode: decode,\n encodingLength: length\n};\nvar _brrp_varint = varint;\nexport default _brrp_varint;", "import varint from '../vendor/varint.js';\nexport const decode = (data, offset = 0) => {\n const code = varint.decode(data, offset);\n return [\n code,\n varint.decode.bytes\n ];\n};\nexport const encodeTo = (int, target, offset = 0) => {\n varint.encode(int, target, offset);\n return target;\n};\nexport const encodingLength = int => {\n return varint.encodingLength(int);\n};", "const empty = new Uint8Array(0);\nconst toHex = d => d.reduce((hex, byte) => hex + byte.toString(16).padStart(2, '0'), '');\nconst fromHex = hex => {\n const hexes = hex.match(/../g);\n return hexes ? new Uint8Array(hexes.map(b => parseInt(b, 16))) : empty;\n};\nconst equals = (aa, bb) => {\n if (aa === bb)\n return true;\n if (aa.byteLength !== bb.byteLength) {\n return false;\n }\n for (let ii = 0; ii < aa.byteLength; ii++) {\n if (aa[ii] !== bb[ii]) {\n return false;\n }\n }\n return true;\n};\nconst coerce = o => {\n if (o instanceof Uint8Array && o.constructor.name === 'Uint8Array')\n return o;\n if (o instanceof ArrayBuffer)\n return new Uint8Array(o);\n if (ArrayBuffer.isView(o)) {\n return new Uint8Array(o.buffer, o.byteOffset, o.byteLength);\n }\n throw new Error('Unknown type, must be binary type');\n};\nconst isBinary = o => o instanceof ArrayBuffer || ArrayBuffer.isView(o);\nconst fromString = str => new TextEncoder().encode(str);\nconst toString = b => new TextDecoder().decode(b);\nexport {\n equals,\n coerce,\n isBinary,\n fromHex,\n toHex,\n fromString,\n toString,\n empty\n};", "import {\n coerce,\n equals as equalBytes\n} from '../bytes.js';\nimport * as varint from '../varint.js';\nexport const create = (code, digest) => {\n const size = digest.byteLength;\n const sizeOffset = varint.encodingLength(code);\n const digestOffset = sizeOffset + varint.encodingLength(size);\n const bytes = new Uint8Array(digestOffset + size);\n varint.encodeTo(code, bytes, 0);\n varint.encodeTo(size, bytes, sizeOffset);\n bytes.set(digest, digestOffset);\n return new Digest(code, size, digest, bytes);\n};\nexport const decode = multihash => {\n const bytes = coerce(multihash);\n const [code, sizeOffset] = varint.decode(bytes);\n const [size, digestOffset] = varint.decode(bytes.subarray(sizeOffset));\n const digest = bytes.subarray(sizeOffset + digestOffset);\n if (digest.byteLength !== size) {\n throw new Error('Incorrect length');\n }\n return new Digest(code, size, digest, bytes);\n};\nexport const equals = (a, b) => {\n if (a === b) {\n return true;\n } else {\n return a.code === b.code && a.size === b.size && equalBytes(a.bytes, b.bytes);\n }\n};\nexport class Digest {\n constructor(code, size, digest, bytes) {\n this.code = code;\n this.size = size;\n this.digest = digest;\n this.bytes = bytes;\n }\n}", "function base(ALPHABET, name) {\n if (ALPHABET.length >= 255) {\n throw new TypeError('Alphabet too long');\n }\n var BASE_MAP = new Uint8Array(256);\n for (var j = 0; j < BASE_MAP.length; j++) {\n BASE_MAP[j] = 255;\n }\n for (var i = 0; i < ALPHABET.length; i++) {\n var x = ALPHABET.charAt(i);\n var xc = x.charCodeAt(0);\n if (BASE_MAP[xc] !== 255) {\n throw new TypeError(x + ' is ambiguous');\n }\n BASE_MAP[xc] = i;\n }\n var BASE = ALPHABET.length;\n var LEADER = ALPHABET.charAt(0);\n var FACTOR = Math.log(BASE) / Math.log(256);\n var iFACTOR = Math.log(256) / Math.log(BASE);\n function encode(source) {\n if (source instanceof Uint8Array);\n else if (ArrayBuffer.isView(source)) {\n source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);\n } else if (Array.isArray(source)) {\n source = Uint8Array.from(source);\n }\n if (!(source instanceof Uint8Array)) {\n throw new TypeError('Expected Uint8Array');\n }\n if (source.length === 0) {\n return '';\n }\n var zeroes = 0;\n var length = 0;\n var pbegin = 0;\n var pend = source.length;\n while (pbegin !== pend && source[pbegin] === 0) {\n pbegin++;\n zeroes++;\n }\n var size = (pend - pbegin) * iFACTOR + 1 >>> 0;\n var b58 = new Uint8Array(size);\n while (pbegin !== pend) {\n var carry = source[pbegin];\n var i = 0;\n for (var it1 = size - 1; (carry !== 0 || i < length) && it1 !== -1; it1--, i++) {\n carry += 256 * b58[it1] >>> 0;\n b58[it1] = carry % BASE >>> 0;\n carry = carry / BASE >>> 0;\n }\n if (carry !== 0) {\n throw new Error('Non-zero carry');\n }\n length = i;\n pbegin++;\n }\n var it2 = size - length;\n while (it2 !== size && b58[it2] === 0) {\n it2++;\n }\n var str = LEADER.repeat(zeroes);\n for (; it2 < size; ++it2) {\n str += ALPHABET.charAt(b58[it2]);\n }\n return str;\n }\n function decodeUnsafe(source) {\n if (typeof source !== 'string') {\n throw new TypeError('Expected String');\n }\n if (source.length === 0) {\n return new Uint8Array();\n }\n var psz = 0;\n if (source[psz] === ' ') {\n return;\n }\n var zeroes = 0;\n var length = 0;\n while (source[psz] === LEADER) {\n zeroes++;\n psz++;\n }\n var size = (source.length - psz) * FACTOR + 1 >>> 0;\n var b256 = new Uint8Array(size);\n while (source[psz]) {\n var carry = BASE_MAP[source.charCodeAt(psz)];\n if (carry === 255) {\n return;\n }\n var i = 0;\n for (var it3 = size - 1; (carry !== 0 || i < length) && it3 !== -1; it3--, i++) {\n carry += BASE * b256[it3] >>> 0;\n b256[it3] = carry % 256 >>> 0;\n carry = carry / 256 >>> 0;\n }\n if (carry !== 0) {\n throw new Error('Non-zero carry');\n }\n length = i;\n psz++;\n }\n if (source[psz] === ' ') {\n return;\n }\n var it4 = size - length;\n while (it4 !== size && b256[it4] === 0) {\n it4++;\n }\n var vch = new Uint8Array(zeroes + (size - it4));\n var j = zeroes;\n while (it4 !== size) {\n vch[j++] = b256[it4++];\n }\n return vch;\n }\n function decode(string) {\n var buffer = decodeUnsafe(string);\n if (buffer) {\n return buffer;\n }\n throw new Error(`Non-${ name } character`);\n }\n return {\n encode: encode,\n decodeUnsafe: decodeUnsafe,\n decode: decode\n };\n}\nvar src = base;\nvar _brrp__multiformats_scope_baseX = src;\nexport default _brrp__multiformats_scope_baseX;", "import basex from '../../vendor/base-x.js';\nimport { coerce } from '../bytes.js';\nclass Encoder {\n constructor(name, prefix, baseEncode) {\n this.name = name;\n this.prefix = prefix;\n this.baseEncode = baseEncode;\n }\n encode(bytes) {\n if (bytes instanceof Uint8Array) {\n return `${ this.prefix }${ this.baseEncode(bytes) }`;\n } else {\n throw Error('Unknown type, must be binary type');\n }\n }\n}\nclass Decoder {\n constructor(name, prefix, baseDecode) {\n this.name = name;\n this.prefix = prefix;\n if (prefix.codePointAt(0) === undefined) {\n throw new Error('Invalid prefix character');\n }\n this.prefixCodePoint = prefix.codePointAt(0);\n this.baseDecode = baseDecode;\n }\n decode(text) {\n if (typeof text === 'string') {\n if (text.codePointAt(0) !== this.prefixCodePoint) {\n throw Error(`Unable to decode multibase string ${ JSON.stringify(text) }, ${ this.name } decoder only supports inputs prefixed with ${ this.prefix }`);\n }\n return this.baseDecode(text.slice(this.prefix.length));\n } else {\n throw Error('Can only multibase decode strings');\n }\n }\n or(decoder) {\n return or(this, decoder);\n }\n}\nclass ComposedDecoder {\n constructor(decoders) {\n this.decoders = decoders;\n }\n or(decoder) {\n return or(this, decoder);\n }\n decode(input) {\n const prefix = input[0];\n const decoder = this.decoders[prefix];\n if (decoder) {\n return decoder.decode(input);\n } else {\n throw RangeError(`Unable to decode multibase string ${ JSON.stringify(input) }, only inputs prefixed with ${ Object.keys(this.decoders) } are supported`);\n }\n }\n}\nexport const or = (left, right) => new ComposedDecoder({\n ...left.decoders || { [left.prefix]: left },\n ...right.decoders || { [right.prefix]: right }\n});\nexport class Codec {\n constructor(name, prefix, baseEncode, baseDecode) {\n this.name = name;\n this.prefix = prefix;\n this.baseEncode = baseEncode;\n this.baseDecode = baseDecode;\n this.encoder = new Encoder(name, prefix, baseEncode);\n this.decoder = new Decoder(name, prefix, baseDecode);\n }\n encode(input) {\n return this.encoder.encode(input);\n }\n decode(input) {\n return this.decoder.decode(input);\n }\n}\nexport const from = ({name, prefix, encode, decode}) => new Codec(name, prefix, encode, decode);\nexport const baseX = ({prefix, name, alphabet}) => {\n const {encode, decode} = basex(alphabet, name);\n return from({\n prefix,\n name,\n encode,\n decode: text => coerce(decode(text))\n });\n};\nconst decode = (string, alphabet, bitsPerChar, name) => {\n const codes = {};\n for (let i = 0; i < alphabet.length; ++i) {\n codes[alphabet[i]] = i;\n }\n let end = string.length;\n while (string[end - 1] === '=') {\n --end;\n }\n const out = new Uint8Array(end * bitsPerChar / 8 | 0);\n let bits = 0;\n let buffer = 0;\n let written = 0;\n for (let i = 0; i < end; ++i) {\n const value = codes[string[i]];\n if (value === undefined) {\n throw new SyntaxError(`Non-${ name } character`);\n }\n buffer = buffer << bitsPerChar | value;\n bits += bitsPerChar;\n if (bits >= 8) {\n bits -= 8;\n out[written++] = 255 & buffer >> bits;\n }\n }\n if (bits >= bitsPerChar || 255 & buffer << 8 - bits) {\n throw new SyntaxError('Unexpected end of data');\n }\n return out;\n};\nconst encode = (data, alphabet, bitsPerChar) => {\n const pad = alphabet[alphabet.length - 1] === '=';\n const mask = (1 << bitsPerChar) - 1;\n let out = '';\n let bits = 0;\n let buffer = 0;\n for (let i = 0; i < data.length; ++i) {\n buffer = buffer << 8 | data[i];\n bits += 8;\n while (bits > bitsPerChar) {\n bits -= bitsPerChar;\n out += alphabet[mask & buffer >> bits];\n }\n }\n if (bits) {\n out += alphabet[mask & buffer << bitsPerChar - bits];\n }\n if (pad) {\n while (out.length * bitsPerChar & 7) {\n out += '=';\n }\n }\n return out;\n};\nexport const rfc4648 = ({name, prefix, bitsPerChar, alphabet}) => {\n return from({\n prefix,\n name,\n encode(input) {\n return encode(input, alphabet, bitsPerChar);\n },\n decode(input) {\n return decode(input, alphabet, bitsPerChar, name);\n }\n });\n};", "import { baseX } from './base.js';\nexport const base58btc = baseX({\n name: 'base58btc',\n prefix: 'z',\n alphabet: '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n});\nexport const base58flickr = baseX({\n name: 'base58flickr',\n prefix: 'Z',\n alphabet: '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ'\n});", "import { rfc4648 } from './base.js';\nexport const base32 = rfc4648({\n prefix: 'b',\n name: 'base32',\n alphabet: 'abcdefghijklmnopqrstuvwxyz234567',\n bitsPerChar: 5\n});\nexport const base32upper = rfc4648({\n prefix: 'B',\n name: 'base32upper',\n alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567',\n bitsPerChar: 5\n});\nexport const base32pad = rfc4648({\n prefix: 'c',\n name: 'base32pad',\n alphabet: 'abcdefghijklmnopqrstuvwxyz234567=',\n bitsPerChar: 5\n});\nexport const base32padupper = rfc4648({\n prefix: 'C',\n name: 'base32padupper',\n alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=',\n bitsPerChar: 5\n});\nexport const base32hex = rfc4648({\n prefix: 'v',\n name: 'base32hex',\n alphabet: '0123456789abcdefghijklmnopqrstuv',\n bitsPerChar: 5\n});\nexport const base32hexupper = rfc4648({\n prefix: 'V',\n name: 'base32hexupper',\n alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV',\n bitsPerChar: 5\n});\nexport const base32hexpad = rfc4648({\n prefix: 't',\n name: 'base32hexpad',\n alphabet: '0123456789abcdefghijklmnopqrstuv=',\n bitsPerChar: 5\n});\nexport const base32hexpadupper = rfc4648({\n prefix: 'T',\n name: 'base32hexpadupper',\n alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV=',\n bitsPerChar: 5\n});\nexport const base32z = rfc4648({\n prefix: 'h',\n name: 'base32z',\n alphabet: 'ybndrfg8ejkmcpqxot1uwisza345h769',\n bitsPerChar: 5\n});", "import * as varint from './varint.js';\nimport * as Digest from './hashes/digest.js';\nimport { base58btc } from './bases/base58.js';\nimport { base32 } from './bases/base32.js';\nimport { coerce } from './bytes.js';\nexport class CID {\n constructor(version, code, multihash, bytes) {\n this.code = code;\n this.version = version;\n this.multihash = multihash;\n this.bytes = bytes;\n this.byteOffset = bytes.byteOffset;\n this.byteLength = bytes.byteLength;\n this.asCID = this;\n this._baseCache = new Map();\n Object.defineProperties(this, {\n byteOffset: hidden,\n byteLength: hidden,\n code: readonly,\n version: readonly,\n multihash: readonly,\n bytes: readonly,\n _baseCache: hidden,\n asCID: hidden\n });\n }\n toV0() {\n switch (this.version) {\n case 0: {\n return this;\n }\n default: {\n const {code, multihash} = this;\n if (code !== DAG_PB_CODE) {\n throw new Error('Cannot convert a non dag-pb CID to CIDv0');\n }\n if (multihash.code !== SHA_256_CODE) {\n throw new Error('Cannot convert non sha2-256 multihash CID to CIDv0');\n }\n return CID.createV0(multihash);\n }\n }\n }\n toV1() {\n switch (this.version) {\n case 0: {\n const {code, digest} = this.multihash;\n const multihash = Digest.create(code, digest);\n return CID.createV1(this.code, multihash);\n }\n case 1: {\n return this;\n }\n default: {\n throw Error(`Can not convert CID version ${ this.version } to version 0. This is a bug please report`);\n }\n }\n }\n equals(other) {\n return other && this.code === other.code && this.version === other.version && Digest.equals(this.multihash, other.multihash);\n }\n toString(base) {\n const {bytes, version, _baseCache} = this;\n switch (version) {\n case 0:\n return toStringV0(bytes, _baseCache, base || base58btc.encoder);\n default:\n return toStringV1(bytes, _baseCache, base || base32.encoder);\n }\n }\n toJSON() {\n return {\n code: this.code,\n version: this.version,\n hash: this.multihash.bytes\n };\n }\n get [Symbol.toStringTag]() {\n return 'CID';\n }\n [Symbol.for('nodejs.util.inspect.custom')]() {\n return 'CID(' + this.toString() + ')';\n }\n static isCID(value) {\n deprecate(/^0\\.0/, IS_CID_DEPRECATION);\n return !!(value && (value[cidSymbol] || value.asCID === value));\n }\n get toBaseEncodedString() {\n throw new Error('Deprecated, use .toString()');\n }\n get codec() {\n throw new Error('\"codec\" property is deprecated, use integer \"code\" property instead');\n }\n get buffer() {\n throw new Error('Deprecated .buffer property, use .bytes to get Uint8Array instead');\n }\n get multibaseName() {\n throw new Error('\"multibaseName\" property is deprecated');\n }\n get prefix() {\n throw new Error('\"prefix\" property is deprecated');\n }\n static asCID(value) {\n if (value instanceof CID) {\n return value;\n } else if (value != null && value.asCID === value) {\n const {version, code, multihash, bytes} = value;\n return new CID(version, code, multihash, bytes || encodeCID(version, code, multihash.bytes));\n } else if (value != null && value[cidSymbol] === true) {\n const {version, multihash, code} = value;\n const digest = Digest.decode(multihash);\n return CID.create(version, code, digest);\n } else {\n return null;\n }\n }\n static create(version, code, digest) {\n if (typeof code !== 'number') {\n throw new Error('String codecs are no longer supported');\n }\n switch (version) {\n case 0: {\n if (code !== DAG_PB_CODE) {\n throw new Error(`Version 0 CID must use dag-pb (code: ${ DAG_PB_CODE }) block encoding`);\n } else {\n return new CID(version, code, digest, digest.bytes);\n }\n }\n case 1: {\n const bytes = encodeCID(version, code, digest.bytes);\n return new CID(version, code, digest, bytes);\n }\n default: {\n throw new Error('Invalid version');\n }\n }\n }\n static createV0(digest) {\n return CID.create(0, DAG_PB_CODE, digest);\n }\n static createV1(code, digest) {\n return CID.create(1, code, digest);\n }\n static decode(bytes) {\n const [cid, remainder] = CID.decodeFirst(bytes);\n if (remainder.length) {\n throw new Error('Incorrect length');\n }\n return cid;\n }\n static decodeFirst(bytes) {\n const specs = CID.inspectBytes(bytes);\n const prefixSize = specs.size - specs.multihashSize;\n const multihashBytes = coerce(bytes.subarray(prefixSize, prefixSize + specs.multihashSize));\n if (multihashBytes.byteLength !== specs.multihashSize) {\n throw new Error('Incorrect length');\n }\n const digestBytes = multihashBytes.subarray(specs.multihashSize - specs.digestSize);\n const digest = new Digest.Digest(specs.multihashCode, specs.digestSize, digestBytes, multihashBytes);\n const cid = specs.version === 0 ? CID.createV0(digest) : CID.createV1(specs.codec, digest);\n return [\n cid,\n bytes.subarray(specs.size)\n ];\n }\n static inspectBytes(initialBytes) {\n let offset = 0;\n const next = () => {\n const [i, length] = varint.decode(initialBytes.subarray(offset));\n offset += length;\n return i;\n };\n let version = next();\n let codec = DAG_PB_CODE;\n if (version === 18) {\n version = 0;\n offset = 0;\n } else if (version === 1) {\n codec = next();\n }\n if (version !== 0 && version !== 1) {\n throw new RangeError(`Invalid CID version ${ version }`);\n }\n const prefixSize = offset;\n const multihashCode = next();\n const digestSize = next();\n const size = offset + digestSize;\n const multihashSize = size - prefixSize;\n return {\n version,\n codec,\n multihashCode,\n digestSize,\n multihashSize,\n size\n };\n }\n static parse(source, base) {\n const [prefix, bytes] = parseCIDtoBytes(source, base);\n const cid = CID.decode(bytes);\n cid._baseCache.set(prefix, source);\n return cid;\n }\n}\nconst parseCIDtoBytes = (source, base) => {\n switch (source[0]) {\n case 'Q': {\n const decoder = base || base58btc;\n return [\n base58btc.prefix,\n decoder.decode(`${ base58btc.prefix }${ source }`)\n ];\n }\n case base58btc.prefix: {\n const decoder = base || base58btc;\n return [\n base58btc.prefix,\n decoder.decode(source)\n ];\n }\n case base32.prefix: {\n const decoder = base || base32;\n return [\n base32.prefix,\n decoder.decode(source)\n ];\n }\n default: {\n if (base == null) {\n throw Error('To parse non base32 or base58btc encoded CID multibase decoder must be provided');\n }\n return [\n source[0],\n base.decode(source)\n ];\n }\n }\n};\nconst toStringV0 = (bytes, cache, base) => {\n const {prefix} = base;\n if (prefix !== base58btc.prefix) {\n throw Error(`Cannot string encode V0 in ${ base.name } encoding`);\n }\n const cid = cache.get(prefix);\n if (cid == null) {\n const cid = base.encode(bytes).slice(1);\n cache.set(prefix, cid);\n return cid;\n } else {\n return cid;\n }\n};\nconst toStringV1 = (bytes, cache, base) => {\n const {prefix} = base;\n const cid = cache.get(prefix);\n if (cid == null) {\n const cid = base.encode(bytes);\n cache.set(prefix, cid);\n return cid;\n } else {\n return cid;\n }\n};\nconst DAG_PB_CODE = 112;\nconst SHA_256_CODE = 18;\nconst encodeCID = (version, code, multihash) => {\n const codeOffset = varint.encodingLength(version);\n const hashOffset = codeOffset + varint.encodingLength(code);\n const bytes = new Uint8Array(hashOffset + multihash.byteLength);\n varint.encodeTo(version, bytes, 0);\n varint.encodeTo(code, bytes, codeOffset);\n bytes.set(multihash, hashOffset);\n return bytes;\n};\nconst cidSymbol = Symbol.for('@ipld/js-cid/CID');\nconst readonly = {\n writable: false,\n configurable: false,\n enumerable: true\n};\nconst hidden = {\n writable: false,\n enumerable: false,\n configurable: false\n};\nconst version = '0.0.0-dev';\nconst deprecate = (range, message) => {\n if (range.test(version)) {\n console.warn(message);\n } else {\n throw new Error(message);\n }\n};\nconst IS_CID_DEPRECATION = `CID.isCID(v) is deprecated and will be removed in the next major release.\nFollowing code pattern:\n\nif (CID.isCID(value)) {\n doSomethingWithCID(value)\n}\n\nIs replaced with:\n\nconst cid = CID.asCID(value)\nif (cid) {\n // Make sure to use cid instead of value\n doSomethingWithCID(cid)\n}\n`;", "export function compare(a, b) {\n for (let i = 0; i < a.byteLength; i++) {\n if (a[i] < b[i]) {\n return -1;\n }\n if (a[i] > b[i]) {\n return 1;\n }\n }\n if (a.byteLength > b.byteLength) {\n return 1;\n }\n if (a.byteLength < b.byteLength) {\n return -1;\n }\n return 0;\n}", "export function concat(arrays, length) {\n if (!length) {\n length = arrays.reduce((acc, curr) => acc + curr.length, 0);\n }\n const output = new Uint8Array(length);\n let offset = 0;\n for (const arr of arrays) {\n output.set(arr, offset);\n offset += arr.length;\n }\n return output;\n}", "export function equals(a, b) {\n if (a === b) {\n return true;\n }\n if (a.byteLength !== b.byteLength) {\n return false;\n }\n for (let i = 0; i < a.byteLength; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n return true;\n}", "import { from } from './base.js';\nimport {\n fromString,\n toString\n} from '../bytes.js';\nexport const identity = from({\n prefix: '\\0',\n name: 'identity',\n encode: buf => toString(buf),\n decode: str => fromString(str)\n});", "import { rfc4648 } from './base.js';\nexport const base2 = rfc4648({\n prefix: '0',\n name: 'base2',\n alphabet: '01',\n bitsPerChar: 1\n});", "import { rfc4648 } from './base.js';\nexport const base8 = rfc4648({\n prefix: '7',\n name: 'base8',\n alphabet: '01234567',\n bitsPerChar: 3\n});", "import { baseX } from './base.js';\nexport const base10 = baseX({\n prefix: '9',\n name: 'base10',\n alphabet: '0123456789'\n});", "import { rfc4648 } from './base.js';\nexport const base16 = rfc4648({\n prefix: 'f',\n name: 'base16',\n alphabet: '0123456789abcdef',\n bitsPerChar: 4\n});\nexport const base16upper = rfc4648({\n prefix: 'F',\n name: 'base16upper',\n alphabet: '0123456789ABCDEF',\n bitsPerChar: 4\n});", "import { baseX } from './base.js';\nexport const base36 = baseX({\n prefix: 'k',\n name: 'base36',\n alphabet: '0123456789abcdefghijklmnopqrstuvwxyz'\n});\nexport const base36upper = baseX({\n prefix: 'K',\n name: 'base36upper',\n alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'\n});", "import { rfc4648 } from './base.js';\nexport const base64 = rfc4648({\n prefix: 'm',\n name: 'base64',\n alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',\n bitsPerChar: 6\n});\nexport const base64pad = rfc4648({\n prefix: 'M',\n name: 'base64pad',\n alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=',\n bitsPerChar: 6\n});\nexport const base64url = rfc4648({\n prefix: 'u',\n name: 'base64url',\n alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_',\n bitsPerChar: 6\n});\nexport const base64urlpad = rfc4648({\n prefix: 'U',\n name: 'base64urlpad',\n alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=',\n bitsPerChar: 6\n});", "import { from } from './base.js';\nconst alphabet = Array.from('\\uD83D\\uDE80\\uD83E\\uDE90\\u2604\\uD83D\\uDEF0\\uD83C\\uDF0C\\uD83C\\uDF11\\uD83C\\uDF12\\uD83C\\uDF13\\uD83C\\uDF14\\uD83C\\uDF15\\uD83C\\uDF16\\uD83C\\uDF17\\uD83C\\uDF18\\uD83C\\uDF0D\\uD83C\\uDF0F\\uD83C\\uDF0E\\uD83D\\uDC09\\u2600\\uD83D\\uDCBB\\uD83D\\uDDA5\\uD83D\\uDCBE\\uD83D\\uDCBF\\uD83D\\uDE02\\u2764\\uD83D\\uDE0D\\uD83E\\uDD23\\uD83D\\uDE0A\\uD83D\\uDE4F\\uD83D\\uDC95\\uD83D\\uDE2D\\uD83D\\uDE18\\uD83D\\uDC4D\\uD83D\\uDE05\\uD83D\\uDC4F\\uD83D\\uDE01\\uD83D\\uDD25\\uD83E\\uDD70\\uD83D\\uDC94\\uD83D\\uDC96\\uD83D\\uDC99\\uD83D\\uDE22\\uD83E\\uDD14\\uD83D\\uDE06\\uD83D\\uDE44\\uD83D\\uDCAA\\uD83D\\uDE09\\u263A\\uD83D\\uDC4C\\uD83E\\uDD17\\uD83D\\uDC9C\\uD83D\\uDE14\\uD83D\\uDE0E\\uD83D\\uDE07\\uD83C\\uDF39\\uD83E\\uDD26\\uD83C\\uDF89\\uD83D\\uDC9E\\u270C\\u2728\\uD83E\\uDD37\\uD83D\\uDE31\\uD83D\\uDE0C\\uD83C\\uDF38\\uD83D\\uDE4C\\uD83D\\uDE0B\\uD83D\\uDC97\\uD83D\\uDC9A\\uD83D\\uDE0F\\uD83D\\uDC9B\\uD83D\\uDE42\\uD83D\\uDC93\\uD83E\\uDD29\\uD83D\\uDE04\\uD83D\\uDE00\\uD83D\\uDDA4\\uD83D\\uDE03\\uD83D\\uDCAF\\uD83D\\uDE48\\uD83D\\uDC47\\uD83C\\uDFB6\\uD83D\\uDE12\\uD83E\\uDD2D\\u2763\\uD83D\\uDE1C\\uD83D\\uDC8B\\uD83D\\uDC40\\uD83D\\uDE2A\\uD83D\\uDE11\\uD83D\\uDCA5\\uD83D\\uDE4B\\uD83D\\uDE1E\\uD83D\\uDE29\\uD83D\\uDE21\\uD83E\\uDD2A\\uD83D\\uDC4A\\uD83E\\uDD73\\uD83D\\uDE25\\uD83E\\uDD24\\uD83D\\uDC49\\uD83D\\uDC83\\uD83D\\uDE33\\u270B\\uD83D\\uDE1A\\uD83D\\uDE1D\\uD83D\\uDE34\\uD83C\\uDF1F\\uD83D\\uDE2C\\uD83D\\uDE43\\uD83C\\uDF40\\uD83C\\uDF37\\uD83D\\uDE3B\\uD83D\\uDE13\\u2B50\\u2705\\uD83E\\uDD7A\\uD83C\\uDF08\\uD83D\\uDE08\\uD83E\\uDD18\\uD83D\\uDCA6\\u2714\\uD83D\\uDE23\\uD83C\\uDFC3\\uD83D\\uDC90\\u2639\\uD83C\\uDF8A\\uD83D\\uDC98\\uD83D\\uDE20\\u261D\\uD83D\\uDE15\\uD83C\\uDF3A\\uD83C\\uDF82\\uD83C\\uDF3B\\uD83D\\uDE10\\uD83D\\uDD95\\uD83D\\uDC9D\\uD83D\\uDE4A\\uD83D\\uDE39\\uD83D\\uDDE3\\uD83D\\uDCAB\\uD83D\\uDC80\\uD83D\\uDC51\\uD83C\\uDFB5\\uD83E\\uDD1E\\uD83D\\uDE1B\\uD83D\\uDD34\\uD83D\\uDE24\\uD83C\\uDF3C\\uD83D\\uDE2B\\u26BD\\uD83E\\uDD19\\u2615\\uD83C\\uDFC6\\uD83E\\uDD2B\\uD83D\\uDC48\\uD83D\\uDE2E\\uD83D\\uDE46\\uD83C\\uDF7B\\uD83C\\uDF43\\uD83D\\uDC36\\uD83D\\uDC81\\uD83D\\uDE32\\uD83C\\uDF3F\\uD83E\\uDDE1\\uD83C\\uDF81\\u26A1\\uD83C\\uDF1E\\uD83C\\uDF88\\u274C\\u270A\\uD83D\\uDC4B\\uD83D\\uDE30\\uD83E\\uDD28\\uD83D\\uDE36\\uD83E\\uDD1D\\uD83D\\uDEB6\\uD83D\\uDCB0\\uD83C\\uDF53\\uD83D\\uDCA2\\uD83E\\uDD1F\\uD83D\\uDE41\\uD83D\\uDEA8\\uD83D\\uDCA8\\uD83E\\uDD2C\\u2708\\uD83C\\uDF80\\uD83C\\uDF7A\\uD83E\\uDD13\\uD83D\\uDE19\\uD83D\\uDC9F\\uD83C\\uDF31\\uD83D\\uDE16\\uD83D\\uDC76\\uD83E\\uDD74\\u25B6\\u27A1\\u2753\\uD83D\\uDC8E\\uD83D\\uDCB8\\u2B07\\uD83D\\uDE28\\uD83C\\uDF1A\\uD83E\\uDD8B\\uD83D\\uDE37\\uD83D\\uDD7A\\u26A0\\uD83D\\uDE45\\uD83D\\uDE1F\\uD83D\\uDE35\\uD83D\\uDC4E\\uD83E\\uDD32\\uD83E\\uDD20\\uD83E\\uDD27\\uD83D\\uDCCC\\uD83D\\uDD35\\uD83D\\uDC85\\uD83E\\uDDD0\\uD83D\\uDC3E\\uD83C\\uDF52\\uD83D\\uDE17\\uD83E\\uDD11\\uD83C\\uDF0A\\uD83E\\uDD2F\\uD83D\\uDC37\\u260E\\uD83D\\uDCA7\\uD83D\\uDE2F\\uD83D\\uDC86\\uD83D\\uDC46\\uD83C\\uDFA4\\uD83D\\uDE47\\uD83C\\uDF51\\u2744\\uD83C\\uDF34\\uD83D\\uDCA3\\uD83D\\uDC38\\uD83D\\uDC8C\\uD83D\\uDCCD\\uD83E\\uDD40\\uD83E\\uDD22\\uD83D\\uDC45\\uD83D\\uDCA1\\uD83D\\uDCA9\\uD83D\\uDC50\\uD83D\\uDCF8\\uD83D\\uDC7B\\uD83E\\uDD10\\uD83E\\uDD2E\\uD83C\\uDFBC\\uD83E\\uDD75\\uD83D\\uDEA9\\uD83C\\uDF4E\\uD83C\\uDF4A\\uD83D\\uDC7C\\uD83D\\uDC8D\\uD83D\\uDCE3\\uD83E\\uDD42');\nconst alphabetBytesToChars = alphabet.reduce((p, c, i) => {\n p[i] = c;\n return p;\n}, []);\nconst alphabetCharsToBytes = alphabet.reduce((p, c, i) => {\n p[c.codePointAt(0)] = i;\n return p;\n}, []);\nfunction encode(data) {\n return data.reduce((p, c) => {\n p += alphabetBytesToChars[c];\n return p;\n }, '');\n}\nfunction decode(str) {\n const byts = [];\n for (const char of str) {\n const byt = alphabetCharsToBytes[char.codePointAt(0)];\n if (byt === undefined) {\n throw new Error(`Non-base256emoji character: ${ char }`);\n }\n byts.push(byt);\n }\n return new Uint8Array(byts);\n}\nexport const base256emoji = from({\n prefix: '\\uD83D\\uDE80',\n name: 'base256emoji',\n encode,\n decode\n});", "import * as Digest from './digest.js';\nexport const from = ({name, code, encode}) => new Hasher(name, code, encode);\nexport class Hasher {\n constructor(name, code, encode) {\n this.name = name;\n this.code = code;\n this.encode = encode;\n }\n digest(input) {\n if (input instanceof Uint8Array) {\n const result = this.encode(input);\n return result instanceof Uint8Array ? Digest.create(this.code, result) : result.then(digest => Digest.create(this.code, digest));\n } else {\n throw Error('Unknown type, must be binary type');\n }\n }\n}", "import { from } from './hasher.js';\nconst sha = name => async data => new Uint8Array(await crypto.subtle.digest(name, data));\nexport const sha256 = from({\n name: 'sha2-256',\n code: 18,\n encode: sha('SHA-256')\n});\nexport const sha512 = from({\n name: 'sha2-512',\n code: 19,\n encode: sha('SHA-512')\n});", "import { coerce } from '../bytes.js';\nimport * as Digest from './digest.js';\nconst code = 0;\nconst name = 'identity';\nconst encode = coerce;\nconst digest = input => Digest.create(code, encode(input));\nexport const identity = {\n code,\n name,\n encode,\n digest\n};", "import { coerce } from '../bytes.js';\nexport const name = 'raw';\nexport const code = 85;\nexport const encode = node => coerce(node);\nexport const decode = data => coerce(data);", "const textEncoder = new TextEncoder();\nconst textDecoder = new TextDecoder();\nexport const name = 'json';\nexport const code = 512;\nexport const encode = node => textEncoder.encode(JSON.stringify(node));\nexport const decode = data => JSON.parse(textDecoder.decode(data));", "import { CID } from './cid.js';\nimport * as varint from './varint.js';\nimport * as bytes from './bytes.js';\nimport * as hasher from './hashes/hasher.js';\nimport * as digest from './hashes/digest.js';\nexport {\n CID,\n hasher,\n digest,\n varint,\n bytes\n};", "import * as identityBase from './bases/identity.js';\nimport * as base2 from './bases/base2.js';\nimport * as base8 from './bases/base8.js';\nimport * as base10 from './bases/base10.js';\nimport * as base16 from './bases/base16.js';\nimport * as base32 from './bases/base32.js';\nimport * as base36 from './bases/base36.js';\nimport * as base58 from './bases/base58.js';\nimport * as base64 from './bases/base64.js';\nimport * as base256emoji from './bases/base256emoji.js';\nimport * as sha2 from './hashes/sha2.js';\nimport * as identity from './hashes/identity.js';\nimport * as raw from './codecs/raw.js';\nimport * as json from './codecs/json.js';\nimport {\n CID,\n hasher,\n digest,\n varint,\n bytes\n} from './index.js';\nconst bases = {\n ...identityBase,\n ...base2,\n ...base8,\n ...base10,\n ...base16,\n ...base32,\n ...base36,\n ...base58,\n ...base64,\n ...base256emoji\n};\nconst hashes = {\n ...sha2,\n ...identity\n};\nconst codecs = {\n raw,\n json\n};\nexport {\n CID,\n hasher,\n digest,\n varint,\n bytes,\n hashes,\n bases,\n codecs\n};", "import { bases } from 'multiformats/basics';\nfunction createCodec(name, prefix, encode, decode) {\n return {\n name,\n prefix,\n encoder: {\n name,\n prefix,\n encode\n },\n decoder: { decode }\n };\n}\nconst string = createCodec('utf8', 'u', buf => {\n const decoder = new TextDecoder('utf8');\n return 'u' + decoder.decode(buf);\n}, str => {\n const encoder = new TextEncoder();\n return encoder.encode(str.substring(1));\n});\nconst ascii = createCodec('ascii', 'a', buf => {\n let string = 'a';\n for (let i = 0; i < buf.length; i++) {\n string += String.fromCharCode(buf[i]);\n }\n return string;\n}, str => {\n str = str.substring(1);\n const buf = new Uint8Array(str.length);\n for (let i = 0; i < str.length; i++) {\n buf[i] = str.charCodeAt(i);\n }\n return buf;\n});\nconst BASES = {\n utf8: string,\n 'utf-8': string,\n hex: bases.base16,\n latin1: ascii,\n ascii: ascii,\n binary: ascii,\n ...bases\n};\nexport default BASES;", "import bases from './util/bases.js';\nexport function fromString(string, encoding = 'utf8') {\n const base = bases[encoding];\n if (!base) {\n throw new Error(`Unsupported encoding \"${ encoding }\"`);\n }\n return base.decoder.decode(`${ base.prefix }${ string }`);\n}", "import bases from './util/bases.js';\nexport function toString(array, encoding = 'utf8') {\n const base = bases[encoding];\n if (!base) {\n throw new Error(`Unsupported encoding \"${ encoding }\"`);\n }\n return base.encoder.encode(array).substring(1);\n}", "export function xor(a, b) {\n if (a.length !== b.length) {\n throw new Error('Inputs should have the same length');\n }\n const result = new Uint8Array(a.length);\n for (let i = 0; i < a.length; i++) {\n result[i] = a[i] ^ b[i];\n }\n return result;\n}", "import { compare } from './compare.js';\nimport { concat } from './concat.js';\nimport { equals } from './equals.js';\nimport { fromString } from './from-string.js';\nimport { toString } from './to-string.js';\nimport { xor } from './xor.js';\nexport {\n compare,\n concat,\n equals,\n fromString,\n toString,\n xor\n};", "import { CID } from 'multiformats/cid'\nimport * as ui8 from 'uint8arrays'\n\nexport type JsonValue =\n | boolean\n | number\n | string\n | null\n | undefined\n | unknown\n | Array\n | { [key: string]: JsonValue }\n\nexport type IpldValue =\n | JsonValue\n | CID\n | Uint8Array\n | Array\n | { [key: string]: IpldValue }\n\n// @NOTE avoiding use of check.is() here only because it makes\n// these implementations slow, and they often live in hot paths.\n\nexport const jsonToIpld = (val: JsonValue): IpldValue => {\n // walk arrays\n if (Array.isArray(val)) {\n return val.map((item) => jsonToIpld(item))\n }\n // objects\n if (val && typeof val === 'object') {\n // check for dag json values\n if (typeof val['$link'] === 'string' && Object.keys(val).length === 1) {\n return CID.parse(val['$link'])\n }\n if (typeof val['$bytes'] === 'string' && Object.keys(val).length === 1) {\n return ui8.fromString(val['$bytes'], 'base64')\n }\n // walk plain objects\n const toReturn = {}\n for (const key of Object.keys(val)) {\n toReturn[key] = jsonToIpld(val[key])\n }\n return toReturn\n }\n // pass through\n return val\n}\n\nexport const ipldToJson = (val: IpldValue): JsonValue => {\n // walk arrays\n if (Array.isArray(val)) {\n return val.map((item) => ipldToJson(item))\n }\n // objects\n if (val && typeof val === 'object') {\n // convert bytes\n if (val instanceof Uint8Array) {\n return {\n $bytes: ui8.toString(val, 'base64'),\n }\n }\n // convert cids\n if (CID.asCID(val)) {\n return {\n $link: (val as CID).toString(),\n }\n }\n // walk plain objects\n const toReturn = {}\n for (const key of Object.keys(val)) {\n toReturn[key] = ipldToJson(val[key])\n }\n return toReturn\n }\n // pass through\n return val as JsonValue\n}\n\nexport const ipldEquals = (a: IpldValue, b: IpldValue): boolean => {\n // walk arrays\n if (Array.isArray(a) && Array.isArray(b)) {\n if (a.length !== b.length) return false\n for (let i = 0; i < a.length; i++) {\n if (!ipldEquals(a[i], b[i])) return false\n }\n return true\n }\n // objects\n if (a && b && typeof a === 'object' && typeof b === 'object') {\n // check bytes\n if (a instanceof Uint8Array && b instanceof Uint8Array) {\n return ui8.equals(a, b)\n }\n // check cids\n if (CID.asCID(a) && CID.asCID(b)) {\n return CID.asCID(a)?.equals(CID.asCID(b))\n }\n // walk plain objects\n if (Object.keys(a).length !== Object.keys(b).length) return false\n for (const key of Object.keys(a)) {\n if (!ipldEquals(a[key], b[key])) return false\n }\n return true\n }\n return a === b\n}\n", "import { wait } from './util'\n\nexport type RetryOptions = {\n maxRetries?: number\n getWaitMs?: (n: number) => number | null\n retryable?: (err: unknown) => boolean\n}\n\nexport async function retry(\n fn: () => Promise,\n opts: RetryOptions = {},\n): Promise {\n const { maxRetries = 3, retryable = () => true, getWaitMs = backoffMs } = opts\n let retries = 0\n let doneError: unknown\n while (!doneError) {\n try {\n return await fn()\n } catch (err) {\n const waitMs = getWaitMs(retries)\n const willRetry =\n retries < maxRetries && waitMs !== null && retryable(err)\n if (willRetry) {\n retries += 1\n if (waitMs !== 0) {\n await wait(waitMs)\n }\n } else {\n doneError = err\n }\n }\n }\n throw doneError\n}\n\n// Waits exponential backoff with max and jitter: ~100, ~200, ~400, ~800, ~1000, ~1000, ...\nexport function backoffMs(n: number, multiplier = 100, max = 1000) {\n const exponentialMs = Math.pow(2, n) * multiplier\n const ms = Math.min(exponentialMs, max)\n return jitter(ms)\n}\n\n// Adds randomness +/-15% of value\nfunction jitter(value: number) {\n const delta = value * 0.15\n return value + randomRange(-delta, delta)\n}\n\nfunction randomRange(from: number, to: number) {\n const rand = Math.random() * (to - from)\n return rand + from\n}\n", "import { CID } from 'multiformats/cid'\nimport { z } from 'zod'\nimport { Def } from './check'\n\nconst cidSchema = z\n .any()\n .refine((obj: unknown) => CID.asCID(obj) !== null, {\n message: 'Not a CID',\n })\n .transform((obj: unknown) => CID.asCID(obj) as CID)\n\nexport const schema = {\n cid: cidSchema,\n bytes: z.instanceof(Uint8Array),\n string: z.string(),\n array: z.array(z.unknown()),\n map: z.record(z.string(), z.unknown()),\n unknown: z.unknown(),\n}\n\nexport const def = {\n cid: {\n name: 'cid',\n schema: schema.cid,\n } as Def,\n bytes: {\n name: 'bytes',\n schema: schema.bytes,\n } as Def,\n string: {\n name: 'string',\n schema: schema.string,\n } as Def,\n map: {\n name: 'map',\n schema: schema.map,\n } as Def>,\n unknown: {\n name: 'unknown',\n schema: schema.unknown,\n } as Def,\n}\n\nexport type ArrayEl = A extends readonly (infer T)[] ? T : never\n\nexport type NotEmptyArray = [T, ...T[]]\n", "export const SECOND = 1000\nexport const MINUTE = SECOND * 60\nexport const HOUR = MINUTE * 60\nexport const DAY = HOUR * 24\n\nexport const lessThanAgoMs = (time: Date, range: number) => {\n return Date.now() < time.getTime() + range\n}\n\nexport const addHoursToDate = (hours: number, startingDate?: Date): Date => {\n // When date is passed, clone before calling `setHours()` so that we are not mutating the original date\n const currentDate = startingDate ? new Date(startingDate) : new Date()\n currentDate.setHours(currentDate.getHours() + hours)\n return currentDate\n}\n", "\"use strict\";\n/**\n * The Grapheme_Cluster_Break property value\n * @see https://www.unicode.org/reports/tr29/#Default_Grapheme_Cluster_Table\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EXTENDED_PICTOGRAPHIC = exports.CLUSTER_BREAK = void 0;\nvar CLUSTER_BREAK;\n(function (CLUSTER_BREAK) {\n CLUSTER_BREAK[CLUSTER_BREAK[\"CR\"] = 0] = \"CR\";\n CLUSTER_BREAK[CLUSTER_BREAK[\"LF\"] = 1] = \"LF\";\n CLUSTER_BREAK[CLUSTER_BREAK[\"CONTROL\"] = 2] = \"CONTROL\";\n CLUSTER_BREAK[CLUSTER_BREAK[\"EXTEND\"] = 3] = \"EXTEND\";\n CLUSTER_BREAK[CLUSTER_BREAK[\"REGIONAL_INDICATOR\"] = 4] = \"REGIONAL_INDICATOR\";\n CLUSTER_BREAK[CLUSTER_BREAK[\"SPACINGMARK\"] = 5] = \"SPACINGMARK\";\n CLUSTER_BREAK[CLUSTER_BREAK[\"L\"] = 6] = \"L\";\n CLUSTER_BREAK[CLUSTER_BREAK[\"V\"] = 7] = \"V\";\n CLUSTER_BREAK[CLUSTER_BREAK[\"T\"] = 8] = \"T\";\n CLUSTER_BREAK[CLUSTER_BREAK[\"LV\"] = 9] = \"LV\";\n CLUSTER_BREAK[CLUSTER_BREAK[\"LVT\"] = 10] = \"LVT\";\n CLUSTER_BREAK[CLUSTER_BREAK[\"OTHER\"] = 11] = \"OTHER\";\n CLUSTER_BREAK[CLUSTER_BREAK[\"PREPEND\"] = 12] = \"PREPEND\";\n CLUSTER_BREAK[CLUSTER_BREAK[\"E_BASE\"] = 13] = \"E_BASE\";\n CLUSTER_BREAK[CLUSTER_BREAK[\"E_MODIFIER\"] = 14] = \"E_MODIFIER\";\n CLUSTER_BREAK[CLUSTER_BREAK[\"ZWJ\"] = 15] = \"ZWJ\";\n CLUSTER_BREAK[CLUSTER_BREAK[\"GLUE_AFTER_ZWJ\"] = 16] = \"GLUE_AFTER_ZWJ\";\n CLUSTER_BREAK[CLUSTER_BREAK[\"E_BASE_GAZ\"] = 17] = \"E_BASE_GAZ\";\n})(CLUSTER_BREAK = exports.CLUSTER_BREAK || (exports.CLUSTER_BREAK = {}));\n/**\n * The Emoji character property is an extension of UCD but shares the same namespace and structure\n * @see http://www.unicode.org/reports/tr51/tr51-14.html#Emoji_Properties_and_Data_Files\n *\n * Here we model Extended_Pictograhpic only to implement UAX #29 GB11\n * \\p{Extended_Pictographic} Extend* ZWJ\t\u00D7\t\\p{Extended_Pictographic}\n *\n * The Emoji character property should not be mixed with Grapheme_Cluster_Break since they are not exclusive\n */\nexports.EXTENDED_PICTOGRAPHIC = 101;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst boundaries_1 = require(\"./boundaries\");\n// BreakTypes\n// @type {BreakType}\nconst NotBreak = 0;\nconst BreakStart = 1;\nconst Break = 2;\nconst BreakLastRegional = 3;\nconst BreakPenultimateRegional = 4;\nclass GraphemerHelper {\n /**\n * Check if the the character at the position {pos} of the string is surrogate\n * @param str {string}\n * @param pos {number}\n * @returns {boolean}\n */\n static isSurrogate(str, pos) {\n return (0xd800 <= str.charCodeAt(pos) &&\n str.charCodeAt(pos) <= 0xdbff &&\n 0xdc00 <= str.charCodeAt(pos + 1) &&\n str.charCodeAt(pos + 1) <= 0xdfff);\n }\n /**\n * The String.prototype.codePointAt polyfill\n * Private function, gets a Unicode code point from a JavaScript UTF-16 string\n * handling surrogate pairs appropriately\n * @param str {string}\n * @param idx {number}\n * @returns {number}\n */\n static codePointAt(str, idx) {\n if (idx === undefined) {\n idx = 0;\n }\n const code = str.charCodeAt(idx);\n // if a high surrogate\n if (0xd800 <= code && code <= 0xdbff && idx < str.length - 1) {\n const hi = code;\n const low = str.charCodeAt(idx + 1);\n if (0xdc00 <= low && low <= 0xdfff) {\n return (hi - 0xd800) * 0x400 + (low - 0xdc00) + 0x10000;\n }\n return hi;\n }\n // if a low surrogate\n if (0xdc00 <= code && code <= 0xdfff && idx >= 1) {\n const hi = str.charCodeAt(idx - 1);\n const low = code;\n if (0xd800 <= hi && hi <= 0xdbff) {\n return (hi - 0xd800) * 0x400 + (low - 0xdc00) + 0x10000;\n }\n return low;\n }\n // just return the char if an unmatched surrogate half or a\n // single-char codepoint\n return code;\n }\n //\n /**\n * Private function, returns whether a break is allowed between the two given grapheme breaking classes\n * Implemented the UAX #29 3.1.1 Grapheme Cluster Boundary Rules on extended grapheme clusters\n * @param start {number}\n * @param mid {Array}\n * @param end {number}\n * @param startEmoji {number}\n * @param midEmoji {Array}\n * @param endEmoji {number}\n * @returns {number}\n */\n static shouldBreak(start, mid, end, startEmoji, midEmoji, endEmoji) {\n const all = [start].concat(mid).concat([end]);\n const allEmoji = [startEmoji].concat(midEmoji).concat([endEmoji]);\n const previous = all[all.length - 2];\n const next = end;\n const nextEmoji = endEmoji;\n // Lookahead terminator for:\n // GB12. ^ (RI RI)* RI ? RI\n // GB13. [^RI] (RI RI)* RI ? RI\n const rIIndex = all.lastIndexOf(boundaries_1.CLUSTER_BREAK.REGIONAL_INDICATOR);\n if (rIIndex > 0 &&\n all.slice(1, rIIndex).every(function (c) {\n return c === boundaries_1.CLUSTER_BREAK.REGIONAL_INDICATOR;\n }) &&\n [boundaries_1.CLUSTER_BREAK.PREPEND, boundaries_1.CLUSTER_BREAK.REGIONAL_INDICATOR].indexOf(previous) === -1) {\n if (all.filter(function (c) {\n return c === boundaries_1.CLUSTER_BREAK.REGIONAL_INDICATOR;\n }).length %\n 2 ===\n 1) {\n return BreakLastRegional;\n }\n else {\n return BreakPenultimateRegional;\n }\n }\n // GB3. CR \u00D7 LF\n if (previous === boundaries_1.CLUSTER_BREAK.CR && next === boundaries_1.CLUSTER_BREAK.LF) {\n return NotBreak;\n }\n // GB4. (Control|CR|LF) \u00F7\n else if (previous === boundaries_1.CLUSTER_BREAK.CONTROL ||\n previous === boundaries_1.CLUSTER_BREAK.CR ||\n previous === boundaries_1.CLUSTER_BREAK.LF) {\n return BreakStart;\n }\n // GB5. \u00F7 (Control|CR|LF)\n else if (next === boundaries_1.CLUSTER_BREAK.CONTROL ||\n next === boundaries_1.CLUSTER_BREAK.CR ||\n next === boundaries_1.CLUSTER_BREAK.LF) {\n return BreakStart;\n }\n // GB6. L \u00D7 (L|V|LV|LVT)\n else if (previous === boundaries_1.CLUSTER_BREAK.L &&\n (next === boundaries_1.CLUSTER_BREAK.L ||\n next === boundaries_1.CLUSTER_BREAK.V ||\n next === boundaries_1.CLUSTER_BREAK.LV ||\n next === boundaries_1.CLUSTER_BREAK.LVT)) {\n return NotBreak;\n }\n // GB7. (LV|V) \u00D7 (V|T)\n else if ((previous === boundaries_1.CLUSTER_BREAK.LV || previous === boundaries_1.CLUSTER_BREAK.V) &&\n (next === boundaries_1.CLUSTER_BREAK.V || next === boundaries_1.CLUSTER_BREAK.T)) {\n return NotBreak;\n }\n // GB8. (LVT|T) \u00D7 (T)\n else if ((previous === boundaries_1.CLUSTER_BREAK.LVT || previous === boundaries_1.CLUSTER_BREAK.T) &&\n next === boundaries_1.CLUSTER_BREAK.T) {\n return NotBreak;\n }\n // GB9. \u00D7 (Extend|ZWJ)\n else if (next === boundaries_1.CLUSTER_BREAK.EXTEND || next === boundaries_1.CLUSTER_BREAK.ZWJ) {\n return NotBreak;\n }\n // GB9a. \u00D7 SpacingMark\n else if (next === boundaries_1.CLUSTER_BREAK.SPACINGMARK) {\n return NotBreak;\n }\n // GB9b. Prepend \u00D7\n else if (previous === boundaries_1.CLUSTER_BREAK.PREPEND) {\n return NotBreak;\n }\n // GB11. \\p{Extended_Pictographic} Extend* ZWJ \u00D7 \\p{Extended_Pictographic}\n const previousNonExtendIndex = allEmoji\n .slice(0, -1)\n .lastIndexOf(boundaries_1.EXTENDED_PICTOGRAPHIC);\n if (previousNonExtendIndex !== -1 &&\n allEmoji[previousNonExtendIndex] === boundaries_1.EXTENDED_PICTOGRAPHIC &&\n all.slice(previousNonExtendIndex + 1, -2).every(function (c) {\n return c === boundaries_1.CLUSTER_BREAK.EXTEND;\n }) &&\n previous === boundaries_1.CLUSTER_BREAK.ZWJ &&\n nextEmoji === boundaries_1.EXTENDED_PICTOGRAPHIC) {\n return NotBreak;\n }\n // GB12. ^ (RI RI)* RI \u00D7 RI\n // GB13. [^RI] (RI RI)* RI \u00D7 RI\n if (mid.indexOf(boundaries_1.CLUSTER_BREAK.REGIONAL_INDICATOR) !== -1) {\n return Break;\n }\n if (previous === boundaries_1.CLUSTER_BREAK.REGIONAL_INDICATOR &&\n next === boundaries_1.CLUSTER_BREAK.REGIONAL_INDICATOR) {\n return NotBreak;\n }\n // GB999. Any ? Any\n return BreakStart;\n }\n}\nexports.default = GraphemerHelper;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * GraphemerIterator\n *\n * Takes a string and a \"BreakHandler\" method during initialisation\n * and creates an iterable object that returns individual graphemes.\n *\n * @param str {string}\n * @return GraphemerIterator\n */\nclass GraphemerIterator {\n constructor(str, nextBreak) {\n this._index = 0;\n this._str = str;\n this._nextBreak = nextBreak;\n }\n [Symbol.iterator]() {\n return this;\n }\n next() {\n let brk;\n if ((brk = this._nextBreak(this._str, this._index)) < this._str.length) {\n const value = this._str.slice(this._index, brk);\n this._index = brk;\n return { value: value, done: false };\n }\n if (this._index < this._str.length) {\n const value = this._str.slice(this._index);\n this._index = this._str.length;\n return { value: value, done: false };\n }\n return { value: undefined, done: true };\n }\n}\nexports.default = GraphemerIterator;\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst boundaries_1 = require(\"./boundaries\");\nconst GraphemerHelper_1 = __importDefault(require(\"./GraphemerHelper\"));\nconst GraphemerIterator_1 = __importDefault(require(\"./GraphemerIterator\"));\nclass Graphemer {\n /**\n * Returns the next grapheme break in the string after the given index\n * @param string {string}\n * @param index {number}\n * @returns {number}\n */\n static nextBreak(string, index) {\n if (index === undefined) {\n index = 0;\n }\n if (index < 0) {\n return 0;\n }\n if (index >= string.length - 1) {\n return string.length;\n }\n const prevCP = GraphemerHelper_1.default.codePointAt(string, index);\n const prev = Graphemer.getGraphemeBreakProperty(prevCP);\n const prevEmoji = Graphemer.getEmojiProperty(prevCP);\n const mid = [];\n const midEmoji = [];\n for (let i = index + 1; i < string.length; i++) {\n // check for already processed low surrogates\n if (GraphemerHelper_1.default.isSurrogate(string, i - 1)) {\n continue;\n }\n const nextCP = GraphemerHelper_1.default.codePointAt(string, i);\n const next = Graphemer.getGraphemeBreakProperty(nextCP);\n const nextEmoji = Graphemer.getEmojiProperty(nextCP);\n if (GraphemerHelper_1.default.shouldBreak(prev, mid, next, prevEmoji, midEmoji, nextEmoji)) {\n return i;\n }\n mid.push(next);\n midEmoji.push(nextEmoji);\n }\n return string.length;\n }\n /**\n * Breaks the given string into an array of grapheme clusters\n * @param str {string}\n * @returns {string[]}\n */\n splitGraphemes(str) {\n const res = [];\n let index = 0;\n let brk;\n while ((brk = Graphemer.nextBreak(str, index)) < str.length) {\n res.push(str.slice(index, brk));\n index = brk;\n }\n if (index < str.length) {\n res.push(str.slice(index));\n }\n return res;\n }\n /**\n * Returns an iterator of grapheme clusters in the given string\n * @param str {string}\n * @returns {GraphemerIterator}\n */\n iterateGraphemes(str) {\n return new GraphemerIterator_1.default(str, Graphemer.nextBreak);\n }\n /**\n * Returns the number of grapheme clusters in the given string\n * @param str {string}\n * @returns {number}\n */\n countGraphemes(str) {\n let count = 0;\n let index = 0;\n let brk;\n while ((brk = Graphemer.nextBreak(str, index)) < str.length) {\n index = brk;\n count++;\n }\n if (index < str.length) {\n count++;\n }\n return count;\n }\n /**\n * Given a Unicode code point, determines this symbol's grapheme break property\n * @param code {number} Unicode code point\n * @returns {number}\n */\n static getGraphemeBreakProperty(code) {\n // Grapheme break property taken from:\n // https://www.unicode.org/Public/UCD/latest/ucd/auxiliary/GraphemeBreakProperty.txt\n // and generated by\n // node ./scripts/generate-grapheme-break.js\n if (code < 0xbf09) {\n if (code < 0xac54) {\n if (code < 0x102d) {\n if (code < 0xb02) {\n if (code < 0x93b) {\n if (code < 0x6df) {\n if (code < 0x5bf) {\n if (code < 0x7f) {\n if (code < 0xb) {\n if (code < 0xa) {\n // Cc [10] ..\n if (0x0 <= code && code <= 0x9) {\n return boundaries_1.CLUSTER_BREAK.CONTROL;\n }\n }\n else {\n // Cc \n if (0xa === code) {\n return boundaries_1.CLUSTER_BREAK.LF;\n }\n }\n }\n else {\n if (code < 0xd) {\n // Cc [2] ..\n if (0xb <= code && code <= 0xc) {\n return boundaries_1.CLUSTER_BREAK.CONTROL;\n }\n }\n else {\n if (code < 0xe) {\n // Cc \n if (0xd === code) {\n return boundaries_1.CLUSTER_BREAK.CR;\n }\n }\n else {\n // Cc [18] ..\n if (0xe <= code && code <= 0x1f) {\n return boundaries_1.CLUSTER_BREAK.CONTROL;\n }\n }\n }\n }\n }\n else {\n if (code < 0x300) {\n if (code < 0xad) {\n // Cc [33] ..\n if (0x7f <= code && code <= 0x9f) {\n return boundaries_1.CLUSTER_BREAK.CONTROL;\n }\n }\n else {\n // Cf SOFT HYPHEN\n if (0xad === code) {\n return boundaries_1.CLUSTER_BREAK.CONTROL;\n }\n }\n }\n else {\n if (code < 0x483) {\n // Mn [112] COMBINING GRAVE ACCENT..COMBINING LATIN SMALL LETTER X\n if (0x300 <= code && code <= 0x36f) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x591) {\n // Mn [5] COMBINING CYRILLIC TITLO..COMBINING CYRILLIC POKRYTIE\n // Me [2] COMBINING CYRILLIC HUNDRED THOUSANDS SIGN..COMBINING CYRILLIC MILLIONS SIGN\n if (0x483 <= code && code <= 0x489) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [45] HEBREW ACCENT ETNAHTA..HEBREW POINT METEG\n if (0x591 <= code && code <= 0x5bd) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x610) {\n if (code < 0x5c4) {\n if (code < 0x5c1) {\n // Mn HEBREW POINT RAFE\n if (0x5bf === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [2] HEBREW POINT SHIN DOT..HEBREW POINT SIN DOT\n if (0x5c1 <= code && code <= 0x5c2) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0x5c7) {\n // Mn [2] HEBREW MARK UPPER DOT..HEBREW MARK LOWER DOT\n if (0x5c4 <= code && code <= 0x5c5) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x600) {\n // Mn HEBREW POINT QAMATS QATAN\n if (0x5c7 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Cf [6] ARABIC NUMBER SIGN..ARABIC NUMBER MARK ABOVE\n if (0x600 <= code && code <= 0x605) {\n return boundaries_1.CLUSTER_BREAK.PREPEND;\n }\n }\n }\n }\n }\n else {\n if (code < 0x670) {\n if (code < 0x61c) {\n // Mn [11] ARABIC SIGN SALLALLAHOU ALAYHE WASSALLAM..ARABIC SMALL KASRA\n if (0x610 <= code && code <= 0x61a) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x64b) {\n // Cf ARABIC LETTER MARK\n if (0x61c === code) {\n return boundaries_1.CLUSTER_BREAK.CONTROL;\n }\n }\n else {\n // Mn [21] ARABIC FATHATAN..ARABIC WAVY HAMZA BELOW\n if (0x64b <= code && code <= 0x65f) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n else {\n if (code < 0x6d6) {\n // Mn ARABIC LETTER SUPERSCRIPT ALEF\n if (0x670 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x6dd) {\n // Mn [7] ARABIC SMALL HIGH LIGATURE SAD WITH LAM WITH ALEF MAKSURA..ARABIC SMALL HIGH SEEN\n if (0x6d6 <= code && code <= 0x6dc) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Cf ARABIC END OF AYAH\n if (0x6dd === code) {\n return boundaries_1.CLUSTER_BREAK.PREPEND;\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x81b) {\n if (code < 0x730) {\n if (code < 0x6ea) {\n if (code < 0x6e7) {\n // Mn [6] ARABIC SMALL HIGH ROUNDED ZERO..ARABIC SMALL HIGH MADDA\n if (0x6df <= code && code <= 0x6e4) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [2] ARABIC SMALL HIGH YEH..ARABIC SMALL HIGH NOON\n if (0x6e7 <= code && code <= 0x6e8) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0x70f) {\n // Mn [4] ARABIC EMPTY CENTRE LOW STOP..ARABIC SMALL LOW MEEM\n if (0x6ea <= code && code <= 0x6ed) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Cf SYRIAC ABBREVIATION MARK\n if (0x70f === code) {\n return boundaries_1.CLUSTER_BREAK.PREPEND;\n }\n // Mn SYRIAC LETTER SUPERSCRIPT ALAPH\n if (0x711 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n else {\n if (code < 0x7eb) {\n if (code < 0x7a6) {\n // Mn [27] SYRIAC PTHAHA ABOVE..SYRIAC BARREKH\n if (0x730 <= code && code <= 0x74a) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [11] THAANA ABAFILI..THAANA SUKUN\n if (0x7a6 <= code && code <= 0x7b0) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0x7fd) {\n // Mn [9] NKO COMBINING SHORT HIGH TONE..NKO COMBINING DOUBLE DOT ABOVE\n if (0x7eb <= code && code <= 0x7f3) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x816) {\n // Mn NKO DANTAYALAN\n if (0x7fd === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [4] SAMARITAN MARK IN..SAMARITAN MARK DAGESH\n if (0x816 <= code && code <= 0x819) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x898) {\n if (code < 0x829) {\n if (code < 0x825) {\n // Mn [9] SAMARITAN MARK EPENTHETIC YUT..SAMARITAN VOWEL SIGN A\n if (0x81b <= code && code <= 0x823) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [3] SAMARITAN VOWEL SIGN SHORT A..SAMARITAN VOWEL SIGN U\n if (0x825 <= code && code <= 0x827) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0x859) {\n // Mn [5] SAMARITAN VOWEL SIGN LONG I..SAMARITAN MARK NEQUDAA\n if (0x829 <= code && code <= 0x82d) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x890) {\n // Mn [3] MANDAIC AFFRICATION MARK..MANDAIC GEMINATION MARK\n if (0x859 <= code && code <= 0x85b) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Cf [2] ARABIC POUND MARK ABOVE..ARABIC PIASTRE MARK ABOVE\n if (0x890 <= code && code <= 0x891) {\n return boundaries_1.CLUSTER_BREAK.PREPEND;\n }\n }\n }\n }\n }\n else {\n if (code < 0x8e3) {\n if (code < 0x8ca) {\n // Mn [8] ARABIC SMALL HIGH WORD AL-JUZ..ARABIC HALF MADDA OVER MADDA\n if (0x898 <= code && code <= 0x89f) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x8e2) {\n // Mn [24] ARABIC SMALL HIGH FARSI YEH..ARABIC SMALL HIGH SIGN SAFHA\n if (0x8ca <= code && code <= 0x8e1) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Cf ARABIC DISPUTED END OF AYAH\n if (0x8e2 === code) {\n return boundaries_1.CLUSTER_BREAK.PREPEND;\n }\n }\n }\n }\n else {\n if (code < 0x903) {\n // Mn [32] ARABIC TURNED DAMMA BELOW..DEVANAGARI SIGN ANUSVARA\n if (0x8e3 <= code && code <= 0x902) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc DEVANAGARI SIGN VISARGA\n if (0x903 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n // Mn DEVANAGARI VOWEL SIGN OE\n if (0x93a === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xa01) {\n if (code < 0x982) {\n if (code < 0x94d) {\n if (code < 0x93e) {\n // Mc DEVANAGARI VOWEL SIGN OOE\n if (0x93b === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n // Mn DEVANAGARI SIGN NUKTA\n if (0x93c === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x941) {\n // Mc [3] DEVANAGARI VOWEL SIGN AA..DEVANAGARI VOWEL SIGN II\n if (0x93e <= code && code <= 0x940) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0x949) {\n // Mn [8] DEVANAGARI VOWEL SIGN U..DEVANAGARI VOWEL SIGN AI\n if (0x941 <= code && code <= 0x948) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc [4] DEVANAGARI VOWEL SIGN CANDRA O..DEVANAGARI VOWEL SIGN AU\n if (0x949 <= code && code <= 0x94c) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n }\n else {\n if (code < 0x951) {\n if (code < 0x94e) {\n // Mn DEVANAGARI SIGN VIRAMA\n if (0x94d === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc [2] DEVANAGARI VOWEL SIGN PRISHTHAMATRA E..DEVANAGARI VOWEL SIGN AW\n if (0x94e <= code && code <= 0x94f) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n else {\n if (code < 0x962) {\n // Mn [7] DEVANAGARI STRESS SIGN UDATTA..DEVANAGARI VOWEL SIGN UUE\n if (0x951 <= code && code <= 0x957) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x981) {\n // Mn [2] DEVANAGARI VOWEL SIGN VOCALIC L..DEVANAGARI VOWEL SIGN VOCALIC LL\n if (0x962 <= code && code <= 0x963) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn BENGALI SIGN CANDRABINDU\n if (0x981 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x9c7) {\n if (code < 0x9be) {\n if (code < 0x9bc) {\n // Mc [2] BENGALI SIGN ANUSVARA..BENGALI SIGN VISARGA\n if (0x982 <= code && code <= 0x983) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn BENGALI SIGN NUKTA\n if (0x9bc === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0x9bf) {\n // Mc BENGALI VOWEL SIGN AA\n if (0x9be === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x9c1) {\n // Mc [2] BENGALI VOWEL SIGN I..BENGALI VOWEL SIGN II\n if (0x9bf <= code && code <= 0x9c0) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn [4] BENGALI VOWEL SIGN U..BENGALI VOWEL SIGN VOCALIC RR\n if (0x9c1 <= code && code <= 0x9c4) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n else {\n if (code < 0x9d7) {\n if (code < 0x9cb) {\n // Mc [2] BENGALI VOWEL SIGN E..BENGALI VOWEL SIGN AI\n if (0x9c7 <= code && code <= 0x9c8) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0x9cd) {\n // Mc [2] BENGALI VOWEL SIGN O..BENGALI VOWEL SIGN AU\n if (0x9cb <= code && code <= 0x9cc) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn BENGALI SIGN VIRAMA\n if (0x9cd === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n else {\n if (code < 0x9e2) {\n // Mc BENGALI AU LENGTH MARK\n if (0x9d7 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x9fe) {\n // Mn [2] BENGALI VOWEL SIGN VOCALIC L..BENGALI VOWEL SIGN VOCALIC LL\n if (0x9e2 <= code && code <= 0x9e3) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn BENGALI SANDHI MARK\n if (0x9fe === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xa83) {\n if (code < 0xa47) {\n if (code < 0xa3c) {\n if (code < 0xa03) {\n // Mn [2] GURMUKHI SIGN ADAK BINDI..GURMUKHI SIGN BINDI\n if (0xa01 <= code && code <= 0xa02) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc GURMUKHI SIGN VISARGA\n if (0xa03 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n else {\n if (code < 0xa3e) {\n // Mn GURMUKHI SIGN NUKTA\n if (0xa3c === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0xa41) {\n // Mc [3] GURMUKHI VOWEL SIGN AA..GURMUKHI VOWEL SIGN II\n if (0xa3e <= code && code <= 0xa40) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn [2] GURMUKHI VOWEL SIGN U..GURMUKHI VOWEL SIGN UU\n if (0xa41 <= code && code <= 0xa42) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n else {\n if (code < 0xa70) {\n if (code < 0xa4b) {\n // Mn [2] GURMUKHI VOWEL SIGN EE..GURMUKHI VOWEL SIGN AI\n if (0xa47 <= code && code <= 0xa48) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0xa51) {\n // Mn [3] GURMUKHI VOWEL SIGN OO..GURMUKHI SIGN VIRAMA\n if (0xa4b <= code && code <= 0xa4d) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn GURMUKHI SIGN UDAAT\n if (0xa51 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n else {\n if (code < 0xa75) {\n // Mn [2] GURMUKHI TIPPI..GURMUKHI ADDAK\n if (0xa70 <= code && code <= 0xa71) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0xa81) {\n // Mn GURMUKHI SIGN YAKASH\n if (0xa75 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [2] GUJARATI SIGN CANDRABINDU..GUJARATI SIGN ANUSVARA\n if (0xa81 <= code && code <= 0xa82) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xac9) {\n if (code < 0xabe) {\n // Mc GUJARATI SIGN VISARGA\n if (0xa83 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n // Mn GUJARATI SIGN NUKTA\n if (0xabc === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0xac1) {\n // Mc [3] GUJARATI VOWEL SIGN AA..GUJARATI VOWEL SIGN II\n if (0xabe <= code && code <= 0xac0) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0xac7) {\n // Mn [5] GUJARATI VOWEL SIGN U..GUJARATI VOWEL SIGN CANDRA E\n if (0xac1 <= code && code <= 0xac5) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [2] GUJARATI VOWEL SIGN E..GUJARATI VOWEL SIGN AI\n if (0xac7 <= code && code <= 0xac8) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n else {\n if (code < 0xae2) {\n if (code < 0xacb) {\n // Mc GUJARATI VOWEL SIGN CANDRA O\n if (0xac9 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0xacd) {\n // Mc [2] GUJARATI VOWEL SIGN O..GUJARATI VOWEL SIGN AU\n if (0xacb <= code && code <= 0xacc) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn GUJARATI SIGN VIRAMA\n if (0xacd === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n else {\n if (code < 0xafa) {\n // Mn [2] GUJARATI VOWEL SIGN VOCALIC L..GUJARATI VOWEL SIGN VOCALIC LL\n if (0xae2 <= code && code <= 0xae3) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0xb01) {\n // Mn [6] GUJARATI SIGN SUKUN..GUJARATI SIGN TWO-CIRCLE NUKTA ABOVE\n if (0xafa <= code && code <= 0xaff) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn ORIYA SIGN CANDRABINDU\n if (0xb01 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xcf3) {\n if (code < 0xc04) {\n if (code < 0xb82) {\n if (code < 0xb47) {\n if (code < 0xb3e) {\n if (code < 0xb3c) {\n // Mc [2] ORIYA SIGN ANUSVARA..ORIYA SIGN VISARGA\n if (0xb02 <= code && code <= 0xb03) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn ORIYA SIGN NUKTA\n if (0xb3c === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0xb40) {\n // Mc ORIYA VOWEL SIGN AA\n // Mn ORIYA VOWEL SIGN I\n if (0xb3e <= code && code <= 0xb3f) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0xb41) {\n // Mc ORIYA VOWEL SIGN II\n if (0xb40 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn [4] ORIYA VOWEL SIGN U..ORIYA VOWEL SIGN VOCALIC RR\n if (0xb41 <= code && code <= 0xb44) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n else {\n if (code < 0xb4d) {\n if (code < 0xb4b) {\n // Mc [2] ORIYA VOWEL SIGN E..ORIYA VOWEL SIGN AI\n if (0xb47 <= code && code <= 0xb48) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mc [2] ORIYA VOWEL SIGN O..ORIYA VOWEL SIGN AU\n if (0xb4b <= code && code <= 0xb4c) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n else {\n if (code < 0xb55) {\n // Mn ORIYA SIGN VIRAMA\n if (0xb4d === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0xb62) {\n // Mn [2] ORIYA SIGN OVERLINE..ORIYA AI LENGTH MARK\n // Mc ORIYA AU LENGTH MARK\n if (0xb55 <= code && code <= 0xb57) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [2] ORIYA VOWEL SIGN VOCALIC L..ORIYA VOWEL SIGN VOCALIC LL\n if (0xb62 <= code && code <= 0xb63) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xbc6) {\n if (code < 0xbbf) {\n // Mn TAMIL SIGN ANUSVARA\n if (0xb82 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n // Mc TAMIL VOWEL SIGN AA\n if (0xbbe === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0xbc0) {\n // Mc TAMIL VOWEL SIGN I\n if (0xbbf === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0xbc1) {\n // Mn TAMIL VOWEL SIGN II\n if (0xbc0 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc [2] TAMIL VOWEL SIGN U..TAMIL VOWEL SIGN UU\n if (0xbc1 <= code && code <= 0xbc2) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n }\n else {\n if (code < 0xbd7) {\n if (code < 0xbca) {\n // Mc [3] TAMIL VOWEL SIGN E..TAMIL VOWEL SIGN AI\n if (0xbc6 <= code && code <= 0xbc8) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0xbcd) {\n // Mc [3] TAMIL VOWEL SIGN O..TAMIL VOWEL SIGN AU\n if (0xbca <= code && code <= 0xbcc) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn TAMIL SIGN VIRAMA\n if (0xbcd === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n else {\n if (code < 0xc00) {\n // Mc TAMIL AU LENGTH MARK\n if (0xbd7 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0xc01) {\n // Mn TELUGU SIGN COMBINING CANDRABINDU ABOVE\n if (0xc00 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc [3] TELUGU SIGN CANDRABINDU..TELUGU SIGN VISARGA\n if (0xc01 <= code && code <= 0xc03) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xcbe) {\n if (code < 0xc4a) {\n if (code < 0xc3e) {\n // Mn TELUGU SIGN COMBINING ANUSVARA ABOVE\n if (0xc04 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n // Mn TELUGU SIGN NUKTA\n if (0xc3c === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0xc41) {\n // Mn [3] TELUGU VOWEL SIGN AA..TELUGU VOWEL SIGN II\n if (0xc3e <= code && code <= 0xc40) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0xc46) {\n // Mc [4] TELUGU VOWEL SIGN U..TELUGU VOWEL SIGN VOCALIC RR\n if (0xc41 <= code && code <= 0xc44) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn [3] TELUGU VOWEL SIGN E..TELUGU VOWEL SIGN AI\n if (0xc46 <= code && code <= 0xc48) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n else {\n if (code < 0xc81) {\n if (code < 0xc55) {\n // Mn [4] TELUGU VOWEL SIGN O..TELUGU SIGN VIRAMA\n if (0xc4a <= code && code <= 0xc4d) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0xc62) {\n // Mn [2] TELUGU LENGTH MARK..TELUGU AI LENGTH MARK\n if (0xc55 <= code && code <= 0xc56) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [2] TELUGU VOWEL SIGN VOCALIC L..TELUGU VOWEL SIGN VOCALIC LL\n if (0xc62 <= code && code <= 0xc63) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n else {\n if (code < 0xc82) {\n // Mn KANNADA SIGN CANDRABINDU\n if (0xc81 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0xcbc) {\n // Mc [2] KANNADA SIGN ANUSVARA..KANNADA SIGN VISARGA\n if (0xc82 <= code && code <= 0xc83) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn KANNADA SIGN NUKTA\n if (0xcbc === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xcc6) {\n if (code < 0xcc0) {\n // Mc KANNADA VOWEL SIGN AA\n if (0xcbe === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n // Mn KANNADA VOWEL SIGN I\n if (0xcbf === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0xcc2) {\n // Mc [2] KANNADA VOWEL SIGN II..KANNADA VOWEL SIGN U\n if (0xcc0 <= code && code <= 0xcc1) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0xcc3) {\n // Mc KANNADA VOWEL SIGN UU\n if (0xcc2 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc [2] KANNADA VOWEL SIGN VOCALIC R..KANNADA VOWEL SIGN VOCALIC RR\n if (0xcc3 <= code && code <= 0xcc4) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n }\n else {\n if (code < 0xccc) {\n if (code < 0xcc7) {\n // Mn KANNADA VOWEL SIGN E\n if (0xcc6 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0xcca) {\n // Mc [2] KANNADA VOWEL SIGN EE..KANNADA VOWEL SIGN AI\n if (0xcc7 <= code && code <= 0xcc8) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mc [2] KANNADA VOWEL SIGN O..KANNADA VOWEL SIGN OO\n if (0xcca <= code && code <= 0xccb) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n else {\n if (code < 0xcd5) {\n // Mn [2] KANNADA VOWEL SIGN AU..KANNADA SIGN VIRAMA\n if (0xccc <= code && code <= 0xccd) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0xce2) {\n // Mc [2] KANNADA LENGTH MARK..KANNADA AI LENGTH MARK\n if (0xcd5 <= code && code <= 0xcd6) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [2] KANNADA VOWEL SIGN VOCALIC L..KANNADA VOWEL SIGN VOCALIC LL\n if (0xce2 <= code && code <= 0xce3) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xddf) {\n if (code < 0xd4e) {\n if (code < 0xd3f) {\n if (code < 0xd02) {\n if (code < 0xd00) {\n // Mc KANNADA SIGN COMBINING ANUSVARA ABOVE RIGHT\n if (0xcf3 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn [2] MALAYALAM SIGN COMBINING ANUSVARA ABOVE..MALAYALAM SIGN CANDRABINDU\n if (0xd00 <= code && code <= 0xd01) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0xd3b) {\n // Mc [2] MALAYALAM SIGN ANUSVARA..MALAYALAM SIGN VISARGA\n if (0xd02 <= code && code <= 0xd03) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0xd3e) {\n // Mn [2] MALAYALAM SIGN VERTICAL BAR VIRAMA..MALAYALAM SIGN CIRCULAR VIRAMA\n if (0xd3b <= code && code <= 0xd3c) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc MALAYALAM VOWEL SIGN AA\n if (0xd3e === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n else {\n if (code < 0xd46) {\n if (code < 0xd41) {\n // Mc [2] MALAYALAM VOWEL SIGN I..MALAYALAM VOWEL SIGN II\n if (0xd3f <= code && code <= 0xd40) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn [4] MALAYALAM VOWEL SIGN U..MALAYALAM VOWEL SIGN VOCALIC RR\n if (0xd41 <= code && code <= 0xd44) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0xd4a) {\n // Mc [3] MALAYALAM VOWEL SIGN E..MALAYALAM VOWEL SIGN AI\n if (0xd46 <= code && code <= 0xd48) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0xd4d) {\n // Mc [3] MALAYALAM VOWEL SIGN O..MALAYALAM VOWEL SIGN AU\n if (0xd4a <= code && code <= 0xd4c) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn MALAYALAM SIGN VIRAMA\n if (0xd4d === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xdca) {\n if (code < 0xd62) {\n // Lo MALAYALAM LETTER DOT REPH\n if (0xd4e === code) {\n return boundaries_1.CLUSTER_BREAK.PREPEND;\n }\n // Mc MALAYALAM AU LENGTH MARK\n if (0xd57 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0xd81) {\n // Mn [2] MALAYALAM VOWEL SIGN VOCALIC L..MALAYALAM VOWEL SIGN VOCALIC LL\n if (0xd62 <= code && code <= 0xd63) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0xd82) {\n // Mn SINHALA SIGN CANDRABINDU\n if (0xd81 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc [2] SINHALA SIGN ANUSVARAYA..SINHALA SIGN VISARGAYA\n if (0xd82 <= code && code <= 0xd83) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n }\n else {\n if (code < 0xdd2) {\n if (code < 0xdcf) {\n // Mn SINHALA SIGN AL-LAKUNA\n if (0xdca === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0xdd0) {\n // Mc SINHALA VOWEL SIGN AELA-PILLA\n if (0xdcf === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc [2] SINHALA VOWEL SIGN KETTI AEDA-PILLA..SINHALA VOWEL SIGN DIGA AEDA-PILLA\n if (0xdd0 <= code && code <= 0xdd1) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n else {\n if (code < 0xdd6) {\n // Mn [3] SINHALA VOWEL SIGN KETTI IS-PILLA..SINHALA VOWEL SIGN KETTI PAA-PILLA\n if (0xdd2 <= code && code <= 0xdd4) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0xdd8) {\n // Mn SINHALA VOWEL SIGN DIGA PAA-PILLA\n if (0xdd6 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc [7] SINHALA VOWEL SIGN GAETTA-PILLA..SINHALA VOWEL SIGN KOMBUVA HAA GAYANUKITTA\n if (0xdd8 <= code && code <= 0xdde) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xf35) {\n if (code < 0xe47) {\n if (code < 0xe31) {\n if (code < 0xdf2) {\n // Mc SINHALA VOWEL SIGN GAYANUKITTA\n if (0xddf === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc [2] SINHALA VOWEL SIGN DIGA GAETTA-PILLA..SINHALA VOWEL SIGN DIGA GAYANUKITTA\n if (0xdf2 <= code && code <= 0xdf3) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n else {\n if (code < 0xe33) {\n // Mn THAI CHARACTER MAI HAN-AKAT\n if (0xe31 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0xe34) {\n // Lo THAI CHARACTER SARA AM\n if (0xe33 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn [7] THAI CHARACTER SARA I..THAI CHARACTER PHINTHU\n if (0xe34 <= code && code <= 0xe3a) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n else {\n if (code < 0xeb4) {\n if (code < 0xeb1) {\n // Mn [8] THAI CHARACTER MAITAIKHU..THAI CHARACTER YAMAKKAN\n if (0xe47 <= code && code <= 0xe4e) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn LAO VOWEL SIGN MAI KAN\n if (0xeb1 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n // Lo LAO VOWEL SIGN AM\n if (0xeb3 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n else {\n if (code < 0xec8) {\n // Mn [9] LAO VOWEL SIGN I..LAO SEMIVOWEL SIGN LO\n if (0xeb4 <= code && code <= 0xebc) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0xf18) {\n // Mn [7] LAO TONE MAI EK..LAO YAMAKKAN\n if (0xec8 <= code && code <= 0xece) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [2] TIBETAN ASTROLOGICAL SIGN -KHYUD PA..TIBETAN ASTROLOGICAL SIGN SDONG TSHUGS\n if (0xf18 <= code && code <= 0xf19) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xf7f) {\n if (code < 0xf39) {\n // Mn TIBETAN MARK NGAS BZUNG NYI ZLA\n if (0xf35 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n // Mn TIBETAN MARK NGAS BZUNG SGOR RTAGS\n if (0xf37 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0xf3e) {\n // Mn TIBETAN MARK TSA -PHRU\n if (0xf39 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0xf71) {\n // Mc [2] TIBETAN SIGN YAR TSHES..TIBETAN SIGN MAR TSHES\n if (0xf3e <= code && code <= 0xf3f) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn [14] TIBETAN VOWEL SIGN AA..TIBETAN SIGN RJES SU NGA RO\n if (0xf71 <= code && code <= 0xf7e) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n else {\n if (code < 0xf8d) {\n if (code < 0xf80) {\n // Mc TIBETAN SIGN RNAM BCAD\n if (0xf7f === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0xf86) {\n // Mn [5] TIBETAN VOWEL SIGN REVERSED I..TIBETAN MARK HALANTA\n if (0xf80 <= code && code <= 0xf84) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [2] TIBETAN SIGN LCI RTAGS..TIBETAN SIGN YANG RTAGS\n if (0xf86 <= code && code <= 0xf87) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n else {\n if (code < 0xf99) {\n // Mn [11] TIBETAN SUBJOINED SIGN LCE TSA CAN..TIBETAN SUBJOINED LETTER JA\n if (0xf8d <= code && code <= 0xf97) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0xfc6) {\n // Mn [36] TIBETAN SUBJOINED LETTER NYA..TIBETAN SUBJOINED LETTER FIXED-FORM RA\n if (0xf99 <= code && code <= 0xfbc) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn TIBETAN SYMBOL PADMA GDAN\n if (0xfc6 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x1c24) {\n if (code < 0x1930) {\n if (code < 0x1732) {\n if (code < 0x1082) {\n if (code < 0x103d) {\n if (code < 0x1032) {\n if (code < 0x1031) {\n // Mn [4] MYANMAR VOWEL SIGN I..MYANMAR VOWEL SIGN UU\n if (0x102d <= code && code <= 0x1030) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc MYANMAR VOWEL SIGN E\n if (0x1031 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n else {\n if (code < 0x1039) {\n // Mn [6] MYANMAR VOWEL SIGN AI..MYANMAR SIGN DOT BELOW\n if (0x1032 <= code && code <= 0x1037) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x103b) {\n // Mn [2] MYANMAR SIGN VIRAMA..MYANMAR SIGN ASAT\n if (0x1039 <= code && code <= 0x103a) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc [2] MYANMAR CONSONANT SIGN MEDIAL YA..MYANMAR CONSONANT SIGN MEDIAL RA\n if (0x103b <= code && code <= 0x103c) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n }\n else {\n if (code < 0x1058) {\n if (code < 0x1056) {\n // Mn [2] MYANMAR CONSONANT SIGN MEDIAL WA..MYANMAR CONSONANT SIGN MEDIAL HA\n if (0x103d <= code && code <= 0x103e) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc [2] MYANMAR VOWEL SIGN VOCALIC R..MYANMAR VOWEL SIGN VOCALIC RR\n if (0x1056 <= code && code <= 0x1057) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n else {\n if (code < 0x105e) {\n // Mn [2] MYANMAR VOWEL SIGN VOCALIC L..MYANMAR VOWEL SIGN VOCALIC LL\n if (0x1058 <= code && code <= 0x1059) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x1071) {\n // Mn [3] MYANMAR CONSONANT SIGN MON MEDIAL NA..MYANMAR CONSONANT SIGN MON MEDIAL LA\n if (0x105e <= code && code <= 0x1060) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [4] MYANMAR VOWEL SIGN GEBA KAREN I..MYANMAR VOWEL SIGN KAYAH EE\n if (0x1071 <= code && code <= 0x1074) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x1100) {\n if (code < 0x1085) {\n // Mn MYANMAR CONSONANT SIGN SHAN MEDIAL WA\n if (0x1082 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n // Mc MYANMAR VOWEL SIGN SHAN E\n if (0x1084 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0x108d) {\n // Mn [2] MYANMAR VOWEL SIGN SHAN E ABOVE..MYANMAR VOWEL SIGN SHAN FINAL Y\n if (0x1085 <= code && code <= 0x1086) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn MYANMAR SIGN SHAN COUNCIL EMPHATIC TONE\n if (0x108d === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n // Mn MYANMAR VOWEL SIGN AITON AI\n if (0x109d === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n else {\n if (code < 0x135d) {\n if (code < 0x1160) {\n // Lo [96] HANGUL CHOSEONG KIYEOK..HANGUL CHOSEONG FILLER\n if (0x1100 <= code && code <= 0x115f) {\n return boundaries_1.CLUSTER_BREAK.L;\n }\n }\n else {\n if (code < 0x11a8) {\n // Lo [72] HANGUL JUNGSEONG FILLER..HANGUL JUNGSEONG O-YAE\n if (0x1160 <= code && code <= 0x11a7) {\n return boundaries_1.CLUSTER_BREAK.V;\n }\n }\n else {\n // Lo [88] HANGUL JONGSEONG KIYEOK..HANGUL JONGSEONG SSANGNIEUN\n if (0x11a8 <= code && code <= 0x11ff) {\n return boundaries_1.CLUSTER_BREAK.T;\n }\n }\n }\n }\n else {\n if (code < 0x1712) {\n // Mn [3] ETHIOPIC COMBINING GEMINATION AND VOWEL LENGTH MARK..ETHIOPIC COMBINING GEMINATION MARK\n if (0x135d <= code && code <= 0x135f) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x1715) {\n // Mn [3] TAGALOG VOWEL SIGN I..TAGALOG SIGN VIRAMA\n if (0x1712 <= code && code <= 0x1714) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc TAGALOG SIGN PAMUDPOD\n if (0x1715 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x17c9) {\n if (code < 0x17b6) {\n if (code < 0x1752) {\n if (code < 0x1734) {\n // Mn [2] HANUNOO VOWEL SIGN I..HANUNOO VOWEL SIGN U\n if (0x1732 <= code && code <= 0x1733) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc HANUNOO SIGN PAMUDPOD\n if (0x1734 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n else {\n if (code < 0x1772) {\n // Mn [2] BUHID VOWEL SIGN I..BUHID VOWEL SIGN U\n if (0x1752 <= code && code <= 0x1753) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x17b4) {\n // Mn [2] TAGBANWA VOWEL SIGN I..TAGBANWA VOWEL SIGN U\n if (0x1772 <= code && code <= 0x1773) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [2] KHMER VOWEL INHERENT AQ..KHMER VOWEL INHERENT AA\n if (0x17b4 <= code && code <= 0x17b5) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n else {\n if (code < 0x17be) {\n if (code < 0x17b7) {\n // Mc KHMER VOWEL SIGN AA\n if (0x17b6 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn [7] KHMER VOWEL SIGN I..KHMER VOWEL SIGN UA\n if (0x17b7 <= code && code <= 0x17bd) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0x17c6) {\n // Mc [8] KHMER VOWEL SIGN OE..KHMER VOWEL SIGN AU\n if (0x17be <= code && code <= 0x17c5) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0x17c7) {\n // Mn KHMER SIGN NIKAHIT\n if (0x17c6 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc [2] KHMER SIGN REAHMUK..KHMER SIGN YUUKALEAPINTU\n if (0x17c7 <= code && code <= 0x17c8) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x1885) {\n if (code < 0x180b) {\n if (code < 0x17dd) {\n // Mn [11] KHMER SIGN MUUSIKATOAN..KHMER SIGN BATHAMASAT\n if (0x17c9 <= code && code <= 0x17d3) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn KHMER SIGN ATTHACAN\n if (0x17dd === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0x180e) {\n // Mn [3] MONGOLIAN FREE VARIATION SELECTOR ONE..MONGOLIAN FREE VARIATION SELECTOR THREE\n if (0x180b <= code && code <= 0x180d) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Cf MONGOLIAN VOWEL SEPARATOR\n if (0x180e === code) {\n return boundaries_1.CLUSTER_BREAK.CONTROL;\n }\n // Mn MONGOLIAN FREE VARIATION SELECTOR FOUR\n if (0x180f === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n else {\n if (code < 0x1923) {\n if (code < 0x18a9) {\n // Mn [2] MONGOLIAN LETTER ALI GALI BALUDA..MONGOLIAN LETTER ALI GALI THREE BALUDA\n if (0x1885 <= code && code <= 0x1886) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x1920) {\n // Mn MONGOLIAN LETTER ALI GALI DAGALGA\n if (0x18a9 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [3] LIMBU VOWEL SIGN A..LIMBU VOWEL SIGN U\n if (0x1920 <= code && code <= 0x1922) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n else {\n if (code < 0x1927) {\n // Mc [4] LIMBU VOWEL SIGN EE..LIMBU VOWEL SIGN AU\n if (0x1923 <= code && code <= 0x1926) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0x1929) {\n // Mn [2] LIMBU VOWEL SIGN E..LIMBU VOWEL SIGN O\n if (0x1927 <= code && code <= 0x1928) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc [3] LIMBU SUBJOINED LETTER YA..LIMBU SUBJOINED LETTER WA\n if (0x1929 <= code && code <= 0x192b) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x1b3b) {\n if (code < 0x1a58) {\n if (code < 0x1a19) {\n if (code < 0x1933) {\n if (code < 0x1932) {\n // Mc [2] LIMBU SMALL LETTER KA..LIMBU SMALL LETTER NGA\n if (0x1930 <= code && code <= 0x1931) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn LIMBU SMALL LETTER ANUSVARA\n if (0x1932 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0x1939) {\n // Mc [6] LIMBU SMALL LETTER TA..LIMBU SMALL LETTER LA\n if (0x1933 <= code && code <= 0x1938) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0x1a17) {\n // Mn [3] LIMBU SIGN MUKPHRENG..LIMBU SIGN SA-I\n if (0x1939 <= code && code <= 0x193b) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [2] BUGINESE VOWEL SIGN I..BUGINESE VOWEL SIGN U\n if (0x1a17 <= code && code <= 0x1a18) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n else {\n if (code < 0x1a55) {\n if (code < 0x1a1b) {\n // Mc [2] BUGINESE VOWEL SIGN E..BUGINESE VOWEL SIGN O\n if (0x1a19 <= code && code <= 0x1a1a) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn BUGINESE VOWEL SIGN AE\n if (0x1a1b === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0x1a56) {\n // Mc TAI THAM CONSONANT SIGN MEDIAL RA\n if (0x1a55 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn TAI THAM CONSONANT SIGN MEDIAL LA\n if (0x1a56 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n // Mc TAI THAM CONSONANT SIGN LA TANG LAI\n if (0x1a57 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n }\n else {\n if (code < 0x1a73) {\n if (code < 0x1a62) {\n if (code < 0x1a60) {\n // Mn [7] TAI THAM SIGN MAI KANG LAI..TAI THAM CONSONANT SIGN SA\n if (0x1a58 <= code && code <= 0x1a5e) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn TAI THAM SIGN SAKOT\n if (0x1a60 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0x1a65) {\n // Mn TAI THAM VOWEL SIGN MAI SAT\n if (0x1a62 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x1a6d) {\n // Mn [8] TAI THAM VOWEL SIGN I..TAI THAM VOWEL SIGN OA BELOW\n if (0x1a65 <= code && code <= 0x1a6c) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc [6] TAI THAM VOWEL SIGN OY..TAI THAM VOWEL SIGN THAM AI\n if (0x1a6d <= code && code <= 0x1a72) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n }\n else {\n if (code < 0x1b00) {\n if (code < 0x1a7f) {\n // Mn [10] TAI THAM VOWEL SIGN OA ABOVE..TAI THAM SIGN KHUEN-LUE KARAN\n if (0x1a73 <= code && code <= 0x1a7c) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x1ab0) {\n // Mn TAI THAM COMBINING CRYPTOGRAMMIC DOT\n if (0x1a7f === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [14] COMBINING DOUBLED CIRCUMFLEX ACCENT..COMBINING PARENTHESES BELOW\n // Me COMBINING PARENTHESES OVERLAY\n // Mn [16] COMBINING LATIN SMALL LETTER W BELOW..COMBINING LATIN SMALL LETTER INSULAR T\n if (0x1ab0 <= code && code <= 0x1ace) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n else {\n if (code < 0x1b04) {\n // Mn [4] BALINESE SIGN ULU RICEM..BALINESE SIGN SURANG\n if (0x1b00 <= code && code <= 0x1b03) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x1b34) {\n // Mc BALINESE SIGN BISAH\n if (0x1b04 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn BALINESE SIGN REREKAN\n // Mc BALINESE VOWEL SIGN TEDUNG\n // Mn [5] BALINESE VOWEL SIGN ULU..BALINESE VOWEL SIGN RA REPA\n if (0x1b34 <= code && code <= 0x1b3a) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x1ba8) {\n if (code < 0x1b6b) {\n if (code < 0x1b3d) {\n // Mc BALINESE VOWEL SIGN RA REPA TEDUNG\n if (0x1b3b === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n // Mn BALINESE VOWEL SIGN LA LENGA\n if (0x1b3c === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x1b42) {\n // Mc [5] BALINESE VOWEL SIGN LA LENGA TEDUNG..BALINESE VOWEL SIGN TALING REPA TEDUNG\n if (0x1b3d <= code && code <= 0x1b41) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0x1b43) {\n // Mn BALINESE VOWEL SIGN PEPET\n if (0x1b42 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc [2] BALINESE VOWEL SIGN PEPET TEDUNG..BALINESE ADEG ADEG\n if (0x1b43 <= code && code <= 0x1b44) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n }\n else {\n if (code < 0x1ba1) {\n if (code < 0x1b80) {\n // Mn [9] BALINESE MUSICAL SYMBOL COMBINING TEGEH..BALINESE MUSICAL SYMBOL COMBINING GONG\n if (0x1b6b <= code && code <= 0x1b73) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x1b82) {\n // Mn [2] SUNDANESE SIGN PANYECEK..SUNDANESE SIGN PANGLAYAR\n if (0x1b80 <= code && code <= 0x1b81) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc SUNDANESE SIGN PANGWISAD\n if (0x1b82 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n else {\n if (code < 0x1ba2) {\n // Mc SUNDANESE CONSONANT SIGN PAMINGKAL\n if (0x1ba1 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0x1ba6) {\n // Mn [4] SUNDANESE CONSONANT SIGN PANYAKRA..SUNDANESE VOWEL SIGN PANYUKU\n if (0x1ba2 <= code && code <= 0x1ba5) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc [2] SUNDANESE VOWEL SIGN PANAELAENG..SUNDANESE VOWEL SIGN PANOLONG\n if (0x1ba6 <= code && code <= 0x1ba7) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x1be8) {\n if (code < 0x1bab) {\n if (code < 0x1baa) {\n // Mn [2] SUNDANESE VOWEL SIGN PAMEPET..SUNDANESE VOWEL SIGN PANEULEUNG\n if (0x1ba8 <= code && code <= 0x1ba9) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc SUNDANESE SIGN PAMAAEH\n if (0x1baa === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n else {\n if (code < 0x1be6) {\n // Mn [3] SUNDANESE SIGN VIRAMA..SUNDANESE CONSONANT SIGN PASANGAN WA\n if (0x1bab <= code && code <= 0x1bad) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn BATAK SIGN TOMPI\n if (0x1be6 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n // Mc BATAK VOWEL SIGN E\n if (0x1be7 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n else {\n if (code < 0x1bee) {\n if (code < 0x1bea) {\n // Mn [2] BATAK VOWEL SIGN PAKPAK E..BATAK VOWEL SIGN EE\n if (0x1be8 <= code && code <= 0x1be9) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x1bed) {\n // Mc [3] BATAK VOWEL SIGN I..BATAK VOWEL SIGN O\n if (0x1bea <= code && code <= 0x1bec) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn BATAK VOWEL SIGN KARO O\n if (0x1bed === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n else {\n if (code < 0x1bef) {\n // Mc BATAK VOWEL SIGN U\n if (0x1bee === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0x1bf2) {\n // Mn [3] BATAK VOWEL SIGN U FOR SIMALUNGUN SA..BATAK CONSONANT SIGN H\n if (0x1bef <= code && code <= 0x1bf1) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc [2] BATAK PANGOLAT..BATAK PANONGONAN\n if (0x1bf2 <= code && code <= 0x1bf3) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xa952) {\n if (code < 0x2d7f) {\n if (code < 0x1cf7) {\n if (code < 0x1cd4) {\n if (code < 0x1c34) {\n if (code < 0x1c2c) {\n // Mc [8] LEPCHA SUBJOINED LETTER YA..LEPCHA VOWEL SIGN UU\n if (0x1c24 <= code && code <= 0x1c2b) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn [8] LEPCHA VOWEL SIGN E..LEPCHA CONSONANT SIGN T\n if (0x1c2c <= code && code <= 0x1c33) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0x1c36) {\n // Mc [2] LEPCHA CONSONANT SIGN NYIN-DO..LEPCHA CONSONANT SIGN KANG\n if (0x1c34 <= code && code <= 0x1c35) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0x1cd0) {\n // Mn [2] LEPCHA SIGN RAN..LEPCHA SIGN NUKTA\n if (0x1c36 <= code && code <= 0x1c37) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [3] VEDIC TONE KARSHANA..VEDIC TONE PRENKHA\n if (0x1cd0 <= code && code <= 0x1cd2) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n else {\n if (code < 0x1ce2) {\n if (code < 0x1ce1) {\n // Mn [13] VEDIC SIGN YAJURVEDIC MIDLINE SVARITA..VEDIC TONE RIGVEDIC KASHMIRI INDEPENDENT SVARITA\n if (0x1cd4 <= code && code <= 0x1ce0) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc VEDIC TONE ATHARVAVEDIC INDEPENDENT SVARITA\n if (0x1ce1 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n else {\n if (code < 0x1ced) {\n // Mn [7] VEDIC SIGN VISARGA SVARITA..VEDIC SIGN VISARGA ANUDATTA WITH TAIL\n if (0x1ce2 <= code && code <= 0x1ce8) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn VEDIC SIGN TIRYAK\n if (0x1ced === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n // Mn VEDIC TONE CANDRA ABOVE\n if (0x1cf4 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n else {\n if (code < 0x200d) {\n if (code < 0x1dc0) {\n if (code < 0x1cf8) {\n // Mc VEDIC SIGN ATIKRAMA\n if (0x1cf7 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn [2] VEDIC TONE RING ABOVE..VEDIC TONE DOUBLE RING ABOVE\n if (0x1cf8 <= code && code <= 0x1cf9) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0x200b) {\n // Mn [64] COMBINING DOTTED GRAVE ACCENT..COMBINING RIGHT ARROWHEAD AND DOWN ARROWHEAD BELOW\n if (0x1dc0 <= code && code <= 0x1dff) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Cf ZERO WIDTH SPACE\n if (0x200b === code) {\n return boundaries_1.CLUSTER_BREAK.CONTROL;\n }\n // Cf ZERO WIDTH NON-JOINER\n if (0x200c === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n else {\n if (code < 0x2060) {\n if (code < 0x200e) {\n // Cf ZERO WIDTH JOINER\n if (0x200d === code) {\n return boundaries_1.CLUSTER_BREAK.ZWJ;\n }\n }\n else {\n if (code < 0x2028) {\n // Cf [2] LEFT-TO-RIGHT MARK..RIGHT-TO-LEFT MARK\n if (0x200e <= code && code <= 0x200f) {\n return boundaries_1.CLUSTER_BREAK.CONTROL;\n }\n }\n else {\n // Zl LINE SEPARATOR\n // Zp PARAGRAPH SEPARATOR\n // Cf [5] LEFT-TO-RIGHT EMBEDDING..RIGHT-TO-LEFT OVERRIDE\n if (0x2028 <= code && code <= 0x202e) {\n return boundaries_1.CLUSTER_BREAK.CONTROL;\n }\n }\n }\n }\n else {\n if (code < 0x20d0) {\n // Cf [5] WORD JOINER..INVISIBLE PLUS\n // Cn \n // Cf [10] LEFT-TO-RIGHT ISOLATE..NOMINAL DIGIT SHAPES\n if (0x2060 <= code && code <= 0x206f) {\n return boundaries_1.CLUSTER_BREAK.CONTROL;\n }\n }\n else {\n if (code < 0x2cef) {\n // Mn [13] COMBINING LEFT HARPOON ABOVE..COMBINING FOUR DOTS ABOVE\n // Me [4] COMBINING ENCLOSING CIRCLE..COMBINING ENCLOSING CIRCLE BACKSLASH\n // Mn COMBINING LEFT RIGHT ARROW ABOVE\n // Me [3] COMBINING ENCLOSING SCREEN..COMBINING ENCLOSING UPWARD POINTING TRIANGLE\n // Mn [12] COMBINING REVERSE SOLIDUS OVERLAY..COMBINING ASTERISK ABOVE\n if (0x20d0 <= code && code <= 0x20f0) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [3] COPTIC COMBINING NI ABOVE..COPTIC COMBINING SPIRITUS LENIS\n if (0x2cef <= code && code <= 0x2cf1) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xa823) {\n if (code < 0xa674) {\n if (code < 0x302a) {\n if (code < 0x2de0) {\n // Mn TIFINAGH CONSONANT JOINER\n if (0x2d7f === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [32] COMBINING CYRILLIC LETTER BE..COMBINING CYRILLIC LETTER IOTIFIED BIG YUS\n if (0x2de0 <= code && code <= 0x2dff) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0x3099) {\n // Mn [4] IDEOGRAPHIC LEVEL TONE MARK..IDEOGRAPHIC ENTERING TONE MARK\n // Mc [2] HANGUL SINGLE DOT TONE MARK..HANGUL DOUBLE DOT TONE MARK\n if (0x302a <= code && code <= 0x302f) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0xa66f) {\n // Mn [2] COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK..COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK\n if (0x3099 <= code && code <= 0x309a) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn COMBINING CYRILLIC VZMET\n // Me [3] COMBINING CYRILLIC TEN MILLIONS SIGN..COMBINING CYRILLIC THOUSAND MILLIONS SIGN\n if (0xa66f <= code && code <= 0xa672) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n else {\n if (code < 0xa802) {\n if (code < 0xa69e) {\n // Mn [10] COMBINING CYRILLIC LETTER UKRAINIAN IE..COMBINING CYRILLIC PAYEROK\n if (0xa674 <= code && code <= 0xa67d) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0xa6f0) {\n // Mn [2] COMBINING CYRILLIC LETTER EF..COMBINING CYRILLIC LETTER IOTIFIED E\n if (0xa69e <= code && code <= 0xa69f) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [2] BAMUM COMBINING MARK KOQNDON..BAMUM COMBINING MARK TUKWENTIS\n if (0xa6f0 <= code && code <= 0xa6f1) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n else {\n if (code < 0xa806) {\n // Mn SYLOTI NAGRI SIGN DVISVARA\n if (0xa802 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn SYLOTI NAGRI SIGN HASANTA\n if (0xa806 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n // Mn SYLOTI NAGRI SIGN ANUSVARA\n if (0xa80b === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n else {\n if (code < 0xa8b4) {\n if (code < 0xa827) {\n if (code < 0xa825) {\n // Mc [2] SYLOTI NAGRI VOWEL SIGN A..SYLOTI NAGRI VOWEL SIGN I\n if (0xa823 <= code && code <= 0xa824) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn [2] SYLOTI NAGRI VOWEL SIGN U..SYLOTI NAGRI VOWEL SIGN E\n if (0xa825 <= code && code <= 0xa826) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0xa82c) {\n // Mc SYLOTI NAGRI VOWEL SIGN OO\n if (0xa827 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0xa880) {\n // Mn SYLOTI NAGRI SIGN ALTERNATE HASANTA\n if (0xa82c === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc [2] SAURASHTRA SIGN ANUSVARA..SAURASHTRA SIGN VISARGA\n if (0xa880 <= code && code <= 0xa881) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n }\n else {\n if (code < 0xa8ff) {\n if (code < 0xa8c4) {\n // Mc [16] SAURASHTRA CONSONANT SIGN HAARU..SAURASHTRA VOWEL SIGN AU\n if (0xa8b4 <= code && code <= 0xa8c3) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0xa8e0) {\n // Mn [2] SAURASHTRA SIGN VIRAMA..SAURASHTRA SIGN CANDRABINDU\n if (0xa8c4 <= code && code <= 0xa8c5) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [18] COMBINING DEVANAGARI DIGIT ZERO..COMBINING DEVANAGARI SIGN AVAGRAHA\n if (0xa8e0 <= code && code <= 0xa8f1) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n else {\n if (code < 0xa926) {\n // Mn DEVANAGARI VOWEL SIGN AY\n if (0xa8ff === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0xa947) {\n // Mn [8] KAYAH LI VOWEL UE..KAYAH LI TONE CALYA PLOPHU\n if (0xa926 <= code && code <= 0xa92d) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [11] REJANG VOWEL SIGN I..REJANG CONSONANT SIGN R\n if (0xa947 <= code && code <= 0xa951) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xaab2) {\n if (code < 0xa9e5) {\n if (code < 0xa9b4) {\n if (code < 0xa980) {\n if (code < 0xa960) {\n // Mc [2] REJANG CONSONANT SIGN H..REJANG VIRAMA\n if (0xa952 <= code && code <= 0xa953) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Lo [29] HANGUL CHOSEONG TIKEUT-MIEUM..HANGUL CHOSEONG SSANGYEORINHIEUH\n if (0xa960 <= code && code <= 0xa97c) {\n return boundaries_1.CLUSTER_BREAK.L;\n }\n }\n }\n else {\n if (code < 0xa983) {\n // Mn [3] JAVANESE SIGN PANYANGGA..JAVANESE SIGN LAYAR\n if (0xa980 <= code && code <= 0xa982) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc JAVANESE SIGN WIGNYAN\n if (0xa983 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n // Mn JAVANESE SIGN CECAK TELU\n if (0xa9b3 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n else {\n if (code < 0xa9ba) {\n if (code < 0xa9b6) {\n // Mc [2] JAVANESE VOWEL SIGN TARUNG..JAVANESE VOWEL SIGN TOLONG\n if (0xa9b4 <= code && code <= 0xa9b5) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn [4] JAVANESE VOWEL SIGN WULU..JAVANESE VOWEL SIGN SUKU MENDUT\n if (0xa9b6 <= code && code <= 0xa9b9) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0xa9bc) {\n // Mc [2] JAVANESE VOWEL SIGN TALING..JAVANESE VOWEL SIGN DIRGA MURE\n if (0xa9ba <= code && code <= 0xa9bb) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0xa9be) {\n // Mn [2] JAVANESE VOWEL SIGN PEPET..JAVANESE CONSONANT SIGN KERET\n if (0xa9bc <= code && code <= 0xa9bd) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc [3] JAVANESE CONSONANT SIGN PENGKAL..JAVANESE PANGKON\n if (0xa9be <= code && code <= 0xa9c0) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xaa35) {\n if (code < 0xaa2f) {\n if (code < 0xaa29) {\n // Mn MYANMAR SIGN SHAN SAW\n if (0xa9e5 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [6] CHAM VOWEL SIGN AA..CHAM VOWEL SIGN OE\n if (0xaa29 <= code && code <= 0xaa2e) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0xaa31) {\n // Mc [2] CHAM VOWEL SIGN O..CHAM VOWEL SIGN AI\n if (0xaa2f <= code && code <= 0xaa30) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0xaa33) {\n // Mn [2] CHAM VOWEL SIGN AU..CHAM VOWEL SIGN UE\n if (0xaa31 <= code && code <= 0xaa32) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc [2] CHAM CONSONANT SIGN YA..CHAM CONSONANT SIGN RA\n if (0xaa33 <= code && code <= 0xaa34) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n }\n else {\n if (code < 0xaa4d) {\n if (code < 0xaa43) {\n // Mn [2] CHAM CONSONANT SIGN LA..CHAM CONSONANT SIGN WA\n if (0xaa35 <= code && code <= 0xaa36) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn CHAM CONSONANT SIGN FINAL NG\n if (0xaa43 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n // Mn CHAM CONSONANT SIGN FINAL M\n if (0xaa4c === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0xaa7c) {\n // Mc CHAM CONSONANT SIGN FINAL H\n if (0xaa4d === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn MYANMAR SIGN TAI LAING TONE-2\n if (0xaa7c === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n // Mn TAI VIET MAI KANG\n if (0xaab0 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xabe6) {\n if (code < 0xaaec) {\n if (code < 0xaabe) {\n if (code < 0xaab7) {\n // Mn [3] TAI VIET VOWEL I..TAI VIET VOWEL U\n if (0xaab2 <= code && code <= 0xaab4) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [2] TAI VIET MAI KHIT..TAI VIET VOWEL IA\n if (0xaab7 <= code && code <= 0xaab8) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0xaac1) {\n // Mn [2] TAI VIET VOWEL AM..TAI VIET TONE MAI EK\n if (0xaabe <= code && code <= 0xaabf) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn TAI VIET TONE MAI THO\n if (0xaac1 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n // Mc MEETEI MAYEK VOWEL SIGN II\n if (0xaaeb === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n else {\n if (code < 0xaaf6) {\n if (code < 0xaaee) {\n // Mn [2] MEETEI MAYEK VOWEL SIGN UU..MEETEI MAYEK VOWEL SIGN AAI\n if (0xaaec <= code && code <= 0xaaed) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0xaaf5) {\n // Mc [2] MEETEI MAYEK VOWEL SIGN AU..MEETEI MAYEK VOWEL SIGN AAU\n if (0xaaee <= code && code <= 0xaaef) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mc MEETEI MAYEK VOWEL SIGN VISARGA\n if (0xaaf5 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n else {\n if (code < 0xabe3) {\n // Mn MEETEI MAYEK VIRAMA\n if (0xaaf6 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0xabe5) {\n // Mc [2] MEETEI MAYEK VOWEL SIGN ONAP..MEETEI MAYEK VOWEL SIGN INAP\n if (0xabe3 <= code && code <= 0xabe4) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn MEETEI MAYEK VOWEL SIGN ANAP\n if (0xabe5 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xac00) {\n if (code < 0xabe9) {\n if (code < 0xabe8) {\n // Mc [2] MEETEI MAYEK VOWEL SIGN YENAP..MEETEI MAYEK VOWEL SIGN SOUNAP\n if (0xabe6 <= code && code <= 0xabe7) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn MEETEI MAYEK VOWEL SIGN UNAP\n if (0xabe8 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0xabec) {\n // Mc [2] MEETEI MAYEK VOWEL SIGN CHEINAP..MEETEI MAYEK VOWEL SIGN NUNG\n if (0xabe9 <= code && code <= 0xabea) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mc MEETEI MAYEK LUM IYEK\n if (0xabec === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n // Mn MEETEI MAYEK APUN IYEK\n if (0xabed === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n else {\n if (code < 0xac1d) {\n if (code < 0xac01) {\n // Lo HANGUL SYLLABLE GA\n if (0xac00 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xac1c) {\n // Lo [27] HANGUL SYLLABLE GAG..HANGUL SYLLABLE GAH\n if (0xac01 <= code && code <= 0xac1b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE GAE\n if (0xac1c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n else {\n if (code < 0xac38) {\n // Lo [27] HANGUL SYLLABLE GAEG..HANGUL SYLLABLE GAEH\n if (0xac1d <= code && code <= 0xac37) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xac39) {\n // Lo HANGUL SYLLABLE GYA\n if (0xac38 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE GYAG..HANGUL SYLLABLE GYAH\n if (0xac39 <= code && code <= 0xac53) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xb5a1) {\n if (code < 0xb0ed) {\n if (code < 0xaea0) {\n if (code < 0xad6d) {\n if (code < 0xace0) {\n if (code < 0xac8d) {\n if (code < 0xac70) {\n if (code < 0xac55) {\n // Lo HANGUL SYLLABLE GYAE\n if (0xac54 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE GYAEG..HANGUL SYLLABLE GYAEH\n if (0xac55 <= code && code <= 0xac6f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xac71) {\n // Lo HANGUL SYLLABLE GEO\n if (0xac70 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xac8c) {\n // Lo [27] HANGUL SYLLABLE GEOG..HANGUL SYLLABLE GEOH\n if (0xac71 <= code && code <= 0xac8b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE GE\n if (0xac8c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xaca9) {\n if (code < 0xaca8) {\n // Lo [27] HANGUL SYLLABLE GEG..HANGUL SYLLABLE GEH\n if (0xac8d <= code && code <= 0xaca7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE GYEO\n if (0xaca8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xacc4) {\n // Lo [27] HANGUL SYLLABLE GYEOG..HANGUL SYLLABLE GYEOH\n if (0xaca9 <= code && code <= 0xacc3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xacc5) {\n // Lo HANGUL SYLLABLE GYE\n if (0xacc4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE GYEG..HANGUL SYLLABLE GYEH\n if (0xacc5 <= code && code <= 0xacdf) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xad19) {\n if (code < 0xacfc) {\n if (code < 0xace1) {\n // Lo HANGUL SYLLABLE GO\n if (0xace0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE GOG..HANGUL SYLLABLE GOH\n if (0xace1 <= code && code <= 0xacfb) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xacfd) {\n // Lo HANGUL SYLLABLE GWA\n if (0xacfc === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xad18) {\n // Lo [27] HANGUL SYLLABLE GWAG..HANGUL SYLLABLE GWAH\n if (0xacfd <= code && code <= 0xad17) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE GWAE\n if (0xad18 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xad50) {\n if (code < 0xad34) {\n // Lo [27] HANGUL SYLLABLE GWAEG..HANGUL SYLLABLE GWAEH\n if (0xad19 <= code && code <= 0xad33) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xad35) {\n // Lo HANGUL SYLLABLE GOE\n if (0xad34 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE GOEG..HANGUL SYLLABLE GOEH\n if (0xad35 <= code && code <= 0xad4f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n else {\n if (code < 0xad51) {\n // Lo HANGUL SYLLABLE GYO\n if (0xad50 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xad6c) {\n // Lo [27] HANGUL SYLLABLE GYOG..HANGUL SYLLABLE GYOH\n if (0xad51 <= code && code <= 0xad6b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE GU\n if (0xad6c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xadf9) {\n if (code < 0xadc0) {\n if (code < 0xad89) {\n if (code < 0xad88) {\n // Lo [27] HANGUL SYLLABLE GUG..HANGUL SYLLABLE GUH\n if (0xad6d <= code && code <= 0xad87) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE GWEO\n if (0xad88 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xada4) {\n // Lo [27] HANGUL SYLLABLE GWEOG..HANGUL SYLLABLE GWEOH\n if (0xad89 <= code && code <= 0xada3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xada5) {\n // Lo HANGUL SYLLABLE GWE\n if (0xada4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE GWEG..HANGUL SYLLABLE GWEH\n if (0xada5 <= code && code <= 0xadbf) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xaddc) {\n if (code < 0xadc1) {\n // Lo HANGUL SYLLABLE GWI\n if (0xadc0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE GWIG..HANGUL SYLLABLE GWIH\n if (0xadc1 <= code && code <= 0xaddb) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xaddd) {\n // Lo HANGUL SYLLABLE GYU\n if (0xaddc === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xadf8) {\n // Lo [27] HANGUL SYLLABLE GYUG..HANGUL SYLLABLE GYUH\n if (0xaddd <= code && code <= 0xadf7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE GEU\n if (0xadf8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xae4c) {\n if (code < 0xae15) {\n if (code < 0xae14) {\n // Lo [27] HANGUL SYLLABLE GEUG..HANGUL SYLLABLE GEUH\n if (0xadf9 <= code && code <= 0xae13) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE GYI\n if (0xae14 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xae30) {\n // Lo [27] HANGUL SYLLABLE GYIG..HANGUL SYLLABLE GYIH\n if (0xae15 <= code && code <= 0xae2f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xae31) {\n // Lo HANGUL SYLLABLE GI\n if (0xae30 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE GIG..HANGUL SYLLABLE GIH\n if (0xae31 <= code && code <= 0xae4b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xae69) {\n if (code < 0xae4d) {\n // Lo HANGUL SYLLABLE GGA\n if (0xae4c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xae68) {\n // Lo [27] HANGUL SYLLABLE GGAG..HANGUL SYLLABLE GGAH\n if (0xae4d <= code && code <= 0xae67) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE GGAE\n if (0xae68 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n else {\n if (code < 0xae84) {\n // Lo [27] HANGUL SYLLABLE GGAEG..HANGUL SYLLABLE GGAEH\n if (0xae69 <= code && code <= 0xae83) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xae85) {\n // Lo HANGUL SYLLABLE GGYA\n if (0xae84 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE GGYAG..HANGUL SYLLABLE GGYAH\n if (0xae85 <= code && code <= 0xae9f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xafb9) {\n if (code < 0xaf2c) {\n if (code < 0xaed9) {\n if (code < 0xaebc) {\n if (code < 0xaea1) {\n // Lo HANGUL SYLLABLE GGYAE\n if (0xaea0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE GGYAEG..HANGUL SYLLABLE GGYAEH\n if (0xaea1 <= code && code <= 0xaebb) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xaebd) {\n // Lo HANGUL SYLLABLE GGEO\n if (0xaebc === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xaed8) {\n // Lo [27] HANGUL SYLLABLE GGEOG..HANGUL SYLLABLE GGEOH\n if (0xaebd <= code && code <= 0xaed7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE GGE\n if (0xaed8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xaef5) {\n if (code < 0xaef4) {\n // Lo [27] HANGUL SYLLABLE GGEG..HANGUL SYLLABLE GGEH\n if (0xaed9 <= code && code <= 0xaef3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE GGYEO\n if (0xaef4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xaf10) {\n // Lo [27] HANGUL SYLLABLE GGYEOG..HANGUL SYLLABLE GGYEOH\n if (0xaef5 <= code && code <= 0xaf0f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xaf11) {\n // Lo HANGUL SYLLABLE GGYE\n if (0xaf10 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE GGYEG..HANGUL SYLLABLE GGYEH\n if (0xaf11 <= code && code <= 0xaf2b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xaf65) {\n if (code < 0xaf48) {\n if (code < 0xaf2d) {\n // Lo HANGUL SYLLABLE GGO\n if (0xaf2c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE GGOG..HANGUL SYLLABLE GGOH\n if (0xaf2d <= code && code <= 0xaf47) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xaf49) {\n // Lo HANGUL SYLLABLE GGWA\n if (0xaf48 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xaf64) {\n // Lo [27] HANGUL SYLLABLE GGWAG..HANGUL SYLLABLE GGWAH\n if (0xaf49 <= code && code <= 0xaf63) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE GGWAE\n if (0xaf64 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xaf9c) {\n if (code < 0xaf80) {\n // Lo [27] HANGUL SYLLABLE GGWAEG..HANGUL SYLLABLE GGWAEH\n if (0xaf65 <= code && code <= 0xaf7f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xaf81) {\n // Lo HANGUL SYLLABLE GGOE\n if (0xaf80 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE GGOEG..HANGUL SYLLABLE GGOEH\n if (0xaf81 <= code && code <= 0xaf9b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n else {\n if (code < 0xaf9d) {\n // Lo HANGUL SYLLABLE GGYO\n if (0xaf9c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xafb8) {\n // Lo [27] HANGUL SYLLABLE GGYOG..HANGUL SYLLABLE GGYOH\n if (0xaf9d <= code && code <= 0xafb7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE GGU\n if (0xafb8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xb060) {\n if (code < 0xb00c) {\n if (code < 0xafd5) {\n if (code < 0xafd4) {\n // Lo [27] HANGUL SYLLABLE GGUG..HANGUL SYLLABLE GGUH\n if (0xafb9 <= code && code <= 0xafd3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE GGWEO\n if (0xafd4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xaff0) {\n // Lo [27] HANGUL SYLLABLE GGWEOG..HANGUL SYLLABLE GGWEOH\n if (0xafd5 <= code && code <= 0xafef) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xaff1) {\n // Lo HANGUL SYLLABLE GGWE\n if (0xaff0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE GGWEG..HANGUL SYLLABLE GGWEH\n if (0xaff1 <= code && code <= 0xb00b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xb029) {\n if (code < 0xb00d) {\n // Lo HANGUL SYLLABLE GGWI\n if (0xb00c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xb028) {\n // Lo [27] HANGUL SYLLABLE GGWIG..HANGUL SYLLABLE GGWIH\n if (0xb00d <= code && code <= 0xb027) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE GGYU\n if (0xb028 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n else {\n if (code < 0xb044) {\n // Lo [27] HANGUL SYLLABLE GGYUG..HANGUL SYLLABLE GGYUH\n if (0xb029 <= code && code <= 0xb043) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xb045) {\n // Lo HANGUL SYLLABLE GGEU\n if (0xb044 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE GGEUG..HANGUL SYLLABLE GGEUH\n if (0xb045 <= code && code <= 0xb05f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xb099) {\n if (code < 0xb07c) {\n if (code < 0xb061) {\n // Lo HANGUL SYLLABLE GGYI\n if (0xb060 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE GGYIG..HANGUL SYLLABLE GGYIH\n if (0xb061 <= code && code <= 0xb07b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xb07d) {\n // Lo HANGUL SYLLABLE GGI\n if (0xb07c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xb098) {\n // Lo [27] HANGUL SYLLABLE GGIG..HANGUL SYLLABLE GGIH\n if (0xb07d <= code && code <= 0xb097) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE NA\n if (0xb098 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xb0d0) {\n if (code < 0xb0b4) {\n // Lo [27] HANGUL SYLLABLE NAG..HANGUL SYLLABLE NAH\n if (0xb099 <= code && code <= 0xb0b3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xb0b5) {\n // Lo HANGUL SYLLABLE NAE\n if (0xb0b4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE NAEG..HANGUL SYLLABLE NAEH\n if (0xb0b5 <= code && code <= 0xb0cf) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n else {\n if (code < 0xb0d1) {\n // Lo HANGUL SYLLABLE NYA\n if (0xb0d0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xb0ec) {\n // Lo [27] HANGUL SYLLABLE NYAG..HANGUL SYLLABLE NYAH\n if (0xb0d1 <= code && code <= 0xb0eb) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE NYAE\n if (0xb0ec === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xb354) {\n if (code < 0xb220) {\n if (code < 0xb179) {\n if (code < 0xb140) {\n if (code < 0xb109) {\n if (code < 0xb108) {\n // Lo [27] HANGUL SYLLABLE NYAEG..HANGUL SYLLABLE NYAEH\n if (0xb0ed <= code && code <= 0xb107) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE NEO\n if (0xb108 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xb124) {\n // Lo [27] HANGUL SYLLABLE NEOG..HANGUL SYLLABLE NEOH\n if (0xb109 <= code && code <= 0xb123) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xb125) {\n // Lo HANGUL SYLLABLE NE\n if (0xb124 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE NEG..HANGUL SYLLABLE NEH\n if (0xb125 <= code && code <= 0xb13f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xb15c) {\n if (code < 0xb141) {\n // Lo HANGUL SYLLABLE NYEO\n if (0xb140 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE NYEOG..HANGUL SYLLABLE NYEOH\n if (0xb141 <= code && code <= 0xb15b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xb15d) {\n // Lo HANGUL SYLLABLE NYE\n if (0xb15c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xb178) {\n // Lo [27] HANGUL SYLLABLE NYEG..HANGUL SYLLABLE NYEH\n if (0xb15d <= code && code <= 0xb177) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE NO\n if (0xb178 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xb1cc) {\n if (code < 0xb195) {\n if (code < 0xb194) {\n // Lo [27] HANGUL SYLLABLE NOG..HANGUL SYLLABLE NOH\n if (0xb179 <= code && code <= 0xb193) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE NWA\n if (0xb194 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xb1b0) {\n // Lo [27] HANGUL SYLLABLE NWAG..HANGUL SYLLABLE NWAH\n if (0xb195 <= code && code <= 0xb1af) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xb1b1) {\n // Lo HANGUL SYLLABLE NWAE\n if (0xb1b0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE NWAEG..HANGUL SYLLABLE NWAEH\n if (0xb1b1 <= code && code <= 0xb1cb) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xb1e9) {\n if (code < 0xb1cd) {\n // Lo HANGUL SYLLABLE NOE\n if (0xb1cc === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xb1e8) {\n // Lo [27] HANGUL SYLLABLE NOEG..HANGUL SYLLABLE NOEH\n if (0xb1cd <= code && code <= 0xb1e7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE NYO\n if (0xb1e8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n else {\n if (code < 0xb204) {\n // Lo [27] HANGUL SYLLABLE NYOG..HANGUL SYLLABLE NYOH\n if (0xb1e9 <= code && code <= 0xb203) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xb205) {\n // Lo HANGUL SYLLABLE NU\n if (0xb204 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE NUG..HANGUL SYLLABLE NUH\n if (0xb205 <= code && code <= 0xb21f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xb2ad) {\n if (code < 0xb259) {\n if (code < 0xb23c) {\n if (code < 0xb221) {\n // Lo HANGUL SYLLABLE NWEO\n if (0xb220 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE NWEOG..HANGUL SYLLABLE NWEOH\n if (0xb221 <= code && code <= 0xb23b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xb23d) {\n // Lo HANGUL SYLLABLE NWE\n if (0xb23c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xb258) {\n // Lo [27] HANGUL SYLLABLE NWEG..HANGUL SYLLABLE NWEH\n if (0xb23d <= code && code <= 0xb257) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE NWI\n if (0xb258 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xb290) {\n if (code < 0xb274) {\n // Lo [27] HANGUL SYLLABLE NWIG..HANGUL SYLLABLE NWIH\n if (0xb259 <= code && code <= 0xb273) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xb275) {\n // Lo HANGUL SYLLABLE NYU\n if (0xb274 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE NYUG..HANGUL SYLLABLE NYUH\n if (0xb275 <= code && code <= 0xb28f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n else {\n if (code < 0xb291) {\n // Lo HANGUL SYLLABLE NEU\n if (0xb290 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xb2ac) {\n // Lo [27] HANGUL SYLLABLE NEUG..HANGUL SYLLABLE NEUH\n if (0xb291 <= code && code <= 0xb2ab) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE NYI\n if (0xb2ac === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xb300) {\n if (code < 0xb2c9) {\n if (code < 0xb2c8) {\n // Lo [27] HANGUL SYLLABLE NYIG..HANGUL SYLLABLE NYIH\n if (0xb2ad <= code && code <= 0xb2c7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE NI\n if (0xb2c8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xb2e4) {\n // Lo [27] HANGUL SYLLABLE NIG..HANGUL SYLLABLE NIH\n if (0xb2c9 <= code && code <= 0xb2e3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xb2e5) {\n // Lo HANGUL SYLLABLE DA\n if (0xb2e4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE DAG..HANGUL SYLLABLE DAH\n if (0xb2e5 <= code && code <= 0xb2ff) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xb31d) {\n if (code < 0xb301) {\n // Lo HANGUL SYLLABLE DAE\n if (0xb300 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xb31c) {\n // Lo [27] HANGUL SYLLABLE DAEG..HANGUL SYLLABLE DAEH\n if (0xb301 <= code && code <= 0xb31b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE DYA\n if (0xb31c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n else {\n if (code < 0xb338) {\n // Lo [27] HANGUL SYLLABLE DYAG..HANGUL SYLLABLE DYAH\n if (0xb31d <= code && code <= 0xb337) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xb339) {\n // Lo HANGUL SYLLABLE DYAE\n if (0xb338 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE DYAEG..HANGUL SYLLABLE DYAEH\n if (0xb339 <= code && code <= 0xb353) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xb46d) {\n if (code < 0xb3e0) {\n if (code < 0xb38d) {\n if (code < 0xb370) {\n if (code < 0xb355) {\n // Lo HANGUL SYLLABLE DEO\n if (0xb354 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE DEOG..HANGUL SYLLABLE DEOH\n if (0xb355 <= code && code <= 0xb36f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xb371) {\n // Lo HANGUL SYLLABLE DE\n if (0xb370 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xb38c) {\n // Lo [27] HANGUL SYLLABLE DEG..HANGUL SYLLABLE DEH\n if (0xb371 <= code && code <= 0xb38b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE DYEO\n if (0xb38c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xb3a9) {\n if (code < 0xb3a8) {\n // Lo [27] HANGUL SYLLABLE DYEOG..HANGUL SYLLABLE DYEOH\n if (0xb38d <= code && code <= 0xb3a7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE DYE\n if (0xb3a8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xb3c4) {\n // Lo [27] HANGUL SYLLABLE DYEG..HANGUL SYLLABLE DYEH\n if (0xb3a9 <= code && code <= 0xb3c3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xb3c5) {\n // Lo HANGUL SYLLABLE DO\n if (0xb3c4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE DOG..HANGUL SYLLABLE DOH\n if (0xb3c5 <= code && code <= 0xb3df) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xb419) {\n if (code < 0xb3fc) {\n if (code < 0xb3e1) {\n // Lo HANGUL SYLLABLE DWA\n if (0xb3e0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE DWAG..HANGUL SYLLABLE DWAH\n if (0xb3e1 <= code && code <= 0xb3fb) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xb3fd) {\n // Lo HANGUL SYLLABLE DWAE\n if (0xb3fc === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xb418) {\n // Lo [27] HANGUL SYLLABLE DWAEG..HANGUL SYLLABLE DWAEH\n if (0xb3fd <= code && code <= 0xb417) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE DOE\n if (0xb418 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xb450) {\n if (code < 0xb434) {\n // Lo [27] HANGUL SYLLABLE DOEG..HANGUL SYLLABLE DOEH\n if (0xb419 <= code && code <= 0xb433) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xb435) {\n // Lo HANGUL SYLLABLE DYO\n if (0xb434 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE DYOG..HANGUL SYLLABLE DYOH\n if (0xb435 <= code && code <= 0xb44f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n else {\n if (code < 0xb451) {\n // Lo HANGUL SYLLABLE DU\n if (0xb450 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xb46c) {\n // Lo [27] HANGUL SYLLABLE DUG..HANGUL SYLLABLE DUH\n if (0xb451 <= code && code <= 0xb46b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE DWEO\n if (0xb46c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xb514) {\n if (code < 0xb4c0) {\n if (code < 0xb489) {\n if (code < 0xb488) {\n // Lo [27] HANGUL SYLLABLE DWEOG..HANGUL SYLLABLE DWEOH\n if (0xb46d <= code && code <= 0xb487) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE DWE\n if (0xb488 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xb4a4) {\n // Lo [27] HANGUL SYLLABLE DWEG..HANGUL SYLLABLE DWEH\n if (0xb489 <= code && code <= 0xb4a3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xb4a5) {\n // Lo HANGUL SYLLABLE DWI\n if (0xb4a4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE DWIG..HANGUL SYLLABLE DWIH\n if (0xb4a5 <= code && code <= 0xb4bf) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xb4dd) {\n if (code < 0xb4c1) {\n // Lo HANGUL SYLLABLE DYU\n if (0xb4c0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xb4dc) {\n // Lo [27] HANGUL SYLLABLE DYUG..HANGUL SYLLABLE DYUH\n if (0xb4c1 <= code && code <= 0xb4db) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE DEU\n if (0xb4dc === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n else {\n if (code < 0xb4f8) {\n // Lo [27] HANGUL SYLLABLE DEUG..HANGUL SYLLABLE DEUH\n if (0xb4dd <= code && code <= 0xb4f7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xb4f9) {\n // Lo HANGUL SYLLABLE DYI\n if (0xb4f8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE DYIG..HANGUL SYLLABLE DYIH\n if (0xb4f9 <= code && code <= 0xb513) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xb54d) {\n if (code < 0xb530) {\n if (code < 0xb515) {\n // Lo HANGUL SYLLABLE DI\n if (0xb514 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE DIG..HANGUL SYLLABLE DIH\n if (0xb515 <= code && code <= 0xb52f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xb531) {\n // Lo HANGUL SYLLABLE DDA\n if (0xb530 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xb54c) {\n // Lo [27] HANGUL SYLLABLE DDAG..HANGUL SYLLABLE DDAH\n if (0xb531 <= code && code <= 0xb54b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE DDAE\n if (0xb54c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xb584) {\n if (code < 0xb568) {\n // Lo [27] HANGUL SYLLABLE DDAEG..HANGUL SYLLABLE DDAEH\n if (0xb54d <= code && code <= 0xb567) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xb569) {\n // Lo HANGUL SYLLABLE DDYA\n if (0xb568 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE DDYAG..HANGUL SYLLABLE DDYAH\n if (0xb569 <= code && code <= 0xb583) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n else {\n if (code < 0xb585) {\n // Lo HANGUL SYLLABLE DDYAE\n if (0xb584 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xb5a0) {\n // Lo [27] HANGUL SYLLABLE DDYAEG..HANGUL SYLLABLE DDYAEH\n if (0xb585 <= code && code <= 0xb59f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE DDEO\n if (0xb5a0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xba55) {\n if (code < 0xb808) {\n if (code < 0xb6d4) {\n if (code < 0xb62d) {\n if (code < 0xb5f4) {\n if (code < 0xb5bd) {\n if (code < 0xb5bc) {\n // Lo [27] HANGUL SYLLABLE DDEOG..HANGUL SYLLABLE DDEOH\n if (0xb5a1 <= code && code <= 0xb5bb) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE DDE\n if (0xb5bc === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xb5d8) {\n // Lo [27] HANGUL SYLLABLE DDEG..HANGUL SYLLABLE DDEH\n if (0xb5bd <= code && code <= 0xb5d7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xb5d9) {\n // Lo HANGUL SYLLABLE DDYEO\n if (0xb5d8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE DDYEOG..HANGUL SYLLABLE DDYEOH\n if (0xb5d9 <= code && code <= 0xb5f3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xb610) {\n if (code < 0xb5f5) {\n // Lo HANGUL SYLLABLE DDYE\n if (0xb5f4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE DDYEG..HANGUL SYLLABLE DDYEH\n if (0xb5f5 <= code && code <= 0xb60f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xb611) {\n // Lo HANGUL SYLLABLE DDO\n if (0xb610 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xb62c) {\n // Lo [27] HANGUL SYLLABLE DDOG..HANGUL SYLLABLE DDOH\n if (0xb611 <= code && code <= 0xb62b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE DDWA\n if (0xb62c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xb680) {\n if (code < 0xb649) {\n if (code < 0xb648) {\n // Lo [27] HANGUL SYLLABLE DDWAG..HANGUL SYLLABLE DDWAH\n if (0xb62d <= code && code <= 0xb647) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE DDWAE\n if (0xb648 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xb664) {\n // Lo [27] HANGUL SYLLABLE DDWAEG..HANGUL SYLLABLE DDWAEH\n if (0xb649 <= code && code <= 0xb663) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xb665) {\n // Lo HANGUL SYLLABLE DDOE\n if (0xb664 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE DDOEG..HANGUL SYLLABLE DDOEH\n if (0xb665 <= code && code <= 0xb67f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xb69d) {\n if (code < 0xb681) {\n // Lo HANGUL SYLLABLE DDYO\n if (0xb680 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xb69c) {\n // Lo [27] HANGUL SYLLABLE DDYOG..HANGUL SYLLABLE DDYOH\n if (0xb681 <= code && code <= 0xb69b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE DDU\n if (0xb69c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n else {\n if (code < 0xb6b8) {\n // Lo [27] HANGUL SYLLABLE DDUG..HANGUL SYLLABLE DDUH\n if (0xb69d <= code && code <= 0xb6b7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xb6b9) {\n // Lo HANGUL SYLLABLE DDWEO\n if (0xb6b8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE DDWEOG..HANGUL SYLLABLE DDWEOH\n if (0xb6b9 <= code && code <= 0xb6d3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xb761) {\n if (code < 0xb70d) {\n if (code < 0xb6f0) {\n if (code < 0xb6d5) {\n // Lo HANGUL SYLLABLE DDWE\n if (0xb6d4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE DDWEG..HANGUL SYLLABLE DDWEH\n if (0xb6d5 <= code && code <= 0xb6ef) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xb6f1) {\n // Lo HANGUL SYLLABLE DDWI\n if (0xb6f0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xb70c) {\n // Lo [27] HANGUL SYLLABLE DDWIG..HANGUL SYLLABLE DDWIH\n if (0xb6f1 <= code && code <= 0xb70b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE DDYU\n if (0xb70c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xb744) {\n if (code < 0xb728) {\n // Lo [27] HANGUL SYLLABLE DDYUG..HANGUL SYLLABLE DDYUH\n if (0xb70d <= code && code <= 0xb727) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xb729) {\n // Lo HANGUL SYLLABLE DDEU\n if (0xb728 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE DDEUG..HANGUL SYLLABLE DDEUH\n if (0xb729 <= code && code <= 0xb743) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n else {\n if (code < 0xb745) {\n // Lo HANGUL SYLLABLE DDYI\n if (0xb744 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xb760) {\n // Lo [27] HANGUL SYLLABLE DDYIG..HANGUL SYLLABLE DDYIH\n if (0xb745 <= code && code <= 0xb75f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE DDI\n if (0xb760 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xb7b4) {\n if (code < 0xb77d) {\n if (code < 0xb77c) {\n // Lo [27] HANGUL SYLLABLE DDIG..HANGUL SYLLABLE DDIH\n if (0xb761 <= code && code <= 0xb77b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE RA\n if (0xb77c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xb798) {\n // Lo [27] HANGUL SYLLABLE RAG..HANGUL SYLLABLE RAH\n if (0xb77d <= code && code <= 0xb797) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xb799) {\n // Lo HANGUL SYLLABLE RAE\n if (0xb798 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE RAEG..HANGUL SYLLABLE RAEH\n if (0xb799 <= code && code <= 0xb7b3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xb7d1) {\n if (code < 0xb7b5) {\n // Lo HANGUL SYLLABLE RYA\n if (0xb7b4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xb7d0) {\n // Lo [27] HANGUL SYLLABLE RYAG..HANGUL SYLLABLE RYAH\n if (0xb7b5 <= code && code <= 0xb7cf) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE RYAE\n if (0xb7d0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n else {\n if (code < 0xb7ec) {\n // Lo [27] HANGUL SYLLABLE RYAEG..HANGUL SYLLABLE RYAEH\n if (0xb7d1 <= code && code <= 0xb7eb) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xb7ed) {\n // Lo HANGUL SYLLABLE REO\n if (0xb7ec === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE REOG..HANGUL SYLLABLE REOH\n if (0xb7ed <= code && code <= 0xb807) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xb921) {\n if (code < 0xb894) {\n if (code < 0xb841) {\n if (code < 0xb824) {\n if (code < 0xb809) {\n // Lo HANGUL SYLLABLE RE\n if (0xb808 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE REG..HANGUL SYLLABLE REH\n if (0xb809 <= code && code <= 0xb823) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xb825) {\n // Lo HANGUL SYLLABLE RYEO\n if (0xb824 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xb840) {\n // Lo [27] HANGUL SYLLABLE RYEOG..HANGUL SYLLABLE RYEOH\n if (0xb825 <= code && code <= 0xb83f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE RYE\n if (0xb840 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xb85d) {\n if (code < 0xb85c) {\n // Lo [27] HANGUL SYLLABLE RYEG..HANGUL SYLLABLE RYEH\n if (0xb841 <= code && code <= 0xb85b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE RO\n if (0xb85c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xb878) {\n // Lo [27] HANGUL SYLLABLE ROG..HANGUL SYLLABLE ROH\n if (0xb85d <= code && code <= 0xb877) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xb879) {\n // Lo HANGUL SYLLABLE RWA\n if (0xb878 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE RWAG..HANGUL SYLLABLE RWAH\n if (0xb879 <= code && code <= 0xb893) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xb8cd) {\n if (code < 0xb8b0) {\n if (code < 0xb895) {\n // Lo HANGUL SYLLABLE RWAE\n if (0xb894 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE RWAEG..HANGUL SYLLABLE RWAEH\n if (0xb895 <= code && code <= 0xb8af) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xb8b1) {\n // Lo HANGUL SYLLABLE ROE\n if (0xb8b0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xb8cc) {\n // Lo [27] HANGUL SYLLABLE ROEG..HANGUL SYLLABLE ROEH\n if (0xb8b1 <= code && code <= 0xb8cb) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE RYO\n if (0xb8cc === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xb904) {\n if (code < 0xb8e8) {\n // Lo [27] HANGUL SYLLABLE RYOG..HANGUL SYLLABLE RYOH\n if (0xb8cd <= code && code <= 0xb8e7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xb8e9) {\n // Lo HANGUL SYLLABLE RU\n if (0xb8e8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE RUG..HANGUL SYLLABLE RUH\n if (0xb8e9 <= code && code <= 0xb903) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n else {\n if (code < 0xb905) {\n // Lo HANGUL SYLLABLE RWEO\n if (0xb904 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xb920) {\n // Lo [27] HANGUL SYLLABLE RWEOG..HANGUL SYLLABLE RWEOH\n if (0xb905 <= code && code <= 0xb91f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE RWE\n if (0xb920 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xb9c8) {\n if (code < 0xb974) {\n if (code < 0xb93d) {\n if (code < 0xb93c) {\n // Lo [27] HANGUL SYLLABLE RWEG..HANGUL SYLLABLE RWEH\n if (0xb921 <= code && code <= 0xb93b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE RWI\n if (0xb93c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xb958) {\n // Lo [27] HANGUL SYLLABLE RWIG..HANGUL SYLLABLE RWIH\n if (0xb93d <= code && code <= 0xb957) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xb959) {\n // Lo HANGUL SYLLABLE RYU\n if (0xb958 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE RYUG..HANGUL SYLLABLE RYUH\n if (0xb959 <= code && code <= 0xb973) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xb991) {\n if (code < 0xb975) {\n // Lo HANGUL SYLLABLE REU\n if (0xb974 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xb990) {\n // Lo [27] HANGUL SYLLABLE REUG..HANGUL SYLLABLE REUH\n if (0xb975 <= code && code <= 0xb98f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE RYI\n if (0xb990 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n else {\n if (code < 0xb9ac) {\n // Lo [27] HANGUL SYLLABLE RYIG..HANGUL SYLLABLE RYIH\n if (0xb991 <= code && code <= 0xb9ab) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xb9ad) {\n // Lo HANGUL SYLLABLE RI\n if (0xb9ac === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE RIG..HANGUL SYLLABLE RIH\n if (0xb9ad <= code && code <= 0xb9c7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xba01) {\n if (code < 0xb9e4) {\n if (code < 0xb9c9) {\n // Lo HANGUL SYLLABLE MA\n if (0xb9c8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE MAG..HANGUL SYLLABLE MAH\n if (0xb9c9 <= code && code <= 0xb9e3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xb9e5) {\n // Lo HANGUL SYLLABLE MAE\n if (0xb9e4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xba00) {\n // Lo [27] HANGUL SYLLABLE MAEG..HANGUL SYLLABLE MAEH\n if (0xb9e5 <= code && code <= 0xb9ff) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE MYA\n if (0xba00 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xba38) {\n if (code < 0xba1c) {\n // Lo [27] HANGUL SYLLABLE MYAG..HANGUL SYLLABLE MYAH\n if (0xba01 <= code && code <= 0xba1b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xba1d) {\n // Lo HANGUL SYLLABLE MYAE\n if (0xba1c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE MYAEG..HANGUL SYLLABLE MYAEH\n if (0xba1d <= code && code <= 0xba37) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n else {\n if (code < 0xba39) {\n // Lo HANGUL SYLLABLE MEO\n if (0xba38 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xba54) {\n // Lo [27] HANGUL SYLLABLE MEOG..HANGUL SYLLABLE MEOH\n if (0xba39 <= code && code <= 0xba53) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE ME\n if (0xba54 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xbcbc) {\n if (code < 0xbb88) {\n if (code < 0xbae1) {\n if (code < 0xbaa8) {\n if (code < 0xba71) {\n if (code < 0xba70) {\n // Lo [27] HANGUL SYLLABLE MEG..HANGUL SYLLABLE MEH\n if (0xba55 <= code && code <= 0xba6f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE MYEO\n if (0xba70 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xba8c) {\n // Lo [27] HANGUL SYLLABLE MYEOG..HANGUL SYLLABLE MYEOH\n if (0xba71 <= code && code <= 0xba8b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xba8d) {\n // Lo HANGUL SYLLABLE MYE\n if (0xba8c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE MYEG..HANGUL SYLLABLE MYEH\n if (0xba8d <= code && code <= 0xbaa7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xbac4) {\n if (code < 0xbaa9) {\n // Lo HANGUL SYLLABLE MO\n if (0xbaa8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE MOG..HANGUL SYLLABLE MOH\n if (0xbaa9 <= code && code <= 0xbac3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xbac5) {\n // Lo HANGUL SYLLABLE MWA\n if (0xbac4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xbae0) {\n // Lo [27] HANGUL SYLLABLE MWAG..HANGUL SYLLABLE MWAH\n if (0xbac5 <= code && code <= 0xbadf) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE MWAE\n if (0xbae0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xbb34) {\n if (code < 0xbafd) {\n if (code < 0xbafc) {\n // Lo [27] HANGUL SYLLABLE MWAEG..HANGUL SYLLABLE MWAEH\n if (0xbae1 <= code && code <= 0xbafb) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE MOE\n if (0xbafc === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xbb18) {\n // Lo [27] HANGUL SYLLABLE MOEG..HANGUL SYLLABLE MOEH\n if (0xbafd <= code && code <= 0xbb17) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xbb19) {\n // Lo HANGUL SYLLABLE MYO\n if (0xbb18 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE MYOG..HANGUL SYLLABLE MYOH\n if (0xbb19 <= code && code <= 0xbb33) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xbb51) {\n if (code < 0xbb35) {\n // Lo HANGUL SYLLABLE MU\n if (0xbb34 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xbb50) {\n // Lo [27] HANGUL SYLLABLE MUG..HANGUL SYLLABLE MUH\n if (0xbb35 <= code && code <= 0xbb4f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE MWEO\n if (0xbb50 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n else {\n if (code < 0xbb6c) {\n // Lo [27] HANGUL SYLLABLE MWEOG..HANGUL SYLLABLE MWEOH\n if (0xbb51 <= code && code <= 0xbb6b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xbb6d) {\n // Lo HANGUL SYLLABLE MWE\n if (0xbb6c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE MWEG..HANGUL SYLLABLE MWEH\n if (0xbb6d <= code && code <= 0xbb87) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xbc15) {\n if (code < 0xbbc1) {\n if (code < 0xbba4) {\n if (code < 0xbb89) {\n // Lo HANGUL SYLLABLE MWI\n if (0xbb88 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE MWIG..HANGUL SYLLABLE MWIH\n if (0xbb89 <= code && code <= 0xbba3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xbba5) {\n // Lo HANGUL SYLLABLE MYU\n if (0xbba4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xbbc0) {\n // Lo [27] HANGUL SYLLABLE MYUG..HANGUL SYLLABLE MYUH\n if (0xbba5 <= code && code <= 0xbbbf) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE MEU\n if (0xbbc0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xbbf8) {\n if (code < 0xbbdc) {\n // Lo [27] HANGUL SYLLABLE MEUG..HANGUL SYLLABLE MEUH\n if (0xbbc1 <= code && code <= 0xbbdb) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xbbdd) {\n // Lo HANGUL SYLLABLE MYI\n if (0xbbdc === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE MYIG..HANGUL SYLLABLE MYIH\n if (0xbbdd <= code && code <= 0xbbf7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n else {\n if (code < 0xbbf9) {\n // Lo HANGUL SYLLABLE MI\n if (0xbbf8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xbc14) {\n // Lo [27] HANGUL SYLLABLE MIG..HANGUL SYLLABLE MIH\n if (0xbbf9 <= code && code <= 0xbc13) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE BA\n if (0xbc14 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xbc68) {\n if (code < 0xbc31) {\n if (code < 0xbc30) {\n // Lo [27] HANGUL SYLLABLE BAG..HANGUL SYLLABLE BAH\n if (0xbc15 <= code && code <= 0xbc2f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE BAE\n if (0xbc30 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xbc4c) {\n // Lo [27] HANGUL SYLLABLE BAEG..HANGUL SYLLABLE BAEH\n if (0xbc31 <= code && code <= 0xbc4b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xbc4d) {\n // Lo HANGUL SYLLABLE BYA\n if (0xbc4c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE BYAG..HANGUL SYLLABLE BYAH\n if (0xbc4d <= code && code <= 0xbc67) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xbc85) {\n if (code < 0xbc69) {\n // Lo HANGUL SYLLABLE BYAE\n if (0xbc68 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xbc84) {\n // Lo [27] HANGUL SYLLABLE BYAEG..HANGUL SYLLABLE BYAEH\n if (0xbc69 <= code && code <= 0xbc83) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE BEO\n if (0xbc84 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n else {\n if (code < 0xbca0) {\n // Lo [27] HANGUL SYLLABLE BEOG..HANGUL SYLLABLE BEOH\n if (0xbc85 <= code && code <= 0xbc9f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xbca1) {\n // Lo HANGUL SYLLABLE BE\n if (0xbca0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE BEG..HANGUL SYLLABLE BEH\n if (0xbca1 <= code && code <= 0xbcbb) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xbdd5) {\n if (code < 0xbd48) {\n if (code < 0xbcf5) {\n if (code < 0xbcd8) {\n if (code < 0xbcbd) {\n // Lo HANGUL SYLLABLE BYEO\n if (0xbcbc === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE BYEOG..HANGUL SYLLABLE BYEOH\n if (0xbcbd <= code && code <= 0xbcd7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xbcd9) {\n // Lo HANGUL SYLLABLE BYE\n if (0xbcd8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xbcf4) {\n // Lo [27] HANGUL SYLLABLE BYEG..HANGUL SYLLABLE BYEH\n if (0xbcd9 <= code && code <= 0xbcf3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE BO\n if (0xbcf4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xbd11) {\n if (code < 0xbd10) {\n // Lo [27] HANGUL SYLLABLE BOG..HANGUL SYLLABLE BOH\n if (0xbcf5 <= code && code <= 0xbd0f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE BWA\n if (0xbd10 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xbd2c) {\n // Lo [27] HANGUL SYLLABLE BWAG..HANGUL SYLLABLE BWAH\n if (0xbd11 <= code && code <= 0xbd2b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xbd2d) {\n // Lo HANGUL SYLLABLE BWAE\n if (0xbd2c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE BWAEG..HANGUL SYLLABLE BWAEH\n if (0xbd2d <= code && code <= 0xbd47) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xbd81) {\n if (code < 0xbd64) {\n if (code < 0xbd49) {\n // Lo HANGUL SYLLABLE BOE\n if (0xbd48 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE BOEG..HANGUL SYLLABLE BOEH\n if (0xbd49 <= code && code <= 0xbd63) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xbd65) {\n // Lo HANGUL SYLLABLE BYO\n if (0xbd64 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xbd80) {\n // Lo [27] HANGUL SYLLABLE BYOG..HANGUL SYLLABLE BYOH\n if (0xbd65 <= code && code <= 0xbd7f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE BU\n if (0xbd80 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xbdb8) {\n if (code < 0xbd9c) {\n // Lo [27] HANGUL SYLLABLE BUG..HANGUL SYLLABLE BUH\n if (0xbd81 <= code && code <= 0xbd9b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xbd9d) {\n // Lo HANGUL SYLLABLE BWEO\n if (0xbd9c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE BWEOG..HANGUL SYLLABLE BWEOH\n if (0xbd9d <= code && code <= 0xbdb7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n else {\n if (code < 0xbdb9) {\n // Lo HANGUL SYLLABLE BWE\n if (0xbdb8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xbdd4) {\n // Lo [27] HANGUL SYLLABLE BWEG..HANGUL SYLLABLE BWEH\n if (0xbdb9 <= code && code <= 0xbdd3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE BWI\n if (0xbdd4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xbe7c) {\n if (code < 0xbe28) {\n if (code < 0xbdf1) {\n if (code < 0xbdf0) {\n // Lo [27] HANGUL SYLLABLE BWIG..HANGUL SYLLABLE BWIH\n if (0xbdd5 <= code && code <= 0xbdef) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE BYU\n if (0xbdf0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xbe0c) {\n // Lo [27] HANGUL SYLLABLE BYUG..HANGUL SYLLABLE BYUH\n if (0xbdf1 <= code && code <= 0xbe0b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xbe0d) {\n // Lo HANGUL SYLLABLE BEU\n if (0xbe0c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE BEUG..HANGUL SYLLABLE BEUH\n if (0xbe0d <= code && code <= 0xbe27) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xbe45) {\n if (code < 0xbe29) {\n // Lo HANGUL SYLLABLE BYI\n if (0xbe28 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xbe44) {\n // Lo [27] HANGUL SYLLABLE BYIG..HANGUL SYLLABLE BYIH\n if (0xbe29 <= code && code <= 0xbe43) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE BI\n if (0xbe44 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n else {\n if (code < 0xbe60) {\n // Lo [27] HANGUL SYLLABLE BIG..HANGUL SYLLABLE BIH\n if (0xbe45 <= code && code <= 0xbe5f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xbe61) {\n // Lo HANGUL SYLLABLE BBA\n if (0xbe60 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE BBAG..HANGUL SYLLABLE BBAH\n if (0xbe61 <= code && code <= 0xbe7b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xbeb5) {\n if (code < 0xbe98) {\n if (code < 0xbe7d) {\n // Lo HANGUL SYLLABLE BBAE\n if (0xbe7c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE BBAEG..HANGUL SYLLABLE BBAEH\n if (0xbe7d <= code && code <= 0xbe97) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xbe99) {\n // Lo HANGUL SYLLABLE BBYA\n if (0xbe98 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xbeb4) {\n // Lo [27] HANGUL SYLLABLE BBYAG..HANGUL SYLLABLE BBYAH\n if (0xbe99 <= code && code <= 0xbeb3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE BBYAE\n if (0xbeb4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xbeec) {\n if (code < 0xbed0) {\n // Lo [27] HANGUL SYLLABLE BBYAEG..HANGUL SYLLABLE BBYAEH\n if (0xbeb5 <= code && code <= 0xbecf) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xbed1) {\n // Lo HANGUL SYLLABLE BBEO\n if (0xbed0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE BBEOG..HANGUL SYLLABLE BBEOH\n if (0xbed1 <= code && code <= 0xbeeb) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n else {\n if (code < 0xbeed) {\n // Lo HANGUL SYLLABLE BBE\n if (0xbeec === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xbf08) {\n // Lo [27] HANGUL SYLLABLE BBEG..HANGUL SYLLABLE BBEH\n if (0xbeed <= code && code <= 0xbf07) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE BBYEO\n if (0xbf08 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xd1d8) {\n if (code < 0xc870) {\n if (code < 0xc3bc) {\n if (code < 0xc155) {\n if (code < 0xc03c) {\n if (code < 0xbf95) {\n if (code < 0xbf5c) {\n if (code < 0xbf25) {\n if (code < 0xbf24) {\n // Lo [27] HANGUL SYLLABLE BBYEOG..HANGUL SYLLABLE BBYEOH\n if (0xbf09 <= code && code <= 0xbf23) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE BBYE\n if (0xbf24 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xbf40) {\n // Lo [27] HANGUL SYLLABLE BBYEG..HANGUL SYLLABLE BBYEH\n if (0xbf25 <= code && code <= 0xbf3f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xbf41) {\n // Lo HANGUL SYLLABLE BBO\n if (0xbf40 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE BBOG..HANGUL SYLLABLE BBOH\n if (0xbf41 <= code && code <= 0xbf5b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xbf78) {\n if (code < 0xbf5d) {\n // Lo HANGUL SYLLABLE BBWA\n if (0xbf5c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE BBWAG..HANGUL SYLLABLE BBWAH\n if (0xbf5d <= code && code <= 0xbf77) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xbf79) {\n // Lo HANGUL SYLLABLE BBWAE\n if (0xbf78 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xbf94) {\n // Lo [27] HANGUL SYLLABLE BBWAEG..HANGUL SYLLABLE BBWAEH\n if (0xbf79 <= code && code <= 0xbf93) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE BBOE\n if (0xbf94 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xbfe8) {\n if (code < 0xbfb1) {\n if (code < 0xbfb0) {\n // Lo [27] HANGUL SYLLABLE BBOEG..HANGUL SYLLABLE BBOEH\n if (0xbf95 <= code && code <= 0xbfaf) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE BBYO\n if (0xbfb0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xbfcc) {\n // Lo [27] HANGUL SYLLABLE BBYOG..HANGUL SYLLABLE BBYOH\n if (0xbfb1 <= code && code <= 0xbfcb) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xbfcd) {\n // Lo HANGUL SYLLABLE BBU\n if (0xbfcc === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE BBUG..HANGUL SYLLABLE BBUH\n if (0xbfcd <= code && code <= 0xbfe7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xc005) {\n if (code < 0xbfe9) {\n // Lo HANGUL SYLLABLE BBWEO\n if (0xbfe8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xc004) {\n // Lo [27] HANGUL SYLLABLE BBWEOG..HANGUL SYLLABLE BBWEOH\n if (0xbfe9 <= code && code <= 0xc003) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE BBWE\n if (0xc004 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n else {\n if (code < 0xc020) {\n // Lo [27] HANGUL SYLLABLE BBWEG..HANGUL SYLLABLE BBWEH\n if (0xc005 <= code && code <= 0xc01f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xc021) {\n // Lo HANGUL SYLLABLE BBWI\n if (0xc020 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE BBWIG..HANGUL SYLLABLE BBWIH\n if (0xc021 <= code && code <= 0xc03b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xc0c8) {\n if (code < 0xc075) {\n if (code < 0xc058) {\n if (code < 0xc03d) {\n // Lo HANGUL SYLLABLE BBYU\n if (0xc03c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE BBYUG..HANGUL SYLLABLE BBYUH\n if (0xc03d <= code && code <= 0xc057) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xc059) {\n // Lo HANGUL SYLLABLE BBEU\n if (0xc058 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xc074) {\n // Lo [27] HANGUL SYLLABLE BBEUG..HANGUL SYLLABLE BBEUH\n if (0xc059 <= code && code <= 0xc073) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE BBYI\n if (0xc074 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xc091) {\n if (code < 0xc090) {\n // Lo [27] HANGUL SYLLABLE BBYIG..HANGUL SYLLABLE BBYIH\n if (0xc075 <= code && code <= 0xc08f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE BBI\n if (0xc090 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xc0ac) {\n // Lo [27] HANGUL SYLLABLE BBIG..HANGUL SYLLABLE BBIH\n if (0xc091 <= code && code <= 0xc0ab) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xc0ad) {\n // Lo HANGUL SYLLABLE SA\n if (0xc0ac === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE SAG..HANGUL SYLLABLE SAH\n if (0xc0ad <= code && code <= 0xc0c7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xc101) {\n if (code < 0xc0e4) {\n if (code < 0xc0c9) {\n // Lo HANGUL SYLLABLE SAE\n if (0xc0c8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE SAEG..HANGUL SYLLABLE SAEH\n if (0xc0c9 <= code && code <= 0xc0e3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xc0e5) {\n // Lo HANGUL SYLLABLE SYA\n if (0xc0e4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xc100) {\n // Lo [27] HANGUL SYLLABLE SYAG..HANGUL SYLLABLE SYAH\n if (0xc0e5 <= code && code <= 0xc0ff) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE SYAE\n if (0xc100 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xc138) {\n if (code < 0xc11c) {\n // Lo [27] HANGUL SYLLABLE SYAEG..HANGUL SYLLABLE SYAEH\n if (0xc101 <= code && code <= 0xc11b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xc11d) {\n // Lo HANGUL SYLLABLE SEO\n if (0xc11c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE SEOG..HANGUL SYLLABLE SEOH\n if (0xc11d <= code && code <= 0xc137) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n else {\n if (code < 0xc139) {\n // Lo HANGUL SYLLABLE SE\n if (0xc138 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xc154) {\n // Lo [27] HANGUL SYLLABLE SEG..HANGUL SYLLABLE SEH\n if (0xc139 <= code && code <= 0xc153) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE SYEO\n if (0xc154 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xc288) {\n if (code < 0xc1e1) {\n if (code < 0xc1a8) {\n if (code < 0xc171) {\n if (code < 0xc170) {\n // Lo [27] HANGUL SYLLABLE SYEOG..HANGUL SYLLABLE SYEOH\n if (0xc155 <= code && code <= 0xc16f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE SYE\n if (0xc170 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xc18c) {\n // Lo [27] HANGUL SYLLABLE SYEG..HANGUL SYLLABLE SYEH\n if (0xc171 <= code && code <= 0xc18b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xc18d) {\n // Lo HANGUL SYLLABLE SO\n if (0xc18c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE SOG..HANGUL SYLLABLE SOH\n if (0xc18d <= code && code <= 0xc1a7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xc1c4) {\n if (code < 0xc1a9) {\n // Lo HANGUL SYLLABLE SWA\n if (0xc1a8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE SWAG..HANGUL SYLLABLE SWAH\n if (0xc1a9 <= code && code <= 0xc1c3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xc1c5) {\n // Lo HANGUL SYLLABLE SWAE\n if (0xc1c4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xc1e0) {\n // Lo [27] HANGUL SYLLABLE SWAEG..HANGUL SYLLABLE SWAEH\n if (0xc1c5 <= code && code <= 0xc1df) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE SOE\n if (0xc1e0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xc234) {\n if (code < 0xc1fd) {\n if (code < 0xc1fc) {\n // Lo [27] HANGUL SYLLABLE SOEG..HANGUL SYLLABLE SOEH\n if (0xc1e1 <= code && code <= 0xc1fb) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE SYO\n if (0xc1fc === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xc218) {\n // Lo [27] HANGUL SYLLABLE SYOG..HANGUL SYLLABLE SYOH\n if (0xc1fd <= code && code <= 0xc217) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xc219) {\n // Lo HANGUL SYLLABLE SU\n if (0xc218 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE SUG..HANGUL SYLLABLE SUH\n if (0xc219 <= code && code <= 0xc233) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xc251) {\n if (code < 0xc235) {\n // Lo HANGUL SYLLABLE SWEO\n if (0xc234 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xc250) {\n // Lo [27] HANGUL SYLLABLE SWEOG..HANGUL SYLLABLE SWEOH\n if (0xc235 <= code && code <= 0xc24f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE SWE\n if (0xc250 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n else {\n if (code < 0xc26c) {\n // Lo [27] HANGUL SYLLABLE SWEG..HANGUL SYLLABLE SWEH\n if (0xc251 <= code && code <= 0xc26b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xc26d) {\n // Lo HANGUL SYLLABLE SWI\n if (0xc26c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE SWIG..HANGUL SYLLABLE SWIH\n if (0xc26d <= code && code <= 0xc287) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xc315) {\n if (code < 0xc2c1) {\n if (code < 0xc2a4) {\n if (code < 0xc289) {\n // Lo HANGUL SYLLABLE SYU\n if (0xc288 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE SYUG..HANGUL SYLLABLE SYUH\n if (0xc289 <= code && code <= 0xc2a3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xc2a5) {\n // Lo HANGUL SYLLABLE SEU\n if (0xc2a4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xc2c0) {\n // Lo [27] HANGUL SYLLABLE SEUG..HANGUL SYLLABLE SEUH\n if (0xc2a5 <= code && code <= 0xc2bf) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE SYI\n if (0xc2c0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xc2f8) {\n if (code < 0xc2dc) {\n // Lo [27] HANGUL SYLLABLE SYIG..HANGUL SYLLABLE SYIH\n if (0xc2c1 <= code && code <= 0xc2db) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xc2dd) {\n // Lo HANGUL SYLLABLE SI\n if (0xc2dc === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE SIG..HANGUL SYLLABLE SIH\n if (0xc2dd <= code && code <= 0xc2f7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n else {\n if (code < 0xc2f9) {\n // Lo HANGUL SYLLABLE SSA\n if (0xc2f8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xc314) {\n // Lo [27] HANGUL SYLLABLE SSAG..HANGUL SYLLABLE SSAH\n if (0xc2f9 <= code && code <= 0xc313) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE SSAE\n if (0xc314 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xc368) {\n if (code < 0xc331) {\n if (code < 0xc330) {\n // Lo [27] HANGUL SYLLABLE SSAEG..HANGUL SYLLABLE SSAEH\n if (0xc315 <= code && code <= 0xc32f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE SSYA\n if (0xc330 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xc34c) {\n // Lo [27] HANGUL SYLLABLE SSYAG..HANGUL SYLLABLE SSYAH\n if (0xc331 <= code && code <= 0xc34b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xc34d) {\n // Lo HANGUL SYLLABLE SSYAE\n if (0xc34c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE SSYAEG..HANGUL SYLLABLE SSYAEH\n if (0xc34d <= code && code <= 0xc367) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xc385) {\n if (code < 0xc369) {\n // Lo HANGUL SYLLABLE SSEO\n if (0xc368 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xc384) {\n // Lo [27] HANGUL SYLLABLE SSEOG..HANGUL SYLLABLE SSEOH\n if (0xc369 <= code && code <= 0xc383) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE SSE\n if (0xc384 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n else {\n if (code < 0xc3a0) {\n // Lo [27] HANGUL SYLLABLE SSEG..HANGUL SYLLABLE SSEH\n if (0xc385 <= code && code <= 0xc39f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xc3a1) {\n // Lo HANGUL SYLLABLE SSYEO\n if (0xc3a0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE SSYEOG..HANGUL SYLLABLE SSYEOH\n if (0xc3a1 <= code && code <= 0xc3bb) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xc609) {\n if (code < 0xc4d5) {\n if (code < 0xc448) {\n if (code < 0xc3f5) {\n if (code < 0xc3d8) {\n if (code < 0xc3bd) {\n // Lo HANGUL SYLLABLE SSYE\n if (0xc3bc === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE SSYEG..HANGUL SYLLABLE SSYEH\n if (0xc3bd <= code && code <= 0xc3d7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xc3d9) {\n // Lo HANGUL SYLLABLE SSO\n if (0xc3d8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xc3f4) {\n // Lo [27] HANGUL SYLLABLE SSOG..HANGUL SYLLABLE SSOH\n if (0xc3d9 <= code && code <= 0xc3f3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE SSWA\n if (0xc3f4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xc411) {\n if (code < 0xc410) {\n // Lo [27] HANGUL SYLLABLE SSWAG..HANGUL SYLLABLE SSWAH\n if (0xc3f5 <= code && code <= 0xc40f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE SSWAE\n if (0xc410 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xc42c) {\n // Lo [27] HANGUL SYLLABLE SSWAEG..HANGUL SYLLABLE SSWAEH\n if (0xc411 <= code && code <= 0xc42b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xc42d) {\n // Lo HANGUL SYLLABLE SSOE\n if (0xc42c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE SSOEG..HANGUL SYLLABLE SSOEH\n if (0xc42d <= code && code <= 0xc447) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xc481) {\n if (code < 0xc464) {\n if (code < 0xc449) {\n // Lo HANGUL SYLLABLE SSYO\n if (0xc448 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE SSYOG..HANGUL SYLLABLE SSYOH\n if (0xc449 <= code && code <= 0xc463) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xc465) {\n // Lo HANGUL SYLLABLE SSU\n if (0xc464 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xc480) {\n // Lo [27] HANGUL SYLLABLE SSUG..HANGUL SYLLABLE SSUH\n if (0xc465 <= code && code <= 0xc47f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE SSWEO\n if (0xc480 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xc4b8) {\n if (code < 0xc49c) {\n // Lo [27] HANGUL SYLLABLE SSWEOG..HANGUL SYLLABLE SSWEOH\n if (0xc481 <= code && code <= 0xc49b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xc49d) {\n // Lo HANGUL SYLLABLE SSWE\n if (0xc49c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE SSWEG..HANGUL SYLLABLE SSWEH\n if (0xc49d <= code && code <= 0xc4b7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n else {\n if (code < 0xc4b9) {\n // Lo HANGUL SYLLABLE SSWI\n if (0xc4b8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xc4d4) {\n // Lo [27] HANGUL SYLLABLE SSWIG..HANGUL SYLLABLE SSWIH\n if (0xc4b9 <= code && code <= 0xc4d3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE SSYU\n if (0xc4d4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xc57c) {\n if (code < 0xc528) {\n if (code < 0xc4f1) {\n if (code < 0xc4f0) {\n // Lo [27] HANGUL SYLLABLE SSYUG..HANGUL SYLLABLE SSYUH\n if (0xc4d5 <= code && code <= 0xc4ef) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE SSEU\n if (0xc4f0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xc50c) {\n // Lo [27] HANGUL SYLLABLE SSEUG..HANGUL SYLLABLE SSEUH\n if (0xc4f1 <= code && code <= 0xc50b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xc50d) {\n // Lo HANGUL SYLLABLE SSYI\n if (0xc50c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE SSYIG..HANGUL SYLLABLE SSYIH\n if (0xc50d <= code && code <= 0xc527) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xc545) {\n if (code < 0xc529) {\n // Lo HANGUL SYLLABLE SSI\n if (0xc528 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xc544) {\n // Lo [27] HANGUL SYLLABLE SSIG..HANGUL SYLLABLE SSIH\n if (0xc529 <= code && code <= 0xc543) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE A\n if (0xc544 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n else {\n if (code < 0xc560) {\n // Lo [27] HANGUL SYLLABLE AG..HANGUL SYLLABLE AH\n if (0xc545 <= code && code <= 0xc55f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xc561) {\n // Lo HANGUL SYLLABLE AE\n if (0xc560 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE AEG..HANGUL SYLLABLE AEH\n if (0xc561 <= code && code <= 0xc57b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xc5b5) {\n if (code < 0xc598) {\n if (code < 0xc57d) {\n // Lo HANGUL SYLLABLE YA\n if (0xc57c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE YAG..HANGUL SYLLABLE YAH\n if (0xc57d <= code && code <= 0xc597) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xc599) {\n // Lo HANGUL SYLLABLE YAE\n if (0xc598 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xc5b4) {\n // Lo [27] HANGUL SYLLABLE YAEG..HANGUL SYLLABLE YAEH\n if (0xc599 <= code && code <= 0xc5b3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE EO\n if (0xc5b4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xc5ec) {\n if (code < 0xc5d0) {\n // Lo [27] HANGUL SYLLABLE EOG..HANGUL SYLLABLE EOH\n if (0xc5b5 <= code && code <= 0xc5cf) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xc5d1) {\n // Lo HANGUL SYLLABLE E\n if (0xc5d0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE EG..HANGUL SYLLABLE EH\n if (0xc5d1 <= code && code <= 0xc5eb) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n else {\n if (code < 0xc5ed) {\n // Lo HANGUL SYLLABLE YEO\n if (0xc5ec === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xc608) {\n // Lo [27] HANGUL SYLLABLE YEOG..HANGUL SYLLABLE YEOH\n if (0xc5ed <= code && code <= 0xc607) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE YE\n if (0xc608 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xc73c) {\n if (code < 0xc695) {\n if (code < 0xc65c) {\n if (code < 0xc625) {\n if (code < 0xc624) {\n // Lo [27] HANGUL SYLLABLE YEG..HANGUL SYLLABLE YEH\n if (0xc609 <= code && code <= 0xc623) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE O\n if (0xc624 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xc640) {\n // Lo [27] HANGUL SYLLABLE OG..HANGUL SYLLABLE OH\n if (0xc625 <= code && code <= 0xc63f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xc641) {\n // Lo HANGUL SYLLABLE WA\n if (0xc640 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE WAG..HANGUL SYLLABLE WAH\n if (0xc641 <= code && code <= 0xc65b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xc678) {\n if (code < 0xc65d) {\n // Lo HANGUL SYLLABLE WAE\n if (0xc65c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE WAEG..HANGUL SYLLABLE WAEH\n if (0xc65d <= code && code <= 0xc677) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xc679) {\n // Lo HANGUL SYLLABLE OE\n if (0xc678 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xc694) {\n // Lo [27] HANGUL SYLLABLE OEG..HANGUL SYLLABLE OEH\n if (0xc679 <= code && code <= 0xc693) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE YO\n if (0xc694 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xc6e8) {\n if (code < 0xc6b1) {\n if (code < 0xc6b0) {\n // Lo [27] HANGUL SYLLABLE YOG..HANGUL SYLLABLE YOH\n if (0xc695 <= code && code <= 0xc6af) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE U\n if (0xc6b0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xc6cc) {\n // Lo [27] HANGUL SYLLABLE UG..HANGUL SYLLABLE UH\n if (0xc6b1 <= code && code <= 0xc6cb) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xc6cd) {\n // Lo HANGUL SYLLABLE WEO\n if (0xc6cc === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE WEOG..HANGUL SYLLABLE WEOH\n if (0xc6cd <= code && code <= 0xc6e7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xc705) {\n if (code < 0xc6e9) {\n // Lo HANGUL SYLLABLE WE\n if (0xc6e8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xc704) {\n // Lo [27] HANGUL SYLLABLE WEG..HANGUL SYLLABLE WEH\n if (0xc6e9 <= code && code <= 0xc703) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE WI\n if (0xc704 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n else {\n if (code < 0xc720) {\n // Lo [27] HANGUL SYLLABLE WIG..HANGUL SYLLABLE WIH\n if (0xc705 <= code && code <= 0xc71f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xc721) {\n // Lo HANGUL SYLLABLE YU\n if (0xc720 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE YUG..HANGUL SYLLABLE YUH\n if (0xc721 <= code && code <= 0xc73b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xc7c9) {\n if (code < 0xc775) {\n if (code < 0xc758) {\n if (code < 0xc73d) {\n // Lo HANGUL SYLLABLE EU\n if (0xc73c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE EUG..HANGUL SYLLABLE EUH\n if (0xc73d <= code && code <= 0xc757) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xc759) {\n // Lo HANGUL SYLLABLE YI\n if (0xc758 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xc774) {\n // Lo [27] HANGUL SYLLABLE YIG..HANGUL SYLLABLE YIH\n if (0xc759 <= code && code <= 0xc773) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE I\n if (0xc774 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xc7ac) {\n if (code < 0xc790) {\n // Lo [27] HANGUL SYLLABLE IG..HANGUL SYLLABLE IH\n if (0xc775 <= code && code <= 0xc78f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xc791) {\n // Lo HANGUL SYLLABLE JA\n if (0xc790 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE JAG..HANGUL SYLLABLE JAH\n if (0xc791 <= code && code <= 0xc7ab) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n else {\n if (code < 0xc7ad) {\n // Lo HANGUL SYLLABLE JAE\n if (0xc7ac === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xc7c8) {\n // Lo [27] HANGUL SYLLABLE JAEG..HANGUL SYLLABLE JAEH\n if (0xc7ad <= code && code <= 0xc7c7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE JYA\n if (0xc7c8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xc81c) {\n if (code < 0xc7e5) {\n if (code < 0xc7e4) {\n // Lo [27] HANGUL SYLLABLE JYAG..HANGUL SYLLABLE JYAH\n if (0xc7c9 <= code && code <= 0xc7e3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE JYAE\n if (0xc7e4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xc800) {\n // Lo [27] HANGUL SYLLABLE JYAEG..HANGUL SYLLABLE JYAEH\n if (0xc7e5 <= code && code <= 0xc7ff) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xc801) {\n // Lo HANGUL SYLLABLE JEO\n if (0xc800 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE JEOG..HANGUL SYLLABLE JEOH\n if (0xc801 <= code && code <= 0xc81b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xc839) {\n if (code < 0xc81d) {\n // Lo HANGUL SYLLABLE JE\n if (0xc81c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xc838) {\n // Lo [27] HANGUL SYLLABLE JEG..HANGUL SYLLABLE JEH\n if (0xc81d <= code && code <= 0xc837) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE JYEO\n if (0xc838 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n else {\n if (code < 0xc854) {\n // Lo [27] HANGUL SYLLABLE JYEOG..HANGUL SYLLABLE JYEOH\n if (0xc839 <= code && code <= 0xc853) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xc855) {\n // Lo HANGUL SYLLABLE JYE\n if (0xc854 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE JYEG..HANGUL SYLLABLE JYEH\n if (0xc855 <= code && code <= 0xc86f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xcd24) {\n if (code < 0xcabd) {\n if (code < 0xc989) {\n if (code < 0xc8fc) {\n if (code < 0xc8a9) {\n if (code < 0xc88c) {\n if (code < 0xc871) {\n // Lo HANGUL SYLLABLE JO\n if (0xc870 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE JOG..HANGUL SYLLABLE JOH\n if (0xc871 <= code && code <= 0xc88b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xc88d) {\n // Lo HANGUL SYLLABLE JWA\n if (0xc88c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xc8a8) {\n // Lo [27] HANGUL SYLLABLE JWAG..HANGUL SYLLABLE JWAH\n if (0xc88d <= code && code <= 0xc8a7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE JWAE\n if (0xc8a8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xc8c5) {\n if (code < 0xc8c4) {\n // Lo [27] HANGUL SYLLABLE JWAEG..HANGUL SYLLABLE JWAEH\n if (0xc8a9 <= code && code <= 0xc8c3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE JOE\n if (0xc8c4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xc8e0) {\n // Lo [27] HANGUL SYLLABLE JOEG..HANGUL SYLLABLE JOEH\n if (0xc8c5 <= code && code <= 0xc8df) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xc8e1) {\n // Lo HANGUL SYLLABLE JYO\n if (0xc8e0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE JYOG..HANGUL SYLLABLE JYOH\n if (0xc8e1 <= code && code <= 0xc8fb) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xc935) {\n if (code < 0xc918) {\n if (code < 0xc8fd) {\n // Lo HANGUL SYLLABLE JU\n if (0xc8fc === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE JUG..HANGUL SYLLABLE JUH\n if (0xc8fd <= code && code <= 0xc917) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xc919) {\n // Lo HANGUL SYLLABLE JWEO\n if (0xc918 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xc934) {\n // Lo [27] HANGUL SYLLABLE JWEOG..HANGUL SYLLABLE JWEOH\n if (0xc919 <= code && code <= 0xc933) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE JWE\n if (0xc934 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xc96c) {\n if (code < 0xc950) {\n // Lo [27] HANGUL SYLLABLE JWEG..HANGUL SYLLABLE JWEH\n if (0xc935 <= code && code <= 0xc94f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xc951) {\n // Lo HANGUL SYLLABLE JWI\n if (0xc950 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE JWIG..HANGUL SYLLABLE JWIH\n if (0xc951 <= code && code <= 0xc96b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n else {\n if (code < 0xc96d) {\n // Lo HANGUL SYLLABLE JYU\n if (0xc96c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xc988) {\n // Lo [27] HANGUL SYLLABLE JYUG..HANGUL SYLLABLE JYUH\n if (0xc96d <= code && code <= 0xc987) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE JEU\n if (0xc988 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xca30) {\n if (code < 0xc9dc) {\n if (code < 0xc9a5) {\n if (code < 0xc9a4) {\n // Lo [27] HANGUL SYLLABLE JEUG..HANGUL SYLLABLE JEUH\n if (0xc989 <= code && code <= 0xc9a3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE JYI\n if (0xc9a4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xc9c0) {\n // Lo [27] HANGUL SYLLABLE JYIG..HANGUL SYLLABLE JYIH\n if (0xc9a5 <= code && code <= 0xc9bf) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xc9c1) {\n // Lo HANGUL SYLLABLE JI\n if (0xc9c0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE JIG..HANGUL SYLLABLE JIH\n if (0xc9c1 <= code && code <= 0xc9db) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xc9f9) {\n if (code < 0xc9dd) {\n // Lo HANGUL SYLLABLE JJA\n if (0xc9dc === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xc9f8) {\n // Lo [27] HANGUL SYLLABLE JJAG..HANGUL SYLLABLE JJAH\n if (0xc9dd <= code && code <= 0xc9f7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE JJAE\n if (0xc9f8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n else {\n if (code < 0xca14) {\n // Lo [27] HANGUL SYLLABLE JJAEG..HANGUL SYLLABLE JJAEH\n if (0xc9f9 <= code && code <= 0xca13) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xca15) {\n // Lo HANGUL SYLLABLE JJYA\n if (0xca14 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE JJYAG..HANGUL SYLLABLE JJYAH\n if (0xca15 <= code && code <= 0xca2f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xca69) {\n if (code < 0xca4c) {\n if (code < 0xca31) {\n // Lo HANGUL SYLLABLE JJYAE\n if (0xca30 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE JJYAEG..HANGUL SYLLABLE JJYAEH\n if (0xca31 <= code && code <= 0xca4b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xca4d) {\n // Lo HANGUL SYLLABLE JJEO\n if (0xca4c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xca68) {\n // Lo [27] HANGUL SYLLABLE JJEOG..HANGUL SYLLABLE JJEOH\n if (0xca4d <= code && code <= 0xca67) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE JJE\n if (0xca68 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xcaa0) {\n if (code < 0xca84) {\n // Lo [27] HANGUL SYLLABLE JJEG..HANGUL SYLLABLE JJEH\n if (0xca69 <= code && code <= 0xca83) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xca85) {\n // Lo HANGUL SYLLABLE JJYEO\n if (0xca84 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE JJYEOG..HANGUL SYLLABLE JJYEOH\n if (0xca85 <= code && code <= 0xca9f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n else {\n if (code < 0xcaa1) {\n // Lo HANGUL SYLLABLE JJYE\n if (0xcaa0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xcabc) {\n // Lo [27] HANGUL SYLLABLE JJYEG..HANGUL SYLLABLE JJYEH\n if (0xcaa1 <= code && code <= 0xcabb) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE JJO\n if (0xcabc === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xcbf0) {\n if (code < 0xcb49) {\n if (code < 0xcb10) {\n if (code < 0xcad9) {\n if (code < 0xcad8) {\n // Lo [27] HANGUL SYLLABLE JJOG..HANGUL SYLLABLE JJOH\n if (0xcabd <= code && code <= 0xcad7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE JJWA\n if (0xcad8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xcaf4) {\n // Lo [27] HANGUL SYLLABLE JJWAG..HANGUL SYLLABLE JJWAH\n if (0xcad9 <= code && code <= 0xcaf3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xcaf5) {\n // Lo HANGUL SYLLABLE JJWAE\n if (0xcaf4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE JJWAEG..HANGUL SYLLABLE JJWAEH\n if (0xcaf5 <= code && code <= 0xcb0f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xcb2c) {\n if (code < 0xcb11) {\n // Lo HANGUL SYLLABLE JJOE\n if (0xcb10 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE JJOEG..HANGUL SYLLABLE JJOEH\n if (0xcb11 <= code && code <= 0xcb2b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xcb2d) {\n // Lo HANGUL SYLLABLE JJYO\n if (0xcb2c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xcb48) {\n // Lo [27] HANGUL SYLLABLE JJYOG..HANGUL SYLLABLE JJYOH\n if (0xcb2d <= code && code <= 0xcb47) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE JJU\n if (0xcb48 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xcb9c) {\n if (code < 0xcb65) {\n if (code < 0xcb64) {\n // Lo [27] HANGUL SYLLABLE JJUG..HANGUL SYLLABLE JJUH\n if (0xcb49 <= code && code <= 0xcb63) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE JJWEO\n if (0xcb64 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xcb80) {\n // Lo [27] HANGUL SYLLABLE JJWEOG..HANGUL SYLLABLE JJWEOH\n if (0xcb65 <= code && code <= 0xcb7f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xcb81) {\n // Lo HANGUL SYLLABLE JJWE\n if (0xcb80 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE JJWEG..HANGUL SYLLABLE JJWEH\n if (0xcb81 <= code && code <= 0xcb9b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xcbb9) {\n if (code < 0xcb9d) {\n // Lo HANGUL SYLLABLE JJWI\n if (0xcb9c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xcbb8) {\n // Lo [27] HANGUL SYLLABLE JJWIG..HANGUL SYLLABLE JJWIH\n if (0xcb9d <= code && code <= 0xcbb7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE JJYU\n if (0xcbb8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n else {\n if (code < 0xcbd4) {\n // Lo [27] HANGUL SYLLABLE JJYUG..HANGUL SYLLABLE JJYUH\n if (0xcbb9 <= code && code <= 0xcbd3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xcbd5) {\n // Lo HANGUL SYLLABLE JJEU\n if (0xcbd4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE JJEUG..HANGUL SYLLABLE JJEUH\n if (0xcbd5 <= code && code <= 0xcbef) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xcc7d) {\n if (code < 0xcc29) {\n if (code < 0xcc0c) {\n if (code < 0xcbf1) {\n // Lo HANGUL SYLLABLE JJYI\n if (0xcbf0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE JJYIG..HANGUL SYLLABLE JJYIH\n if (0xcbf1 <= code && code <= 0xcc0b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xcc0d) {\n // Lo HANGUL SYLLABLE JJI\n if (0xcc0c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xcc28) {\n // Lo [27] HANGUL SYLLABLE JJIG..HANGUL SYLLABLE JJIH\n if (0xcc0d <= code && code <= 0xcc27) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE CA\n if (0xcc28 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xcc60) {\n if (code < 0xcc44) {\n // Lo [27] HANGUL SYLLABLE CAG..HANGUL SYLLABLE CAH\n if (0xcc29 <= code && code <= 0xcc43) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xcc45) {\n // Lo HANGUL SYLLABLE CAE\n if (0xcc44 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE CAEG..HANGUL SYLLABLE CAEH\n if (0xcc45 <= code && code <= 0xcc5f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n else {\n if (code < 0xcc61) {\n // Lo HANGUL SYLLABLE CYA\n if (0xcc60 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xcc7c) {\n // Lo [27] HANGUL SYLLABLE CYAG..HANGUL SYLLABLE CYAH\n if (0xcc61 <= code && code <= 0xcc7b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE CYAE\n if (0xcc7c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xccd0) {\n if (code < 0xcc99) {\n if (code < 0xcc98) {\n // Lo [27] HANGUL SYLLABLE CYAEG..HANGUL SYLLABLE CYAEH\n if (0xcc7d <= code && code <= 0xcc97) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE CEO\n if (0xcc98 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xccb4) {\n // Lo [27] HANGUL SYLLABLE CEOG..HANGUL SYLLABLE CEOH\n if (0xcc99 <= code && code <= 0xccb3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xccb5) {\n // Lo HANGUL SYLLABLE CE\n if (0xccb4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE CEG..HANGUL SYLLABLE CEH\n if (0xccb5 <= code && code <= 0xcccf) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xcced) {\n if (code < 0xccd1) {\n // Lo HANGUL SYLLABLE CYEO\n if (0xccd0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xccec) {\n // Lo [27] HANGUL SYLLABLE CYEOG..HANGUL SYLLABLE CYEOH\n if (0xccd1 <= code && code <= 0xcceb) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE CYE\n if (0xccec === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n else {\n if (code < 0xcd08) {\n // Lo [27] HANGUL SYLLABLE CYEG..HANGUL SYLLABLE CYEH\n if (0xcced <= code && code <= 0xcd07) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xcd09) {\n // Lo HANGUL SYLLABLE CO\n if (0xcd08 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE COG..HANGUL SYLLABLE COH\n if (0xcd09 <= code && code <= 0xcd23) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xcf71) {\n if (code < 0xce3d) {\n if (code < 0xcdb0) {\n if (code < 0xcd5d) {\n if (code < 0xcd40) {\n if (code < 0xcd25) {\n // Lo HANGUL SYLLABLE CWA\n if (0xcd24 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE CWAG..HANGUL SYLLABLE CWAH\n if (0xcd25 <= code && code <= 0xcd3f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xcd41) {\n // Lo HANGUL SYLLABLE CWAE\n if (0xcd40 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xcd5c) {\n // Lo [27] HANGUL SYLLABLE CWAEG..HANGUL SYLLABLE CWAEH\n if (0xcd41 <= code && code <= 0xcd5b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE COE\n if (0xcd5c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xcd79) {\n if (code < 0xcd78) {\n // Lo [27] HANGUL SYLLABLE COEG..HANGUL SYLLABLE COEH\n if (0xcd5d <= code && code <= 0xcd77) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE CYO\n if (0xcd78 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xcd94) {\n // Lo [27] HANGUL SYLLABLE CYOG..HANGUL SYLLABLE CYOH\n if (0xcd79 <= code && code <= 0xcd93) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xcd95) {\n // Lo HANGUL SYLLABLE CU\n if (0xcd94 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE CUG..HANGUL SYLLABLE CUH\n if (0xcd95 <= code && code <= 0xcdaf) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xcde9) {\n if (code < 0xcdcc) {\n if (code < 0xcdb1) {\n // Lo HANGUL SYLLABLE CWEO\n if (0xcdb0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE CWEOG..HANGUL SYLLABLE CWEOH\n if (0xcdb1 <= code && code <= 0xcdcb) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xcdcd) {\n // Lo HANGUL SYLLABLE CWE\n if (0xcdcc === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xcde8) {\n // Lo [27] HANGUL SYLLABLE CWEG..HANGUL SYLLABLE CWEH\n if (0xcdcd <= code && code <= 0xcde7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE CWI\n if (0xcde8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xce20) {\n if (code < 0xce04) {\n // Lo [27] HANGUL SYLLABLE CWIG..HANGUL SYLLABLE CWIH\n if (0xcde9 <= code && code <= 0xce03) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xce05) {\n // Lo HANGUL SYLLABLE CYU\n if (0xce04 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE CYUG..HANGUL SYLLABLE CYUH\n if (0xce05 <= code && code <= 0xce1f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n else {\n if (code < 0xce21) {\n // Lo HANGUL SYLLABLE CEU\n if (0xce20 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xce3c) {\n // Lo [27] HANGUL SYLLABLE CEUG..HANGUL SYLLABLE CEUH\n if (0xce21 <= code && code <= 0xce3b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE CYI\n if (0xce3c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xcee4) {\n if (code < 0xce90) {\n if (code < 0xce59) {\n if (code < 0xce58) {\n // Lo [27] HANGUL SYLLABLE CYIG..HANGUL SYLLABLE CYIH\n if (0xce3d <= code && code <= 0xce57) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE CI\n if (0xce58 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xce74) {\n // Lo [27] HANGUL SYLLABLE CIG..HANGUL SYLLABLE CIH\n if (0xce59 <= code && code <= 0xce73) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xce75) {\n // Lo HANGUL SYLLABLE KA\n if (0xce74 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE KAG..HANGUL SYLLABLE KAH\n if (0xce75 <= code && code <= 0xce8f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xcead) {\n if (code < 0xce91) {\n // Lo HANGUL SYLLABLE KAE\n if (0xce90 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xceac) {\n // Lo [27] HANGUL SYLLABLE KAEG..HANGUL SYLLABLE KAEH\n if (0xce91 <= code && code <= 0xceab) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE KYA\n if (0xceac === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n else {\n if (code < 0xcec8) {\n // Lo [27] HANGUL SYLLABLE KYAG..HANGUL SYLLABLE KYAH\n if (0xcead <= code && code <= 0xcec7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xcec9) {\n // Lo HANGUL SYLLABLE KYAE\n if (0xcec8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE KYAEG..HANGUL SYLLABLE KYAEH\n if (0xcec9 <= code && code <= 0xcee3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xcf1d) {\n if (code < 0xcf00) {\n if (code < 0xcee5) {\n // Lo HANGUL SYLLABLE KEO\n if (0xcee4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE KEOG..HANGUL SYLLABLE KEOH\n if (0xcee5 <= code && code <= 0xceff) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xcf01) {\n // Lo HANGUL SYLLABLE KE\n if (0xcf00 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xcf1c) {\n // Lo [27] HANGUL SYLLABLE KEG..HANGUL SYLLABLE KEH\n if (0xcf01 <= code && code <= 0xcf1b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE KYEO\n if (0xcf1c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xcf54) {\n if (code < 0xcf38) {\n // Lo [27] HANGUL SYLLABLE KYEOG..HANGUL SYLLABLE KYEOH\n if (0xcf1d <= code && code <= 0xcf37) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xcf39) {\n // Lo HANGUL SYLLABLE KYE\n if (0xcf38 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE KYEG..HANGUL SYLLABLE KYEH\n if (0xcf39 <= code && code <= 0xcf53) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n else {\n if (code < 0xcf55) {\n // Lo HANGUL SYLLABLE KO\n if (0xcf54 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xcf70) {\n // Lo [27] HANGUL SYLLABLE KOG..HANGUL SYLLABLE KOH\n if (0xcf55 <= code && code <= 0xcf6f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE KWA\n if (0xcf70 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xd0a4) {\n if (code < 0xcffd) {\n if (code < 0xcfc4) {\n if (code < 0xcf8d) {\n if (code < 0xcf8c) {\n // Lo [27] HANGUL SYLLABLE KWAG..HANGUL SYLLABLE KWAH\n if (0xcf71 <= code && code <= 0xcf8b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE KWAE\n if (0xcf8c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xcfa8) {\n // Lo [27] HANGUL SYLLABLE KWAEG..HANGUL SYLLABLE KWAEH\n if (0xcf8d <= code && code <= 0xcfa7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xcfa9) {\n // Lo HANGUL SYLLABLE KOE\n if (0xcfa8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE KOEG..HANGUL SYLLABLE KOEH\n if (0xcfa9 <= code && code <= 0xcfc3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xcfe0) {\n if (code < 0xcfc5) {\n // Lo HANGUL SYLLABLE KYO\n if (0xcfc4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE KYOG..HANGUL SYLLABLE KYOH\n if (0xcfc5 <= code && code <= 0xcfdf) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xcfe1) {\n // Lo HANGUL SYLLABLE KU\n if (0xcfe0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xcffc) {\n // Lo [27] HANGUL SYLLABLE KUG..HANGUL SYLLABLE KUH\n if (0xcfe1 <= code && code <= 0xcffb) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE KWEO\n if (0xcffc === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xd050) {\n if (code < 0xd019) {\n if (code < 0xd018) {\n // Lo [27] HANGUL SYLLABLE KWEOG..HANGUL SYLLABLE KWEOH\n if (0xcffd <= code && code <= 0xd017) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE KWE\n if (0xd018 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xd034) {\n // Lo [27] HANGUL SYLLABLE KWEG..HANGUL SYLLABLE KWEH\n if (0xd019 <= code && code <= 0xd033) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xd035) {\n // Lo HANGUL SYLLABLE KWI\n if (0xd034 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE KWIG..HANGUL SYLLABLE KWIH\n if (0xd035 <= code && code <= 0xd04f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xd06d) {\n if (code < 0xd051) {\n // Lo HANGUL SYLLABLE KYU\n if (0xd050 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xd06c) {\n // Lo [27] HANGUL SYLLABLE KYUG..HANGUL SYLLABLE KYUH\n if (0xd051 <= code && code <= 0xd06b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE KEU\n if (0xd06c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n else {\n if (code < 0xd088) {\n // Lo [27] HANGUL SYLLABLE KEUG..HANGUL SYLLABLE KEUH\n if (0xd06d <= code && code <= 0xd087) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xd089) {\n // Lo HANGUL SYLLABLE KYI\n if (0xd088 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE KYIG..HANGUL SYLLABLE KYIH\n if (0xd089 <= code && code <= 0xd0a3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xd131) {\n if (code < 0xd0dd) {\n if (code < 0xd0c0) {\n if (code < 0xd0a5) {\n // Lo HANGUL SYLLABLE KI\n if (0xd0a4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE KIG..HANGUL SYLLABLE KIH\n if (0xd0a5 <= code && code <= 0xd0bf) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xd0c1) {\n // Lo HANGUL SYLLABLE TA\n if (0xd0c0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xd0dc) {\n // Lo [27] HANGUL SYLLABLE TAG..HANGUL SYLLABLE TAH\n if (0xd0c1 <= code && code <= 0xd0db) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE TAE\n if (0xd0dc === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xd114) {\n if (code < 0xd0f8) {\n // Lo [27] HANGUL SYLLABLE TAEG..HANGUL SYLLABLE TAEH\n if (0xd0dd <= code && code <= 0xd0f7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xd0f9) {\n // Lo HANGUL SYLLABLE TYA\n if (0xd0f8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE TYAG..HANGUL SYLLABLE TYAH\n if (0xd0f9 <= code && code <= 0xd113) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n else {\n if (code < 0xd115) {\n // Lo HANGUL SYLLABLE TYAE\n if (0xd114 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xd130) {\n // Lo [27] HANGUL SYLLABLE TYAEG..HANGUL SYLLABLE TYAEH\n if (0xd115 <= code && code <= 0xd12f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE TEO\n if (0xd130 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xd184) {\n if (code < 0xd14d) {\n if (code < 0xd14c) {\n // Lo [27] HANGUL SYLLABLE TEOG..HANGUL SYLLABLE TEOH\n if (0xd131 <= code && code <= 0xd14b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE TE\n if (0xd14c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xd168) {\n // Lo [27] HANGUL SYLLABLE TEG..HANGUL SYLLABLE TEH\n if (0xd14d <= code && code <= 0xd167) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xd169) {\n // Lo HANGUL SYLLABLE TYEO\n if (0xd168 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE TYEOG..HANGUL SYLLABLE TYEOH\n if (0xd169 <= code && code <= 0xd183) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xd1a1) {\n if (code < 0xd185) {\n // Lo HANGUL SYLLABLE TYE\n if (0xd184 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xd1a0) {\n // Lo [27] HANGUL SYLLABLE TYEG..HANGUL SYLLABLE TYEH\n if (0xd185 <= code && code <= 0xd19f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE TO\n if (0xd1a0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n else {\n if (code < 0xd1bc) {\n // Lo [27] HANGUL SYLLABLE TOG..HANGUL SYLLABLE TOH\n if (0xd1a1 <= code && code <= 0xd1bb) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xd1bd) {\n // Lo HANGUL SYLLABLE TWA\n if (0xd1bc === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE TWAG..HANGUL SYLLABLE TWAH\n if (0xd1bd <= code && code <= 0xd1d7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x1133b) {\n if (code < 0xd671) {\n if (code < 0xd424) {\n if (code < 0xd2f1) {\n if (code < 0xd264) {\n if (code < 0xd211) {\n if (code < 0xd1f4) {\n if (code < 0xd1d9) {\n // Lo HANGUL SYLLABLE TWAE\n if (0xd1d8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE TWAEG..HANGUL SYLLABLE TWAEH\n if (0xd1d9 <= code && code <= 0xd1f3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xd1f5) {\n // Lo HANGUL SYLLABLE TOE\n if (0xd1f4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xd210) {\n // Lo [27] HANGUL SYLLABLE TOEG..HANGUL SYLLABLE TOEH\n if (0xd1f5 <= code && code <= 0xd20f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE TYO\n if (0xd210 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xd22d) {\n if (code < 0xd22c) {\n // Lo [27] HANGUL SYLLABLE TYOG..HANGUL SYLLABLE TYOH\n if (0xd211 <= code && code <= 0xd22b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE TU\n if (0xd22c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xd248) {\n // Lo [27] HANGUL SYLLABLE TUG..HANGUL SYLLABLE TUH\n if (0xd22d <= code && code <= 0xd247) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xd249) {\n // Lo HANGUL SYLLABLE TWEO\n if (0xd248 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE TWEOG..HANGUL SYLLABLE TWEOH\n if (0xd249 <= code && code <= 0xd263) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xd29d) {\n if (code < 0xd280) {\n if (code < 0xd265) {\n // Lo HANGUL SYLLABLE TWE\n if (0xd264 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE TWEG..HANGUL SYLLABLE TWEH\n if (0xd265 <= code && code <= 0xd27f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xd281) {\n // Lo HANGUL SYLLABLE TWI\n if (0xd280 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xd29c) {\n // Lo [27] HANGUL SYLLABLE TWIG..HANGUL SYLLABLE TWIH\n if (0xd281 <= code && code <= 0xd29b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE TYU\n if (0xd29c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xd2d4) {\n if (code < 0xd2b8) {\n // Lo [27] HANGUL SYLLABLE TYUG..HANGUL SYLLABLE TYUH\n if (0xd29d <= code && code <= 0xd2b7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xd2b9) {\n // Lo HANGUL SYLLABLE TEU\n if (0xd2b8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE TEUG..HANGUL SYLLABLE TEUH\n if (0xd2b9 <= code && code <= 0xd2d3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n else {\n if (code < 0xd2d5) {\n // Lo HANGUL SYLLABLE TYI\n if (0xd2d4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xd2f0) {\n // Lo [27] HANGUL SYLLABLE TYIG..HANGUL SYLLABLE TYIH\n if (0xd2d5 <= code && code <= 0xd2ef) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE TI\n if (0xd2f0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xd37d) {\n if (code < 0xd344) {\n if (code < 0xd30d) {\n if (code < 0xd30c) {\n // Lo [27] HANGUL SYLLABLE TIG..HANGUL SYLLABLE TIH\n if (0xd2f1 <= code && code <= 0xd30b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE PA\n if (0xd30c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xd328) {\n // Lo [27] HANGUL SYLLABLE PAG..HANGUL SYLLABLE PAH\n if (0xd30d <= code && code <= 0xd327) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xd329) {\n // Lo HANGUL SYLLABLE PAE\n if (0xd328 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE PAEG..HANGUL SYLLABLE PAEH\n if (0xd329 <= code && code <= 0xd343) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xd360) {\n if (code < 0xd345) {\n // Lo HANGUL SYLLABLE PYA\n if (0xd344 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE PYAG..HANGUL SYLLABLE PYAH\n if (0xd345 <= code && code <= 0xd35f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xd361) {\n // Lo HANGUL SYLLABLE PYAE\n if (0xd360 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xd37c) {\n // Lo [27] HANGUL SYLLABLE PYAEG..HANGUL SYLLABLE PYAEH\n if (0xd361 <= code && code <= 0xd37b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE PEO\n if (0xd37c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xd3d0) {\n if (code < 0xd399) {\n if (code < 0xd398) {\n // Lo [27] HANGUL SYLLABLE PEOG..HANGUL SYLLABLE PEOH\n if (0xd37d <= code && code <= 0xd397) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE PE\n if (0xd398 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xd3b4) {\n // Lo [27] HANGUL SYLLABLE PEG..HANGUL SYLLABLE PEH\n if (0xd399 <= code && code <= 0xd3b3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xd3b5) {\n // Lo HANGUL SYLLABLE PYEO\n if (0xd3b4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE PYEOG..HANGUL SYLLABLE PYEOH\n if (0xd3b5 <= code && code <= 0xd3cf) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xd3ed) {\n if (code < 0xd3d1) {\n // Lo HANGUL SYLLABLE PYE\n if (0xd3d0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xd3ec) {\n // Lo [27] HANGUL SYLLABLE PYEG..HANGUL SYLLABLE PYEH\n if (0xd3d1 <= code && code <= 0xd3eb) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE PO\n if (0xd3ec === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n else {\n if (code < 0xd408) {\n // Lo [27] HANGUL SYLLABLE POG..HANGUL SYLLABLE POH\n if (0xd3ed <= code && code <= 0xd407) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xd409) {\n // Lo HANGUL SYLLABLE PWA\n if (0xd408 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE PWAG..HANGUL SYLLABLE PWAH\n if (0xd409 <= code && code <= 0xd423) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xd53d) {\n if (code < 0xd4b0) {\n if (code < 0xd45d) {\n if (code < 0xd440) {\n if (code < 0xd425) {\n // Lo HANGUL SYLLABLE PWAE\n if (0xd424 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE PWAEG..HANGUL SYLLABLE PWAEH\n if (0xd425 <= code && code <= 0xd43f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xd441) {\n // Lo HANGUL SYLLABLE POE\n if (0xd440 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xd45c) {\n // Lo [27] HANGUL SYLLABLE POEG..HANGUL SYLLABLE POEH\n if (0xd441 <= code && code <= 0xd45b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE PYO\n if (0xd45c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xd479) {\n if (code < 0xd478) {\n // Lo [27] HANGUL SYLLABLE PYOG..HANGUL SYLLABLE PYOH\n if (0xd45d <= code && code <= 0xd477) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE PU\n if (0xd478 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xd494) {\n // Lo [27] HANGUL SYLLABLE PUG..HANGUL SYLLABLE PUH\n if (0xd479 <= code && code <= 0xd493) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xd495) {\n // Lo HANGUL SYLLABLE PWEO\n if (0xd494 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE PWEOG..HANGUL SYLLABLE PWEOH\n if (0xd495 <= code && code <= 0xd4af) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xd4e9) {\n if (code < 0xd4cc) {\n if (code < 0xd4b1) {\n // Lo HANGUL SYLLABLE PWE\n if (0xd4b0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE PWEG..HANGUL SYLLABLE PWEH\n if (0xd4b1 <= code && code <= 0xd4cb) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xd4cd) {\n // Lo HANGUL SYLLABLE PWI\n if (0xd4cc === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xd4e8) {\n // Lo [27] HANGUL SYLLABLE PWIG..HANGUL SYLLABLE PWIH\n if (0xd4cd <= code && code <= 0xd4e7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE PYU\n if (0xd4e8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xd520) {\n if (code < 0xd504) {\n // Lo [27] HANGUL SYLLABLE PYUG..HANGUL SYLLABLE PYUH\n if (0xd4e9 <= code && code <= 0xd503) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xd505) {\n // Lo HANGUL SYLLABLE PEU\n if (0xd504 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE PEUG..HANGUL SYLLABLE PEUH\n if (0xd505 <= code && code <= 0xd51f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n else {\n if (code < 0xd521) {\n // Lo HANGUL SYLLABLE PYI\n if (0xd520 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xd53c) {\n // Lo [27] HANGUL SYLLABLE PYIG..HANGUL SYLLABLE PYIH\n if (0xd521 <= code && code <= 0xd53b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE PI\n if (0xd53c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xd5e4) {\n if (code < 0xd590) {\n if (code < 0xd559) {\n if (code < 0xd558) {\n // Lo [27] HANGUL SYLLABLE PIG..HANGUL SYLLABLE PIH\n if (0xd53d <= code && code <= 0xd557) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE HA\n if (0xd558 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xd574) {\n // Lo [27] HANGUL SYLLABLE HAG..HANGUL SYLLABLE HAH\n if (0xd559 <= code && code <= 0xd573) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xd575) {\n // Lo HANGUL SYLLABLE HAE\n if (0xd574 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE HAEG..HANGUL SYLLABLE HAEH\n if (0xd575 <= code && code <= 0xd58f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xd5ad) {\n if (code < 0xd591) {\n // Lo HANGUL SYLLABLE HYA\n if (0xd590 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xd5ac) {\n // Lo [27] HANGUL SYLLABLE HYAG..HANGUL SYLLABLE HYAH\n if (0xd591 <= code && code <= 0xd5ab) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE HYAE\n if (0xd5ac === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n else {\n if (code < 0xd5c8) {\n // Lo [27] HANGUL SYLLABLE HYAEG..HANGUL SYLLABLE HYAEH\n if (0xd5ad <= code && code <= 0xd5c7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xd5c9) {\n // Lo HANGUL SYLLABLE HEO\n if (0xd5c8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE HEOG..HANGUL SYLLABLE HEOH\n if (0xd5c9 <= code && code <= 0xd5e3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xd61d) {\n if (code < 0xd600) {\n if (code < 0xd5e5) {\n // Lo HANGUL SYLLABLE HE\n if (0xd5e4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE HEG..HANGUL SYLLABLE HEH\n if (0xd5e5 <= code && code <= 0xd5ff) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xd601) {\n // Lo HANGUL SYLLABLE HYEO\n if (0xd600 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xd61c) {\n // Lo [27] HANGUL SYLLABLE HYEOG..HANGUL SYLLABLE HYEOH\n if (0xd601 <= code && code <= 0xd61b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE HYE\n if (0xd61c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n else {\n if (code < 0xd654) {\n if (code < 0xd638) {\n // Lo [27] HANGUL SYLLABLE HYEG..HANGUL SYLLABLE HYEH\n if (0xd61d <= code && code <= 0xd637) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xd639) {\n // Lo HANGUL SYLLABLE HO\n if (0xd638 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE HOG..HANGUL SYLLABLE HOH\n if (0xd639 <= code && code <= 0xd653) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n else {\n if (code < 0xd655) {\n // Lo HANGUL SYLLABLE HWA\n if (0xd654 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xd670) {\n // Lo [27] HANGUL SYLLABLE HWAG..HANGUL SYLLABLE HWAH\n if (0xd655 <= code && code <= 0xd66f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE HWAE\n if (0xd670 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x11000) {\n if (code < 0xd7b0) {\n if (code < 0xd6fd) {\n if (code < 0xd6c4) {\n if (code < 0xd68d) {\n if (code < 0xd68c) {\n // Lo [27] HANGUL SYLLABLE HWAEG..HANGUL SYLLABLE HWAEH\n if (0xd671 <= code && code <= 0xd68b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE HOE\n if (0xd68c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xd6a8) {\n // Lo [27] HANGUL SYLLABLE HOEG..HANGUL SYLLABLE HOEH\n if (0xd68d <= code && code <= 0xd6a7) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xd6a9) {\n // Lo HANGUL SYLLABLE HYO\n if (0xd6a8 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE HYOG..HANGUL SYLLABLE HYOH\n if (0xd6a9 <= code && code <= 0xd6c3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xd6e0) {\n if (code < 0xd6c5) {\n // Lo HANGUL SYLLABLE HU\n if (0xd6c4 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE HUG..HANGUL SYLLABLE HUH\n if (0xd6c5 <= code && code <= 0xd6df) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n else {\n if (code < 0xd6e1) {\n // Lo HANGUL SYLLABLE HWEO\n if (0xd6e0 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xd6fc) {\n // Lo [27] HANGUL SYLLABLE HWEOG..HANGUL SYLLABLE HWEOH\n if (0xd6e1 <= code && code <= 0xd6fb) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE HWE\n if (0xd6fc === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0xd750) {\n if (code < 0xd719) {\n if (code < 0xd718) {\n // Lo [27] HANGUL SYLLABLE HWEG..HANGUL SYLLABLE HWEH\n if (0xd6fd <= code && code <= 0xd717) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE HWI\n if (0xd718 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n else {\n if (code < 0xd734) {\n // Lo [27] HANGUL SYLLABLE HWIG..HANGUL SYLLABLE HWIH\n if (0xd719 <= code && code <= 0xd733) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xd735) {\n // Lo HANGUL SYLLABLE HYU\n if (0xd734 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE HYUG..HANGUL SYLLABLE HYUH\n if (0xd735 <= code && code <= 0xd74f) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n else {\n if (code < 0xd76d) {\n if (code < 0xd751) {\n // Lo HANGUL SYLLABLE HEU\n if (0xd750 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n if (code < 0xd76c) {\n // Lo [27] HANGUL SYLLABLE HEUG..HANGUL SYLLABLE HEUH\n if (0xd751 <= code && code <= 0xd76b) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n // Lo HANGUL SYLLABLE HYI\n if (0xd76c === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n }\n }\n else {\n if (code < 0xd788) {\n // Lo [27] HANGUL SYLLABLE HYIG..HANGUL SYLLABLE HYIH\n if (0xd76d <= code && code <= 0xd787) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n else {\n if (code < 0xd789) {\n // Lo HANGUL SYLLABLE HI\n if (0xd788 === code) {\n return boundaries_1.CLUSTER_BREAK.LV;\n }\n }\n else {\n // Lo [27] HANGUL SYLLABLE HIG..HANGUL SYLLABLE HIH\n if (0xd789 <= code && code <= 0xd7a3) {\n return boundaries_1.CLUSTER_BREAK.LVT;\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x10a01) {\n if (code < 0xfeff) {\n if (code < 0xfb1e) {\n if (code < 0xd7cb) {\n // Lo [23] HANGUL JUNGSEONG O-YEO..HANGUL JUNGSEONG ARAEA-E\n if (0xd7b0 <= code && code <= 0xd7c6) {\n return boundaries_1.CLUSTER_BREAK.V;\n }\n }\n else {\n // Lo [49] HANGUL JONGSEONG NIEUN-RIEUL..HANGUL JONGSEONG PHIEUPH-THIEUTH\n if (0xd7cb <= code && code <= 0xd7fb) {\n return boundaries_1.CLUSTER_BREAK.T;\n }\n }\n }\n else {\n if (code < 0xfe00) {\n // Mn HEBREW POINT JUDEO-SPANISH VARIKA\n if (0xfb1e === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0xfe20) {\n // Mn [16] VARIATION SELECTOR-1..VARIATION SELECTOR-16\n if (0xfe00 <= code && code <= 0xfe0f) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [16] COMBINING LIGATURE LEFT HALF..COMBINING CYRILLIC TITLO RIGHT HALF\n if (0xfe20 <= code && code <= 0xfe2f) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n else {\n if (code < 0x101fd) {\n if (code < 0xff9e) {\n // Cf ZERO WIDTH NO-BREAK SPACE\n if (0xfeff === code) {\n return boundaries_1.CLUSTER_BREAK.CONTROL;\n }\n }\n else {\n if (code < 0xfff0) {\n // Lm [2] HALFWIDTH KATAKANA VOICED SOUND MARK..HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK\n if (0xff9e <= code && code <= 0xff9f) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Cn [9] ..\n // Cf [3] INTERLINEAR ANNOTATION ANCHOR..INTERLINEAR ANNOTATION TERMINATOR\n if (0xfff0 <= code && code <= 0xfffb) {\n return boundaries_1.CLUSTER_BREAK.CONTROL;\n }\n }\n }\n }\n else {\n if (code < 0x102e0) {\n // Mn PHAISTOS DISC SIGN COMBINING OBLIQUE STROKE\n if (0x101fd === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x10376) {\n // Mn COPTIC EPACT THOUSANDS MARK\n if (0x102e0 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [5] COMBINING OLD PERMIC LETTER AN..COMBINING OLD PERMIC LETTER SII\n if (0x10376 <= code && code <= 0x1037a) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x10ae5) {\n if (code < 0x10a0c) {\n if (code < 0x10a05) {\n // Mn [3] KHAROSHTHI VOWEL SIGN I..KHAROSHTHI VOWEL SIGN VOCALIC R\n if (0x10a01 <= code && code <= 0x10a03) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [2] KHAROSHTHI VOWEL SIGN E..KHAROSHTHI VOWEL SIGN O\n if (0x10a05 <= code && code <= 0x10a06) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0x10a38) {\n // Mn [4] KHAROSHTHI VOWEL LENGTH MARK..KHAROSHTHI SIGN VISARGA\n if (0x10a0c <= code && code <= 0x10a0f) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x10a3f) {\n // Mn [3] KHAROSHTHI SIGN BAR ABOVE..KHAROSHTHI SIGN DOT BELOW\n if (0x10a38 <= code && code <= 0x10a3a) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn KHAROSHTHI VIRAMA\n if (0x10a3f === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n else {\n if (code < 0x10efd) {\n if (code < 0x10d24) {\n // Mn [2] MANICHAEAN ABBREVIATION MARK ABOVE..MANICHAEAN ABBREVIATION MARK BELOW\n if (0x10ae5 <= code && code <= 0x10ae6) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x10eab) {\n // Mn [4] HANIFI ROHINGYA SIGN HARBAHAY..HANIFI ROHINGYA SIGN TASSI\n if (0x10d24 <= code && code <= 0x10d27) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [2] YEZIDI COMBINING HAMZA MARK..YEZIDI COMBINING MADDA MARK\n if (0x10eab <= code && code <= 0x10eac) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n else {\n if (code < 0x10f46) {\n // Mn [3] ARABIC SMALL LOW WORD SAKTA..ARABIC SMALL LOW WORD MADDA\n if (0x10efd <= code && code <= 0x10eff) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x10f82) {\n // Mn [11] SOGDIAN COMBINING DOT BELOW..SOGDIAN COMBINING STROKE BELOW\n if (0x10f46 <= code && code <= 0x10f50) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [4] OLD UYGHUR COMBINING DOT ABOVE..OLD UYGHUR COMBINING TWO DOTS BELOW\n if (0x10f82 <= code && code <= 0x10f85) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x11180) {\n if (code < 0x110b7) {\n if (code < 0x11073) {\n if (code < 0x11002) {\n // Mc BRAHMI SIGN CANDRABINDU\n if (0x11000 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n // Mn BRAHMI SIGN ANUSVARA\n if (0x11001 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x11038) {\n // Mc BRAHMI SIGN VISARGA\n if (0x11002 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0x11070) {\n // Mn [15] BRAHMI VOWEL SIGN AA..BRAHMI VIRAMA\n if (0x11038 <= code && code <= 0x11046) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn BRAHMI SIGN OLD TAMIL VIRAMA\n if (0x11070 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n else {\n if (code < 0x11082) {\n if (code < 0x1107f) {\n // Mn [2] BRAHMI VOWEL SIGN OLD TAMIL SHORT E..BRAHMI VOWEL SIGN OLD TAMIL SHORT O\n if (0x11073 <= code && code <= 0x11074) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [3] BRAHMI NUMBER JOINER..KAITHI SIGN ANUSVARA\n if (0x1107f <= code && code <= 0x11081) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0x110b0) {\n // Mc KAITHI SIGN VISARGA\n if (0x11082 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0x110b3) {\n // Mc [3] KAITHI VOWEL SIGN AA..KAITHI VOWEL SIGN II\n if (0x110b0 <= code && code <= 0x110b2) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn [4] KAITHI VOWEL SIGN U..KAITHI VOWEL SIGN AI\n if (0x110b3 <= code && code <= 0x110b6) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x11100) {\n if (code < 0x110bd) {\n if (code < 0x110b9) {\n // Mc [2] KAITHI VOWEL SIGN O..KAITHI VOWEL SIGN AU\n if (0x110b7 <= code && code <= 0x110b8) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn [2] KAITHI SIGN VIRAMA..KAITHI SIGN NUKTA\n if (0x110b9 <= code && code <= 0x110ba) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0x110c2) {\n // Cf KAITHI NUMBER SIGN\n if (0x110bd === code) {\n return boundaries_1.CLUSTER_BREAK.PREPEND;\n }\n }\n else {\n // Mn KAITHI VOWEL SIGN VOCALIC R\n if (0x110c2 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n // Cf KAITHI NUMBER SIGN ABOVE\n if (0x110cd === code) {\n return boundaries_1.CLUSTER_BREAK.PREPEND;\n }\n }\n }\n }\n else {\n if (code < 0x1112d) {\n if (code < 0x11127) {\n // Mn [3] CHAKMA SIGN CANDRABINDU..CHAKMA SIGN VISARGA\n if (0x11100 <= code && code <= 0x11102) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x1112c) {\n // Mn [5] CHAKMA VOWEL SIGN A..CHAKMA VOWEL SIGN UU\n if (0x11127 <= code && code <= 0x1112b) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc CHAKMA VOWEL SIGN E\n if (0x1112c === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n else {\n if (code < 0x11145) {\n // Mn [8] CHAKMA VOWEL SIGN AI..CHAKMA MAAYYAA\n if (0x1112d <= code && code <= 0x11134) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x11173) {\n // Mc [2] CHAKMA VOWEL SIGN AA..CHAKMA VOWEL SIGN EI\n if (0x11145 <= code && code <= 0x11146) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn MAHAJANI SIGN NUKTA\n if (0x11173 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x11232) {\n if (code < 0x111c2) {\n if (code < 0x111b3) {\n if (code < 0x11182) {\n // Mn [2] SHARADA SIGN CANDRABINDU..SHARADA SIGN ANUSVARA\n if (0x11180 <= code && code <= 0x11181) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc SHARADA SIGN VISARGA\n if (0x11182 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n else {\n if (code < 0x111b6) {\n // Mc [3] SHARADA VOWEL SIGN AA..SHARADA VOWEL SIGN II\n if (0x111b3 <= code && code <= 0x111b5) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0x111bf) {\n // Mn [9] SHARADA VOWEL SIGN U..SHARADA VOWEL SIGN O\n if (0x111b6 <= code && code <= 0x111be) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc [2] SHARADA VOWEL SIGN AU..SHARADA SIGN VIRAMA\n if (0x111bf <= code && code <= 0x111c0) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n }\n else {\n if (code < 0x111cf) {\n if (code < 0x111c9) {\n // Lo [2] SHARADA SIGN JIHVAMULIYA..SHARADA SIGN UPADHMANIYA\n if (0x111c2 <= code && code <= 0x111c3) {\n return boundaries_1.CLUSTER_BREAK.PREPEND;\n }\n }\n else {\n if (code < 0x111ce) {\n // Mn [4] SHARADA SANDHI MARK..SHARADA EXTRA SHORT VOWEL MARK\n if (0x111c9 <= code && code <= 0x111cc) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc SHARADA VOWEL SIGN PRISHTHAMATRA E\n if (0x111ce === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n else {\n if (code < 0x1122c) {\n // Mn SHARADA SIGN INVERTED CANDRABINDU\n if (0x111cf === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x1122f) {\n // Mc [3] KHOJKI VOWEL SIGN AA..KHOJKI VOWEL SIGN II\n if (0x1122c <= code && code <= 0x1122e) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn [3] KHOJKI VOWEL SIGN U..KHOJKI VOWEL SIGN AI\n if (0x1122f <= code && code <= 0x11231) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x11241) {\n if (code < 0x11235) {\n if (code < 0x11234) {\n // Mc [2] KHOJKI VOWEL SIGN O..KHOJKI VOWEL SIGN AU\n if (0x11232 <= code && code <= 0x11233) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn KHOJKI SIGN ANUSVARA\n if (0x11234 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0x11236) {\n // Mc KHOJKI SIGN VIRAMA\n if (0x11235 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0x1123e) {\n // Mn [2] KHOJKI SIGN NUKTA..KHOJKI SIGN SHADDA\n if (0x11236 <= code && code <= 0x11237) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn KHOJKI SIGN SUKUN\n if (0x1123e === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n else {\n if (code < 0x112e3) {\n if (code < 0x112df) {\n // Mn KHOJKI VOWEL SIGN VOCALIC R\n if (0x11241 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x112e0) {\n // Mn KHUDAWADI SIGN ANUSVARA\n if (0x112df === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc [3] KHUDAWADI VOWEL SIGN AA..KHUDAWADI VOWEL SIGN II\n if (0x112e0 <= code && code <= 0x112e2) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n else {\n if (code < 0x11300) {\n // Mn [8] KHUDAWADI VOWEL SIGN U..KHUDAWADI SIGN VIRAMA\n if (0x112e3 <= code && code <= 0x112ea) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x11302) {\n // Mn [2] GRANTHA SIGN COMBINING ANUSVARA ABOVE..GRANTHA SIGN CANDRABINDU\n if (0x11300 <= code && code <= 0x11301) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc [2] GRANTHA SIGN ANUSVARA..GRANTHA SIGN VISARGA\n if (0x11302 <= code && code <= 0x11303) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x11a97) {\n if (code < 0x116ab) {\n if (code < 0x114b9) {\n if (code < 0x11370) {\n if (code < 0x11347) {\n if (code < 0x1133f) {\n if (code < 0x1133e) {\n // Mn [2] COMBINING BINDU BELOW..GRANTHA SIGN NUKTA\n if (0x1133b <= code && code <= 0x1133c) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc GRANTHA VOWEL SIGN AA\n if (0x1133e === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0x11340) {\n // Mc GRANTHA VOWEL SIGN I\n if (0x1133f === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0x11341) {\n // Mn GRANTHA VOWEL SIGN II\n if (0x11340 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc [4] GRANTHA VOWEL SIGN U..GRANTHA VOWEL SIGN VOCALIC RR\n if (0x11341 <= code && code <= 0x11344) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n }\n else {\n if (code < 0x11357) {\n if (code < 0x1134b) {\n // Mc [2] GRANTHA VOWEL SIGN EE..GRANTHA VOWEL SIGN AI\n if (0x11347 <= code && code <= 0x11348) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mc [3] GRANTHA VOWEL SIGN OO..GRANTHA SIGN VIRAMA\n if (0x1134b <= code && code <= 0x1134d) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n else {\n if (code < 0x11362) {\n // Mc GRANTHA AU LENGTH MARK\n if (0x11357 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x11366) {\n // Mc [2] GRANTHA VOWEL SIGN VOCALIC L..GRANTHA VOWEL SIGN VOCALIC LL\n if (0x11362 <= code && code <= 0x11363) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn [7] COMBINING GRANTHA DIGIT ZERO..COMBINING GRANTHA DIGIT SIX\n if (0x11366 <= code && code <= 0x1136c) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x11445) {\n if (code < 0x11438) {\n if (code < 0x11435) {\n // Mn [5] COMBINING GRANTHA LETTER A..COMBINING GRANTHA LETTER PA\n if (0x11370 <= code && code <= 0x11374) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc [3] NEWA VOWEL SIGN AA..NEWA VOWEL SIGN II\n if (0x11435 <= code && code <= 0x11437) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n else {\n if (code < 0x11440) {\n // Mn [8] NEWA VOWEL SIGN U..NEWA VOWEL SIGN AI\n if (0x11438 <= code && code <= 0x1143f) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x11442) {\n // Mc [2] NEWA VOWEL SIGN O..NEWA VOWEL SIGN AU\n if (0x11440 <= code && code <= 0x11441) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn [3] NEWA SIGN VIRAMA..NEWA SIGN ANUSVARA\n if (0x11442 <= code && code <= 0x11444) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n else {\n if (code < 0x114b0) {\n if (code < 0x11446) {\n // Mc NEWA SIGN VISARGA\n if (0x11445 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn NEWA SIGN NUKTA\n if (0x11446 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n // Mn NEWA SANDHI MARK\n if (0x1145e === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0x114b1) {\n // Mc TIRHUTA VOWEL SIGN AA\n if (0x114b0 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x114b3) {\n // Mc [2] TIRHUTA VOWEL SIGN I..TIRHUTA VOWEL SIGN II\n if (0x114b1 <= code && code <= 0x114b2) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn [6] TIRHUTA VOWEL SIGN U..TIRHUTA VOWEL SIGN VOCALIC LL\n if (0x114b3 <= code && code <= 0x114b8) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x115b8) {\n if (code < 0x114bf) {\n if (code < 0x114bb) {\n // Mc TIRHUTA VOWEL SIGN E\n if (0x114b9 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n // Mn TIRHUTA VOWEL SIGN SHORT E\n if (0x114ba === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x114bd) {\n // Mc [2] TIRHUTA VOWEL SIGN AI..TIRHUTA VOWEL SIGN O\n if (0x114bb <= code && code <= 0x114bc) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mc TIRHUTA VOWEL SIGN SHORT O\n if (0x114bd === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n // Mc TIRHUTA VOWEL SIGN AU\n if (0x114be === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n else {\n if (code < 0x115af) {\n if (code < 0x114c1) {\n // Mn [2] TIRHUTA SIGN CANDRABINDU..TIRHUTA SIGN ANUSVARA\n if (0x114bf <= code && code <= 0x114c0) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x114c2) {\n // Mc TIRHUTA SIGN VISARGA\n if (0x114c1 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn [2] TIRHUTA SIGN VIRAMA..TIRHUTA SIGN NUKTA\n if (0x114c2 <= code && code <= 0x114c3) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n else {\n if (code < 0x115b0) {\n // Mc SIDDHAM VOWEL SIGN AA\n if (0x115af === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x115b2) {\n // Mc [2] SIDDHAM VOWEL SIGN I..SIDDHAM VOWEL SIGN II\n if (0x115b0 <= code && code <= 0x115b1) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn [4] SIDDHAM VOWEL SIGN U..SIDDHAM VOWEL SIGN VOCALIC RR\n if (0x115b2 <= code && code <= 0x115b5) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x11630) {\n if (code < 0x115be) {\n if (code < 0x115bc) {\n // Mc [4] SIDDHAM VOWEL SIGN E..SIDDHAM VOWEL SIGN AU\n if (0x115b8 <= code && code <= 0x115bb) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn [2] SIDDHAM SIGN CANDRABINDU..SIDDHAM SIGN ANUSVARA\n if (0x115bc <= code && code <= 0x115bd) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0x115bf) {\n // Mc SIDDHAM SIGN VISARGA\n if (0x115be === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0x115dc) {\n // Mn [2] SIDDHAM SIGN VIRAMA..SIDDHAM SIGN NUKTA\n if (0x115bf <= code && code <= 0x115c0) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [2] SIDDHAM VOWEL SIGN ALTERNATE U..SIDDHAM VOWEL SIGN ALTERNATE UU\n if (0x115dc <= code && code <= 0x115dd) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n else {\n if (code < 0x1163d) {\n if (code < 0x11633) {\n // Mc [3] MODI VOWEL SIGN AA..MODI VOWEL SIGN II\n if (0x11630 <= code && code <= 0x11632) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0x1163b) {\n // Mn [8] MODI VOWEL SIGN U..MODI VOWEL SIGN AI\n if (0x11633 <= code && code <= 0x1163a) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc [2] MODI VOWEL SIGN O..MODI VOWEL SIGN AU\n if (0x1163b <= code && code <= 0x1163c) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n else {\n if (code < 0x1163e) {\n // Mn MODI SIGN ANUSVARA\n if (0x1163d === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x1163f) {\n // Mc MODI SIGN VISARGA\n if (0x1163e === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn [2] MODI SIGN VIRAMA..MODI SIGN ARDHACANDRA\n if (0x1163f <= code && code <= 0x11640) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x1193f) {\n if (code < 0x11727) {\n if (code < 0x116b6) {\n if (code < 0x116ad) {\n // Mn TAKRI SIGN ANUSVARA\n if (0x116ab === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n // Mc TAKRI SIGN VISARGA\n if (0x116ac === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0x116ae) {\n // Mn TAKRI VOWEL SIGN AA\n if (0x116ad === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x116b0) {\n // Mc [2] TAKRI VOWEL SIGN I..TAKRI VOWEL SIGN II\n if (0x116ae <= code && code <= 0x116af) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn [6] TAKRI VOWEL SIGN U..TAKRI VOWEL SIGN AU\n if (0x116b0 <= code && code <= 0x116b5) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n else {\n if (code < 0x1171d) {\n // Mc TAKRI SIGN VIRAMA\n if (0x116b6 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n // Mn TAKRI SIGN NUKTA\n if (0x116b7 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x11722) {\n // Mn [3] AHOM CONSONANT SIGN MEDIAL LA..AHOM CONSONANT SIGN MEDIAL LIGATING RA\n if (0x1171d <= code && code <= 0x1171f) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x11726) {\n // Mn [4] AHOM VOWEL SIGN I..AHOM VOWEL SIGN UU\n if (0x11722 <= code && code <= 0x11725) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc AHOM VOWEL SIGN E\n if (0x11726 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x11930) {\n if (code < 0x1182f) {\n if (code < 0x1182c) {\n // Mn [5] AHOM VOWEL SIGN AW..AHOM SIGN KILLER\n if (0x11727 <= code && code <= 0x1172b) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc [3] DOGRA VOWEL SIGN AA..DOGRA VOWEL SIGN II\n if (0x1182c <= code && code <= 0x1182e) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n else {\n if (code < 0x11838) {\n // Mn [9] DOGRA VOWEL SIGN U..DOGRA SIGN ANUSVARA\n if (0x1182f <= code && code <= 0x11837) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x11839) {\n // Mc DOGRA SIGN VISARGA\n if (0x11838 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn [2] DOGRA SIGN VIRAMA..DOGRA SIGN NUKTA\n if (0x11839 <= code && code <= 0x1183a) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n else {\n if (code < 0x1193b) {\n if (code < 0x11931) {\n // Mc DIVES AKURU VOWEL SIGN AA\n if (0x11930 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x11937) {\n // Mc [5] DIVES AKURU VOWEL SIGN I..DIVES AKURU VOWEL SIGN E\n if (0x11931 <= code && code <= 0x11935) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mc [2] DIVES AKURU VOWEL SIGN AI..DIVES AKURU VOWEL SIGN O\n if (0x11937 <= code && code <= 0x11938) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n else {\n if (code < 0x1193d) {\n // Mn [2] DIVES AKURU SIGN ANUSVARA..DIVES AKURU SIGN CANDRABINDU\n if (0x1193b <= code && code <= 0x1193c) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc DIVES AKURU SIGN HALANTA\n if (0x1193d === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n // Mn DIVES AKURU VIRAMA\n if (0x1193e === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x11a01) {\n if (code < 0x119d1) {\n if (code < 0x11941) {\n // Lo DIVES AKURU PREFIXED NASAL SIGN\n if (0x1193f === code) {\n return boundaries_1.CLUSTER_BREAK.PREPEND;\n }\n // Mc DIVES AKURU MEDIAL YA\n if (0x11940 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0x11942) {\n // Lo DIVES AKURU INITIAL RA\n if (0x11941 === code) {\n return boundaries_1.CLUSTER_BREAK.PREPEND;\n }\n }\n else {\n // Mc DIVES AKURU MEDIAL RA\n if (0x11942 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n // Mn DIVES AKURU SIGN NUKTA\n if (0x11943 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n else {\n if (code < 0x119dc) {\n if (code < 0x119d4) {\n // Mc [3] NANDINAGARI VOWEL SIGN AA..NANDINAGARI VOWEL SIGN II\n if (0x119d1 <= code && code <= 0x119d3) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0x119da) {\n // Mn [4] NANDINAGARI VOWEL SIGN U..NANDINAGARI VOWEL SIGN VOCALIC RR\n if (0x119d4 <= code && code <= 0x119d7) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [2] NANDINAGARI VOWEL SIGN E..NANDINAGARI VOWEL SIGN AI\n if (0x119da <= code && code <= 0x119db) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n else {\n if (code < 0x119e0) {\n // Mc [4] NANDINAGARI VOWEL SIGN O..NANDINAGARI SIGN VISARGA\n if (0x119dc <= code && code <= 0x119df) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn NANDINAGARI SIGN VIRAMA\n if (0x119e0 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n // Mc NANDINAGARI VOWEL SIGN PRISHTHAMATRA E\n if (0x119e4 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n }\n else {\n if (code < 0x11a47) {\n if (code < 0x11a39) {\n if (code < 0x11a33) {\n // Mn [10] ZANABAZAR SQUARE VOWEL SIGN I..ZANABAZAR SQUARE VOWEL LENGTH MARK\n if (0x11a01 <= code && code <= 0x11a0a) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [6] ZANABAZAR SQUARE FINAL CONSONANT MARK..ZANABAZAR SQUARE SIGN ANUSVARA\n if (0x11a33 <= code && code <= 0x11a38) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0x11a3a) {\n // Mc ZANABAZAR SQUARE SIGN VISARGA\n if (0x11a39 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0x11a3b) {\n // Lo ZANABAZAR SQUARE CLUSTER-INITIAL LETTER RA\n if (0x11a3a === code) {\n return boundaries_1.CLUSTER_BREAK.PREPEND;\n }\n }\n else {\n // Mn [4] ZANABAZAR SQUARE CLUSTER-FINAL LETTER YA..ZANABAZAR SQUARE CLUSTER-FINAL LETTER VA\n if (0x11a3b <= code && code <= 0x11a3e) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n else {\n if (code < 0x11a59) {\n if (code < 0x11a51) {\n // Mn ZANABAZAR SQUARE SUBJOINER\n if (0x11a47 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x11a57) {\n // Mn [6] SOYOMBO VOWEL SIGN I..SOYOMBO VOWEL SIGN OE\n if (0x11a51 <= code && code <= 0x11a56) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc [2] SOYOMBO VOWEL SIGN AI..SOYOMBO VOWEL SIGN AU\n if (0x11a57 <= code && code <= 0x11a58) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n else {\n if (code < 0x11a84) {\n // Mn [3] SOYOMBO VOWEL SIGN VOCALIC R..SOYOMBO VOWEL LENGTH MARK\n if (0x11a59 <= code && code <= 0x11a5b) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x11a8a) {\n // Lo [6] SOYOMBO SIGN JIHVAMULIYA..SOYOMBO CLUSTER-INITIAL LETTER SA\n if (0x11a84 <= code && code <= 0x11a89) {\n return boundaries_1.CLUSTER_BREAK.PREPEND;\n }\n }\n else {\n // Mn [13] SOYOMBO FINAL CONSONANT SIGN G..SOYOMBO SIGN ANUSVARA\n if (0x11a8a <= code && code <= 0x11a96) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x16f51) {\n if (code < 0x11d90) {\n if (code < 0x11cb1) {\n if (code < 0x11c3e) {\n if (code < 0x11c2f) {\n if (code < 0x11a98) {\n // Mc SOYOMBO SIGN VISARGA\n if (0x11a97 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn [2] SOYOMBO GEMINATION MARK..SOYOMBO SUBJOINER\n if (0x11a98 <= code && code <= 0x11a99) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0x11c30) {\n // Mc BHAIKSUKI VOWEL SIGN AA\n if (0x11c2f === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0x11c38) {\n // Mn [7] BHAIKSUKI VOWEL SIGN I..BHAIKSUKI VOWEL SIGN VOCALIC L\n if (0x11c30 <= code && code <= 0x11c36) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [6] BHAIKSUKI VOWEL SIGN E..BHAIKSUKI SIGN ANUSVARA\n if (0x11c38 <= code && code <= 0x11c3d) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n else {\n if (code < 0x11c92) {\n // Mc BHAIKSUKI SIGN VISARGA\n if (0x11c3e === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n // Mn BHAIKSUKI SIGN VIRAMA\n if (0x11c3f === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x11ca9) {\n // Mn [22] MARCHEN SUBJOINED LETTER KA..MARCHEN SUBJOINED LETTER ZA\n if (0x11c92 <= code && code <= 0x11ca7) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x11caa) {\n // Mc MARCHEN SUBJOINED LETTER YA\n if (0x11ca9 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn [7] MARCHEN SUBJOINED LETTER RA..MARCHEN VOWEL SIGN AA\n if (0x11caa <= code && code <= 0x11cb0) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x11d3a) {\n if (code < 0x11cb4) {\n if (code < 0x11cb2) {\n // Mc MARCHEN VOWEL SIGN I\n if (0x11cb1 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn [2] MARCHEN VOWEL SIGN U..MARCHEN VOWEL SIGN E\n if (0x11cb2 <= code && code <= 0x11cb3) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0x11cb5) {\n // Mc MARCHEN VOWEL SIGN O\n if (0x11cb4 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n if (code < 0x11d31) {\n // Mn [2] MARCHEN SIGN ANUSVARA..MARCHEN SIGN CANDRABINDU\n if (0x11cb5 <= code && code <= 0x11cb6) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [6] MASARAM GONDI VOWEL SIGN AA..MASARAM GONDI VOWEL SIGN VOCALIC R\n if (0x11d31 <= code && code <= 0x11d36) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n else {\n if (code < 0x11d46) {\n if (code < 0x11d3c) {\n // Mn MASARAM GONDI VOWEL SIGN E\n if (0x11d3a === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x11d3f) {\n // Mn [2] MASARAM GONDI VOWEL SIGN AI..MASARAM GONDI VOWEL SIGN O\n if (0x11d3c <= code && code <= 0x11d3d) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [7] MASARAM GONDI VOWEL SIGN AU..MASARAM GONDI VIRAMA\n if (0x11d3f <= code && code <= 0x11d45) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n else {\n if (code < 0x11d47) {\n // Lo MASARAM GONDI REPHA\n if (0x11d46 === code) {\n return boundaries_1.CLUSTER_BREAK.PREPEND;\n }\n }\n else {\n if (code < 0x11d8a) {\n // Mn MASARAM GONDI RA-KARA\n if (0x11d47 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc [5] GUNJALA GONDI VOWEL SIGN AA..GUNJALA GONDI VOWEL SIGN UU\n if (0x11d8a <= code && code <= 0x11d8e) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x11f36) {\n if (code < 0x11ef3) {\n if (code < 0x11d95) {\n if (code < 0x11d93) {\n // Mn [2] GUNJALA GONDI VOWEL SIGN EE..GUNJALA GONDI VOWEL SIGN AI\n if (0x11d90 <= code && code <= 0x11d91) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc [2] GUNJALA GONDI VOWEL SIGN OO..GUNJALA GONDI VOWEL SIGN AU\n if (0x11d93 <= code && code <= 0x11d94) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n else {\n if (code < 0x11d96) {\n // Mn GUNJALA GONDI SIGN ANUSVARA\n if (0x11d95 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc GUNJALA GONDI SIGN VISARGA\n if (0x11d96 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n // Mn GUNJALA GONDI VIRAMA\n if (0x11d97 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n else {\n if (code < 0x11f02) {\n if (code < 0x11ef5) {\n // Mn [2] MAKASAR VOWEL SIGN I..MAKASAR VOWEL SIGN U\n if (0x11ef3 <= code && code <= 0x11ef4) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x11f00) {\n // Mc [2] MAKASAR VOWEL SIGN E..MAKASAR VOWEL SIGN O\n if (0x11ef5 <= code && code <= 0x11ef6) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn [2] KAWI SIGN CANDRABINDU..KAWI SIGN ANUSVARA\n if (0x11f00 <= code && code <= 0x11f01) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n else {\n if (code < 0x11f03) {\n // Lo KAWI SIGN REPHA\n if (0x11f02 === code) {\n return boundaries_1.CLUSTER_BREAK.PREPEND;\n }\n }\n else {\n if (code < 0x11f34) {\n // Mc KAWI SIGN VISARGA\n if (0x11f03 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mc [2] KAWI VOWEL SIGN AA..KAWI VOWEL SIGN ALTERNATE AA\n if (0x11f34 <= code && code <= 0x11f35) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x13430) {\n if (code < 0x11f40) {\n if (code < 0x11f3e) {\n // Mn [5] KAWI VOWEL SIGN I..KAWI VOWEL SIGN VOCALIC R\n if (0x11f36 <= code && code <= 0x11f3a) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc [2] KAWI VOWEL SIGN E..KAWI VOWEL SIGN AI\n if (0x11f3e <= code && code <= 0x11f3f) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n else {\n if (code < 0x11f41) {\n // Mn KAWI VOWEL SIGN EU\n if (0x11f40 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc KAWI SIGN KILLER\n if (0x11f41 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n // Mn KAWI CONJOINER\n if (0x11f42 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n else {\n if (code < 0x16af0) {\n if (code < 0x13440) {\n // Cf [16] EGYPTIAN HIEROGLYPH VERTICAL JOINER..EGYPTIAN HIEROGLYPH END WALLED ENCLOSURE\n if (0x13430 <= code && code <= 0x1343f) {\n return boundaries_1.CLUSTER_BREAK.CONTROL;\n }\n }\n else {\n if (code < 0x13447) {\n // Mn EGYPTIAN HIEROGLYPH MIRROR HORIZONTALLY\n if (0x13440 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [15] EGYPTIAN HIEROGLYPH MODIFIER DAMAGED AT TOP START..EGYPTIAN HIEROGLYPH MODIFIER DAMAGED\n if (0x13447 <= code && code <= 0x13455) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n else {\n if (code < 0x16b30) {\n // Mn [5] BASSA VAH COMBINING HIGH TONE..BASSA VAH COMBINING HIGH-LOW TONE\n if (0x16af0 <= code && code <= 0x16af4) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x16f4f) {\n // Mn [7] PAHAWH HMONG MARK CIM TUB..PAHAWH HMONG MARK CIM TAUM\n if (0x16b30 <= code && code <= 0x16b36) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn MIAO SIGN CONSONANT MODIFIER BAR\n if (0x16f4f === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x1da84) {\n if (code < 0x1d167) {\n if (code < 0x1bca0) {\n if (code < 0x16fe4) {\n if (code < 0x16f8f) {\n // Mc [55] MIAO SIGN ASPIRATION..MIAO VOWEL SIGN UI\n if (0x16f51 <= code && code <= 0x16f87) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn [4] MIAO TONE RIGHT..MIAO TONE BELOW\n if (0x16f8f <= code && code <= 0x16f92) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0x16ff0) {\n // Mn KHITAN SMALL SCRIPT FILLER\n if (0x16fe4 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x1bc9d) {\n // Mc [2] VIETNAMESE ALTERNATE READING MARK CA..VIETNAMESE ALTERNATE READING MARK NHAY\n if (0x16ff0 <= code && code <= 0x16ff1) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n else {\n // Mn [2] DUPLOYAN THICK LETTER SELECTOR..DUPLOYAN DOUBLE MARK\n if (0x1bc9d <= code && code <= 0x1bc9e) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n else {\n if (code < 0x1cf30) {\n if (code < 0x1cf00) {\n // Cf [4] SHORTHAND FORMAT LETTER OVERLAP..SHORTHAND FORMAT UP STEP\n if (0x1bca0 <= code && code <= 0x1bca3) {\n return boundaries_1.CLUSTER_BREAK.CONTROL;\n }\n }\n else {\n // Mn [46] ZNAMENNY COMBINING MARK GORAZDO NIZKO S KRYZHEM ON LEFT..ZNAMENNY COMBINING MARK KRYZH ON LEFT\n if (0x1cf00 <= code && code <= 0x1cf2d) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0x1d165) {\n // Mn [23] ZNAMENNY COMBINING TONAL RANGE MARK MRACHNO..ZNAMENNY PRIZNAK MODIFIER ROG\n if (0x1cf30 <= code && code <= 0x1cf46) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc MUSICAL SYMBOL COMBINING STEM\n if (0x1d165 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n // Mc MUSICAL SYMBOL COMBINING SPRECHGESANG STEM\n if (0x1d166 === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n }\n }\n else {\n if (code < 0x1d185) {\n if (code < 0x1d16e) {\n if (code < 0x1d16d) {\n // Mn [3] MUSICAL SYMBOL COMBINING TREMOLO-1..MUSICAL SYMBOL COMBINING TREMOLO-3\n if (0x1d167 <= code && code <= 0x1d169) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mc MUSICAL SYMBOL COMBINING AUGMENTATION DOT\n if (0x1d16d === code) {\n return boundaries_1.CLUSTER_BREAK.SPACINGMARK;\n }\n }\n }\n else {\n if (code < 0x1d173) {\n // Mc [5] MUSICAL SYMBOL COMBINING FLAG-1..MUSICAL SYMBOL COMBINING FLAG-5\n if (0x1d16e <= code && code <= 0x1d172) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x1d17b) {\n // Cf [8] MUSICAL SYMBOL BEGIN BEAM..MUSICAL SYMBOL END PHRASE\n if (0x1d173 <= code && code <= 0x1d17a) {\n return boundaries_1.CLUSTER_BREAK.CONTROL;\n }\n }\n else {\n // Mn [8] MUSICAL SYMBOL COMBINING ACCENT..MUSICAL SYMBOL COMBINING LOURE\n if (0x1d17b <= code && code <= 0x1d182) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n else {\n if (code < 0x1da00) {\n if (code < 0x1d1aa) {\n // Mn [7] MUSICAL SYMBOL COMBINING DOIT..MUSICAL SYMBOL COMBINING TRIPLE TONGUE\n if (0x1d185 <= code && code <= 0x1d18b) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x1d242) {\n // Mn [4] MUSICAL SYMBOL COMBINING DOWN BOW..MUSICAL SYMBOL COMBINING SNAP PIZZICATO\n if (0x1d1aa <= code && code <= 0x1d1ad) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [3] COMBINING GREEK MUSICAL TRISEME..COMBINING GREEK MUSICAL PENTASEME\n if (0x1d242 <= code && code <= 0x1d244) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n else {\n if (code < 0x1da3b) {\n // Mn [55] SIGNWRITING HEAD RIM..SIGNWRITING AIR SUCKING IN\n if (0x1da00 <= code && code <= 0x1da36) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x1da75) {\n // Mn [50] SIGNWRITING MOUTH CLOSED NEUTRAL..SIGNWRITING EXCITEMENT\n if (0x1da3b <= code && code <= 0x1da6c) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn SIGNWRITING UPPER BODY TILTING FROM HIP JOINTS\n if (0x1da75 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x1e2ec) {\n if (code < 0x1e01b) {\n if (code < 0x1daa1) {\n if (code < 0x1da9b) {\n // Mn SIGNWRITING LOCATION HEAD NECK\n if (0x1da84 === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [5] SIGNWRITING FILL MODIFIER-2..SIGNWRITING FILL MODIFIER-6\n if (0x1da9b <= code && code <= 0x1da9f) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0x1e000) {\n // Mn [15] SIGNWRITING ROTATION MODIFIER-2..SIGNWRITING ROTATION MODIFIER-16\n if (0x1daa1 <= code && code <= 0x1daaf) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x1e008) {\n // Mn [7] COMBINING GLAGOLITIC LETTER AZU..COMBINING GLAGOLITIC LETTER ZHIVETE\n if (0x1e000 <= code && code <= 0x1e006) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [17] COMBINING GLAGOLITIC LETTER ZEMLJA..COMBINING GLAGOLITIC LETTER HERU\n if (0x1e008 <= code && code <= 0x1e018) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n else {\n if (code < 0x1e08f) {\n if (code < 0x1e023) {\n // Mn [7] COMBINING GLAGOLITIC LETTER SHTA..COMBINING GLAGOLITIC LETTER YATI\n if (0x1e01b <= code && code <= 0x1e021) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x1e026) {\n // Mn [2] COMBINING GLAGOLITIC LETTER YU..COMBINING GLAGOLITIC LETTER SMALL YUS\n if (0x1e023 <= code && code <= 0x1e024) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [5] COMBINING GLAGOLITIC LETTER YO..COMBINING GLAGOLITIC LETTER FITA\n if (0x1e026 <= code && code <= 0x1e02a) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n else {\n if (code < 0x1e130) {\n // Mn COMBINING CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I\n if (0x1e08f === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x1e2ae) {\n // Mn [7] NYIAKENG PUACHUE HMONG TONE-B..NYIAKENG PUACHUE HMONG TONE-D\n if (0x1e130 <= code && code <= 0x1e136) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn TOTO SIGN RISING TONE\n if (0x1e2ae === code) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x1f3fb) {\n if (code < 0x1e8d0) {\n if (code < 0x1e4ec) {\n // Mn [4] WANCHO TONE TUP..WANCHO TONE KOINI\n if (0x1e2ec <= code && code <= 0x1e2ef) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Mn [4] NAG MUNDARI SIGN MUHOR..NAG MUNDARI SIGN SUTUH\n if (0x1e4ec <= code && code <= 0x1e4ef) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n else {\n if (code < 0x1e944) {\n // Mn [7] MENDE KIKAKUI COMBINING NUMBER TEENS..MENDE KIKAKUI COMBINING NUMBER MILLIONS\n if (0x1e8d0 <= code && code <= 0x1e8d6) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0x1f1e6) {\n // Mn [7] ADLAM ALIF LENGTHENER..ADLAM NUKTA\n if (0x1e944 <= code && code <= 0x1e94a) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // So [26] REGIONAL INDICATOR SYMBOL LETTER A..REGIONAL INDICATOR SYMBOL LETTER Z\n if (0x1f1e6 <= code && code <= 0x1f1ff) {\n return boundaries_1.CLUSTER_BREAK.REGIONAL_INDICATOR;\n }\n }\n }\n }\n }\n else {\n if (code < 0xe0080) {\n if (code < 0xe0000) {\n // Sk [5] EMOJI MODIFIER FITZPATRICK TYPE-1-2..EMOJI MODIFIER FITZPATRICK TYPE-6\n if (0x1f3fb <= code && code <= 0x1f3ff) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n if (code < 0xe0020) {\n // Cn \n // Cf LANGUAGE TAG\n // Cn [30] ..\n if (0xe0000 <= code && code <= 0xe001f) {\n return boundaries_1.CLUSTER_BREAK.CONTROL;\n }\n }\n else {\n // Cf [96] TAG SPACE..CANCEL TAG\n if (0xe0020 <= code && code <= 0xe007f) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n }\n }\n else {\n if (code < 0xe0100) {\n // Cn [128] ..\n if (0xe0080 <= code && code <= 0xe00ff) {\n return boundaries_1.CLUSTER_BREAK.CONTROL;\n }\n }\n else {\n if (code < 0xe01f0) {\n // Mn [240] VARIATION SELECTOR-17..VARIATION SELECTOR-256\n if (0xe0100 <= code && code <= 0xe01ef) {\n return boundaries_1.CLUSTER_BREAK.EXTEND;\n }\n }\n else {\n // Cn [3600] ..\n if (0xe01f0 <= code && code <= 0xe0fff) {\n return boundaries_1.CLUSTER_BREAK.CONTROL;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n // unlisted code points are treated as a break property of \"Other\"\n return boundaries_1.CLUSTER_BREAK.OTHER;\n }\n /**\n * Given a Unicode code point, returns if symbol is an extended pictographic or some other break\n * @param code {number} Unicode code point\n * @returns {number}\n */\n static getEmojiProperty(code) {\n // emoji property taken from:\n // https://www.unicode.org/Public/UCD/latest/ucd/emoji/emoji-data.txt\n // and generated by\n // node ./scripts/generate-emoji-extended-pictographic.js\n if (code < 0x27b0) {\n if (code < 0x2600) {\n if (code < 0x2328) {\n if (code < 0x2122) {\n if (code < 0x203c) {\n // E0.6 [1] (\u00A9\uFE0F) copyright\n if (0xa9 === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n // E0.6 [1] (\u00AE\uFE0F) registered\n if (0xae === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n // E0.6 [1] (\u203C\uFE0F) double exclamation mark\n if (0x203c === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n // E0.6 [1] (\u2049\uFE0F) exclamation question mark\n if (0x2049 === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n }\n else {\n if (code < 0x2194) {\n // E0.6 [1] (\u2122\uFE0F) trade mark\n if (0x2122 === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n // E0.6 [1] (\u2139\uFE0F) information\n if (0x2139 === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n if (code < 0x21a9) {\n // E0.6 [6] (\u2194\uFE0F..\u2199\uFE0F) left-right arrow..down-left arrow\n if (0x2194 <= code && code <= 0x2199) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n if (code < 0x231a) {\n // E0.6 [2] (\u21A9\uFE0F..\u21AA\uFE0F) right arrow curving left..left arrow curving right\n if (0x21a9 <= code && code <= 0x21aa) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n // E0.6 [2] (\u231A..\u231B) watch..hourglass done\n if (0x231a <= code && code <= 0x231b) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x24c2) {\n if (code < 0x23cf) {\n // E1.0 [1] (\u2328\uFE0F) keyboard\n if (0x2328 === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n // E0.0 [1] (\u2388) HELM SYMBOL\n if (0x2388 === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n if (code < 0x23e9) {\n // E1.0 [1] (\u23CF\uFE0F) eject button\n if (0x23cf === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n if (code < 0x23f8) {\n // E0.6 [4] (\u23E9..\u23EC) fast-forward button..fast down button\n // E0.7 [2] (\u23ED\uFE0F..\u23EE\uFE0F) next track button..last track button\n // E1.0 [1] (\u23EF\uFE0F) play or pause button\n // E0.6 [1] (\u23F0) alarm clock\n // E1.0 [2] (\u23F1\uFE0F..\u23F2\uFE0F) stopwatch..timer clock\n // E0.6 [1] (\u23F3) hourglass not done\n if (0x23e9 <= code && code <= 0x23f3) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n // E0.7 [3] (\u23F8\uFE0F..\u23FA\uFE0F) pause button..record button\n if (0x23f8 <= code && code <= 0x23fa) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n }\n }\n }\n else {\n if (code < 0x25b6) {\n if (code < 0x25aa) {\n // E0.6 [1] (\u24C2\uFE0F) circled M\n if (0x24c2 === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n // E0.6 [2] (\u25AA\uFE0F..\u25AB\uFE0F) black small square..white small square\n if (0x25aa <= code && code <= 0x25ab) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n }\n else {\n if (code < 0x25c0) {\n // E0.6 [1] (\u25B6\uFE0F) play button\n if (0x25b6 === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n if (code < 0x25fb) {\n // E0.6 [1] (\u25C0\uFE0F) reverse button\n if (0x25c0 === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n // E0.6 [4] (\u25FB\uFE0F..\u25FE) white medium square..black medium-small square\n if (0x25fb <= code && code <= 0x25fe) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x2733) {\n if (code < 0x2714) {\n if (code < 0x2614) {\n if (code < 0x2607) {\n // E0.6 [2] (\u2600\uFE0F..\u2601\uFE0F) sun..cloud\n // E0.7 [2] (\u2602\uFE0F..\u2603\uFE0F) umbrella..snowman\n // E1.0 [1] (\u2604\uFE0F) comet\n // E0.0 [1] (\u2605) BLACK STAR\n if (0x2600 <= code && code <= 0x2605) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n // E0.0 [7] (\u2607..\u260D) LIGHTNING..OPPOSITION\n // E0.6 [1] (\u260E\uFE0F) telephone\n // E0.0 [2] (\u260F..\u2610) WHITE TELEPHONE..BALLOT BOX\n // E0.6 [1] (\u2611\uFE0F) check box with check\n // E0.0 [1] (\u2612) BALLOT BOX WITH X\n if (0x2607 <= code && code <= 0x2612) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n }\n else {\n if (code < 0x2690) {\n // E0.6 [2] (\u2614..\u2615) umbrella with rain drops..hot beverage\n // E0.0 [2] (\u2616..\u2617) WHITE SHOGI PIECE..BLACK SHOGI PIECE\n // E1.0 [1] (\u2618\uFE0F) shamrock\n // E0.0 [4] (\u2619..\u261C) REVERSED ROTATED FLORAL HEART BULLET..WHITE LEFT POINTING INDEX\n // E0.6 [1] (\u261D\uFE0F) index pointing up\n // E0.0 [2] (\u261E..\u261F) WHITE RIGHT POINTING INDEX..WHITE DOWN POINTING INDEX\n // E1.0 [1] (\u2620\uFE0F) skull and crossbones\n // E0.0 [1] (\u2621) CAUTION SIGN\n // E1.0 [2] (\u2622\uFE0F..\u2623\uFE0F) radioactive..biohazard\n // E0.0 [2] (\u2624..\u2625) CADUCEUS..ANKH\n // E1.0 [1] (\u2626\uFE0F) orthodox cross\n // E0.0 [3] (\u2627..\u2629) CHI RHO..CROSS OF JERUSALEM\n // E0.7 [1] (\u262A\uFE0F) star and crescent\n // E0.0 [3] (\u262B..\u262D) FARSI SYMBOL..HAMMER AND SICKLE\n // E1.0 [1] (\u262E\uFE0F) peace symbol\n // E0.7 [1] (\u262F\uFE0F) yin yang\n // E0.0 [8] (\u2630..\u2637) TRIGRAM FOR HEAVEN..TRIGRAM FOR EARTH\n // E0.7 [2] (\u2638\uFE0F..\u2639\uFE0F) wheel of dharma..frowning face\n // E0.6 [1] (\u263A\uFE0F) smiling face\n // E0.0 [5] (\u263B..\u263F) BLACK SMILING FACE..MERCURY\n // E4.0 [1] (\u2640\uFE0F) female sign\n // E0.0 [1] (\u2641) EARTH\n // E4.0 [1] (\u2642\uFE0F) male sign\n // E0.0 [5] (\u2643..\u2647) JUPITER..PLUTO\n // E0.6 [12] (\u2648..\u2653) Aries..Pisces\n // E0.0 [11] (\u2654..\u265E) WHITE CHESS KING..BLACK CHESS KNIGHT\n // E11.0 [1] (\u265F\uFE0F) chess pawn\n // E0.6 [1] (\u2660\uFE0F) spade suit\n // E0.0 [2] (\u2661..\u2662) WHITE HEART SUIT..WHITE DIAMOND SUIT\n // E0.6 [1] (\u2663\uFE0F) club suit\n // E0.0 [1] (\u2664) WHITE SPADE SUIT\n // E0.6 [2] (\u2665\uFE0F..\u2666\uFE0F) heart suit..diamond suit\n // E0.0 [1] (\u2667) WHITE CLUB SUIT\n // E0.6 [1] (\u2668\uFE0F) hot springs\n // E0.0 [18] (\u2669..\u267A) QUARTER NOTE..RECYCLING SYMBOL FOR GENERIC MATERIALS\n // E0.6 [1] (\u267B\uFE0F) recycling symbol\n // E0.0 [2] (\u267C..\u267D) RECYCLED PAPER SYMBOL..PARTIALLY-RECYCLED PAPER SYMBOL\n // E11.0 [1] (\u267E\uFE0F) infinity\n // E0.6 [1] (\u267F) wheelchair symbol\n // E0.0 [6] (\u2680..\u2685) DIE FACE-1..DIE FACE-6\n if (0x2614 <= code && code <= 0x2685) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n if (code < 0x2708) {\n // E0.0 [2] (\u2690..\u2691) WHITE FLAG..BLACK FLAG\n // E1.0 [1] (\u2692\uFE0F) hammer and pick\n // E0.6 [1] (\u2693) anchor\n // E1.0 [1] (\u2694\uFE0F) crossed swords\n // E4.0 [1] (\u2695\uFE0F) medical symbol\n // E1.0 [2] (\u2696\uFE0F..\u2697\uFE0F) balance scale..alembic\n // E0.0 [1] (\u2698) FLOWER\n // E1.0 [1] (\u2699\uFE0F) gear\n // E0.0 [1] (\u269A) STAFF OF HERMES\n // E1.0 [2] (\u269B\uFE0F..\u269C\uFE0F) atom symbol..fleur-de-lis\n // E0.0 [3] (\u269D..\u269F) OUTLINED WHITE STAR..THREE LINES CONVERGING LEFT\n // E0.6 [2] (\u26A0\uFE0F..\u26A1) warning..high voltage\n // E0.0 [5] (\u26A2..\u26A6) DOUBLED FEMALE SIGN..MALE WITH STROKE SIGN\n // E13.0 [1] (\u26A7\uFE0F) transgender symbol\n // E0.0 [2] (\u26A8..\u26A9) VERTICAL MALE WITH STROKE SIGN..HORIZONTAL MALE WITH STROKE SIGN\n // E0.6 [2] (\u26AA..\u26AB) white circle..black circle\n // E0.0 [4] (\u26AC..\u26AF) MEDIUM SMALL WHITE CIRCLE..UNMARRIED PARTNERSHIP SYMBOL\n // E1.0 [2] (\u26B0\uFE0F..\u26B1\uFE0F) coffin..funeral urn\n // E0.0 [11] (\u26B2..\u26BC) NEUTER..SESQUIQUADRATE\n // E0.6 [2] (\u26BD..\u26BE) soccer ball..baseball\n // E0.0 [5] (\u26BF..\u26C3) SQUARED KEY..BLACK DRAUGHTS KING\n // E0.6 [2] (\u26C4..\u26C5) snowman without snow..sun behind cloud\n // E0.0 [2] (\u26C6..\u26C7) RAIN..BLACK SNOWMAN\n // E0.7 [1] (\u26C8\uFE0F) cloud with lightning and rain\n // E0.0 [5] (\u26C9..\u26CD) TURNED WHITE SHOGI PIECE..DISABLED CAR\n // E0.6 [1] (\u26CE) Ophiuchus\n // E0.7 [1] (\u26CF\uFE0F) pick\n // E0.0 [1] (\u26D0) CAR SLIDING\n // E0.7 [1] (\u26D1\uFE0F) rescue worker\u2019s helmet\n // E0.0 [1] (\u26D2) CIRCLED CROSSING LANES\n // E0.7 [1] (\u26D3\uFE0F) chains\n // E0.6 [1] (\u26D4) no entry\n // E0.0 [20] (\u26D5..\u26E8) ALTERNATE ONE-WAY LEFT WAY TRAFFIC..BLACK CROSS ON SHIELD\n // E0.7 [1] (\u26E9\uFE0F) shinto shrine\n // E0.6 [1] (\u26EA) church\n // E0.0 [5] (\u26EB..\u26EF) CASTLE..MAP SYMBOL FOR LIGHTHOUSE\n // E0.7 [2] (\u26F0\uFE0F..\u26F1\uFE0F) mountain..umbrella on ground\n // E0.6 [2] (\u26F2..\u26F3) fountain..flag in hole\n // E0.7 [1] (\u26F4\uFE0F) ferry\n // E0.6 [1] (\u26F5) sailboat\n // E0.0 [1] (\u26F6) SQUARE FOUR CORNERS\n // E0.7 [3] (\u26F7\uFE0F..\u26F9\uFE0F) skier..person bouncing ball\n // E0.6 [1] (\u26FA) tent\n // E0.0 [2] (\u26FB..\u26FC) JAPANESE BANK SYMBOL..HEADSTONE GRAVEYARD SYMBOL\n // E0.6 [1] (\u26FD) fuel pump\n // E0.0 [4] (\u26FE..\u2701) CUP ON BLACK SQUARE..UPPER BLADE SCISSORS\n // E0.6 [1] (\u2702\uFE0F) scissors\n // E0.0 [2] (\u2703..\u2704) LOWER BLADE SCISSORS..WHITE SCISSORS\n // E0.6 [1] (\u2705) check mark button\n if (0x2690 <= code && code <= 0x2705) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n // E0.6 [5] (\u2708\uFE0F..\u270C\uFE0F) airplane..victory hand\n // E0.7 [1] (\u270D\uFE0F) writing hand\n // E0.0 [1] (\u270E) LOWER RIGHT PENCIL\n // E0.6 [1] (\u270F\uFE0F) pencil\n // E0.0 [2] (\u2710..\u2711) UPPER RIGHT PENCIL..WHITE NIB\n // E0.6 [1] (\u2712\uFE0F) black nib\n if (0x2708 <= code && code <= 0x2712) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n }\n }\n }\n else {\n if (code < 0x271d) {\n // E0.6 [1] (\u2714\uFE0F) check mark\n if (0x2714 === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n // E0.6 [1] (\u2716\uFE0F) multiply\n if (0x2716 === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n if (code < 0x2721) {\n // E0.7 [1] (\u271D\uFE0F) latin cross\n if (0x271d === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n // E0.7 [1] (\u2721\uFE0F) star of David\n if (0x2721 === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n // E0.6 [1] (\u2728) sparkles\n if (0x2728 === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n }\n }\n }\n else {\n if (code < 0x2753) {\n if (code < 0x2747) {\n if (code < 0x2744) {\n // E0.6 [2] (\u2733\uFE0F..\u2734\uFE0F) eight-spoked asterisk..eight-pointed star\n if (0x2733 <= code && code <= 0x2734) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n // E0.6 [1] (\u2744\uFE0F) snowflake\n if (0x2744 === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n }\n else {\n if (code < 0x274c) {\n // E0.6 [1] (\u2747\uFE0F) sparkle\n if (0x2747 === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n // E0.6 [1] (\u274C) cross mark\n if (0x274c === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n // E0.6 [1] (\u274E) cross mark button\n if (0x274e === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n }\n }\n else {\n if (code < 0x2763) {\n if (code < 0x2757) {\n // E0.6 [3] (\u2753..\u2755) red question mark..white exclamation mark\n if (0x2753 <= code && code <= 0x2755) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n // E0.6 [1] (\u2757) red exclamation mark\n if (0x2757 === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n }\n else {\n if (code < 0x2795) {\n // E1.0 [1] (\u2763\uFE0F) heart exclamation\n // E0.6 [1] (\u2764\uFE0F) red heart\n // E0.0 [3] (\u2765..\u2767) ROTATED HEAVY BLACK HEART BULLET..ROTATED FLORAL HEART BULLET\n if (0x2763 <= code && code <= 0x2767) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n if (code < 0x27a1) {\n // E0.6 [3] (\u2795..\u2797) plus..divide\n if (0x2795 <= code && code <= 0x2797) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n // E0.6 [1] (\u27A1\uFE0F) right arrow\n if (0x27a1 === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x1f201) {\n if (code < 0x3297) {\n if (code < 0x2b1b) {\n if (code < 0x2934) {\n // E0.6 [1] (\u27B0) curly loop\n if (0x27b0 === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n // E1.0 [1] (\u27BF) double curly loop\n if (0x27bf === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n if (code < 0x2b05) {\n // E0.6 [2] (\u2934\uFE0F..\u2935\uFE0F) right arrow curving up..right arrow curving down\n if (0x2934 <= code && code <= 0x2935) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n // E0.6 [3] (\u2B05\uFE0F..\u2B07\uFE0F) left arrow..down arrow\n if (0x2b05 <= code && code <= 0x2b07) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n }\n }\n else {\n if (code < 0x2b55) {\n if (code < 0x2b50) {\n // E0.6 [2] (\u2B1B..\u2B1C) black large square..white large square\n if (0x2b1b <= code && code <= 0x2b1c) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n // E0.6 [1] (\u2B50) star\n if (0x2b50 === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n }\n else {\n if (code < 0x3030) {\n // E0.6 [1] (\u2B55) hollow red circle\n if (0x2b55 === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n // E0.6 [1] (\u3030\uFE0F) wavy dash\n if (0x3030 === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n // E0.6 [1] (\u303D\uFE0F) part alternation mark\n if (0x303d === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n }\n }\n }\n else {\n if (code < 0x1f16c) {\n if (code < 0x1f000) {\n // E0.6 [1] (\u3297\uFE0F) Japanese \u201Ccongratulations\u201D button\n if (0x3297 === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n // E0.6 [1] (\u3299\uFE0F) Japanese \u201Csecret\u201D button\n if (0x3299 === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n if (code < 0x1f10d) {\n // E0.0 [4] (\uD83C\uDC00..\uD83C\uDC03) MAHJONG TILE EAST WIND..MAHJONG TILE NORTH WIND\n // E0.6 [1] (\uD83C\uDC04) mahjong red dragon\n // E0.0 [202] (\uD83C\uDC05..\uD83C\uDCCE) MAHJONG TILE GREEN DRAGON..PLAYING CARD KING OF DIAMONDS\n // E0.6 [1] (\uD83C\uDCCF) joker\n // E0.0 [48] (\uD83C\uDCD0..\uD83C\uDCFF) ..\n if (0x1f000 <= code && code <= 0x1f0ff) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n if (code < 0x1f12f) {\n // E0.0 [3] (\uD83C\uDD0D..\uD83C\uDD0F) CIRCLED ZERO WITH SLASH..CIRCLED DOLLAR SIGN WITH OVERLAID BACKSLASH\n if (0x1f10d <= code && code <= 0x1f10f) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n // E0.0 [1] (\uD83C\uDD2F) COPYLEFT SYMBOL\n if (0x1f12f === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n }\n }\n }\n else {\n if (code < 0x1f18e) {\n if (code < 0x1f17e) {\n // E0.0 [4] (\uD83C\uDD6C..\uD83C\uDD6F) RAISED MR SIGN..CIRCLED HUMAN FIGURE\n // E0.6 [2] (\uD83C\uDD70\uFE0F..\uD83C\uDD71\uFE0F) A button (blood type)..B button (blood type)\n if (0x1f16c <= code && code <= 0x1f171) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n // E0.6 [2] (\uD83C\uDD7E\uFE0F..\uD83C\uDD7F\uFE0F) O button (blood type)..P button\n if (0x1f17e <= code && code <= 0x1f17f) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n }\n else {\n if (code < 0x1f191) {\n // E0.6 [1] (\uD83C\uDD8E) AB button (blood type)\n if (0x1f18e === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n if (code < 0x1f1ad) {\n // E0.6 [10] (\uD83C\uDD91..\uD83C\uDD9A) CL button..VS button\n if (0x1f191 <= code && code <= 0x1f19a) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n // E0.0 [57] (\uD83C\uDDAD..\uD83C\uDDE5) MASK WORK SYMBOL..\n if (0x1f1ad <= code && code <= 0x1f1e5) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x1f7d5) {\n if (code < 0x1f249) {\n if (code < 0x1f22f) {\n if (code < 0x1f21a) {\n // E0.6 [2] (\uD83C\uDE01..\uD83C\uDE02\uFE0F) Japanese \u201Chere\u201D button..Japanese \u201Cservice charge\u201D button\n // E0.0 [13] (\uD83C\uDE03..\uD83C\uDE0F) ..\n if (0x1f201 <= code && code <= 0x1f20f) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n // E0.6 [1] (\uD83C\uDE1A) Japanese \u201Cfree of charge\u201D button\n if (0x1f21a === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n }\n else {\n if (code < 0x1f232) {\n // E0.6 [1] (\uD83C\uDE2F) Japanese \u201Creserved\u201D button\n if (0x1f22f === code) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n if (code < 0x1f23c) {\n // E0.6 [9] (\uD83C\uDE32..\uD83C\uDE3A) Japanese \u201Cprohibited\u201D button..Japanese \u201Copen for business\u201D button\n if (0x1f232 <= code && code <= 0x1f23a) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n // E0.0 [4] (\uD83C\uDE3C..\uD83C\uDE3F) ..\n if (0x1f23c <= code && code <= 0x1f23f) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n }\n }\n }\n else {\n if (code < 0x1f546) {\n if (code < 0x1f400) {\n // E0.0 [7] (\uD83C\uDE49..\uD83C\uDE4F) ..\n // E0.6 [2] (\uD83C\uDE50..\uD83C\uDE51) Japanese \u201Cbargain\u201D button..Japanese \u201Cacceptable\u201D button\n // E0.0 [174] (\uD83C\uDE52..\uD83C\uDEFF) ..\n // E0.6 [13] (\uD83C\uDF00..\uD83C\uDF0C) cyclone..milky way\n // E0.7 [2] (\uD83C\uDF0D..\uD83C\uDF0E) globe showing Europe-Africa..globe showing Americas\n // E0.6 [1] (\uD83C\uDF0F) globe showing Asia-Australia\n // E1.0 [1] (\uD83C\uDF10) globe with meridians\n // E0.6 [1] (\uD83C\uDF11) new moon\n // E1.0 [1] (\uD83C\uDF12) waxing crescent moon\n // E0.6 [3] (\uD83C\uDF13..\uD83C\uDF15) first quarter moon..full moon\n // E1.0 [3] (\uD83C\uDF16..\uD83C\uDF18) waning gibbous moon..waning crescent moon\n // E0.6 [1] (\uD83C\uDF19) crescent moon\n // E1.0 [1] (\uD83C\uDF1A) new moon face\n // E0.6 [1] (\uD83C\uDF1B) first quarter moon face\n // E0.7 [1] (\uD83C\uDF1C) last quarter moon face\n // E1.0 [2] (\uD83C\uDF1D..\uD83C\uDF1E) full moon face..sun with face\n // E0.6 [2] (\uD83C\uDF1F..\uD83C\uDF20) glowing star..shooting star\n // E0.7 [1] (\uD83C\uDF21\uFE0F) thermometer\n // E0.0 [2] (\uD83C\uDF22..\uD83C\uDF23) BLACK DROPLET..WHITE SUN\n // E0.7 [9] (\uD83C\uDF24\uFE0F..\uD83C\uDF2C\uFE0F) sun behind small cloud..wind face\n // E1.0 [3] (\uD83C\uDF2D..\uD83C\uDF2F) hot dog..burrito\n // E0.6 [2] (\uD83C\uDF30..\uD83C\uDF31) chestnut..seedling\n // E1.0 [2] (\uD83C\uDF32..\uD83C\uDF33) evergreen tree..deciduous tree\n // E0.6 [2] (\uD83C\uDF34..\uD83C\uDF35) palm tree..cactus\n // E0.7 [1] (\uD83C\uDF36\uFE0F) hot pepper\n // E0.6 [20] (\uD83C\uDF37..\uD83C\uDF4A) tulip..tangerine\n // E1.0 [1] (\uD83C\uDF4B) lemon\n // E0.6 [4] (\uD83C\uDF4C..\uD83C\uDF4F) banana..green apple\n // E1.0 [1] (\uD83C\uDF50) pear\n // E0.6 [43] (\uD83C\uDF51..\uD83C\uDF7B) peach..clinking beer mugs\n // E1.0 [1] (\uD83C\uDF7C) baby bottle\n // E0.7 [1] (\uD83C\uDF7D\uFE0F) fork and knife with plate\n // E1.0 [2] (\uD83C\uDF7E..\uD83C\uDF7F) bottle with popping cork..popcorn\n // E0.6 [20] (\uD83C\uDF80..\uD83C\uDF93) ribbon..graduation cap\n // E0.0 [2] (\uD83C\uDF94..\uD83C\uDF95) HEART WITH TIP ON THE LEFT..BOUQUET OF FLOWERS\n // E0.7 [2] (\uD83C\uDF96\uFE0F..\uD83C\uDF97\uFE0F) military medal..reminder ribbon\n // E0.0 [1] (\uD83C\uDF98) MUSICAL KEYBOARD WITH JACKS\n // E0.7 [3] (\uD83C\uDF99\uFE0F..\uD83C\uDF9B\uFE0F) studio microphone..control knobs\n // E0.0 [2] (\uD83C\uDF9C..\uD83C\uDF9D) BEAMED ASCENDING MUSICAL NOTES..BEAMED DESCENDING MUSICAL NOTES\n // E0.7 [2] (\uD83C\uDF9E\uFE0F..\uD83C\uDF9F\uFE0F) film frames..admission tickets\n // E0.6 [37] (\uD83C\uDFA0..\uD83C\uDFC4) carousel horse..person surfing\n // E1.0 [1] (\uD83C\uDFC5) sports medal\n // E0.6 [1] (\uD83C\uDFC6) trophy\n // E1.0 [1] (\uD83C\uDFC7) horse racing\n // E0.6 [1] (\uD83C\uDFC8) american football\n // E1.0 [1] (\uD83C\uDFC9) rugby football\n // E0.6 [1] (\uD83C\uDFCA) person swimming\n // E0.7 [4] (\uD83C\uDFCB\uFE0F..\uD83C\uDFCE\uFE0F) person lifting weights..racing car\n // E1.0 [5] (\uD83C\uDFCF..\uD83C\uDFD3) cricket game..ping pong\n // E0.7 [12] (\uD83C\uDFD4\uFE0F..\uD83C\uDFDF\uFE0F) snow-capped mountain..stadium\n // E0.6 [4] (\uD83C\uDFE0..\uD83C\uDFE3) house..Japanese post office\n // E1.0 [1] (\uD83C\uDFE4) post office\n // E0.6 [12] (\uD83C\uDFE5..\uD83C\uDFF0) hospital..castle\n // E0.0 [2] (\uD83C\uDFF1..\uD83C\uDFF2) WHITE PENNANT..BLACK PENNANT\n // E0.7 [1] (\uD83C\uDFF3\uFE0F) white flag\n // E1.0 [1] (\uD83C\uDFF4) black flag\n // E0.7 [1] (\uD83C\uDFF5\uFE0F) rosette\n // E0.0 [1] (\uD83C\uDFF6) BLACK ROSETTE\n // E0.7 [1] (\uD83C\uDFF7\uFE0F) label\n // E1.0 [3] (\uD83C\uDFF8..\uD83C\uDFFA) badminton..amphora\n if (0x1f249 <= code && code <= 0x1f3fa) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n // E1.0 [8] (\uD83D\uDC00..\uD83D\uDC07) rat..rabbit\n // E0.7 [1] (\uD83D\uDC08) cat\n // E1.0 [3] (\uD83D\uDC09..\uD83D\uDC0B) dragon..whale\n // E0.6 [3] (\uD83D\uDC0C..\uD83D\uDC0E) snail..horse\n // E1.0 [2] (\uD83D\uDC0F..\uD83D\uDC10) ram..goat\n // E0.6 [2] (\uD83D\uDC11..\uD83D\uDC12) ewe..monkey\n // E1.0 [1] (\uD83D\uDC13) rooster\n // E0.6 [1] (\uD83D\uDC14) chicken\n // E0.7 [1] (\uD83D\uDC15) dog\n // E1.0 [1] (\uD83D\uDC16) pig\n // E0.6 [19] (\uD83D\uDC17..\uD83D\uDC29) boar..poodle\n // E1.0 [1] (\uD83D\uDC2A) camel\n // E0.6 [20] (\uD83D\uDC2B..\uD83D\uDC3E) two-hump camel..paw prints\n // E0.7 [1] (\uD83D\uDC3F\uFE0F) chipmunk\n // E0.6 [1] (\uD83D\uDC40) eyes\n // E0.7 [1] (\uD83D\uDC41\uFE0F) eye\n // E0.6 [35] (\uD83D\uDC42..\uD83D\uDC64) ear..bust in silhouette\n // E1.0 [1] (\uD83D\uDC65) busts in silhouette\n // E0.6 [6] (\uD83D\uDC66..\uD83D\uDC6B) boy..woman and man holding hands\n // E1.0 [2] (\uD83D\uDC6C..\uD83D\uDC6D) men holding hands..women holding hands\n // E0.6 [63] (\uD83D\uDC6E..\uD83D\uDCAC) police officer..speech balloon\n // E1.0 [1] (\uD83D\uDCAD) thought balloon\n // E0.6 [8] (\uD83D\uDCAE..\uD83D\uDCB5) white flower..dollar banknote\n // E1.0 [2] (\uD83D\uDCB6..\uD83D\uDCB7) euro banknote..pound banknote\n // E0.6 [52] (\uD83D\uDCB8..\uD83D\uDCEB) money with wings..closed mailbox with raised flag\n // E0.7 [2] (\uD83D\uDCEC..\uD83D\uDCED) open mailbox with raised flag..open mailbox with lowered flag\n // E0.6 [1] (\uD83D\uDCEE) postbox\n // E1.0 [1] (\uD83D\uDCEF) postal horn\n // E0.6 [5] (\uD83D\uDCF0..\uD83D\uDCF4) newspaper..mobile phone off\n // E1.0 [1] (\uD83D\uDCF5) no mobile phones\n // E0.6 [2] (\uD83D\uDCF6..\uD83D\uDCF7) antenna bars..camera\n // E1.0 [1] (\uD83D\uDCF8) camera with flash\n // E0.6 [4] (\uD83D\uDCF9..\uD83D\uDCFC) video camera..videocassette\n // E0.7 [1] (\uD83D\uDCFD\uFE0F) film projector\n // E0.0 [1] (\uD83D\uDCFE) PORTABLE STEREO\n // E1.0 [4] (\uD83D\uDCFF..\uD83D\uDD02) prayer beads..repeat single button\n // E0.6 [1] (\uD83D\uDD03) clockwise vertical arrows\n // E1.0 [4] (\uD83D\uDD04..\uD83D\uDD07) counterclockwise arrows button..muted speaker\n // E0.7 [1] (\uD83D\uDD08) speaker low volume\n // E1.0 [1] (\uD83D\uDD09) speaker medium volume\n // E0.6 [11] (\uD83D\uDD0A..\uD83D\uDD14) speaker high volume..bell\n // E1.0 [1] (\uD83D\uDD15) bell with slash\n // E0.6 [22] (\uD83D\uDD16..\uD83D\uDD2B) bookmark..water pistol\n // E1.0 [2] (\uD83D\uDD2C..\uD83D\uDD2D) microscope..telescope\n // E0.6 [16] (\uD83D\uDD2E..\uD83D\uDD3D) crystal ball..downwards button\n if (0x1f400 <= code && code <= 0x1f53d) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n }\n else {\n if (code < 0x1f680) {\n // E0.0 [3] (\uD83D\uDD46..\uD83D\uDD48) WHITE LATIN CROSS..CELTIC CROSS\n // E0.7 [2] (\uD83D\uDD49\uFE0F..\uD83D\uDD4A\uFE0F) om..dove\n // E1.0 [4] (\uD83D\uDD4B..\uD83D\uDD4E) kaaba..menorah\n // E0.0 [1] (\uD83D\uDD4F) BOWL OF HYGIEIA\n // E0.6 [12] (\uD83D\uDD50..\uD83D\uDD5B) one o\u2019clock..twelve o\u2019clock\n // E0.7 [12] (\uD83D\uDD5C..\uD83D\uDD67) one-thirty..twelve-thirty\n // E0.0 [7] (\uD83D\uDD68..\uD83D\uDD6E) RIGHT SPEAKER..BOOK\n // E0.7 [2] (\uD83D\uDD6F\uFE0F..\uD83D\uDD70\uFE0F) candle..mantelpiece clock\n // E0.0 [2] (\uD83D\uDD71..\uD83D\uDD72) BLACK SKULL AND CROSSBONES..NO PIRACY\n // E0.7 [7] (\uD83D\uDD73\uFE0F..\uD83D\uDD79\uFE0F) hole..joystick\n // E3.0 [1] (\uD83D\uDD7A) man dancing\n // E0.0 [12] (\uD83D\uDD7B..\uD83D\uDD86) LEFT HAND TELEPHONE RECEIVER..PEN OVER STAMPED ENVELOPE\n // E0.7 [1] (\uD83D\uDD87\uFE0F) linked paperclips\n // E0.0 [2] (\uD83D\uDD88..\uD83D\uDD89) BLACK PUSHPIN..LOWER LEFT PENCIL\n // E0.7 [4] (\uD83D\uDD8A\uFE0F..\uD83D\uDD8D\uFE0F) pen..crayon\n // E0.0 [2] (\uD83D\uDD8E..\uD83D\uDD8F) LEFT WRITING HAND..TURNED OK HAND SIGN\n // E0.7 [1] (\uD83D\uDD90\uFE0F) hand with fingers splayed\n // E0.0 [4] (\uD83D\uDD91..\uD83D\uDD94) REVERSED RAISED HAND WITH FINGERS SPLAYED..REVERSED VICTORY HAND\n // E1.0 [2] (\uD83D\uDD95..\uD83D\uDD96) middle finger..vulcan salute\n // E0.0 [13] (\uD83D\uDD97..\uD83D\uDDA3) WHITE DOWN POINTING LEFT HAND INDEX..BLACK DOWN POINTING BACKHAND INDEX\n // E3.0 [1] (\uD83D\uDDA4) black heart\n // E0.7 [1] (\uD83D\uDDA5\uFE0F) desktop computer\n // E0.0 [2] (\uD83D\uDDA6..\uD83D\uDDA7) KEYBOARD AND MOUSE..THREE NETWORKED COMPUTERS\n // E0.7 [1] (\uD83D\uDDA8\uFE0F) printer\n // E0.0 [8] (\uD83D\uDDA9..\uD83D\uDDB0) POCKET CALCULATOR..TWO BUTTON MOUSE\n // E0.7 [2] (\uD83D\uDDB1\uFE0F..\uD83D\uDDB2\uFE0F) computer mouse..trackball\n // E0.0 [9] (\uD83D\uDDB3..\uD83D\uDDBB) OLD PERSONAL COMPUTER..DOCUMENT WITH PICTURE\n // E0.7 [1] (\uD83D\uDDBC\uFE0F) framed picture\n // E0.0 [5] (\uD83D\uDDBD..\uD83D\uDDC1) FRAME WITH TILES..OPEN FOLDER\n // E0.7 [3] (\uD83D\uDDC2\uFE0F..\uD83D\uDDC4\uFE0F) card index dividers..file cabinet\n // E0.0 [12] (\uD83D\uDDC5..\uD83D\uDDD0) EMPTY NOTE..PAGES\n // E0.7 [3] (\uD83D\uDDD1\uFE0F..\uD83D\uDDD3\uFE0F) wastebasket..spiral calendar\n // E0.0 [8] (\uD83D\uDDD4..\uD83D\uDDDB) DESKTOP WINDOW..DECREASE FONT SIZE SYMBOL\n // E0.7 [3] (\uD83D\uDDDC\uFE0F..\uD83D\uDDDE\uFE0F) clamp..rolled-up newspaper\n // E0.0 [2] (\uD83D\uDDDF..\uD83D\uDDE0) PAGE WITH CIRCLED TEXT..STOCK CHART\n // E0.7 [1] (\uD83D\uDDE1\uFE0F) dagger\n // E0.0 [1] (\uD83D\uDDE2) LIPS\n // E0.7 [1] (\uD83D\uDDE3\uFE0F) speaking head\n // E0.0 [4] (\uD83D\uDDE4..\uD83D\uDDE7) THREE RAYS ABOVE..THREE RAYS RIGHT\n // E2.0 [1] (\uD83D\uDDE8\uFE0F) left speech bubble\n // E0.0 [6] (\uD83D\uDDE9..\uD83D\uDDEE) RIGHT SPEECH BUBBLE..LEFT ANGER BUBBLE\n // E0.7 [1] (\uD83D\uDDEF\uFE0F) right anger bubble\n // E0.0 [3] (\uD83D\uDDF0..\uD83D\uDDF2) MOOD BUBBLE..LIGHTNING MOOD\n // E0.7 [1] (\uD83D\uDDF3\uFE0F) ballot box with ballot\n // E0.0 [6] (\uD83D\uDDF4..\uD83D\uDDF9) BALLOT SCRIPT X..BALLOT BOX WITH BOLD CHECK\n // E0.7 [1] (\uD83D\uDDFA\uFE0F) world map\n // E0.6 [5] (\uD83D\uDDFB..\uD83D\uDDFF) mount fuji..moai\n // E1.0 [1] (\uD83D\uDE00) grinning face\n // E0.6 [6] (\uD83D\uDE01..\uD83D\uDE06) beaming face with smiling eyes..grinning squinting face\n // E1.0 [2] (\uD83D\uDE07..\uD83D\uDE08) smiling face with halo..smiling face with horns\n // E0.6 [5] (\uD83D\uDE09..\uD83D\uDE0D) winking face..smiling face with heart-eyes\n // E1.0 [1] (\uD83D\uDE0E) smiling face with sunglasses\n // E0.6 [1] (\uD83D\uDE0F) smirking face\n // E0.7 [1] (\uD83D\uDE10) neutral face\n // E1.0 [1] (\uD83D\uDE11) expressionless face\n // E0.6 [3] (\uD83D\uDE12..\uD83D\uDE14) unamused face..pensive face\n // E1.0 [1] (\uD83D\uDE15) confused face\n // E0.6 [1] (\uD83D\uDE16) confounded face\n // E1.0 [1] (\uD83D\uDE17) kissing face\n // E0.6 [1] (\uD83D\uDE18) face blowing a kiss\n // E1.0 [1] (\uD83D\uDE19) kissing face with smiling eyes\n // E0.6 [1] (\uD83D\uDE1A) kissing face with closed eyes\n // E1.0 [1] (\uD83D\uDE1B) face with tongue\n // E0.6 [3] (\uD83D\uDE1C..\uD83D\uDE1E) winking face with tongue..disappointed face\n // E1.0 [1] (\uD83D\uDE1F) worried face\n // E0.6 [6] (\uD83D\uDE20..\uD83D\uDE25) angry face..sad but relieved face\n // E1.0 [2] (\uD83D\uDE26..\uD83D\uDE27) frowning face with open mouth..anguished face\n // E0.6 [4] (\uD83D\uDE28..\uD83D\uDE2B) fearful face..tired face\n // E1.0 [1] (\uD83D\uDE2C) grimacing face\n // E0.6 [1] (\uD83D\uDE2D) loudly crying face\n // E1.0 [2] (\uD83D\uDE2E..\uD83D\uDE2F) face with open mouth..hushed face\n // E0.6 [4] (\uD83D\uDE30..\uD83D\uDE33) anxious face with sweat..flushed face\n // E1.0 [1] (\uD83D\uDE34) sleeping face\n // E0.6 [1] (\uD83D\uDE35) face with crossed-out eyes\n // E1.0 [1] (\uD83D\uDE36) face without mouth\n // E0.6 [10] (\uD83D\uDE37..\uD83D\uDE40) face with medical mask..weary cat\n // E1.0 [4] (\uD83D\uDE41..\uD83D\uDE44) slightly frowning face..face with rolling eyes\n // E0.6 [11] (\uD83D\uDE45..\uD83D\uDE4F) person gesturing NO..folded hands\n if (0x1f546 <= code && code <= 0x1f64f) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n if (code < 0x1f774) {\n // E0.6 [1] (\uD83D\uDE80) rocket\n // E1.0 [2] (\uD83D\uDE81..\uD83D\uDE82) helicopter..locomotive\n // E0.6 [3] (\uD83D\uDE83..\uD83D\uDE85) railway car..bullet train\n // E1.0 [1] (\uD83D\uDE86) train\n // E0.6 [1] (\uD83D\uDE87) metro\n // E1.0 [1] (\uD83D\uDE88) light rail\n // E0.6 [1] (\uD83D\uDE89) station\n // E1.0 [2] (\uD83D\uDE8A..\uD83D\uDE8B) tram..tram car\n // E0.6 [1] (\uD83D\uDE8C) bus\n // E0.7 [1] (\uD83D\uDE8D) oncoming bus\n // E1.0 [1] (\uD83D\uDE8E) trolleybus\n // E0.6 [1] (\uD83D\uDE8F) bus stop\n // E1.0 [1] (\uD83D\uDE90) minibus\n // E0.6 [3] (\uD83D\uDE91..\uD83D\uDE93) ambulance..police car\n // E0.7 [1] (\uD83D\uDE94) oncoming police car\n // E0.6 [1] (\uD83D\uDE95) taxi\n // E1.0 [1] (\uD83D\uDE96) oncoming taxi\n // E0.6 [1] (\uD83D\uDE97) automobile\n // E0.7 [1] (\uD83D\uDE98) oncoming automobile\n // E0.6 [2] (\uD83D\uDE99..\uD83D\uDE9A) sport utility vehicle..delivery truck\n // E1.0 [7] (\uD83D\uDE9B..\uD83D\uDEA1) articulated lorry..aerial tramway\n // E0.6 [1] (\uD83D\uDEA2) ship\n // E1.0 [1] (\uD83D\uDEA3) person rowing boat\n // E0.6 [2] (\uD83D\uDEA4..\uD83D\uDEA5) speedboat..horizontal traffic light\n // E1.0 [1] (\uD83D\uDEA6) vertical traffic light\n // E0.6 [7] (\uD83D\uDEA7..\uD83D\uDEAD) construction..no smoking\n // E1.0 [4] (\uD83D\uDEAE..\uD83D\uDEB1) litter in bin sign..non-potable water\n // E0.6 [1] (\uD83D\uDEB2) bicycle\n // E1.0 [3] (\uD83D\uDEB3..\uD83D\uDEB5) no bicycles..person mountain biking\n // E0.6 [1] (\uD83D\uDEB6) person walking\n // E1.0 [2] (\uD83D\uDEB7..\uD83D\uDEB8) no pedestrians..children crossing\n // E0.6 [6] (\uD83D\uDEB9..\uD83D\uDEBE) men\u2019s room..water closet\n // E1.0 [1] (\uD83D\uDEBF) shower\n // E0.6 [1] (\uD83D\uDEC0) person taking bath\n // E1.0 [5] (\uD83D\uDEC1..\uD83D\uDEC5) bathtub..left luggage\n // E0.0 [5] (\uD83D\uDEC6..\uD83D\uDECA) TRIANGLE WITH ROUNDED CORNERS..GIRLS SYMBOL\n // E0.7 [1] (\uD83D\uDECB\uFE0F) couch and lamp\n // E1.0 [1] (\uD83D\uDECC) person in bed\n // E0.7 [3] (\uD83D\uDECD\uFE0F..\uD83D\uDECF\uFE0F) shopping bags..bed\n // E1.0 [1] (\uD83D\uDED0) place of worship\n // E3.0 [2] (\uD83D\uDED1..\uD83D\uDED2) stop sign..shopping cart\n // E0.0 [2] (\uD83D\uDED3..\uD83D\uDED4) STUPA..PAGODA\n // E12.0 [1] (\uD83D\uDED5) hindu temple\n // E13.0 [2] (\uD83D\uDED6..\uD83D\uDED7) hut..elevator\n // E0.0 [4] (\uD83D\uDED8..\uD83D\uDEDB) ..\n // E15.0 [1] (\uD83D\uDEDC) wireless\n // E14.0 [3] (\uD83D\uDEDD..\uD83D\uDEDF) playground slide..ring buoy\n // E0.7 [6] (\uD83D\uDEE0\uFE0F..\uD83D\uDEE5\uFE0F) hammer and wrench..motor boat\n // E0.0 [3] (\uD83D\uDEE6..\uD83D\uDEE8) UP-POINTING MILITARY AIRPLANE..UP-POINTING SMALL AIRPLANE\n // E0.7 [1] (\uD83D\uDEE9\uFE0F) small airplane\n // E0.0 [1] (\uD83D\uDEEA) NORTHEAST-POINTING AIRPLANE\n // E1.0 [2] (\uD83D\uDEEB..\uD83D\uDEEC) airplane departure..airplane arrival\n // E0.0 [3] (\uD83D\uDEED..\uD83D\uDEEF) ..\n // E0.7 [1] (\uD83D\uDEF0\uFE0F) satellite\n // E0.0 [2] (\uD83D\uDEF1..\uD83D\uDEF2) ONCOMING FIRE ENGINE..DIESEL LOCOMOTIVE\n // E0.7 [1] (\uD83D\uDEF3\uFE0F) passenger ship\n // E3.0 [3] (\uD83D\uDEF4..\uD83D\uDEF6) kick scooter..canoe\n // E5.0 [2] (\uD83D\uDEF7..\uD83D\uDEF8) sled..flying saucer\n // E11.0 [1] (\uD83D\uDEF9) skateboard\n // E12.0 [1] (\uD83D\uDEFA) auto rickshaw\n // E13.0 [2] (\uD83D\uDEFB..\uD83D\uDEFC) pickup truck..roller skate\n // E0.0 [3] (\uD83D\uDEFD..\uD83D\uDEFF) ..\n if (0x1f680 <= code && code <= 0x1f6ff) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n // E0.0 [12] (\uD83D\uDF74..\uD83D\uDF7F) LOT OF FORTUNE..ORCUS\n if (0x1f774 <= code && code <= 0x1f77f) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n }\n }\n }\n }\n else {\n if (code < 0x1f8ae) {\n if (code < 0x1f848) {\n if (code < 0x1f80c) {\n // E0.0 [11] (\uD83D\uDFD5..\uD83D\uDFDF) CIRCLED TRIANGLE..\n // E12.0 [12] (\uD83D\uDFE0..\uD83D\uDFEB) orange circle..brown square\n // E0.0 [4] (\uD83D\uDFEC..\uD83D\uDFEF) ..\n // E14.0 [1] (\uD83D\uDFF0) heavy equals sign\n // E0.0 [15] (\uD83D\uDFF1..\uD83D\uDFFF) ..\n if (0x1f7d5 <= code && code <= 0x1f7ff) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n // E0.0 [4] (\uD83E\uDC0C..\uD83E\uDC0F) ..\n if (0x1f80c <= code && code <= 0x1f80f) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n }\n else {\n if (code < 0x1f85a) {\n // E0.0 [8] (\uD83E\uDC48..\uD83E\uDC4F) ..\n if (0x1f848 <= code && code <= 0x1f84f) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n if (code < 0x1f888) {\n // E0.0 [6] (\uD83E\uDC5A..\uD83E\uDC5F) ..\n if (0x1f85a <= code && code <= 0x1f85f) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n // E0.0 [8] (\uD83E\uDC88..\uD83E\uDC8F) ..\n if (0x1f888 <= code && code <= 0x1f88f) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n }\n }\n }\n else {\n if (code < 0x1f93c) {\n if (code < 0x1f90c) {\n // E0.0 [82] (\uD83E\uDCAE..\uD83E\uDCFF) ..\n if (0x1f8ae <= code && code <= 0x1f8ff) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n // E13.0 [1] (\uD83E\uDD0C) pinched fingers\n // E12.0 [3] (\uD83E\uDD0D..\uD83E\uDD0F) white heart..pinching hand\n // E1.0 [9] (\uD83E\uDD10..\uD83E\uDD18) zipper-mouth face..sign of the horns\n // E3.0 [6] (\uD83E\uDD19..\uD83E\uDD1E) call me hand..crossed fingers\n // E5.0 [1] (\uD83E\uDD1F) love-you gesture\n // E3.0 [8] (\uD83E\uDD20..\uD83E\uDD27) cowboy hat face..sneezing face\n // E5.0 [8] (\uD83E\uDD28..\uD83E\uDD2F) face with raised eyebrow..exploding head\n // E3.0 [1] (\uD83E\uDD30) pregnant woman\n // E5.0 [2] (\uD83E\uDD31..\uD83E\uDD32) breast-feeding..palms up together\n // E3.0 [8] (\uD83E\uDD33..\uD83E\uDD3A) selfie..person fencing\n if (0x1f90c <= code && code <= 0x1f93a) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n }\n else {\n if (code < 0x1f947) {\n // E3.0 [3] (\uD83E\uDD3C..\uD83E\uDD3E) people wrestling..person playing handball\n // E12.0 [1] (\uD83E\uDD3F) diving mask\n // E3.0 [6] (\uD83E\uDD40..\uD83E\uDD45) wilted flower..goal net\n if (0x1f93c <= code && code <= 0x1f945) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n if (code < 0x1fc00) {\n // E3.0 [5] (\uD83E\uDD47..\uD83E\uDD4B) 1st place medal..martial arts uniform\n // E5.0 [1] (\uD83E\uDD4C) curling stone\n // E11.0 [3] (\uD83E\uDD4D..\uD83E\uDD4F) lacrosse..flying disc\n // E3.0 [15] (\uD83E\uDD50..\uD83E\uDD5E) croissant..pancakes\n // E5.0 [13] (\uD83E\uDD5F..\uD83E\uDD6B) dumpling..canned food\n // E11.0 [5] (\uD83E\uDD6C..\uD83E\uDD70) leafy green..smiling face with hearts\n // E12.0 [1] (\uD83E\uDD71) yawning face\n // E13.0 [1] (\uD83E\uDD72) smiling face with tear\n // E11.0 [4] (\uD83E\uDD73..\uD83E\uDD76) partying face..cold face\n // E13.0 [2] (\uD83E\uDD77..\uD83E\uDD78) ninja..disguised face\n // E14.0 [1] (\uD83E\uDD79) face holding back tears\n // E11.0 [1] (\uD83E\uDD7A) pleading face\n // E12.0 [1] (\uD83E\uDD7B) sari\n // E11.0 [4] (\uD83E\uDD7C..\uD83E\uDD7F) lab coat..flat shoe\n // E1.0 [5] (\uD83E\uDD80..\uD83E\uDD84) crab..unicorn\n // E3.0 [13] (\uD83E\uDD85..\uD83E\uDD91) eagle..squid\n // E5.0 [6] (\uD83E\uDD92..\uD83E\uDD97) giraffe..cricket\n // E11.0 [11] (\uD83E\uDD98..\uD83E\uDDA2) kangaroo..swan\n // E13.0 [2] (\uD83E\uDDA3..\uD83E\uDDA4) mammoth..dodo\n // E12.0 [6] (\uD83E\uDDA5..\uD83E\uDDAA) sloth..oyster\n // E13.0 [3] (\uD83E\uDDAB..\uD83E\uDDAD) beaver..seal\n // E12.0 [2] (\uD83E\uDDAE..\uD83E\uDDAF) guide dog..white cane\n // E11.0 [10] (\uD83E\uDDB0..\uD83E\uDDB9) red hair..supervillain\n // E12.0 [6] (\uD83E\uDDBA..\uD83E\uDDBF) safety vest..mechanical leg\n // E1.0 [1] (\uD83E\uDDC0) cheese wedge\n // E11.0 [2] (\uD83E\uDDC1..\uD83E\uDDC2) cupcake..salt\n // E12.0 [8] (\uD83E\uDDC3..\uD83E\uDDCA) beverage box..ice\n // E13.0 [1] (\uD83E\uDDCB) bubble tea\n // E14.0 [1] (\uD83E\uDDCC) troll\n // E12.0 [3] (\uD83E\uDDCD..\uD83E\uDDCF) person standing..deaf person\n // E5.0 [23] (\uD83E\uDDD0..\uD83E\uDDE6) face with monocle..socks\n // E11.0 [25] (\uD83E\uDDE7..\uD83E\uDDFF) red envelope..nazar amulet\n // E0.0 [112] (\uD83E\uDE00..\uD83E\uDE6F) NEUTRAL CHESS KING..\n // E12.0 [4] (\uD83E\uDE70..\uD83E\uDE73) ballet shoes..shorts\n // E13.0 [1] (\uD83E\uDE74) thong sandal\n // E15.0 [3] (\uD83E\uDE75..\uD83E\uDE77) light blue heart..pink heart\n // E12.0 [3] (\uD83E\uDE78..\uD83E\uDE7A) drop of blood..stethoscope\n // E14.0 [2] (\uD83E\uDE7B..\uD83E\uDE7C) x-ray..crutch\n // E0.0 [3] (\uD83E\uDE7D..\uD83E\uDE7F) ..\n // E12.0 [3] (\uD83E\uDE80..\uD83E\uDE82) yo-yo..parachute\n // E13.0 [4] (\uD83E\uDE83..\uD83E\uDE86) boomerang..nesting dolls\n // E15.0 [2] (\uD83E\uDE87..\uD83E\uDE88) maracas..flute\n // E0.0 [7] (\uD83E\uDE89..\uD83E\uDE8F) ..\n // E12.0 [6] (\uD83E\uDE90..\uD83E\uDE95) ringed planet..banjo\n // E13.0 [19] (\uD83E\uDE96..\uD83E\uDEA8) military helmet..rock\n // E14.0 [4] (\uD83E\uDEA9..\uD83E\uDEAC) mirror ball..hamsa\n // E15.0 [3] (\uD83E\uDEAD..\uD83E\uDEAF) folding hand fan..khanda\n // E13.0 [7] (\uD83E\uDEB0..\uD83E\uDEB6) fly..feather\n // E14.0 [4] (\uD83E\uDEB7..\uD83E\uDEBA) lotus..nest with eggs\n // E15.0 [3] (\uD83E\uDEBB..\uD83E\uDEBD) hyacinth..wing\n // E0.0 [1] (\uD83E\uDEBE) \n // E15.0 [1] (\uD83E\uDEBF) goose\n // E13.0 [3] (\uD83E\uDEC0..\uD83E\uDEC2) anatomical heart..people hugging\n // E14.0 [3] (\uD83E\uDEC3..\uD83E\uDEC5) pregnant man..person with crown\n // E0.0 [8] (\uD83E\uDEC6..\uD83E\uDECD) ..\n // E15.0 [2] (\uD83E\uDECE..\uD83E\uDECF) moose..donkey\n // E13.0 [7] (\uD83E\uDED0..\uD83E\uDED6) blueberries..teapot\n // E14.0 [3] (\uD83E\uDED7..\uD83E\uDED9) pouring liquid..jar\n // E15.0 [2] (\uD83E\uDEDA..\uD83E\uDEDB) ginger root..pea pod\n // E0.0 [4] (\uD83E\uDEDC..\uD83E\uDEDF) ..\n // E14.0 [8] (\uD83E\uDEE0..\uD83E\uDEE7) melting face..bubbles\n // E15.0 [1] (\uD83E\uDEE8) shaking face\n // E0.0 [7] (\uD83E\uDEE9..\uD83E\uDEEF) ..\n // E14.0 [7] (\uD83E\uDEF0..\uD83E\uDEF6) hand with index finger and thumb crossed..heart hands\n // E15.0 [2] (\uD83E\uDEF7..\uD83E\uDEF8) leftwards pushing hand..rightwards pushing hand\n // E0.0 [7] (\uD83E\uDEF9..\uD83E\uDEFF) ..\n if (0x1f947 <= code && code <= 0x1faff) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n else {\n // E0.0[1022] (\uD83F\uDC00..\uD83F\uDFFD) ..\n if (0x1fc00 <= code && code <= 0x1fffd) {\n return boundaries_1.EXTENDED_PICTOGRAPHIC;\n }\n }\n }\n }\n }\n }\n }\n }\n // unlisted code points are treated as a break property of \"Other\"\n return boundaries_1.CLUSTER_BREAK.OTHER;\n }\n}\nexports.default = Graphemer;\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Graphemer_1 = __importDefault(require(\"./Graphemer\"));\nexports.default = Graphemer_1.default;\n", "import Graphemer from 'graphemer'\nimport * as ui8 from 'uint8arrays'\n\n// counts the number of bytes in a utf8 string\nexport const utf8Len = (str: string): number => {\n return new TextEncoder().encode(str).byteLength\n}\n\n// counts the number of graphemes (user-displayed characters) in a string\nexport const graphemeLen = (str: string): number => {\n const splitter = new Graphemer()\n return splitter.countGraphemes(str)\n}\n\nexport const utf8ToB64Url = (utf8: string): string => {\n return ui8.toString(ui8.fromString(utf8, 'utf8'), 'base64url')\n}\n\nexport const b64UrlToUtf8 = (b64: string): string => {\n return ui8.toString(ui8.fromString(b64, 'base64url'), 'utf8')\n}\n\nexport const parseLanguage = (langTag: string): LanguageTag | null => {\n const parsed = langTag.match(bcp47Regexp)\n if (!parsed?.groups) return null\n const parts = parsed.groups\n return {\n grandfathered: parts.grandfathered,\n language: parts.language,\n extlang: parts.extlang,\n script: parts.script,\n region: parts.region,\n variant: parts.variant,\n extension: parts.extension,\n privateUse: parts.privateUseA || parts.privateUseB,\n }\n}\n\nexport const validateLanguage = (langTag: string): boolean => {\n return bcp47Regexp.test(langTag)\n}\n\nexport type LanguageTag = {\n grandfathered?: string\n language?: string\n extlang?: string\n script?: string\n region?: string\n variant?: string\n extension?: string\n privateUse?: string\n}\n\n// Validates well-formed BCP 47 syntax: https://www.rfc-editor.org/rfc/rfc5646.html#section-2.1\nconst bcp47Regexp =\n /^((?(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang))|((?([A-Za-z]{2,3}(-(?[A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4}|[A-Za-z]{5,8})(-(?\n * ```\n * @nocollapse\n * @category styles\n */\n static styles?: CSSResultGroup;\n\n /**\n * Returns a list of attributes corresponding to the registered properties.\n * @nocollapse\n * @category attributes\n */\n static get observedAttributes() {\n // Ensure we've created all properties\n this.finalize();\n // this.__attributeToPropertyMap is only undefined after finalize() in\n // ReactiveElement itself. ReactiveElement.observedAttributes is only\n // accessed with ReactiveElement as the receiver when a subclass or mixin\n // calls super.observedAttributes\n return (\n this.__attributeToPropertyMap && [...this.__attributeToPropertyMap.keys()]\n );\n }\n\n private __instanceProperties?: PropertyValues = undefined;\n\n /**\n * Creates a property accessor on the element prototype if one does not exist\n * and stores a {@linkcode PropertyDeclaration} for the property with the\n * given options. The property setter calls the property's `hasChanged`\n * property option or uses a strict identity check to determine whether or not\n * to request an update.\n *\n * This method may be overridden to customize properties; however,\n * when doing so, it's important to call `super.createProperty` to ensure\n * the property is setup correctly. This method calls\n * `getPropertyDescriptor` internally to get a descriptor to install.\n * To customize what properties do when they are get or set, override\n * `getPropertyDescriptor`. To customize the options for a property,\n * implement `createProperty` like this:\n *\n * ```ts\n * static createProperty(name, options) {\n * options = Object.assign(options, {myOption: true});\n * super.createProperty(name, options);\n * }\n * ```\n *\n * @nocollapse\n * @category properties\n */\n static createProperty(\n name: PropertyKey,\n options: PropertyDeclaration = defaultPropertyDeclaration\n ) {\n // If this is a state property, force the attribute to false.\n if (options.state) {\n (options as Mutable).attribute = false;\n }\n this.__prepare();\n this.elementProperties.set(name, options);\n if (!options.noAccessor) {\n const key = DEV_MODE\n ? // Use Symbol.for in dev mode to make it easier to maintain state\n // when doing HMR.\n Symbol.for(`${String(name)} (@property() cache)`)\n : Symbol();\n const descriptor = this.getPropertyDescriptor(name, key, options);\n if (descriptor !== undefined) {\n defineProperty(this.prototype, name, descriptor);\n }\n }\n }\n\n /**\n * Returns a property descriptor to be defined on the given named property.\n * If no descriptor is returned, the property will not become an accessor.\n * For example,\n *\n * ```ts\n * class MyElement extends LitElement {\n * static getPropertyDescriptor(name, key, options) {\n * const defaultDescriptor =\n * super.getPropertyDescriptor(name, key, options);\n * const setter = defaultDescriptor.set;\n * return {\n * get: defaultDescriptor.get,\n * set(value) {\n * setter.call(this, value);\n * // custom action.\n * },\n * configurable: true,\n * enumerable: true\n * }\n * }\n * }\n * ```\n *\n * @nocollapse\n * @category properties\n */\n protected static getPropertyDescriptor(\n name: PropertyKey,\n key: string | symbol,\n options: PropertyDeclaration\n ): PropertyDescriptor | undefined {\n const {get, set} = getOwnPropertyDescriptor(this.prototype, name) ?? {\n get(this: ReactiveElement) {\n return this[key as keyof typeof this];\n },\n set(this: ReactiveElement, v: unknown) {\n (this as unknown as Record)[key] = v;\n },\n };\n if (DEV_MODE && get == null) {\n if ('value' in (getOwnPropertyDescriptor(this.prototype, name) ?? {})) {\n throw new Error(\n `Field ${JSON.stringify(String(name))} on ` +\n `${this.name} was declared as a reactive property ` +\n `but it's actually declared as a value on the prototype. ` +\n `Usually this is due to using @property or @state on a method.`\n );\n }\n issueWarning(\n 'reactive-property-without-getter',\n `Field ${JSON.stringify(String(name))} on ` +\n `${this.name} was declared as a reactive property ` +\n `but it does not have a getter. This will be an error in a ` +\n `future version of Lit.`\n );\n }\n return {\n get(this: ReactiveElement) {\n return get?.call(this);\n },\n set(this: ReactiveElement, value: unknown) {\n const oldValue = get?.call(this);\n set!.call(this, value);\n this.requestUpdate(name, oldValue, options);\n },\n configurable: true,\n enumerable: true,\n };\n }\n\n /**\n * Returns the property options associated with the given property.\n * These options are defined with a `PropertyDeclaration` via the `properties`\n * object or the `@property` decorator and are registered in\n * `createProperty(...)`.\n *\n * Note, this method should be considered \"final\" and not overridden. To\n * customize the options for a given property, override\n * {@linkcode createProperty}.\n *\n * @nocollapse\n * @final\n * @category properties\n */\n static getPropertyOptions(name: PropertyKey) {\n return this.elementProperties.get(name) ?? defaultPropertyDeclaration;\n }\n\n // Temporary, until google3 is on TypeScript 5.2\n declare static [Symbol.metadata]: object & Record;\n\n /**\n * Initializes static own properties of the class used in bookkeeping\n * for element properties, initializers, etc.\n *\n * Can be called multiple times by code that needs to ensure these\n * properties exist before using them.\n *\n * This method ensures the superclass is finalized so that inherited\n * property metadata can be copied down.\n * @nocollapse\n */\n private static __prepare() {\n if (\n this.hasOwnProperty(JSCompiler_renameProperty('elementProperties', this))\n ) {\n // Already prepared\n return;\n }\n // Finalize any superclasses\n const superCtor = getPrototypeOf(this) as typeof ReactiveElement;\n superCtor.finalize();\n\n // Create own set of initializers for this class if any exist on the\n // superclass and copy them down. Note, for a small perf boost, avoid\n // creating initializers unless needed.\n if (superCtor._initializers !== undefined) {\n this._initializers = [...superCtor._initializers];\n }\n // Initialize elementProperties from the superclass\n this.elementProperties = new Map(superCtor.elementProperties);\n }\n\n /**\n * Finishes setting up the class so that it's ready to be registered\n * as a custom element and instantiated.\n *\n * This method is called by the ReactiveElement.observedAttributes getter.\n * If you override the observedAttributes getter, you must either call\n * super.observedAttributes to trigger finalization, or call finalize()\n * yourself.\n *\n * @nocollapse\n */\n protected static finalize() {\n if (this.hasOwnProperty(JSCompiler_renameProperty('finalized', this))) {\n return;\n }\n this.finalized = true;\n this.__prepare();\n\n // Create properties from the static properties block:\n if (this.hasOwnProperty(JSCompiler_renameProperty('properties', this))) {\n const props = this.properties;\n const propKeys = [\n ...getOwnPropertyNames(props),\n ...getOwnPropertySymbols(props),\n ] as Array;\n for (const p of propKeys) {\n this.createProperty(p, props[p]);\n }\n }\n\n // Create properties from standard decorator metadata:\n const metadata = this[Symbol.metadata];\n if (metadata !== null) {\n const properties = litPropertyMetadata.get(metadata);\n if (properties !== undefined) {\n for (const [p, options] of properties) {\n this.elementProperties.set(p, options);\n }\n }\n }\n\n // Create the attribute-to-property map\n this.__attributeToPropertyMap = new Map();\n for (const [p, options] of this.elementProperties) {\n const attr = this.__attributeNameForProperty(p, options);\n if (attr !== undefined) {\n this.__attributeToPropertyMap.set(attr, p);\n }\n }\n\n this.elementStyles = this.finalizeStyles(this.styles);\n\n if (DEV_MODE) {\n if (this.hasOwnProperty('createProperty')) {\n issueWarning(\n 'no-override-create-property',\n 'Overriding ReactiveElement.createProperty() is deprecated. ' +\n 'The override will not be called with standard decorators'\n );\n }\n if (this.hasOwnProperty('getPropertyDescriptor')) {\n issueWarning(\n 'no-override-get-property-descriptor',\n 'Overriding ReactiveElement.getPropertyDescriptor() is deprecated. ' +\n 'The override will not be called with standard decorators'\n );\n }\n }\n }\n\n /**\n * Options used when calling `attachShadow`. Set this property to customize\n * the options for the shadowRoot; for example, to create a closed\n * shadowRoot: `{mode: 'closed'}`.\n *\n * Note, these options are used in `createRenderRoot`. If this method\n * is customized, options should be respected if possible.\n * @nocollapse\n * @category rendering\n */\n static shadowRootOptions: ShadowRootInit = {mode: 'open'};\n\n /**\n * Takes the styles the user supplied via the `static styles` property and\n * returns the array of styles to apply to the element.\n * Override this method to integrate into a style management system.\n *\n * Styles are deduplicated preserving the _last_ instance in the list. This\n * is a performance optimization to avoid duplicated styles that can occur\n * especially when composing via subclassing. The last item is kept to try\n * to preserve the cascade order with the assumption that it's most important\n * that last added styles override previous styles.\n *\n * @nocollapse\n * @category styles\n */\n protected static finalizeStyles(\n styles?: CSSResultGroup\n ): Array {\n const elementStyles = [];\n if (Array.isArray(styles)) {\n // Dedupe the flattened array in reverse order to preserve the last items.\n // Casting to Array works around TS error that\n // appears to come from trying to flatten a type CSSResultArray.\n const set = new Set((styles as Array).flat(Infinity).reverse());\n // Then preserve original order by adding the set items in reverse order.\n for (const s of set) {\n elementStyles.unshift(getCompatibleStyle(s as CSSResultOrNative));\n }\n } else if (styles !== undefined) {\n elementStyles.push(getCompatibleStyle(styles));\n }\n return elementStyles;\n }\n\n /**\n * Node or ShadowRoot into which element DOM should be rendered. Defaults\n * to an open shadowRoot.\n * @category rendering\n */\n readonly renderRoot!: HTMLElement | DocumentFragment;\n\n /**\n * Returns the property name for the given attribute `name`.\n * @nocollapse\n */\n private static __attributeNameForProperty(\n name: PropertyKey,\n options: PropertyDeclaration\n ) {\n const attribute = options.attribute;\n return attribute === false\n ? undefined\n : typeof attribute === 'string'\n ? attribute\n : typeof name === 'string'\n ? name.toLowerCase()\n : undefined;\n }\n\n // Initialize to an unresolved Promise so we can make sure the element has\n // connected before first update.\n private __updatePromise!: Promise;\n\n /**\n * True if there is a pending update as a result of calling `requestUpdate()`.\n * Should only be read.\n * @category updates\n */\n isUpdatePending = false;\n\n /**\n * Is set to `true` after the first update. The element code cannot assume\n * that `renderRoot` exists before the element `hasUpdated`.\n * @category updates\n */\n hasUpdated = false;\n\n /**\n * Map with keys for any properties that have changed since the last\n * update cycle with previous values.\n *\n * @internal\n */\n _$changedProperties!: PropertyValues;\n\n /**\n * Properties that should be reflected when updated.\n */\n private __reflectingProperties?: Set;\n\n /**\n * Name of currently reflecting property\n */\n private __reflectingProperty: PropertyKey | null = null;\n\n /**\n * Set of controllers.\n */\n private __controllers?: Set;\n\n constructor() {\n super();\n this.__initialize();\n }\n\n /**\n * Internal only override point for customizing work done when elements\n * are constructed.\n */\n private __initialize() {\n this.__updatePromise = new Promise(\n (res) => (this.enableUpdating = res)\n );\n this._$changedProperties = new Map();\n // This enqueues a microtask that ust run before the first update, so it\n // must be called before requestUpdate()\n this.__saveInstanceProperties();\n // ensures first update will be caught by an early access of\n // `updateComplete`\n this.requestUpdate();\n (this.constructor as typeof ReactiveElement)._initializers?.forEach((i) =>\n i(this)\n );\n }\n\n /**\n * Registers a `ReactiveController` to participate in the element's reactive\n * update cycle. The element automatically calls into any registered\n * controllers during its lifecycle callbacks.\n *\n * If the element is connected when `addController()` is called, the\n * controller's `hostConnected()` callback will be immediately called.\n * @category controllers\n */\n addController(controller: ReactiveController) {\n (this.__controllers ??= new Set()).add(controller);\n // If a controller is added after the element has been connected,\n // call hostConnected. Note, re-using existence of `renderRoot` here\n // (which is set in connectedCallback) to avoid the need to track a\n // first connected state.\n if (this.renderRoot !== undefined && this.isConnected) {\n controller.hostConnected?.();\n }\n }\n\n /**\n * Removes a `ReactiveController` from the element.\n * @category controllers\n */\n removeController(controller: ReactiveController) {\n this.__controllers?.delete(controller);\n }\n\n /**\n * Fixes any properties set on the instance before upgrade time.\n * Otherwise these would shadow the accessor and break these properties.\n * The properties are stored in a Map which is played back after the\n * constructor runs. Note, on very old versions of Safari (<=9) or Chrome\n * (<=41), properties created for native platform properties like (`id` or\n * `name`) may not have default values set in the element constructor. On\n * these browsers native properties appear on instances and therefore their\n * default value will overwrite any element default (e.g. if the element sets\n * this.id = 'id' in the constructor, the 'id' will become '' since this is\n * the native platform default).\n */\n private __saveInstanceProperties() {\n const instanceProperties = new Map();\n const elementProperties = (this.constructor as typeof ReactiveElement)\n .elementProperties;\n for (const p of elementProperties.keys() as IterableIterator) {\n if (this.hasOwnProperty(p)) {\n instanceProperties.set(p, this[p]);\n delete this[p];\n }\n }\n if (instanceProperties.size > 0) {\n this.__instanceProperties = instanceProperties;\n }\n }\n\n /**\n * Returns the node into which the element should render and by default\n * creates and returns an open shadowRoot. Implement to customize where the\n * element's DOM is rendered. For example, to render into the element's\n * childNodes, return `this`.\n *\n * @return Returns a node into which to render.\n * @category rendering\n */\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n const renderRoot =\n this.shadowRoot ??\n this.attachShadow(\n (this.constructor as typeof ReactiveElement).shadowRootOptions\n );\n adoptStyles(\n renderRoot,\n (this.constructor as typeof ReactiveElement).elementStyles\n );\n return renderRoot;\n }\n\n /**\n * On first connection, creates the element's renderRoot, sets up\n * element styling, and enables updating.\n * @category lifecycle\n */\n connectedCallback() {\n // Create renderRoot before controllers `hostConnected`\n (this as Mutable).renderRoot ??=\n this.createRenderRoot();\n this.enableUpdating(true);\n this.__controllers?.forEach((c) => c.hostConnected?.());\n }\n\n /**\n * Note, this method should be considered final and not overridden. It is\n * overridden on the element instance with a function that triggers the first\n * update.\n * @category updates\n */\n protected enableUpdating(_requestedUpdate: boolean) {}\n\n /**\n * Allows for `super.disconnectedCallback()` in extensions while\n * reserving the possibility of making non-breaking feature additions\n * when disconnecting at some point in the future.\n * @category lifecycle\n */\n disconnectedCallback() {\n this.__controllers?.forEach((c) => c.hostDisconnected?.());\n }\n\n /**\n * Synchronizes property values when attributes change.\n *\n * Specifically, when an attribute is set, the corresponding property is set.\n * You should rarely need to implement this callback. If this method is\n * overridden, `super.attributeChangedCallback(name, _old, value)` must be\n * called.\n *\n * See [using the lifecycle callbacks](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements#using_the_lifecycle_callbacks)\n * on MDN for more information about the `attributeChangedCallback`.\n * @category attributes\n */\n attributeChangedCallback(\n name: string,\n _old: string | null,\n value: string | null\n ) {\n this._$attributeToProperty(name, value);\n }\n\n private __propertyToAttribute(name: PropertyKey, value: unknown) {\n const elemProperties: PropertyDeclarationMap = (\n this.constructor as typeof ReactiveElement\n ).elementProperties;\n const options = elemProperties.get(name)!;\n const attr = (\n this.constructor as typeof ReactiveElement\n ).__attributeNameForProperty(name, options);\n if (attr !== undefined && options.reflect === true) {\n const converter =\n (options.converter as ComplexAttributeConverter)?.toAttribute !==\n undefined\n ? (options.converter as ComplexAttributeConverter)\n : defaultConverter;\n const attrValue = converter.toAttribute!(value, options.type);\n if (\n DEV_MODE &&\n (this.constructor as typeof ReactiveElement).enabledWarnings!.includes(\n 'migration'\n ) &&\n attrValue === undefined\n ) {\n issueWarning(\n 'undefined-attribute-value',\n `The attribute value for the ${name as string} property is ` +\n `undefined on element ${this.localName}. The attribute will be ` +\n `removed, but in the previous version of \\`ReactiveElement\\`, ` +\n `the attribute would not have changed.`\n );\n }\n // Track if the property is being reflected to avoid\n // setting the property again via `attributeChangedCallback`. Note:\n // 1. this takes advantage of the fact that the callback is synchronous.\n // 2. will behave incorrectly if multiple attributes are in the reaction\n // stack at time of calling. However, since we process attributes\n // in `update` this should not be possible (or an extreme corner case\n // that we'd like to discover).\n // mark state reflecting\n this.__reflectingProperty = name;\n if (attrValue == null) {\n this.removeAttribute(attr);\n } else {\n this.setAttribute(attr, attrValue as string);\n }\n // mark state not reflecting\n this.__reflectingProperty = null;\n }\n }\n\n /** @internal */\n _$attributeToProperty(name: string, value: string | null) {\n const ctor = this.constructor as typeof ReactiveElement;\n // Note, hint this as an `AttributeMap` so closure clearly understands\n // the type; it has issues with tracking types through statics\n const propName = (ctor.__attributeToPropertyMap as AttributeMap).get(name);\n // Use tracking info to avoid reflecting a property value to an attribute\n // if it was just set because the attribute changed.\n if (propName !== undefined && this.__reflectingProperty !== propName) {\n const options = ctor.getPropertyOptions(propName);\n const converter =\n typeof options.converter === 'function'\n ? {fromAttribute: options.converter}\n : options.converter?.fromAttribute !== undefined\n ? options.converter\n : defaultConverter;\n // mark state reflecting\n this.__reflectingProperty = propName;\n this[propName as keyof this] = converter.fromAttribute!(\n value,\n options.type\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ) as any;\n // mark state not reflecting\n this.__reflectingProperty = null;\n }\n }\n\n /**\n * Requests an update which is processed asynchronously. This should be called\n * when an element should update based on some state not triggered by setting\n * a reactive property. In this case, pass no arguments. It should also be\n * called when manually implementing a property setter. In this case, pass the\n * property `name` and `oldValue` to ensure that any configured property\n * options are honored.\n *\n * @param name name of requesting property\n * @param oldValue old value of requesting property\n * @param options property options to use instead of the previously\n * configured options\n * @category updates\n */\n requestUpdate(\n name?: PropertyKey,\n oldValue?: unknown,\n options?: PropertyDeclaration\n ): void {\n // If we have a property key, perform property update steps.\n if (name !== undefined) {\n if (DEV_MODE && (name as unknown) instanceof Event) {\n issueWarning(\n ``,\n `The requestUpdate() method was called with an Event as the property name. This is probably a mistake caused by binding this.requestUpdate as an event listener. Instead bind a function that will call it with no arguments: () => this.requestUpdate()`\n );\n }\n options ??= (\n this.constructor as typeof ReactiveElement\n ).getPropertyOptions(name);\n const hasChanged = options.hasChanged ?? notEqual;\n const newValue = this[name as keyof this];\n if (hasChanged(newValue, oldValue)) {\n this._$changeProperty(name, oldValue, options);\n } else {\n // Abort the request if the property should not be considered changed.\n return;\n }\n }\n if (this.isUpdatePending === false) {\n this.__updatePromise = this.__enqueueUpdate();\n }\n }\n\n /**\n * @internal\n */\n _$changeProperty(\n name: PropertyKey,\n oldValue: unknown,\n options: PropertyDeclaration\n ) {\n // TODO (justinfagnani): Create a benchmark of Map.has() + Map.set(\n // vs just Map.set()\n if (!this._$changedProperties.has(name)) {\n this._$changedProperties.set(name, oldValue);\n }\n // Add to reflecting properties set.\n // Note, it's important that every change has a chance to add the\n // property to `__reflectingProperties`. This ensures setting\n // attribute + property reflects correctly.\n if (options.reflect === true && this.__reflectingProperty !== name) {\n (this.__reflectingProperties ??= new Set()).add(name);\n }\n }\n\n /**\n * Sets up the element to asynchronously update.\n */\n private async __enqueueUpdate() {\n this.isUpdatePending = true;\n try {\n // Ensure any previous update has resolved before updating.\n // This `await` also ensures that property changes are batched.\n await this.__updatePromise;\n } catch (e) {\n // Refire any previous errors async so they do not disrupt the update\n // cycle. Errors are refired so developers have a chance to observe\n // them, and this can be done by implementing\n // `window.onunhandledrejection`.\n Promise.reject(e);\n }\n const result = this.scheduleUpdate();\n // If `scheduleUpdate` returns a Promise, we await it. This is done to\n // enable coordinating updates with a scheduler. Note, the result is\n // checked to avoid delaying an additional microtask unless we need to.\n if (result != null) {\n await result;\n }\n return !this.isUpdatePending;\n }\n\n /**\n * Schedules an element update. You can override this method to change the\n * timing of updates by returning a Promise. The update will await the\n * returned Promise, and you should resolve the Promise to allow the update\n * to proceed. If this method is overridden, `super.scheduleUpdate()`\n * must be called.\n *\n * For instance, to schedule updates to occur just before the next frame:\n *\n * ```ts\n * override protected async scheduleUpdate(): Promise {\n * await new Promise((resolve) => requestAnimationFrame(() => resolve()));\n * super.scheduleUpdate();\n * }\n * ```\n * @category updates\n */\n protected scheduleUpdate(): void | Promise {\n const result = this.performUpdate();\n if (\n DEV_MODE &&\n (this.constructor as typeof ReactiveElement).enabledWarnings!.includes(\n 'async-perform-update'\n ) &&\n typeof (result as unknown as Promise | undefined)?.then ===\n 'function'\n ) {\n issueWarning(\n 'async-perform-update',\n `Element ${this.localName} returned a Promise from performUpdate(). ` +\n `This behavior is deprecated and will be removed in a future ` +\n `version of ReactiveElement.`\n );\n }\n return result;\n }\n\n /**\n * Performs an element update. Note, if an exception is thrown during the\n * update, `firstUpdated` and `updated` will not be called.\n *\n * Call `performUpdate()` to immediately process a pending update. This should\n * generally not be needed, but it can be done in rare cases when you need to\n * update synchronously.\n *\n * @category updates\n */\n protected performUpdate(): void {\n // Abort any update if one is not pending when this is called.\n // This can happen if `performUpdate` is called early to \"flush\"\n // the update.\n if (!this.isUpdatePending) {\n return;\n }\n debugLogEvent?.({kind: 'update'});\n if (!this.hasUpdated) {\n // Create renderRoot before first update. This occurs in `connectedCallback`\n // but is done here to support out of tree calls to `enableUpdating`/`performUpdate`.\n (this as Mutable).renderRoot ??=\n this.createRenderRoot();\n if (DEV_MODE) {\n // Produce warning if any reactive properties on the prototype are\n // shadowed by class fields. Instance fields set before upgrade are\n // deleted by this point, so any own property is caused by class field\n // initialization in the constructor.\n const ctor = this.constructor as typeof ReactiveElement;\n const shadowedProperties = [...ctor.elementProperties.keys()].filter(\n (p) => this.hasOwnProperty(p) && p in getPrototypeOf(this)\n );\n if (shadowedProperties.length) {\n throw new Error(\n `The following properties on element ${this.localName} will not ` +\n `trigger updates as expected because they are set using class ` +\n `fields: ${shadowedProperties.join(', ')}. ` +\n `Native class fields and some compiled output will overwrite ` +\n `accessors used for detecting changes. See ` +\n `https://lit.dev/msg/class-field-shadowing ` +\n `for more information.`\n );\n }\n }\n // Mixin instance properties once, if they exist.\n if (this.__instanceProperties) {\n // TODO (justinfagnani): should we use the stored value? Could a new value\n // have been set since we stored the own property value?\n for (const [p, value] of this.__instanceProperties) {\n this[p as keyof this] = value as this[keyof this];\n }\n this.__instanceProperties = undefined;\n }\n // Trigger initial value reflection and populate the initial\n // changedProperties map, but only for the case of experimental\n // decorators on accessors, which will not have already populated the\n // changedProperties map. We can't know if these accessors had\n // initializers, so we just set them anyway - a difference from\n // experimental decorators on fields and standard decorators on\n // auto-accessors.\n // For context why experimentalDecorators with auto accessors are handled\n // specifically also see:\n // https://github.com/lit/lit/pull/4183#issuecomment-1711959635\n const elementProperties = (this.constructor as typeof ReactiveElement)\n .elementProperties;\n if (elementProperties.size > 0) {\n for (const [p, options] of elementProperties) {\n if (\n options.wrapped === true &&\n !this._$changedProperties.has(p) &&\n this[p as keyof this] !== undefined\n ) {\n this._$changeProperty(p, this[p as keyof this], options);\n }\n }\n }\n }\n let shouldUpdate = false;\n const changedProperties = this._$changedProperties;\n try {\n shouldUpdate = this.shouldUpdate(changedProperties);\n if (shouldUpdate) {\n this.willUpdate(changedProperties);\n this.__controllers?.forEach((c) => c.hostUpdate?.());\n this.update(changedProperties);\n } else {\n this.__markUpdated();\n }\n } catch (e) {\n // Prevent `firstUpdated` and `updated` from running when there's an\n // update exception.\n shouldUpdate = false;\n // Ensure element can accept additional updates after an exception.\n this.__markUpdated();\n throw e;\n }\n // The update is no longer considered pending and further updates are now allowed.\n if (shouldUpdate) {\n this._$didUpdate(changedProperties);\n }\n }\n\n /**\n * Invoked before `update()` to compute values needed during the update.\n *\n * Implement `willUpdate` to compute property values that depend on other\n * properties and are used in the rest of the update process.\n *\n * ```ts\n * willUpdate(changedProperties) {\n * // only need to check changed properties for an expensive computation.\n * if (changedProperties.has('firstName') || changedProperties.has('lastName')) {\n * this.sha = computeSHA(`${this.firstName} ${this.lastName}`);\n * }\n * }\n *\n * render() {\n * return html`SHA: ${this.sha}`;\n * }\n * ```\n *\n * @category updates\n */\n protected willUpdate(_changedProperties: PropertyValues): void {}\n\n // Note, this is an override point for polyfill-support.\n // @internal\n _$didUpdate(changedProperties: PropertyValues) {\n this.__controllers?.forEach((c) => c.hostUpdated?.());\n if (!this.hasUpdated) {\n this.hasUpdated = true;\n this.firstUpdated(changedProperties);\n }\n this.updated(changedProperties);\n if (\n DEV_MODE &&\n this.isUpdatePending &&\n (this.constructor as typeof ReactiveElement).enabledWarnings!.includes(\n 'change-in-update'\n )\n ) {\n issueWarning(\n 'change-in-update',\n `Element ${this.localName} scheduled an update ` +\n `(generally because a property was set) ` +\n `after an update completed, causing a new update to be scheduled. ` +\n `This is inefficient and should be avoided unless the next update ` +\n `can only be scheduled as a side effect of the previous update.`\n );\n }\n }\n\n private __markUpdated() {\n this._$changedProperties = new Map();\n this.isUpdatePending = false;\n }\n\n /**\n * Returns a Promise that resolves when the element has completed updating.\n * The Promise value is a boolean that is `true` if the element completed the\n * update without triggering another update. The Promise result is `false` if\n * a property was set inside `updated()`. If the Promise is rejected, an\n * exception was thrown during the update.\n *\n * To await additional asynchronous work, override the `getUpdateComplete`\n * method. For example, it is sometimes useful to await a rendered element\n * before fulfilling this Promise. To do this, first await\n * `super.getUpdateComplete()`, then any subsequent state.\n *\n * @return A promise of a boolean that resolves to true if the update completed\n * without triggering another update.\n * @category updates\n */\n get updateComplete(): Promise {\n return this.getUpdateComplete();\n }\n\n /**\n * Override point for the `updateComplete` promise.\n *\n * It is not safe to override the `updateComplete` getter directly due to a\n * limitation in TypeScript which means it is not possible to call a\n * superclass getter (e.g. `super.updateComplete.then(...)`) when the target\n * language is ES5 (https://github.com/microsoft/TypeScript/issues/338).\n * This method should be overridden instead. For example:\n *\n * ```ts\n * class MyElement extends LitElement {\n * override async getUpdateComplete() {\n * const result = await super.getUpdateComplete();\n * await this._myChild.updateComplete;\n * return result;\n * }\n * }\n * ```\n *\n * @return A promise of a boolean that resolves to true if the update completed\n * without triggering another update.\n * @category updates\n */\n protected getUpdateComplete(): Promise {\n return this.__updatePromise;\n }\n\n /**\n * Controls whether or not `update()` should be called when the element requests\n * an update. By default, this method always returns `true`, but this can be\n * customized to control when to update.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n protected shouldUpdate(_changedProperties: PropertyValues): boolean {\n return true;\n }\n\n /**\n * Updates the element. This method reflects property values to attributes.\n * It can be overridden to render and keep updated element DOM.\n * Setting properties inside this method will *not* trigger\n * another update.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n protected update(_changedProperties: PropertyValues) {\n // The forEach() expression will only run when when __reflectingProperties is\n // defined, and it returns undefined, setting __reflectingProperties to\n // undefined\n this.__reflectingProperties &&= this.__reflectingProperties.forEach((p) =>\n this.__propertyToAttribute(p, this[p as keyof this])\n ) as undefined;\n this.__markUpdated();\n }\n\n /**\n * Invoked whenever the element is updated. Implement to perform\n * post-updating tasks via DOM APIs, for example, focusing an element.\n *\n * Setting properties inside this method will trigger the element to update\n * again after this update cycle completes.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n protected updated(_changedProperties: PropertyValues) {}\n\n /**\n * Invoked when the element is first updated. Implement to perform one time\n * work on the element after update.\n *\n * ```ts\n * firstUpdated() {\n * this.renderRoot.getElementById('my-text-area').focus();\n * }\n * ```\n *\n * Setting properties inside this method will trigger the element to update\n * again after this update cycle completes.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n protected firstUpdated(_changedProperties: PropertyValues) {}\n}\n// Assigned here to work around a jscompiler bug with static fields\n// when compiling to ES5.\n// https://github.com/google/closure-compiler/issues/3177\n(ReactiveElement as unknown as Record)[\n JSCompiler_renameProperty('elementProperties', ReactiveElement)\n] = new Map();\n(ReactiveElement as unknown as Record)[\n JSCompiler_renameProperty('finalized', ReactiveElement)\n] = new Map();\n\n// Apply polyfills if available\npolyfillSupport?.({ReactiveElement});\n\n// Dev mode warnings...\nif (DEV_MODE) {\n // Default warning set.\n ReactiveElement.enabledWarnings = [\n 'change-in-update',\n 'async-perform-update',\n ];\n const ensureOwnWarnings = function (ctor: typeof ReactiveElement) {\n if (\n !ctor.hasOwnProperty(JSCompiler_renameProperty('enabledWarnings', ctor))\n ) {\n ctor.enabledWarnings = ctor.enabledWarnings!.slice();\n }\n };\n ReactiveElement.enableWarning = function (\n this: typeof ReactiveElement,\n warning: WarningKind\n ) {\n ensureOwnWarnings(this);\n if (!this.enabledWarnings!.includes(warning)) {\n this.enabledWarnings!.push(warning);\n }\n };\n ReactiveElement.disableWarning = function (\n this: typeof ReactiveElement,\n warning: WarningKind\n ) {\n ensureOwnWarnings(this);\n const i = this.enabledWarnings!.indexOf(warning);\n if (i >= 0) {\n this.enabledWarnings!.splice(i, 1);\n }\n };\n}\n\n// IMPORTANT: do not change the property name or the assignment expression.\n// This line will be used in regexes to search for ReactiveElement usage.\n(global.reactiveElementVersions ??= []).push('2.0.4');\nif (DEV_MODE && global.reactiveElementVersions.length > 1) {\n issueWarning!(\n 'multiple-versions',\n `Multiple versions of Lit loaded. Loading multiple versions ` +\n `is not recommended.`\n );\n}\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n// IMPORTANT: these imports must be type-only\nimport type {Directive, DirectiveResult, PartInfo} from './directive.js';\nimport type {TrustedHTML, TrustedTypesWindow} from 'trusted-types/lib';\n\nconst DEV_MODE = true;\nconst ENABLE_EXTRA_SECURITY_HOOKS = true;\nconst ENABLE_SHADYDOM_NOPATCH = true;\nconst NODE_MODE = false;\n\n// Allows minifiers to rename references to globalThis\nconst global = globalThis;\n\n/**\n * Contains types that are part of the unstable debug API.\n *\n * Everything in this API is not stable and may change or be removed in the future,\n * even on patch releases.\n */\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace LitUnstable {\n /**\n * When Lit is running in dev mode and `window.emitLitDebugLogEvents` is true,\n * we will emit 'lit-debug' events to window, with live details about the update and render\n * lifecycle. These can be useful for writing debug tooling and visualizations.\n *\n * Please be aware that running with window.emitLitDebugLogEvents has performance overhead,\n * making certain operations that are normally very cheap (like a no-op render) much slower,\n * because we must copy data and dispatch events.\n */\n // eslint-disable-next-line @typescript-eslint/no-namespace\n export namespace DebugLog {\n export type Entry =\n | TemplatePrep\n | TemplateInstantiated\n | TemplateInstantiatedAndUpdated\n | TemplateUpdating\n | BeginRender\n | EndRender\n | CommitPartEntry\n | SetPartValue;\n export interface TemplatePrep {\n kind: 'template prep';\n template: Template;\n strings: TemplateStringsArray;\n clonableTemplate: HTMLTemplateElement;\n parts: TemplatePart[];\n }\n export interface BeginRender {\n kind: 'begin render';\n id: number;\n value: unknown;\n container: HTMLElement | DocumentFragment;\n options: RenderOptions | undefined;\n part: ChildPart | undefined;\n }\n export interface EndRender {\n kind: 'end render';\n id: number;\n value: unknown;\n container: HTMLElement | DocumentFragment;\n options: RenderOptions | undefined;\n part: ChildPart;\n }\n export interface TemplateInstantiated {\n kind: 'template instantiated';\n template: Template | CompiledTemplate;\n instance: TemplateInstance;\n options: RenderOptions | undefined;\n fragment: Node;\n parts: Array;\n values: unknown[];\n }\n export interface TemplateInstantiatedAndUpdated {\n kind: 'template instantiated and updated';\n template: Template | CompiledTemplate;\n instance: TemplateInstance;\n options: RenderOptions | undefined;\n fragment: Node;\n parts: Array;\n values: unknown[];\n }\n export interface TemplateUpdating {\n kind: 'template updating';\n template: Template | CompiledTemplate;\n instance: TemplateInstance;\n options: RenderOptions | undefined;\n parts: Array;\n values: unknown[];\n }\n export interface SetPartValue {\n kind: 'set part';\n part: Part;\n value: unknown;\n valueIndex: number;\n values: unknown[];\n templateInstance: TemplateInstance;\n }\n\n export type CommitPartEntry =\n | CommitNothingToChildEntry\n | CommitText\n | CommitNode\n | CommitAttribute\n | CommitProperty\n | CommitBooleanAttribute\n | CommitEventListener\n | CommitToElementBinding;\n\n export interface CommitNothingToChildEntry {\n kind: 'commit nothing to child';\n start: ChildNode;\n end: ChildNode | null;\n parent: Disconnectable | undefined;\n options: RenderOptions | undefined;\n }\n\n export interface CommitText {\n kind: 'commit text';\n node: Text;\n value: unknown;\n options: RenderOptions | undefined;\n }\n\n export interface CommitNode {\n kind: 'commit node';\n start: Node;\n parent: Disconnectable | undefined;\n value: Node;\n options: RenderOptions | undefined;\n }\n\n export interface CommitAttribute {\n kind: 'commit attribute';\n element: Element;\n name: string;\n value: unknown;\n options: RenderOptions | undefined;\n }\n\n export interface CommitProperty {\n kind: 'commit property';\n element: Element;\n name: string;\n value: unknown;\n options: RenderOptions | undefined;\n }\n\n export interface CommitBooleanAttribute {\n kind: 'commit boolean attribute';\n element: Element;\n name: string;\n value: boolean;\n options: RenderOptions | undefined;\n }\n\n export interface CommitEventListener {\n kind: 'commit event listener';\n element: Element;\n name: string;\n value: unknown;\n oldListener: unknown;\n options: RenderOptions | undefined;\n // True if we're removing the old event listener (e.g. because settings changed, or value is nothing)\n removeListener: boolean;\n // True if we're adding a new event listener (e.g. because first render, or settings changed)\n addListener: boolean;\n }\n\n export interface CommitToElementBinding {\n kind: 'commit to element binding';\n element: Element;\n value: unknown;\n options: RenderOptions | undefined;\n }\n }\n}\n\ninterface DebugLoggingWindow {\n // Even in dev mode, we generally don't want to emit these events, as that's\n // another level of cost, so only emit them when DEV_MODE is true _and_ when\n // window.emitLitDebugEvents is true.\n emitLitDebugLogEvents?: boolean;\n}\n\n/**\n * Useful for visualizing and logging insights into what the Lit template system is doing.\n *\n * Compiled out of prod mode builds.\n */\nconst debugLogEvent = DEV_MODE\n ? (event: LitUnstable.DebugLog.Entry) => {\n const shouldEmit = (global as unknown as DebugLoggingWindow)\n .emitLitDebugLogEvents;\n if (!shouldEmit) {\n return;\n }\n global.dispatchEvent(\n new CustomEvent('lit-debug', {\n detail: event,\n })\n );\n }\n : undefined;\n// Used for connecting beginRender and endRender events when there are nested\n// renders when errors are thrown preventing an endRender event from being\n// called.\nlet debugLogRenderId = 0;\n\nlet issueWarning: (code: string, warning: string) => void;\n\nif (DEV_MODE) {\n global.litIssuedWarnings ??= new Set();\n\n // Issue a warning, if we haven't already.\n issueWarning = (code: string, warning: string) => {\n warning += code\n ? ` See https://lit.dev/msg/${code} for more information.`\n : '';\n if (!global.litIssuedWarnings!.has(warning)) {\n console.warn(warning);\n global.litIssuedWarnings!.add(warning);\n }\n };\n\n issueWarning(\n 'dev-mode',\n `Lit is in dev mode. Not recommended for production!`\n );\n}\n\nconst wrap =\n ENABLE_SHADYDOM_NOPATCH &&\n global.ShadyDOM?.inUse &&\n global.ShadyDOM?.noPatch === true\n ? (global.ShadyDOM!.wrap as (node: T) => T)\n : (node: T) => node;\n\nconst trustedTypes = (global as unknown as TrustedTypesWindow).trustedTypes;\n\n/**\n * Our TrustedTypePolicy for HTML which is declared using the html template\n * tag function.\n *\n * That HTML is a developer-authored constant, and is parsed with innerHTML\n * before any untrusted expressions have been mixed in. Therefor it is\n * considered safe by construction.\n */\nconst policy = trustedTypes\n ? trustedTypes.createPolicy('lit-html', {\n createHTML: (s) => s,\n })\n : undefined;\n\n/**\n * Used to sanitize any value before it is written into the DOM. This can be\n * used to implement a security policy of allowed and disallowed values in\n * order to prevent XSS attacks.\n *\n * One way of using this callback would be to check attributes and properties\n * against a list of high risk fields, and require that values written to such\n * fields be instances of a class which is safe by construction. Closure's Safe\n * HTML Types is one implementation of this technique (\n * https://github.com/google/safe-html-types/blob/master/doc/safehtml-types.md).\n * The TrustedTypes polyfill in API-only mode could also be used as a basis\n * for this technique (https://github.com/WICG/trusted-types).\n *\n * @param node The HTML node (usually either a #text node or an Element) that\n * is being written to. Note that this is just an exemplar node, the write\n * may take place against another instance of the same class of node.\n * @param name The name of an attribute or property (for example, 'href').\n * @param type Indicates whether the write that's about to be performed will\n * be to a property or a node.\n * @return A function that will sanitize this class of writes.\n */\nexport type SanitizerFactory = (\n node: Node,\n name: string,\n type: 'property' | 'attribute'\n) => ValueSanitizer;\n\n/**\n * A function which can sanitize values that will be written to a specific kind\n * of DOM sink.\n *\n * See SanitizerFactory.\n *\n * @param value The value to sanitize. Will be the actual value passed into\n * the lit-html template literal, so this could be of any type.\n * @return The value to write to the DOM. Usually the same as the input value,\n * unless sanitization is needed.\n */\nexport type ValueSanitizer = (value: unknown) => unknown;\n\nconst identityFunction: ValueSanitizer = (value: unknown) => value;\nconst noopSanitizer: SanitizerFactory = (\n _node: Node,\n _name: string,\n _type: 'property' | 'attribute'\n) => identityFunction;\n\n/** Sets the global sanitizer factory. */\nconst setSanitizer = (newSanitizer: SanitizerFactory) => {\n if (!ENABLE_EXTRA_SECURITY_HOOKS) {\n return;\n }\n if (sanitizerFactoryInternal !== noopSanitizer) {\n throw new Error(\n `Attempted to overwrite existing lit-html security policy.` +\n ` setSanitizeDOMValueFactory should be called at most once.`\n );\n }\n sanitizerFactoryInternal = newSanitizer;\n};\n\n/**\n * Only used in internal tests, not a part of the public API.\n */\nconst _testOnlyClearSanitizerFactoryDoNotCallOrElse = () => {\n sanitizerFactoryInternal = noopSanitizer;\n};\n\nconst createSanitizer: SanitizerFactory = (node, name, type) => {\n return sanitizerFactoryInternal(node, name, type);\n};\n\n// Added to an attribute name to mark the attribute as bound so we can find\n// it easily.\nconst boundAttributeSuffix = '$lit$';\n\n// This marker is used in many syntactic positions in HTML, so it must be\n// a valid element name and attribute name. We don't support dynamic names (yet)\n// but this at least ensures that the parse tree is closer to the template\n// intention.\nconst marker = `lit$${Math.random().toFixed(9).slice(2)}$`;\n\n// String used to tell if a comment is a marker comment\nconst markerMatch = '?' + marker;\n\n// Text used to insert a comment marker node. We use processing instruction\n// syntax because it's slightly smaller, but parses as a comment node.\nconst nodeMarker = `<${markerMatch}>`;\n\nconst d =\n NODE_MODE && global.document === undefined\n ? ({\n createTreeWalker() {\n return {};\n },\n } as unknown as Document)\n : document;\n\n// Creates a dynamic marker. We never have to search for these in the DOM.\nconst createMarker = () => d.createComment('');\n\n// https://tc39.github.io/ecma262/#sec-typeof-operator\ntype Primitive = null | undefined | boolean | number | string | symbol | bigint;\nconst isPrimitive = (value: unknown): value is Primitive =>\n value === null || (typeof value != 'object' && typeof value != 'function');\nconst isArray = Array.isArray;\nconst isIterable = (value: unknown): value is Iterable =>\n isArray(value) ||\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n typeof (value as any)?.[Symbol.iterator] === 'function';\n\nconst SPACE_CHAR = `[ \\t\\n\\f\\r]`;\nconst ATTR_VALUE_CHAR = `[^ \\t\\n\\f\\r\"'\\`<>=]`;\nconst NAME_CHAR = `[^\\\\s\"'>=/]`;\n\n// These regexes represent the five parsing states that we care about in the\n// Template's HTML scanner. They match the *end* of the state they're named\n// after.\n// Depending on the match, we transition to a new state. If there's no match,\n// we stay in the same state.\n// Note that the regexes are stateful. We utilize lastIndex and sync it\n// across the multiple regexes used. In addition to the five regexes below\n// we also dynamically create a regex to find the matching end tags for raw\n// text elements.\n\n/**\n * End of text is: `<` followed by:\n * (comment start) or (tag) or (dynamic tag binding)\n */\nconst textEndRegex = /<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g;\nconst COMMENT_START = 1;\nconst TAG_NAME = 2;\nconst DYNAMIC_TAG_NAME = 3;\n\nconst commentEndRegex = /-->/g;\n/**\n * Comments not started with /g;\n/**\n * Comments not started with