@chainpatrol/sdk 0.9.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { __spreadValues, __export, __async, __spreadProps, __objRest, __pow } from './chunk-4U7ZT42S.mjs';
1
+ import { __spreadValues, __export, __spreadProps, __async, __objRest, __pow } from './chunk-4U7ZT42S.mjs';
2
2
  import { getDomain, getSubdomain, parse as parse$1 } from 'tldts';
3
3
  import { z } from 'zod';
4
4
 
@@ -556,6 +556,32 @@ z.object({
556
556
  email: z.string().email(),
557
557
  description: z.string().optional().default("")
558
558
  });
559
+ z.object({
560
+ /** Canonicalization algorithm version the client computed its prefixes with. */
561
+ algoVersion: z.number().int().positive(),
562
+ /** 4-byte (8-hex-char) prefixes that hit the client's local index. */
563
+ prefixes: z.array(z.string().regex(/^[0-9a-f]{8}$/)).min(1).max(200)
564
+ }).describe("Blocklist confirm request");
565
+ z.object({
566
+ /** Full 64-char SHA-256 hashes of blocked expressions, grouped by prefix. */
567
+ fullHashes: z.record(z.string(), z.array(z.string()))
568
+ }).describe("Blocklist confirm response");
569
+ z.void().describe("Blocklist version request");
570
+ z.object({
571
+ /** Canonicalization algorithm version the artifacts + confirm are built with. */
572
+ algoVersion: z.number().int().positive(),
573
+ snapshot: z.object({
574
+ token: z.string(),
575
+ url: z.string().url(),
576
+ prefixBytes: z.number().int().positive(),
577
+ count: z.number().int().nonnegative()
578
+ }),
579
+ recent: z.object({
580
+ token: z.string(),
581
+ url: z.string().url(),
582
+ windowSeconds: z.number().int().positive()
583
+ })
584
+ }).describe("Blocklist version response");
559
585
 
560
586
  // ../../node_modules/luxon/src/errors.js
561
587
  var LuxonError = class extends Error {
@@ -6977,7 +7003,7 @@ var BrandType = {
6977
7003
  ORGANIZATION: "ORGANIZATION"
6978
7004
  };
6979
7005
  var SubscriptionStatus = {
6980
- TRIAL: "TRIAL",
7006
+ POC: "POC",
6981
7007
  ACTIVE: "ACTIVE",
6982
7008
  PROSPECT: "PROSPECT",
6983
7009
  INTEGRATION: "INTEGRATION",
@@ -7073,7 +7099,8 @@ var AssetType = {
7073
7099
  BANDCAMP: "BANDCAMP",
7074
7100
  ARCHIVE_ORG: "ARCHIVE_ORG",
7075
7101
  FIVE_HUNDRED_PX: "FIVE_HUNDRED_PX",
7076
- LUMA: "LUMA"
7102
+ LUMA: "LUMA",
7103
+ SMARTMONEYMATCH: "SMARTMONEYMATCH"
7077
7104
  };
7078
7105
  var LivenessStatus = {
7079
7106
  UNKNOWN: "UNKNOWN",
@@ -7599,14 +7626,6 @@ z.object({
7599
7626
  warnAgeHours: z.number().int().positive().default(24 * 7),
7600
7627
  failAgeHours: z.number().int().positive().default(24 * 14)
7601
7628
  });
7602
- z.object({
7603
- slug: z.string().min(1),
7604
- warnThreshold: z.number().int().nonnegative().default(200)
7605
- });
7606
- z.object({
7607
- slug: z.string().min(1),
7608
- warnAgeHours: z.number().int().nonnegative().default(24 * 30)
7609
- });
7610
7629
  z.object({
7611
7630
  slug: z.string().min(1),
7612
7631
  warnAgeHours: z.number().int().nonnegative().default(24 * 30),
@@ -7842,6 +7861,26 @@ Returns all brands belonging to the organization associated with your API key,
7842
7861
  including sub-brands (\`ORGANIZATION\`) and individual / employee brands
7843
7862
  (\`INDIVIDUAL\`). Soft-deleted brands are excluded.`
7844
7863
  );
7864
+ var brandLegalDocumentSchema = z.object({
7865
+ present: z.boolean().describe("Whether the brand has this document attached"),
7866
+ fileName: z.string().nullable().describe("Original filename of the uploaded document (null when not present)"),
7867
+ fileUrl: z.string().nullable().describe("Direct URL to view or download the document (null when not present)")
7868
+ });
7869
+ var brandTrademarkRegistrationSchema = z.object({
7870
+ id: z.number().describe("Trademark registration ID"),
7871
+ brandName: z.string().describe("Trademarked brand name as it appears on the registration"),
7872
+ trademarkOffice: z.string().describe("Issuing trademark office (e.g. `USPTO`, `EUIPO`)"),
7873
+ registrationNumber: z.string().describe("Registration number assigned by the office"),
7874
+ goodsAndServicesClass: z.string().describe("Nice Classification class(es) the registration covers"),
7875
+ rightsOwnerName: z.string().nullable().describe("Legal entity the trademark is registered to, if recorded"),
7876
+ registrationPageUrl: z.string().nullable().describe("Public URL on the trademark office's site, if recorded"),
7877
+ certificateFileName: z.string().nullable().describe(
7878
+ "Original filename of the uploaded certificate PDF (null when no certificate is attached)"
7879
+ ),
7880
+ certificateFileUrl: z.string().nullable().describe(
7881
+ "Direct URL to view or download the certificate PDF (null when no certificate is attached)"
7882
+ )
7883
+ });
7845
7884
  var brandItemSchema = z.object({
7846
7885
  id: z.number().describe("Brand ID"),
7847
7886
  slug: z.string().describe("Brand slug (stable, URL-safe identifier)"),
@@ -7850,15 +7889,32 @@ var brandItemSchema = z.object({
7850
7889
  "Brand type: `ORGANIZATION` for parent / product brands, `INDIVIDUAL` for employee or person brands"
7851
7890
  ),
7852
7891
  description: z.string().nullable().describe("Free-form description, if set"),
7892
+ avatarUrl: z.string().nullable().describe("URL of the brand's avatar / logo image"),
7893
+ websiteUrl: z.string().nullable().describe("Official brand website URL"),
7894
+ twitterHandle: z.string().nullable().describe("Official Twitter / X handle (without @)"),
7895
+ brandColors: z.array(z.string()).describe("HEX color strings associated with the brand (e.g. `#FF0000`)"),
7896
+ includedTerms: z.array(z.string()).describe("Terms that should be included when matching this brand"),
7897
+ excludedTerms: z.array(z.string()).describe("Terms that should be excluded when matching this brand"),
7898
+ tickers: z.array(z.string()).describe("Ticker symbols associated with the brand (e.g. `$JUP`)"),
7853
7899
  brandGroupId: z.number().nullable().describe("Group this brand belongs to (only set for `INDIVIDUAL` brands)"),
7854
- createdAt: z.date().describe("When the brand was created")
7900
+ createdAt: z.date().describe("When the brand was created"),
7901
+ useOrganizationDocs: z.boolean().describe(
7902
+ "When true, this brand inherits its Letter of Authorization and Power of Attorney from the organization rather than carrying its own. The `legalDocuments` block below always reflects the brand-level attachments \u2014 read `/user/orgs/{slug}` for the org-level fallbacks."
7903
+ ),
7904
+ legalDocuments: z.object({
7905
+ letterOfAuthorization: brandLegalDocumentSchema,
7906
+ powerOfAttorney: brandLegalDocumentSchema
7907
+ }).describe("Brand-level Letter of Authorization and Power of Attorney attachments"),
7908
+ trademarkRegistrations: z.array(brandTrademarkRegistrationSchema).describe(
7909
+ "Trademark registrations attached to this brand. An empty array means no trademarks are on file for the brand \u2014 use this to identify brands that still need them added."
7910
+ )
7855
7911
  });
7856
7912
  z.object({
7857
7913
  brands: z.array(brandItemSchema).describe("List of brands")
7858
7914
  }).describe("Successful operation");
7859
7915
  var FILTERABLE_SUBSCRIPTION_STATUSES = [
7860
7916
  SubscriptionStatus.PROSPECT,
7861
- SubscriptionStatus.TRIAL,
7917
+ SubscriptionStatus.POC,
7862
7918
  SubscriptionStatus.ACTIVE,
7863
7919
  SubscriptionStatus.INTEGRATION
7864
7920
  ];
@@ -7922,6 +7978,41 @@ var PendingServiceApprovalSchema = z.object({
7922
7978
  // When the enable request was submitted (ISO 8601, UTC).
7923
7979
  requestedAt: z.string()
7924
7980
  });
7981
+ var UserOrgIntegrationsSchema = z.object({
7982
+ slack: z.boolean(),
7983
+ discord: z.boolean(),
7984
+ telegram: z.object({
7985
+ connected: z.boolean(),
7986
+ groupCount: z.number()
7987
+ }),
7988
+ vercel: z.boolean(),
7989
+ intercom: z.boolean(),
7990
+ moderation: z.boolean()
7991
+ });
7992
+ var UserOrgLegalDocumentSchema = z.object({
7993
+ present: z.boolean().describe("Whether the organization has this document attached"),
7994
+ fileName: z.string().nullable().describe("Original filename of the uploaded document (null when not present)"),
7995
+ fileUrl: z.string().nullable().describe("Direct URL to view or download the document (null when not present)")
7996
+ });
7997
+ var UserOrgLegalDocumentsSchema = z.object({
7998
+ letterOfAuthorization: UserOrgLegalDocumentSchema,
7999
+ powerOfAttorney: UserOrgLegalDocumentSchema
8000
+ });
8001
+ var UserOrgTrademarkRegistrationSchema = z.object({
8002
+ id: z.number().describe("Trademark registration ID"),
8003
+ brandName: z.string().describe("Trademarked brand name as it appears on the registration"),
8004
+ trademarkOffice: z.string().describe("Issuing trademark office (e.g. `USPTO`, `EUIPO`)"),
8005
+ registrationNumber: z.string().describe("Registration number assigned by the office"),
8006
+ goodsAndServicesClass: z.string().describe("Nice Classification class(es) the registration covers"),
8007
+ rightsOwnerName: z.string().nullable().describe("Legal entity the trademark is registered to, if recorded"),
8008
+ registrationPageUrl: z.string().nullable().describe("Public URL on the trademark office's site, if recorded"),
8009
+ certificateFileName: z.string().nullable().describe(
8010
+ "Original filename of the uploaded certificate PDF (null when no certificate is attached)"
8011
+ ),
8012
+ certificateFileUrl: z.string().nullable().describe(
8013
+ "Direct URL to view or download the certificate PDF (null when no certificate is attached)"
8014
+ )
8015
+ });
7925
8016
  var UserOrgSchema = z.object({
7926
8017
  id: z.number(),
7927
8018
  name: z.string(),
@@ -7937,8 +8028,15 @@ var UserOrgSchema = z.object({
7937
8028
  detection: singleServiceSchema,
7938
8029
  darkWebMonitoring: singleServiceSchema
7939
8030
  }),
8031
+ integrations: UserOrgIntegrationsSchema,
7940
8032
  obligatoryAdminApproval: UserOrgObligatoryAdminApprovalSchema,
7941
- pendingServiceApprovals: z.array(PendingServiceApprovalSchema)
8033
+ pendingServiceApprovals: z.array(PendingServiceApprovalSchema),
8034
+ legalDocuments: UserOrgLegalDocumentsSchema.describe(
8035
+ "Org-level Letter of Authorization and Power of Attorney attachments"
8036
+ ),
8037
+ trademarkRegistrations: z.array(UserOrgTrademarkRegistrationSchema).describe(
8038
+ "Org-level trademark registrations attached to the organization. An empty array means no trademarks are on file \u2014 use this to identify customers who still need to add them."
8039
+ )
7942
8040
  });
7943
8041
  z.object({
7944
8042
  organizations: z.array(UserOrgSchema)
@@ -7983,7 +8081,7 @@ z.object({
7983
8081
  "Shortcut for 'every org the caller is authorized to read'. Reuses the same filter logic as `/user/orgs`: org-scoped API keys are rejected (they're pinned to one org \u2014 use the default form); user API keys / Bearer sessions resolve to the user's memberships (or every active org for staff). Combine with `subscriptionStatus` and `services` to narrow (e.g. only paying customers with takedowns enabled). The resolved org set is still capped at " + String(ORGANIZATION_METRICS_MAX_SLUGS) + " and a 413 is returned if exceeded. Mutually exclusive with `organizationSlug`, `slugs`, and `brandSlug`."
7984
8082
  ),
7985
8083
  subscriptionStatus: z.array(UserOrgsSubscriptionStatusSchema).min(1).optional().describe(
7986
- "Only meaningful with `allMyOrgs: true`. Defaults to the same set `/user/orgs` uses (ACTIVE/TRIAL/PROSPECT/INTEGRATION \u2014 INACTIVE is always excluded)."
8084
+ "Only meaningful with `allMyOrgs: true`. Defaults to the same set `/user/orgs` uses (ACTIVE/POC/PROSPECT/INTEGRATION \u2014 INACTIVE is always excluded)."
7987
8085
  ),
7988
8086
  services: organizationMetricsServicesFilterSchema.describe(
7989
8087
  "Only meaningful with `allMyOrgs: true`. Same shape as `/user/orgs`'s `services` filter \u2014 every service accepts `{ active }`, and **only `takedowns` additionally accepts `automated`** (the one service where manual-vs-automated changes real platform behavior). E.g. `{ takedowns: { active: true, automated: false } }` for 'orgs with takedowns enabled but automation off'."
@@ -8152,6 +8250,7 @@ var AssetScanEnrichmentSource = /* @__PURE__ */ ((AssetScanEnrichmentSource2) =>
8152
8250
  AssetScanEnrichmentSource2["REDDIT_API"] = "reddit_api";
8153
8251
  AssetScanEnrichmentSource2["MAILS_API"] = "mails_api";
8154
8252
  AssetScanEnrichmentSource2["TELNYX_LOOKUP"] = "telnyx_lookup";
8253
+ AssetScanEnrichmentSource2["TWILIO_LOOKUP"] = "twilio_lookup";
8155
8254
  AssetScanEnrichmentSource2["DAILYMOTION_API"] = "dailymotion_api";
8156
8255
  AssetScanEnrichmentSource2["VIMEO_API"] = "vimeo_api";
8157
8256
  AssetScanEnrichmentSource2["STACKBLITZ_API"] = "stackblitz_api";
@@ -8253,6 +8352,7 @@ var ASSET_SCAN_ENRICHMENT_SOURCE_LABELS = {
8253
8352
  ["mails_api" /* MAILS_API */]: "Mails.so API",
8254
8353
  // Phone Number
8255
8354
  ["telnyx_lookup" /* TELNYX_LOOKUP */]: "Telnyx Lookup",
8355
+ ["twilio_lookup" /* TWILIO_LOOKUP */]: "Twilio Lookup",
8256
8356
  // DailyMotion
8257
8357
  ["dailymotion_api" /* DAILYMOTION_API */]: "DailyMotion API",
8258
8358
  // Vimeo
@@ -8344,6 +8444,7 @@ var ASSET_SCAN_ENRICHMENT_SOURCE_TO_TYPES = {
8344
8444
  ["mails_api" /* MAILS_API */]: ["email_validation" /* EMAIL_VALIDATION */],
8345
8445
  // Phone Number-related sources
8346
8446
  ["telnyx_lookup" /* TELNYX_LOOKUP */]: ["phone_lookup" /* PHONE_LOOKUP */],
8447
+ ["twilio_lookup" /* TWILIO_LOOKUP */]: ["phone_lookup" /* PHONE_LOOKUP */],
8347
8448
  // DailyMotion-related sources
8348
8449
  ["dailymotion_api" /* DAILYMOTION_API */]: [
8349
8450
  "dailymotion_video" /* DAILYMOTION_VIDEO */
@@ -10737,124 +10838,34 @@ function slugify(string, options) {
10737
10838
  return string;
10738
10839
  }
10739
10840
 
10740
- // ../../internal/utils/src/punycode.ts
10741
- var maxInt = 2147483647;
10742
- var base = 36;
10743
- var tMin = 1;
10744
- var tMax = 26;
10745
- var skew = 38;
10746
- var damp = 700;
10747
- var initialBias = 72;
10748
- var initialN = 128;
10749
- var delimiter = "-";
10750
- var regexPunycode = /^xn--/;
10751
- var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g;
10752
- var errors = {
10753
- overflow: "Overflow: input needs wider integers to process",
10754
- "not-basic": "Illegal input >= 0x80 (not a basic code point)",
10755
- "invalid-input": "Invalid input"
10756
- };
10757
- var baseMinusTMin = base - tMin;
10758
- var floor = Math.floor;
10759
- function error(type) {
10760
- throw new RangeError(errors[type]);
10761
- }
10762
- function mapDomain(domain, callback) {
10763
- const parts = domain.split("@");
10764
- let result = "";
10765
- if (parts.length > 1) {
10766
- result = parts[0] + "@";
10767
- domain = parts[1];
10768
- }
10769
- domain = domain.replace(regexSeparators, ".");
10770
- const labels = domain.split(".");
10771
- const encoded = labels.map(callback).join(".");
10772
- return result + encoded;
10773
- }
10774
- function basicToDigit(codePoint) {
10775
- if (codePoint >= 48 && codePoint < 58) {
10776
- return 26 + (codePoint - 48);
10777
- }
10778
- if (codePoint >= 65 && codePoint < 91) {
10779
- return codePoint - 65;
10780
- }
10781
- if (codePoint >= 97 && codePoint < 123) {
10782
- return codePoint - 97;
10783
- }
10784
- return base;
10785
- }
10786
- function adapt(delta, numPoints, firstTime) {
10787
- let k4 = 0;
10788
- delta = firstTime ? floor(delta / damp) : delta >> 1;
10789
- delta += floor(delta / numPoints);
10790
- for (
10791
- ;
10792
- /* no initialization */
10793
- delta > baseMinusTMin * tMax >> 1;
10794
- k4 += base
10795
- ) {
10796
- delta = floor(delta / baseMinusTMin);
10797
- }
10798
- return floor(k4 + (baseMinusTMin + 1) * delta / (delta + skew));
10799
- }
10800
- function decode(input) {
10801
- const output = [];
10802
- const inputLength = input.length;
10803
- let i = 0;
10804
- let n2 = initialN;
10805
- let bias2 = initialBias;
10806
- let basic = input.lastIndexOf(delimiter);
10807
- if (basic < 0) {
10808
- basic = 0;
10809
- }
10810
- for (let j = 0; j < basic; ++j) {
10811
- if (input.charCodeAt(j) >= 128) {
10812
- error("not-basic");
10813
- }
10814
- output.push(input.charCodeAt(j));
10815
- }
10816
- for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; ) {
10817
- const oldi = i;
10818
- for (let w = 1, k4 = base; ; k4 += base) {
10819
- if (index >= inputLength) {
10820
- error("invalid-input");
10821
- }
10822
- const digit = basicToDigit(input.charCodeAt(index++));
10823
- if (digit >= base) {
10824
- error("invalid-input");
10825
- }
10826
- if (digit > floor((maxInt - i) / w)) {
10827
- error("overflow");
10828
- }
10829
- i += digit * w;
10830
- const t = k4 <= bias2 ? tMin : k4 >= bias2 + tMax ? tMax : k4 - bias2;
10831
- if (digit < t) {
10832
- break;
10833
- }
10834
- const baseMinusT = base - t;
10835
- if (w > floor(maxInt / baseMinusT)) {
10836
- error("overflow");
10837
- }
10838
- w *= baseMinusT;
10839
- }
10840
- const out = output.length + 1;
10841
- bias2 = adapt(i - oldi, out, oldi == 0);
10842
- if (floor(i / out) > maxInt - n2) {
10843
- error("overflow");
10844
- }
10845
- n2 += floor(i / out);
10846
- i %= out;
10847
- output.splice(i++, 0, n2);
10848
- }
10849
- return String.fromCodePoint(...output);
10850
- }
10851
- function toUnicode(input) {
10852
- return mapDomain(input, function(string) {
10853
- return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
10854
- });
10855
- }
10856
-
10857
- // ../../internal/utils/src/url.ts
10841
+ // ../asset-parse/src/model.ts
10842
+ var AssetModel = /* @__PURE__ */ ((AssetModel2) => {
10843
+ AssetModel2["Addon"] = "addon";
10844
+ AssetModel2["App"] = "app";
10845
+ AssetModel2["Bot"] = "bot";
10846
+ AssetModel2["BusinessProfile"] = "business-profile";
10847
+ AssetModel2["Catalog"] = "catalog";
10848
+ AssetModel2["Collection"] = "collection";
10849
+ AssetModel2["Channel"] = "channel";
10850
+ AssetModel2["Group"] = "group";
10851
+ AssetModel2["Post"] = "post";
10852
+ AssetModel2["Profile"] = "profile";
10853
+ AssetModel2["Short"] = "short";
10854
+ AssetModel2["Video"] = "video";
10855
+ AssetModel2["Space"] = "space";
10856
+ AssetModel2["Issue"] = "issue";
10857
+ AssetModel2["PullRequest"] = "pull-request";
10858
+ AssetModel2["Discussion"] = "discussion";
10859
+ AssetModel2["Repository"] = "repository";
10860
+ AssetModel2["Article"] = "Article";
10861
+ AssetModel2["Comment"] = "comment";
10862
+ AssetModel2["List"] = "list";
10863
+ AssetModel2["Subreddit"] = "subreddit";
10864
+ AssetModel2["Community"] = "community";
10865
+ AssetModel2["MiniApp"] = "mini-app";
10866
+ AssetModel2["Developer"] = "developer";
10867
+ return AssetModel2;
10868
+ })(AssetModel || {});
10858
10869
  function isUrl(input) {
10859
10870
  if (input.trim() === "") {
10860
10871
  return false;
@@ -10864,21 +10875,6 @@ function isUrl(input) {
10864
10875
  }
10865
10876
  return URL.canParse(input) || URL.canParse(`https://${input}`);
10866
10877
  }
10867
- function isEmail(input) {
10868
- if (input.trim() === "") {
10869
- return false;
10870
- }
10871
- const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
10872
- return emailRegex.test(input);
10873
- }
10874
- function removeHttpProtocol(input) {
10875
- return input.replace(/^https?:\/\//, "");
10876
- }
10877
- function stripDomainWildcardPrefix(domain) {
10878
- const trimmedDomain = domain.trim();
10879
- const strippedDomain = trimmedDomain.startsWith("*.") ? trimmedDomain.slice(2) : trimmedDomain;
10880
- return strippedDomain.length > 0 ? strippedDomain : null;
10881
- }
10882
10878
  function getNormalizedUrl(input) {
10883
10879
  if (!isUrl(input)) {
10884
10880
  throw new Error(`Invalid URL: ${input}`);
@@ -10902,20 +10898,15 @@ function getNormalizedUrl(input) {
10902
10898
  throw new Error(`Invalid URL: ${input}`);
10903
10899
  }
10904
10900
  }
10905
- function getDefangedUrl(input) {
10906
- if (!isUrl(input)) {
10907
- console.warn(`[getDefangedUrl] Invalid URL: ${input}, returning input as-is`);
10908
- return input;
10901
+ var ensureHttpsPrefix = (url) => {
10902
+ if (!url.startsWith("http")) {
10903
+ return `https://${url}`;
10909
10904
  }
10910
- return input.replace(/\./g, "[.]").replace(/(https:\/\/)/g, "hxxps://").replace(/(http:\/\/)/g, "hxxp://").replace(/:\/\//g, "[://]");
10911
- }
10912
- function getRefangedUrl(input) {
10913
- return input.replace(/hxxps/gi, "https").replace(/hxxp/gi, "http").replace(/\[:\/{2}\]/g, "://").replace(/\[\.\]/g, ".");
10914
- }
10905
+ return url.replace(/^https?:\/{1,2}/, "https://");
10906
+ };
10915
10907
  function getHostname(input) {
10916
10908
  try {
10917
- const normalizedUrl = getNormalizedUrl(input);
10918
- return normalizedUrl.hostname;
10909
+ return getNormalizedUrl(input).hostname;
10919
10910
  } catch (e4) {
10920
10911
  return null;
10921
10912
  }
@@ -10952,62 +10943,8 @@ function trimDomainToLevels(domain, options = { levels: 4 }) {
10952
10943
  const trimmedSubdomains = subdomains.slice(Math.max(eTLDPlusOneIndex - (options.levels - 1), 0)).join(".");
10953
10944
  return trimmedSubdomains;
10954
10945
  }
10955
- var ensureHttpsPrefix = (url) => {
10956
- if (!url.startsWith("http")) {
10957
- return `https://${url}`;
10958
- }
10959
- return url.replace(/^https?:\/{1,2}/, "https://");
10960
- };
10961
- function containsPunycode(url) {
10962
- return url.indexOf("xn--") !== -1;
10963
- }
10964
- function toUnicode2(url) {
10965
- return toUnicode(url);
10966
- }
10967
- function convertHttpsToHttp(url) {
10968
- if (url.startsWith("https://")) {
10969
- const httpUrl = new URL(url);
10970
- httpUrl.protocol = "http:";
10971
- return httpUrl.toString();
10972
- }
10973
- throw new Error(`URL is not HTTPS: ${url}`);
10974
- }
10975
- function generateCanonicalIPFSUrl(content) {
10976
- if (!content) {
10977
- return content;
10978
- }
10979
- if (content.includes("ipfs.io")) {
10980
- return content;
10981
- }
10982
- if (content.startsWith("Qm") || content.startsWith("bafy")) {
10983
- return `ipfs.io/ipfs/${content}`;
10984
- }
10985
- return content;
10986
- }
10987
- function isWalrusSite(content) {
10988
- return content.includes(".walrus.site") || content.includes(".walrus.host") || content.includes(".wal.app") || content.includes(".wal.site");
10989
- }
10990
- function getFaviconUrl(content) {
10991
- const normalizedUrl = getNormalizedUrl(content);
10992
- return `https://icons.duckduckgo.com/ip3/${normalizedUrl.hostname}.ico`;
10993
- }
10994
- function sanitizeHttpUrl(value) {
10995
- if (typeof value !== "string" || value.length === 0) {
10996
- return null;
10997
- }
10998
- try {
10999
- const parsed = new URL(value);
11000
- if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
11001
- return null;
11002
- }
11003
- return parsed.toString();
11004
- } catch (e4) {
11005
- return null;
11006
- }
11007
- }
11008
- var URL_REGEX = /https?:\/\/[^\s"'<>\])]*/g;
11009
10946
 
11010
- // ../../internal/utils/src/phone.ts
10947
+ // ../asset-parse/src/phone.ts
11011
10948
  var phone_exports = {};
11012
10949
  __export(phone_exports, {
11013
10950
  PHONE_NUMBER_REGEX: () => PHONE_NUMBER_REGEX,
@@ -11134,8 +11071,200 @@ function normalizePhoneNumber(phone) {
11134
11071
  return hasPlus ? `+${digitsOnly}` : digitsOnly;
11135
11072
  }
11136
11073
 
11137
- // ../../internal/utils/src/email.ts
11138
- var email_exports = {};
11074
+ // ../../internal/utils/src/punycode.ts
11075
+ var maxInt = 2147483647;
11076
+ var base = 36;
11077
+ var tMin = 1;
11078
+ var tMax = 26;
11079
+ var skew = 38;
11080
+ var damp = 700;
11081
+ var initialBias = 72;
11082
+ var initialN = 128;
11083
+ var delimiter = "-";
11084
+ var regexPunycode = /^xn--/;
11085
+ var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g;
11086
+ var errors = {
11087
+ overflow: "Overflow: input needs wider integers to process",
11088
+ "not-basic": "Illegal input >= 0x80 (not a basic code point)",
11089
+ "invalid-input": "Invalid input"
11090
+ };
11091
+ var baseMinusTMin = base - tMin;
11092
+ var floor = Math.floor;
11093
+ function error(type) {
11094
+ throw new RangeError(errors[type]);
11095
+ }
11096
+ function mapDomain(domain, callback) {
11097
+ const parts = domain.split("@");
11098
+ let result = "";
11099
+ if (parts.length > 1) {
11100
+ result = parts[0] + "@";
11101
+ domain = parts[1];
11102
+ }
11103
+ domain = domain.replace(regexSeparators, ".");
11104
+ const labels = domain.split(".");
11105
+ const encoded = labels.map(callback).join(".");
11106
+ return result + encoded;
11107
+ }
11108
+ function basicToDigit(codePoint) {
11109
+ if (codePoint >= 48 && codePoint < 58) {
11110
+ return 26 + (codePoint - 48);
11111
+ }
11112
+ if (codePoint >= 65 && codePoint < 91) {
11113
+ return codePoint - 65;
11114
+ }
11115
+ if (codePoint >= 97 && codePoint < 123) {
11116
+ return codePoint - 97;
11117
+ }
11118
+ return base;
11119
+ }
11120
+ function adapt(delta, numPoints, firstTime) {
11121
+ let k4 = 0;
11122
+ delta = firstTime ? floor(delta / damp) : delta >> 1;
11123
+ delta += floor(delta / numPoints);
11124
+ for (
11125
+ ;
11126
+ /* no initialization */
11127
+ delta > baseMinusTMin * tMax >> 1;
11128
+ k4 += base
11129
+ ) {
11130
+ delta = floor(delta / baseMinusTMin);
11131
+ }
11132
+ return floor(k4 + (baseMinusTMin + 1) * delta / (delta + skew));
11133
+ }
11134
+ function decode(input) {
11135
+ const output = [];
11136
+ const inputLength = input.length;
11137
+ let i = 0;
11138
+ let n2 = initialN;
11139
+ let bias2 = initialBias;
11140
+ let basic = input.lastIndexOf(delimiter);
11141
+ if (basic < 0) {
11142
+ basic = 0;
11143
+ }
11144
+ for (let j = 0; j < basic; ++j) {
11145
+ if (input.charCodeAt(j) >= 128) {
11146
+ error("not-basic");
11147
+ }
11148
+ output.push(input.charCodeAt(j));
11149
+ }
11150
+ for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; ) {
11151
+ const oldi = i;
11152
+ for (let w = 1, k4 = base; ; k4 += base) {
11153
+ if (index >= inputLength) {
11154
+ error("invalid-input");
11155
+ }
11156
+ const digit = basicToDigit(input.charCodeAt(index++));
11157
+ if (digit >= base) {
11158
+ error("invalid-input");
11159
+ }
11160
+ if (digit > floor((maxInt - i) / w)) {
11161
+ error("overflow");
11162
+ }
11163
+ i += digit * w;
11164
+ const t = k4 <= bias2 ? tMin : k4 >= bias2 + tMax ? tMax : k4 - bias2;
11165
+ if (digit < t) {
11166
+ break;
11167
+ }
11168
+ const baseMinusT = base - t;
11169
+ if (w > floor(maxInt / baseMinusT)) {
11170
+ error("overflow");
11171
+ }
11172
+ w *= baseMinusT;
11173
+ }
11174
+ const out = output.length + 1;
11175
+ bias2 = adapt(i - oldi, out, oldi == 0);
11176
+ if (floor(i / out) > maxInt - n2) {
11177
+ error("overflow");
11178
+ }
11179
+ n2 += floor(i / out);
11180
+ i %= out;
11181
+ output.splice(i++, 0, n2);
11182
+ }
11183
+ return String.fromCodePoint(...output);
11184
+ }
11185
+ function toUnicode(input) {
11186
+ return mapDomain(input, function(string) {
11187
+ return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
11188
+ });
11189
+ }
11190
+
11191
+ // ../../internal/utils/src/url.ts
11192
+ function isEmail(input) {
11193
+ if (input.trim() === "") {
11194
+ return false;
11195
+ }
11196
+ const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
11197
+ return emailRegex.test(input);
11198
+ }
11199
+ function removeHttpProtocol(input) {
11200
+ return input.replace(/^https?:\/\//, "");
11201
+ }
11202
+ function stripDomainWildcardPrefix(domain) {
11203
+ const trimmedDomain = domain.trim();
11204
+ const strippedDomain = trimmedDomain.startsWith("*.") ? trimmedDomain.slice(2) : trimmedDomain;
11205
+ return strippedDomain.length > 0 ? strippedDomain : null;
11206
+ }
11207
+ function getDefangedUrl(input) {
11208
+ if (!isUrl(input)) {
11209
+ console.warn(`[getDefangedUrl] Invalid URL: ${input}, returning input as-is`);
11210
+ return input;
11211
+ }
11212
+ return input.replace(/\./g, "[.]").replace(/(https:\/\/)/g, "hxxps://").replace(/(http:\/\/)/g, "hxxp://").replace(/:\/\//g, "[://]");
11213
+ }
11214
+ function getRefangedUrl(input) {
11215
+ return input.replace(/hxxps/gi, "https").replace(/hxxp/gi, "http").replace(/\[:\/{2}\]/g, "://").replace(/\[\.\]/g, ".");
11216
+ }
11217
+ function containsPunycode(url) {
11218
+ return url.indexOf("xn--") !== -1;
11219
+ }
11220
+ function toUnicode2(url) {
11221
+ return toUnicode(url);
11222
+ }
11223
+ function convertHttpsToHttp(url) {
11224
+ if (url.startsWith("https://")) {
11225
+ const httpUrl = new URL(url);
11226
+ httpUrl.protocol = "http:";
11227
+ return httpUrl.toString();
11228
+ }
11229
+ throw new Error(`URL is not HTTPS: ${url}`);
11230
+ }
11231
+ function generateCanonicalIPFSUrl(content) {
11232
+ if (!content) {
11233
+ return content;
11234
+ }
11235
+ if (content.includes("ipfs.io")) {
11236
+ return content;
11237
+ }
11238
+ if (content.startsWith("Qm") || content.startsWith("bafy")) {
11239
+ return `ipfs.io/ipfs/${content}`;
11240
+ }
11241
+ return content;
11242
+ }
11243
+ function isWalrusSite(content) {
11244
+ return content.includes(".walrus.site") || content.includes(".walrus.host") || content.includes(".wal.app") || content.includes(".wal.site");
11245
+ }
11246
+ function getFaviconUrl(content) {
11247
+ const normalizedUrl = getNormalizedUrl(content);
11248
+ return `https://icons.duckduckgo.com/ip3/${normalizedUrl.hostname}.ico`;
11249
+ }
11250
+ function sanitizeHttpUrl(value) {
11251
+ if (typeof value !== "string" || value.length === 0) {
11252
+ return null;
11253
+ }
11254
+ try {
11255
+ const parsed = new URL(value);
11256
+ if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
11257
+ return null;
11258
+ }
11259
+ return parsed.toString();
11260
+ } catch (e4) {
11261
+ return null;
11262
+ }
11263
+ }
11264
+ var URL_REGEX = /https?:\/\/[^\s"'<>\])]*/g;
11265
+
11266
+ // ../../internal/utils/src/email.ts
11267
+ var email_exports = {};
11139
11268
  __export(email_exports, {
11140
11269
  extractTextFromGmailPayload: () => extractTextFromGmailPayload,
11141
11270
  getDomainFromEmail: () => getDomainFromEmail,
@@ -11380,816 +11509,6 @@ function countPatternMatches(content, pattern, maxMatches = DEFAULT_MAX_MATCHES)
11380
11509
  return count;
11381
11510
  }
11382
11511
 
11383
- // ../../internal/utils/src/itunes-api.ts
11384
- var itunes_api_exports = {};
11385
- __export(itunes_api_exports, {
11386
- APP_STORE_COUNTRIES: () => APP_STORE_COUNTRIES,
11387
- fetchItunesAppData: () => fetchItunesAppData,
11388
- fetchItunesSearchResults: () => fetchItunesSearchResults,
11389
- getAllAppStoreCountryCodes: () => getAllAppStoreCountryCodes,
11390
- getAppStoreCountryName: () => getAppStoreCountryName,
11391
- isValidAppStoreCountryCode: () => isValidAppStoreCountryCode,
11392
- selectBestArtworkUrl: () => selectBestArtworkUrl
11393
- });
11394
- var APP_STORE_COUNTRIES = [
11395
- { code: "al", name: "Albania" },
11396
- { code: "dz", name: "Algeria" },
11397
- { code: "ao", name: "Angola" },
11398
- { code: "ai", name: "Anguilla" },
11399
- { code: "ag", name: "Antigua and Barbuda" },
11400
- { code: "ar", name: "Argentina" },
11401
- { code: "am", name: "Armenia" },
11402
- { code: "au", name: "Australia" },
11403
- { code: "at", name: "Austria" },
11404
- { code: "az", name: "Azerbaijan" },
11405
- { code: "bs", name: "Bahamas" },
11406
- { code: "bh", name: "Bahrain" },
11407
- { code: "bb", name: "Barbados" },
11408
- { code: "by", name: "Belarus" },
11409
- { code: "be", name: "Belgium" },
11410
- { code: "bz", name: "Belize" },
11411
- { code: "bj", name: "Benin" },
11412
- { code: "bm", name: "Bermuda" },
11413
- { code: "bt", name: "Bhutan" },
11414
- { code: "bo", name: "Bolivia" },
11415
- { code: "bw", name: "Botswana" },
11416
- { code: "br", name: "Brazil" },
11417
- { code: "vg", name: "British Virgin Islands" },
11418
- { code: "bn", name: "Brunei" },
11419
- { code: "bg", name: "Bulgaria" },
11420
- { code: "bf", name: "Burkina Faso" },
11421
- { code: "kh", name: "Cambodia" },
11422
- { code: "ca", name: "Canada" },
11423
- { code: "cv", name: "Cape Verde" },
11424
- { code: "ky", name: "Cayman Islands" },
11425
- { code: "cl", name: "Chile" },
11426
- { code: "td", name: "Chad" },
11427
- { code: "cn", name: "China" },
11428
- { code: "co", name: "Colombia" },
11429
- { code: "cd", name: "Congo" },
11430
- { code: "cr", name: "Costa Rica" },
11431
- { code: "hr", name: "Croatia" },
11432
- { code: "cy", name: "Cyprus" },
11433
- { code: "cz", name: "Czechia" },
11434
- { code: "dk", name: "Denmark" },
11435
- { code: "dm", name: "Dominica" },
11436
- { code: "do", name: "Dominican Republic" },
11437
- { code: "ec", name: "Ecuador" },
11438
- { code: "eg", name: "Egypt" },
11439
- { code: "sv", name: "El Salvador" },
11440
- { code: "ee", name: "Estonia" },
11441
- { code: "fj", name: "Fiji" },
11442
- { code: "fi", name: "Finland" },
11443
- { code: "fr", name: "France" },
11444
- { code: "de", name: "Germany" },
11445
- { code: "gm", name: "Gambia" },
11446
- { code: "gb", name: "United Kingdom" },
11447
- { code: "gh", name: "Ghana" },
11448
- { code: "gr", name: "Greece" },
11449
- { code: "gd", name: "Grenada" },
11450
- { code: "gt", name: "Guatemala" },
11451
- { code: "gw", name: "Guinea-bissau" },
11452
- { code: "gy", name: "Guyana" },
11453
- { code: "hn", name: "Honduras" },
11454
- { code: "hk", name: "Hong Kong" },
11455
- { code: "hu", name: "Hungary" },
11456
- { code: "is", name: "Iceland" },
11457
- { code: "in", name: "India" },
11458
- { code: "id", name: "Indonesia" },
11459
- { code: "ie", name: "Ireland" },
11460
- { code: "il", name: "Israel" },
11461
- { code: "it", name: "Italy" },
11462
- { code: "jm", name: "Jamaica" },
11463
- { code: "jp", name: "Japan" },
11464
- { code: "jo", name: "Jordan" },
11465
- { code: "kz", name: "Kazakhstan" },
11466
- { code: "ke", name: "Kenya" },
11467
- { code: "kw", name: "Kuwait" },
11468
- { code: "kg", name: "Kyrgyzstan" },
11469
- { code: "la", name: "Lao Peoples Democratic Republic" },
11470
- { code: "lv", name: "Latvia" },
11471
- { code: "lb", name: "Lebanon" },
11472
- { code: "li", name: "Liberia" },
11473
- { code: "lt", name: "Lithuania" },
11474
- { code: "lu", name: "Luxembourg" },
11475
- { code: "mo", name: "Macao" },
11476
- { code: "mk", name: "North Macedonia" },
11477
- { code: "mg", name: "Madagascar" },
11478
- { code: "mw", name: "Malawi" },
11479
- { code: "my", name: "Malaysia" },
11480
- { code: "ml", name: "Mali" },
11481
- { code: "mt", name: "Malta" },
11482
- { code: "mr", name: "Mauritania" },
11483
- { code: "mu", name: "Mauritius" },
11484
- { code: "mx", name: "Mexico" },
11485
- { code: "fm", name: "Micronesia" },
11486
- { code: "md", name: "Moldova" },
11487
- { code: "mn", name: "Mongolia" },
11488
- { code: "ms", name: "Montserrat" },
11489
- { code: "mz", name: "Mozambique" },
11490
- { code: "na", name: "Namibia" },
11491
- { code: "np", name: "Nepal" },
11492
- { code: "nl", name: "Netherlands" },
11493
- { code: "nz", name: "New Zealand" },
11494
- { code: "ni", name: "Nicaragua" },
11495
- { code: "ne", name: "Niger" },
11496
- { code: "ng", name: "Nigeria" },
11497
- { code: "no", name: "Norway" },
11498
- { code: "om", name: "Oman" },
11499
- { code: "pk", name: "Pakistan" },
11500
- { code: "pw", name: "Palau" },
11501
- { code: "pa", name: "Panama" },
11502
- { code: "pg", name: "Papua New Guinea" },
11503
- { code: "py", name: "Paraguay" },
11504
- { code: "pe", name: "Peru" },
11505
- { code: "ph", name: "Philippines" },
11506
- { code: "pl", name: "Poland" },
11507
- { code: "pt", name: "Portugal" },
11508
- { code: "qa", name: "Qatar" },
11509
- { code: "ro", name: "Romania" },
11510
- { code: "ru", name: "Russia" },
11511
- { code: "st", name: "Sao Tome & Principe" },
11512
- { code: "sa", name: "Saudi Arabia" },
11513
- { code: "sn", name: "Senegal" },
11514
- { code: "sc", name: "Seychelles" },
11515
- { code: "sl", name: "Sierra Leone" },
11516
- { code: "sg", name: "Singapore" },
11517
- { code: "sk", name: "Slovakia" },
11518
- { code: "si", name: "Slovenia" },
11519
- { code: "sb", name: "Solomon Islands" },
11520
- { code: "za", name: "South Africa" },
11521
- { code: "kr", name: "South Korea" },
11522
- { code: "es", name: "Spain" },
11523
- { code: "lk", name: "Sri Lanka" },
11524
- { code: "kn", name: "St. Kitts and Nevis" },
11525
- { code: "lc", name: "St. Lucia" },
11526
- { code: "vc", name: "St. Vincent & The Grenadines" },
11527
- { code: "sr", name: "Suriname" },
11528
- { code: "sz", name: "Swaziland" },
11529
- { code: "se", name: "Sweden" },
11530
- { code: "ch", name: "Switzerland" },
11531
- { code: "tw", name: "Taiwan" },
11532
- { code: "tj", name: "Tajikistan" },
11533
- { code: "tz", name: "Tanzania" },
11534
- { code: "th", name: "Thailand" },
11535
- { code: "tt", name: "Trinidad and Tobago" },
11536
- { code: "tn", name: "Tunisia" },
11537
- { code: "tr", name: "Turkey" },
11538
- { code: "tm", name: "Turkmenistan" },
11539
- { code: "tc", name: "Turks and Caicos" },
11540
- { code: "ug", name: "Uganda" },
11541
- { code: "ua", name: "Ukraine" },
11542
- { code: "ae", name: "United Arab Emirates" },
11543
- { code: "us", name: "United States" },
11544
- { code: "uy", name: "Uruguay" },
11545
- { code: "uz", name: "Uzbekistan" },
11546
- { code: "ve", name: "Venezuela" },
11547
- { code: "vn", name: "Vietnam" },
11548
- { code: "ye", name: "Yemen" },
11549
- { code: "zw", name: "Zimbabwe" }
11550
- ];
11551
- var APP_STORE_COUNTRY_MAP = new Map(
11552
- APP_STORE_COUNTRIES.map((country) => [country.code, country.name])
11553
- );
11554
- var APP_STORE_CODES_SET = new Set(APP_STORE_COUNTRIES.map((country) => country.code));
11555
- var APP_STORE_CODES_ARRAY = Array.from(APP_STORE_CODES_SET).sort();
11556
- function getAppStoreCountryName(code) {
11557
- return APP_STORE_COUNTRY_MAP.get(code);
11558
- }
11559
- function getAllAppStoreCountryCodes() {
11560
- return APP_STORE_CODES_ARRAY;
11561
- }
11562
- function isValidAppStoreCountryCode(code) {
11563
- return APP_STORE_CODES_SET.has(code);
11564
- }
11565
- function selectBestArtworkUrl(appData) {
11566
- return appData.artworkUrl512 || appData.artworkUrl100 || appData.artworkUrl60;
11567
- }
11568
- function fetchItunesSearchResults(term, country = "us", limit = 10) {
11569
- return __async(this, null, function* () {
11570
- const params = new URLSearchParams({
11571
- media: "software",
11572
- term,
11573
- country,
11574
- lang: "en_us",
11575
- entity: "software",
11576
- explicit: "yes",
11577
- limit: String(limit)
11578
- });
11579
- const response = yield fetch(`https://itunes.apple.com/search?${params.toString()}`, {
11580
- headers: { "User-Agent": "ChainPatrol/1.0 (https://chainpatrol.io)" }
11581
- });
11582
- if (!response.ok) {
11583
- throw new Error(`iTunes API returned ${response.status} ${response.statusText}`);
11584
- }
11585
- const data = yield response.json();
11586
- return data.results.map((r) => ({
11587
- trackId: r.trackId,
11588
- trackName: r.trackName,
11589
- trackViewUrl: r.trackViewUrl,
11590
- releaseDate: r.releaseDate,
11591
- artistName: r.artistName,
11592
- bundleId: r.bundleId
11593
- }));
11594
- });
11595
- }
11596
- function fetchItunesAppData(appId, country = "us") {
11597
- return __async(this, null, function* () {
11598
- try {
11599
- const apiUrl = `https://itunes.apple.com/lookup?id=${appId}&country=${country}&entity=software`;
11600
- const response = yield fetch(apiUrl, {
11601
- headers: {
11602
- "User-Agent": "ChainPatrol/1.0 (https://chainpatrol.io)"
11603
- }
11604
- });
11605
- if (!response.ok) {
11606
- throw new Error(
11607
- `iTunes API request failed: ${response.status} ${response.statusText}`
11608
- );
11609
- }
11610
- const data = yield response.json();
11611
- if (data.resultCount > 0 && data.results.length > 0) {
11612
- return data.results[0];
11613
- }
11614
- return null;
11615
- } catch (error2) {
11616
- console.error("Error fetching iTunes app data", { error: error2 });
11617
- return null;
11618
- }
11619
- });
11620
- }
11621
-
11622
- // ../../internal/utils/src/google-play-api.ts
11623
- var GOOGLE_PLAY_COUNTRIES = [
11624
- { code: "af", name: "Afghanistan" },
11625
- { code: "al", name: "Albania" },
11626
- { code: "dz", name: "Algeria" },
11627
- { code: "as", name: "American Samoa" },
11628
- { code: "ad", name: "Andorra" },
11629
- { code: "ao", name: "Angola" },
11630
- { code: "ai", name: "Anguilla" },
11631
- { code: "aq", name: "Antarctica" },
11632
- { code: "ag", name: "Antigua and Barbuda" },
11633
- { code: "ar", name: "Argentina" },
11634
- { code: "am", name: "Armenia" },
11635
- { code: "aw", name: "Aruba" },
11636
- { code: "au", name: "Australia" },
11637
- { code: "at", name: "Austria" },
11638
- { code: "az", name: "Azerbaijan" },
11639
- { code: "bs", name: "Bahamas" },
11640
- { code: "bh", name: "Bahrain" },
11641
- { code: "bd", name: "Bangladesh" },
11642
- { code: "bb", name: "Barbados" },
11643
- { code: "by", name: "Belarus" },
11644
- { code: "be", name: "Belgium" },
11645
- { code: "bz", name: "Belize" },
11646
- { code: "bj", name: "Benin" },
11647
- { code: "bm", name: "Bermuda" },
11648
- { code: "bt", name: "Bhutan" },
11649
- { code: "bo", name: "Bolivia" },
11650
- { code: "ba", name: "Bosnia and Herzegovina" },
11651
- { code: "bw", name: "Botswana" },
11652
- { code: "bv", name: "Bouvet Island" },
11653
- { code: "br", name: "Brazil" },
11654
- { code: "io", name: "British Indian Ocean Territory" },
11655
- { code: "bn", name: "Brunei Darussalam" },
11656
- { code: "bg", name: "Bulgaria" },
11657
- { code: "bf", name: "Burkina Faso" },
11658
- { code: "bi", name: "Burundi" },
11659
- { code: "kh", name: "Cambodia" },
11660
- { code: "cm", name: "Cameroon" },
11661
- { code: "ca", name: "Canada" },
11662
- { code: "cv", name: "Cape Verde" },
11663
- { code: "ky", name: "Cayman Islands" },
11664
- { code: "cf", name: "Central African Republic" },
11665
- { code: "td", name: "Chad" },
11666
- { code: "cl", name: "Chile" },
11667
- { code: "cn", name: "China" },
11668
- { code: "cx", name: "Christmas Island" },
11669
- { code: "cc", name: "Cocos (Keeling) Islands" },
11670
- { code: "co", name: "Colombia" },
11671
- { code: "km", name: "Comoros" },
11672
- { code: "cg", name: "Congo" },
11673
- { code: "cd", name: "Congo, the Democratic Republic of the" },
11674
- { code: "ck", name: "Cook Islands" },
11675
- { code: "cr", name: "Costa Rica" },
11676
- { code: "ci", name: "Cote D'ivoire" },
11677
- { code: "hr", name: "Croatia" },
11678
- { code: "cu", name: "Cuba" },
11679
- { code: "cy", name: "Cyprus" },
11680
- { code: "cz", name: "Czech Republic" },
11681
- { code: "dk", name: "Denmark" },
11682
- { code: "dj", name: "Djibouti" },
11683
- { code: "dm", name: "Dominica" },
11684
- { code: "do", name: "Dominican Republic" },
11685
- { code: "ec", name: "Ecuador" },
11686
- { code: "eg", name: "Egypt" },
11687
- { code: "sv", name: "El Salvador" },
11688
- { code: "gq", name: "Equatorial Guinea" },
11689
- { code: "er", name: "Eritrea" },
11690
- { code: "ee", name: "Estonia" },
11691
- { code: "et", name: "Ethiopia" },
11692
- { code: "fk", name: "Falkland Islands (Malvinas)" },
11693
- { code: "fo", name: "Faroe Islands" },
11694
- { code: "fj", name: "Fiji" },
11695
- { code: "fi", name: "Finland" },
11696
- { code: "fr", name: "France" },
11697
- { code: "gf", name: "French Guiana" },
11698
- { code: "pf", name: "French Polynesia" },
11699
- { code: "tf", name: "French Southern Territories" },
11700
- { code: "ga", name: "Gabon" },
11701
- { code: "gm", name: "Gambia" },
11702
- { code: "ge", name: "Georgia" },
11703
- { code: "de", name: "Germany" },
11704
- { code: "gh", name: "Ghana" },
11705
- { code: "gi", name: "Gibraltar" },
11706
- { code: "gr", name: "Greece" },
11707
- { code: "gl", name: "Greenland" },
11708
- { code: "gd", name: "Grenada" },
11709
- { code: "gp", name: "Guadeloupe" },
11710
- { code: "gu", name: "Guam" },
11711
- { code: "gt", name: "Guatemala" },
11712
- { code: "gg", name: "Guernsey" },
11713
- { code: "gn", name: "Guinea" },
11714
- { code: "gw", name: "Guinea-Bissau" },
11715
- { code: "gy", name: "Guyana" },
11716
- { code: "ht", name: "Haiti" },
11717
- { code: "hm", name: "Heard Island and Mcdonald Islands" },
11718
- { code: "va", name: "Holy See (Vatican City State)" },
11719
- { code: "hn", name: "Honduras" },
11720
- { code: "hk", name: "Hong Kong" },
11721
- { code: "hu", name: "Hungary" },
11722
- { code: "is", name: "Iceland" },
11723
- { code: "in", name: "India" },
11724
- { code: "id", name: "Indonesia" },
11725
- { code: "ir", name: "Iran, Islamic Republic of" },
11726
- { code: "iq", name: "Iraq" },
11727
- { code: "ie", name: "Ireland" },
11728
- { code: "im", name: "Isle of Man" },
11729
- { code: "il", name: "Israel" },
11730
- { code: "it", name: "Italy" },
11731
- { code: "je", name: "Jersey" },
11732
- { code: "jm", name: "Jamaica" },
11733
- { code: "jp", name: "Japan" },
11734
- { code: "jo", name: "Jordan" },
11735
- { code: "kz", name: "Kazakhstan" },
11736
- { code: "ke", name: "Kenya" },
11737
- { code: "ki", name: "Kiribati" },
11738
- { code: "kp", name: "Korea, Democratic People's Republic of" },
11739
- { code: "kr", name: "Korea, Republic of" },
11740
- { code: "kw", name: "Kuwait" },
11741
- { code: "kg", name: "Kyrgyzstan" },
11742
- { code: "la", name: "Lao People's Democratic Republic" },
11743
- { code: "lv", name: "Latvia" },
11744
- { code: "lb", name: "Lebanon" },
11745
- { code: "ls", name: "Lesotho" },
11746
- { code: "lr", name: "Liberia" },
11747
- { code: "ly", name: "Libyan Arab Jamahiriya" },
11748
- { code: "li", name: "Liechtenstein" },
11749
- { code: "lt", name: "Lithuania" },
11750
- { code: "lu", name: "Luxembourg" },
11751
- { code: "mo", name: "Macao" },
11752
- { code: "mk", name: "Macedonia, the Former Yugoslav Republic of" },
11753
- { code: "mg", name: "Madagascar" },
11754
- { code: "mw", name: "Malawi" },
11755
- { code: "my", name: "Malaysia" },
11756
- { code: "mv", name: "Maldives" },
11757
- { code: "ml", name: "Mali" },
11758
- { code: "mt", name: "Malta" },
11759
- { code: "mh", name: "Marshall Islands" },
11760
- { code: "mq", name: "Martinique" },
11761
- { code: "mr", name: "Mauritania" },
11762
- { code: "mu", name: "Mauritius" },
11763
- { code: "yt", name: "Mayotte" },
11764
- { code: "mx", name: "Mexico" },
11765
- { code: "fm", name: "Micronesia, Federated States of" },
11766
- { code: "md", name: "Moldova, Republic of" },
11767
- { code: "mc", name: "Monaco" },
11768
- { code: "mn", name: "Mongolia" },
11769
- { code: "me", name: "Montenegro" },
11770
- { code: "ms", name: "Montserrat" },
11771
- { code: "ma", name: "Morocco" },
11772
- { code: "mz", name: "Mozambique" },
11773
- { code: "mm", name: "Myanmar" },
11774
- { code: "na", name: "Namibia" },
11775
- { code: "nr", name: "Nauru" },
11776
- { code: "np", name: "Nepal" },
11777
- { code: "nl", name: "Netherlands" },
11778
- { code: "an", name: "Netherlands Antilles" },
11779
- { code: "nc", name: "New Caledonia" },
11780
- { code: "nz", name: "New Zealand" },
11781
- { code: "ni", name: "Nicaragua" },
11782
- { code: "ne", name: "Niger" },
11783
- { code: "ng", name: "Nigeria" },
11784
- { code: "nu", name: "Niue" },
11785
- { code: "nf", name: "Norfolk Island" },
11786
- { code: "mp", name: "Northern Mariana Islands" },
11787
- { code: "no", name: "Norway" },
11788
- { code: "om", name: "Oman" },
11789
- { code: "pk", name: "Pakistan" },
11790
- { code: "pw", name: "Palau" },
11791
- { code: "ps", name: "Palestinian Territory, Occupied" },
11792
- { code: "pa", name: "Panama" },
11793
- { code: "pg", name: "Papua New Guinea" },
11794
- { code: "py", name: "Paraguay" },
11795
- { code: "pe", name: "Peru" },
11796
- { code: "ph", name: "Philippines" },
11797
- { code: "pn", name: "Pitcairn" },
11798
- { code: "pl", name: "Poland" },
11799
- { code: "pt", name: "Portugal" },
11800
- { code: "pr", name: "Puerto Rico" },
11801
- { code: "qa", name: "Qatar" },
11802
- { code: "re", name: "Reunion" },
11803
- { code: "ro", name: "Romania" },
11804
- { code: "ru", name: "Russian Federation" },
11805
- { code: "rw", name: "Rwanda" },
11806
- { code: "sh", name: "Saint Helena" },
11807
- { code: "kn", name: "Saint Kitts and Nevis" },
11808
- { code: "lc", name: "Saint Lucia" },
11809
- { code: "pm", name: "Saint Pierre and Miquelon" },
11810
- { code: "vc", name: "Saint Vincent and the Grenadines" },
11811
- { code: "ws", name: "Samoa" },
11812
- { code: "sm", name: "San Marino" },
11813
- { code: "st", name: "Sao Tome and Principe" },
11814
- { code: "sa", name: "Saudi Arabia" },
11815
- { code: "sn", name: "Senegal" },
11816
- { code: "rs", name: "Serbia" },
11817
- { code: "sc", name: "Seychelles" },
11818
- { code: "sl", name: "Sierra Leone" },
11819
- { code: "sg", name: "Singapore" },
11820
- { code: "sk", name: "Slovakia" },
11821
- { code: "si", name: "Slovenia" },
11822
- { code: "sb", name: "Solomon Islands" },
11823
- { code: "so", name: "Somalia" },
11824
- { code: "za", name: "South Africa" },
11825
- { code: "gs", name: "South Georgia and the South Sandwich Islands" },
11826
- { code: "es", name: "Spain" },
11827
- { code: "lk", name: "Sri Lanka" },
11828
- { code: "sd", name: "Sudan" },
11829
- { code: "sr", name: "Suriname" },
11830
- { code: "sj", name: "Svalbard and Jan Mayen" },
11831
- { code: "sz", name: "Swaziland" },
11832
- { code: "se", name: "Sweden" },
11833
- { code: "ch", name: "Switzerland" },
11834
- { code: "sy", name: "Syrian Arab Republic" },
11835
- { code: "tw", name: "Taiwan, Province of China" },
11836
- { code: "tj", name: "Tajikistan" },
11837
- { code: "tz", name: "Tanzania, United Republic of" },
11838
- { code: "th", name: "Thailand" },
11839
- { code: "tl", name: "Timor-Leste" },
11840
- { code: "tg", name: "Togo" },
11841
- { code: "tk", name: "Tokelau" },
11842
- { code: "to", name: "Tonga" },
11843
- { code: "tt", name: "Trinidad and Tobago" },
11844
- { code: "tn", name: "Tunisia" },
11845
- { code: "tr", name: "Turkiye" },
11846
- { code: "tm", name: "Turkmenistan" },
11847
- { code: "tc", name: "Turks and Caicos Islands" },
11848
- { code: "tv", name: "Tuvalu" },
11849
- { code: "ug", name: "Uganda" },
11850
- { code: "ua", name: "Ukraine" },
11851
- { code: "ae", name: "United Arab Emirates" },
11852
- { code: "uk", name: "United Kingdom" },
11853
- { code: "gb", name: "United Kingdom" },
11854
- { code: "us", name: "United States" },
11855
- { code: "um", name: "United States Minor Outlying Islands" },
11856
- { code: "uy", name: "Uruguay" },
11857
- { code: "uz", name: "Uzbekistan" },
11858
- { code: "vu", name: "Vanuatu" },
11859
- { code: "ve", name: "Venezuela" },
11860
- { code: "vn", name: "Viet Nam" },
11861
- { code: "vg", name: "Virgin Islands, British" },
11862
- { code: "vi", name: "Virgin Islands, U.S." },
11863
- { code: "wf", name: "Wallis and Futuna" },
11864
- { code: "eh", name: "Western Sahara" },
11865
- { code: "ye", name: "Yemen" },
11866
- { code: "zm", name: "Zambia" },
11867
- { code: "zw", name: "Zimbabwe" }
11868
- ];
11869
- var GOOGLE_PLAY_COUNTRY_MAP = new Map(
11870
- GOOGLE_PLAY_COUNTRIES.map((country) => [country.code, country.name])
11871
- );
11872
- var GOOGLE_PLAY_CODES_SET = new Set(
11873
- GOOGLE_PLAY_COUNTRIES.map((country) => country.code)
11874
- );
11875
- Array.from(GOOGLE_PLAY_CODES_SET).sort();
11876
- function getGooglePlayCountryName(code) {
11877
- return GOOGLE_PLAY_COUNTRY_MAP.get(code);
11878
- }
11879
-
11880
- // ../../internal/utils/src/country-codes.ts
11881
- var country_codes_exports = {};
11882
- __export(country_codes_exports, {
11883
- APPLE_ONLY_COUNTRY_CODES: () => APPLE_ONLY_COUNTRY_CODES,
11884
- COUNTRY_NAMES: () => COUNTRY_NAMES,
11885
- GOOGLE_ONLY_COUNTRY_CODES: () => GOOGLE_ONLY_COUNTRY_CODES,
11886
- SHARED_COUNTRY_CODES: () => SHARED_COUNTRY_CODES,
11887
- countryCodeToFlag: () => countryCodeToFlag,
11888
- getAllCountryCodes: () => getAllCountryCodes,
11889
- getCountryName: () => getCountryName,
11890
- isValidAppleCountryCode: () => isValidAppleCountryCode,
11891
- isValidGoogleCountryCode: () => isValidGoogleCountryCode
11892
- });
11893
- function createCountryLists() {
11894
- const appleCodesSet = new Set(APP_STORE_COUNTRIES.map((c2) => c2.code));
11895
- const googleCodesSet = new Set(GOOGLE_PLAY_COUNTRIES.map((c2) => c2.code));
11896
- const shared2 = [];
11897
- const appleOnly2 = [];
11898
- const googleOnly2 = [];
11899
- appleCodesSet.forEach((code) => {
11900
- if (googleCodesSet.has(code)) {
11901
- shared2.push(code);
11902
- } else {
11903
- appleOnly2.push(code);
11904
- }
11905
- });
11906
- googleCodesSet.forEach((code) => {
11907
- if (!appleCodesSet.has(code)) {
11908
- googleOnly2.push(code);
11909
- }
11910
- });
11911
- return {
11912
- shared: shared2.sort(),
11913
- appleOnly: appleOnly2.sort(),
11914
- googleOnly: googleOnly2.sort()
11915
- };
11916
- }
11917
- var { shared, appleOnly, googleOnly } = createCountryLists();
11918
- var SHARED_COUNTRY_CODES = shared;
11919
- var APPLE_ONLY_COUNTRY_CODES = appleOnly;
11920
- var GOOGLE_ONLY_COUNTRY_CODES = googleOnly;
11921
- function isValidGoogleCountryCode(code) {
11922
- return SHARED_COUNTRY_CODES.includes(code) || GOOGLE_ONLY_COUNTRY_CODES.includes(code);
11923
- }
11924
- function isValidAppleCountryCode(code) {
11925
- return SHARED_COUNTRY_CODES.includes(code) || APPLE_ONLY_COUNTRY_CODES.includes(code);
11926
- }
11927
- function getCountryName(code) {
11928
- return getAppStoreCountryName(code) || getGooglePlayCountryName(code);
11929
- }
11930
- function getAllCountryCodes(platform) {
11931
- if (platform === "apple") {
11932
- return [...SHARED_COUNTRY_CODES, ...APPLE_ONLY_COUNTRY_CODES].sort();
11933
- } else {
11934
- return [...SHARED_COUNTRY_CODES, ...GOOGLE_ONLY_COUNTRY_CODES].sort();
11935
- }
11936
- }
11937
- var COUNTRY_NAMES = {
11938
- AD: "Andorra",
11939
- AE: "United Arab Emirates",
11940
- AF: "Afghanistan",
11941
- AG: "Antigua and Barbuda",
11942
- AI: "Anguilla",
11943
- AL: "Albania",
11944
- AM: "Armenia",
11945
- AO: "Angola",
11946
- AQ: "Antarctica",
11947
- AR: "Argentina",
11948
- AS: "American Samoa",
11949
- AT: "Austria",
11950
- AU: "Australia",
11951
- AW: "Aruba",
11952
- AX: "\xC5land Islands",
11953
- AZ: "Azerbaijan",
11954
- BA: "Bosnia and Herzegovina",
11955
- BB: "Barbados",
11956
- BD: "Bangladesh",
11957
- BE: "Belgium",
11958
- BF: "Burkina Faso",
11959
- BG: "Bulgaria",
11960
- BH: "Bahrain",
11961
- BI: "Burundi",
11962
- BJ: "Benin",
11963
- BL: "Saint Barth\xE9lemy",
11964
- BM: "Bermuda",
11965
- BN: "Brunei",
11966
- BO: "Bolivia",
11967
- BQ: "Caribbean Netherlands",
11968
- BR: "Brazil",
11969
- BS: "Bahamas",
11970
- BT: "Bhutan",
11971
- BV: "Bouvet Island",
11972
- BW: "Botswana",
11973
- BY: "Belarus",
11974
- BZ: "Belize",
11975
- CA: "Canada",
11976
- CC: "Cocos (Keeling) Islands",
11977
- CD: "DR Congo",
11978
- CF: "Central African Republic",
11979
- CG: "Republic of the Congo",
11980
- CH: "Switzerland",
11981
- CI: "C\xF4te d'Ivoire",
11982
- CK: "Cook Islands",
11983
- CL: "Chile",
11984
- CM: "Cameroon",
11985
- CN: "China",
11986
- CO: "Colombia",
11987
- CR: "Costa Rica",
11988
- CU: "Cuba",
11989
- CV: "Cape Verde",
11990
- CW: "Cura\xE7ao",
11991
- CX: "Christmas Island",
11992
- CY: "Cyprus",
11993
- CZ: "Czechia",
11994
- DE: "Germany",
11995
- DJ: "Djibouti",
11996
- DK: "Denmark",
11997
- DM: "Dominica",
11998
- DO: "Dominican Republic",
11999
- DZ: "Algeria",
12000
- EC: "Ecuador",
12001
- EE: "Estonia",
12002
- EG: "Egypt",
12003
- EH: "Western Sahara",
12004
- ER: "Eritrea",
12005
- ES: "Spain",
12006
- ET: "Ethiopia",
12007
- FI: "Finland",
12008
- FJ: "Fiji",
12009
- FK: "Falkland Islands",
12010
- FM: "Micronesia",
12011
- FO: "Faroe Islands",
12012
- FR: "France",
12013
- GA: "Gabon",
12014
- GB: "United Kingdom",
12015
- GD: "Grenada",
12016
- GE: "Georgia",
12017
- GF: "French Guiana",
12018
- GG: "Guernsey",
12019
- GH: "Ghana",
12020
- GI: "Gibraltar",
12021
- GL: "Greenland",
12022
- GM: "Gambia",
12023
- GN: "Guinea",
12024
- GP: "Guadeloupe",
12025
- GQ: "Equatorial Guinea",
12026
- GR: "Greece",
12027
- GS: "South Georgia",
12028
- GT: "Guatemala",
12029
- GU: "Guam",
12030
- GW: "Guinea-Bissau",
12031
- GY: "Guyana",
12032
- HK: "Hong Kong",
12033
- HM: "Heard Island and McDonald Islands",
12034
- HN: "Honduras",
12035
- HR: "Croatia",
12036
- HT: "Haiti",
12037
- HU: "Hungary",
12038
- ID: "Indonesia",
12039
- IE: "Ireland",
12040
- IL: "Israel",
12041
- IM: "Isle of Man",
12042
- IN: "India",
12043
- IO: "British Indian Ocean Territory",
12044
- IQ: "Iraq",
12045
- IR: "Iran",
12046
- IS: "Iceland",
12047
- IT: "Italy",
12048
- JE: "Jersey",
12049
- JM: "Jamaica",
12050
- JO: "Jordan",
12051
- JP: "Japan",
12052
- KE: "Kenya",
12053
- KG: "Kyrgyzstan",
12054
- KH: "Cambodia",
12055
- KI: "Kiribati",
12056
- KM: "Comoros",
12057
- KN: "Saint Kitts and Nevis",
12058
- KP: "North Korea",
12059
- KR: "South Korea",
12060
- KW: "Kuwait",
12061
- KY: "Cayman Islands",
12062
- KZ: "Kazakhstan",
12063
- LA: "Laos",
12064
- LB: "Lebanon",
12065
- LC: "Saint Lucia",
12066
- LI: "Liechtenstein",
12067
- LK: "Sri Lanka",
12068
- LR: "Liberia",
12069
- LS: "Lesotho",
12070
- LT: "Lithuania",
12071
- LU: "Luxembourg",
12072
- LV: "Latvia",
12073
- LY: "Libya",
12074
- MA: "Morocco",
12075
- MC: "Monaco",
12076
- MD: "Moldova",
12077
- ME: "Montenegro",
12078
- MF: "Saint Martin",
12079
- MG: "Madagascar",
12080
- MH: "Marshall Islands",
12081
- MK: "North Macedonia",
12082
- ML: "Mali",
12083
- MM: "Myanmar",
12084
- MN: "Mongolia",
12085
- MO: "Macau",
12086
- MP: "Northern Mariana Islands",
12087
- MQ: "Martinique",
12088
- MR: "Mauritania",
12089
- MS: "Montserrat",
12090
- MT: "Malta",
12091
- MU: "Mauritius",
12092
- MV: "Maldives",
12093
- MW: "Malawi",
12094
- MX: "Mexico",
12095
- MY: "Malaysia",
12096
- MZ: "Mozambique",
12097
- NA: "Namibia",
12098
- NC: "New Caledonia",
12099
- NE: "Niger",
12100
- NF: "Norfolk Island",
12101
- NG: "Nigeria",
12102
- NI: "Nicaragua",
12103
- NL: "Netherlands",
12104
- NO: "Norway",
12105
- NP: "Nepal",
12106
- NR: "Nauru",
12107
- NU: "Niue",
12108
- NZ: "New Zealand",
12109
- OM: "Oman",
12110
- PA: "Panama",
12111
- PE: "Peru",
12112
- PF: "French Polynesia",
12113
- PG: "Papua New Guinea",
12114
- PH: "Philippines",
12115
- PK: "Pakistan",
12116
- PL: "Poland",
12117
- PM: "Saint Pierre and Miquelon",
12118
- PN: "Pitcairn Islands",
12119
- PR: "Puerto Rico",
12120
- PS: "Palestine",
12121
- PT: "Portugal",
12122
- PW: "Palau",
12123
- PY: "Paraguay",
12124
- QA: "Qatar",
12125
- RE: "R\xE9union",
12126
- RO: "Romania",
12127
- RS: "Serbia",
12128
- RU: "Russia",
12129
- RW: "Rwanda",
12130
- SA: "Saudi Arabia",
12131
- SB: "Solomon Islands",
12132
- SC: "Seychelles",
12133
- SD: "Sudan",
12134
- SE: "Sweden",
12135
- SG: "Singapore",
12136
- SH: "Saint Helena",
12137
- SI: "Slovenia",
12138
- SJ: "Svalbard and Jan Mayen",
12139
- SK: "Slovakia",
12140
- SL: "Sierra Leone",
12141
- SM: "San Marino",
12142
- SN: "Senegal",
12143
- SO: "Somalia",
12144
- SR: "Suriname",
12145
- SS: "South Sudan",
12146
- ST: "S\xE3o Tom\xE9 and Pr\xEDncipe",
12147
- SV: "El Salvador",
12148
- SX: "Sint Maarten",
12149
- SY: "Syria",
12150
- SZ: "Eswatini",
12151
- TC: "Turks and Caicos Islands",
12152
- TD: "Chad",
12153
- TF: "French Southern Territories",
12154
- TG: "Togo",
12155
- TH: "Thailand",
12156
- TJ: "Tajikistan",
12157
- TK: "Tokelau",
12158
- TL: "Timor-Leste",
12159
- TM: "Turkmenistan",
12160
- TN: "Tunisia",
12161
- TO: "Tonga",
12162
- TR: "Turkey",
12163
- TT: "Trinidad and Tobago",
12164
- TV: "Tuvalu",
12165
- TW: "Taiwan",
12166
- TZ: "Tanzania",
12167
- UA: "Ukraine",
12168
- UG: "Uganda",
12169
- UM: "U.S. Minor Outlying Islands",
12170
- US: "United States",
12171
- UY: "Uruguay",
12172
- UZ: "Uzbekistan",
12173
- VA: "Vatican City",
12174
- VC: "Saint Vincent and the Grenadines",
12175
- VE: "Venezuela",
12176
- VG: "British Virgin Islands",
12177
- VI: "U.S. Virgin Islands",
12178
- VN: "Vietnam",
12179
- VU: "Vanuatu",
12180
- WF: "Wallis and Futuna",
12181
- WS: "Samoa",
12182
- XK: "Kosovo",
12183
- YE: "Yemen",
12184
- YT: "Mayotte",
12185
- ZA: "South Africa",
12186
- ZM: "Zambia",
12187
- ZW: "Zimbabwe"
12188
- };
12189
- function countryCodeToFlag(code) {
12190
- return code.toUpperCase().split("").map((c2) => String.fromCodePoint(127462 + c2.charCodeAt(0) - 65)).join("");
12191
- }
12192
-
12193
11512
  // ../../internal/utils/src/text.ts
12194
11513
  var text_exports = {};
12195
11514
  __export(text_exports, {
@@ -12743,241 +12062,6 @@ z.object({
12743
12062
  })
12744
12063
  )
12745
12064
  });
12746
-
12747
- // ../../internal/asset/src/parse/caip2.ts
12748
- var SUPPORTED_CHAINS = {
12749
- // EIP155 chains (Ethereum Virtual Machine compatible)
12750
- ETHEREUM_MAINNET: {
12751
- chainId: "eip155:1",
12752
- namespace: "eip155",
12753
- reference: "1",
12754
- name: "Ethereum Mainnet",
12755
- shortName: "Ethereum",
12756
- explorerUrl: "https://etherscan.io",
12757
- explorerName: "Etherscan"
12758
- },
12759
- OPTIMISM: {
12760
- chainId: "eip155:10",
12761
- namespace: "eip155",
12762
- reference: "10",
12763
- name: "Optimism",
12764
- shortName: "Optimism",
12765
- explorerUrl: "https://optimistic.etherscan.io",
12766
- explorerName: "Optimism Explorer"
12767
- },
12768
- POLYGON: {
12769
- chainId: "eip155:137",
12770
- namespace: "eip155",
12771
- reference: "137",
12772
- name: "Polygon",
12773
- shortName: "Polygon",
12774
- explorerUrl: "https://polygonscan.com",
12775
- explorerName: "PolygonScan"
12776
- },
12777
- ARBITRUM: {
12778
- chainId: "eip155:42161",
12779
- namespace: "eip155",
12780
- reference: "42161",
12781
- name: "Arbitrum",
12782
- shortName: "Arbitrum",
12783
- explorerUrl: "https://arbiscan.io",
12784
- explorerName: "Arbiscan"
12785
- },
12786
- BASE: {
12787
- chainId: "eip155:8453",
12788
- namespace: "eip155",
12789
- reference: "8453",
12790
- name: "Base",
12791
- shortName: "Base",
12792
- explorerUrl: "https://basescan.org",
12793
- explorerName: "BaseScan"
12794
- },
12795
- CELO: {
12796
- chainId: "eip155:42220",
12797
- namespace: "eip155",
12798
- reference: "42220",
12799
- name: "Celo",
12800
- shortName: "Celo",
12801
- explorerUrl: "https://celoscan.io",
12802
- explorerName: "CeloScan"
12803
- },
12804
- PLASMA: {
12805
- chainId: "eip155:9745",
12806
- namespace: "eip155",
12807
- reference: "9745",
12808
- name: "Plasma",
12809
- shortName: "Plasma",
12810
- explorerUrl: "https://plasmascan.to",
12811
- explorerName: "PlasmaScan"
12812
- },
12813
- BSC: {
12814
- chainId: "eip155:56",
12815
- namespace: "eip155",
12816
- reference: "56",
12817
- name: "Binance Smart Chain",
12818
- shortName: "BSC",
12819
- explorerUrl: "https://bscscan.com",
12820
- explorerName: "BscScan"
12821
- },
12822
- LINEA: {
12823
- chainId: "eip155:59144",
12824
- namespace: "eip155",
12825
- reference: "59144",
12826
- name: "Linea",
12827
- shortName: "Linea",
12828
- explorerUrl: "https://lineascan.build",
12829
- explorerName: "LineaScan"
12830
- },
12831
- MONAD: {
12832
- chainId: "eip155:143",
12833
- namespace: "eip155",
12834
- reference: "143",
12835
- name: "Monad",
12836
- shortName: "Monad",
12837
- explorerUrl: "https://monadvision.com",
12838
- explorerName: "MonadVision"
12839
- },
12840
- INK: {
12841
- chainId: "eip155:57073",
12842
- namespace: "eip155",
12843
- reference: "57073",
12844
- name: "Ink",
12845
- shortName: "Ink",
12846
- explorerUrl: "https://explorer.inkonchain.com",
12847
- explorerName: "Ink Explorer"
12848
- },
12849
- SHAPE: {
12850
- chainId: "eip155:360",
12851
- namespace: "eip155",
12852
- reference: "360",
12853
- name: "Shape",
12854
- shortName: "Shape",
12855
- explorerUrl: "https://shapescan.xyz",
12856
- explorerName: "ShapeScan"
12857
- },
12858
- SONEIUM: {
12859
- chainId: "eip155:1868",
12860
- namespace: "eip155",
12861
- reference: "1868",
12862
- name: "Soneium",
12863
- shortName: "Soneium",
12864
- explorerUrl: "https://soneium.blockscout.com",
12865
- explorerName: "Soneium Blockscout"
12866
- },
12867
- UNICHAIN: {
12868
- chainId: "eip155:130",
12869
- namespace: "eip155",
12870
- reference: "130",
12871
- name: "Unichain",
12872
- shortName: "Unichain",
12873
- explorerUrl: "https://unichain.blockscout.com",
12874
- explorerName: "Unichain Blockscout"
12875
- },
12876
- WORLD_CHAIN: {
12877
- chainId: "eip155:480",
12878
- namespace: "eip155",
12879
- reference: "480",
12880
- name: "World Chain",
12881
- shortName: "World Chain",
12882
- explorerUrl: "https://worldscan.org",
12883
- explorerName: "WorldScan"
12884
- },
12885
- // Non-EVM chains
12886
- SOLANA_MAINNET: {
12887
- chainId: "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
12888
- namespace: "solana",
12889
- reference: "5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
12890
- name: "Solana Mainnet",
12891
- shortName: "Solana",
12892
- explorerUrl: "https://solscan.io",
12893
- explorerName: "Solscan"
12894
- },
12895
- STELLAR_PUBNET: {
12896
- chainId: "stellar:pubnet",
12897
- namespace: "stellar",
12898
- reference: "pubnet",
12899
- name: "Stellar",
12900
- shortName: "Stellar",
12901
- explorerUrl: "https://stellar.expert/explorer/public",
12902
- explorerName: "Stellar Expert"
12903
- },
12904
- TRON_MAINNET: {
12905
- chainId: "tron:mainnet",
12906
- namespace: "tron",
12907
- reference: "mainnet",
12908
- name: "Tron",
12909
- shortName: "Tron",
12910
- explorerUrl: "https://tronscan.org",
12911
- explorerName: "TronScan"
12912
- },
12913
- BITCOIN_MAINNET: {
12914
- chainId: "bip122:000000000019d6689c085ae165831e93-p2wpkh",
12915
- namespace: "bip122",
12916
- reference: "000000000019d6689c085ae165831e93-p2wpkh",
12917
- name: "Bitcoin (P2WPKH)",
12918
- shortName: "Bitcoin",
12919
- explorerUrl: "https://mempool.space",
12920
- explorerName: "Mempool"
12921
- },
12922
- CARDANO_MAINNET: {
12923
- chainId: "cip34:1-764824073",
12924
- namespace: "cip34",
12925
- reference: "1-764824073",
12926
- name: "Cardano",
12927
- shortName: "Cardano",
12928
- explorerUrl: "https://cardanoscan.io",
12929
- explorerName: "CardanoScan"
12930
- },
12931
- SUI_MAINNET: {
12932
- chainId: "sui:mainnet",
12933
- namespace: "sui",
12934
- reference: "mainnet",
12935
- name: "Sui Mainnet",
12936
- shortName: "Sui",
12937
- explorerUrl: "https://suiscan.xyz",
12938
- explorerName: "SuiScan"
12939
- }
12940
- };
12941
- Object.fromEntries(
12942
- Object.values(SUPPORTED_CHAINS).map((chain) => [chain.shortName, chain])
12943
- );
12944
- Object.fromEntries(
12945
- Object.values(SUPPORTED_CHAINS).map((chain) => [chain.chainId, chain])
12946
- );
12947
- Object.values(SUPPORTED_CHAINS).filter(
12948
- (chain) => chain.namespace === "eip155"
12949
- );
12950
-
12951
- // ../../internal/asset/src/parse/model.ts
12952
- var AssetModel = /* @__PURE__ */ ((AssetModel2) => {
12953
- AssetModel2["Addon"] = "addon";
12954
- AssetModel2["App"] = "app";
12955
- AssetModel2["Bot"] = "bot";
12956
- AssetModel2["BusinessProfile"] = "business-profile";
12957
- AssetModel2["Catalog"] = "catalog";
12958
- AssetModel2["Collection"] = "collection";
12959
- AssetModel2["Channel"] = "channel";
12960
- AssetModel2["Group"] = "group";
12961
- AssetModel2["Post"] = "post";
12962
- AssetModel2["Profile"] = "profile";
12963
- AssetModel2["Short"] = "short";
12964
- AssetModel2["Video"] = "video";
12965
- AssetModel2["Space"] = "space";
12966
- AssetModel2["Issue"] = "issue";
12967
- AssetModel2["PullRequest"] = "pull-request";
12968
- AssetModel2["Discussion"] = "discussion";
12969
- AssetModel2["Repository"] = "repository";
12970
- AssetModel2["Article"] = "Article";
12971
- AssetModel2["Comment"] = "comment";
12972
- AssetModel2["List"] = "list";
12973
- AssetModel2["Subreddit"] = "subreddit";
12974
- AssetModel2["Community"] = "community";
12975
- AssetModel2["MiniApp"] = "mini-app";
12976
- AssetModel2["Developer"] = "developer";
12977
- return AssetModel2;
12978
- })(AssetModel || {});
12979
-
12980
- // ../../internal/validation/src/assets/parse.ts
12981
12065
  z.object({
12982
12066
  content: z.string().min(1, "Input string is required").describe("The asset content to parse (URL, address, etc.)")
12983
12067
  }).describe("Parse asset request body");
@@ -13074,6 +12158,7 @@ z.object({
13074
12158
  }).optional(),
13075
12159
  isOverviewManuallyEdited: z.boolean().optional(),
13076
12160
  overviewDisplayLocation: z.enum(["cover", "separate"]).default("cover"),
12161
+ coverVersion: z.enum(["v1", "v2"]).default("v1"),
13077
12162
  showCaseStudyOrgNames: z.boolean().default(true),
13078
12163
  showSimilarThreats: z.boolean().default(true),
13079
12164
  threatAnalysisType: z.enum(["threats_blocked", "takedowns_completed"]).default("threats_blocked"),
@@ -13364,11 +12449,11 @@ var parseNamed_default = parseNamed;
13364
12449
 
13365
12450
  // ../../node_modules/culori/src/rgb/parseHex.js
13366
12451
  var hex = /^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i;
13367
- var parseHex2 = (color) => {
12452
+ var parseHex = (color) => {
13368
12453
  let match2;
13369
12454
  return (match2 = color.match(hex)) ? parseNumber_default(parseInt(match2[1], 16), match2[1].length) : void 0;
13370
12455
  };
13371
- var parseHex_default = parseHex2;
12456
+ var parseHex_default = parseHex;
13372
12457
 
13373
12458
  // ../../node_modules/culori/src/util/regex.js
13374
12459
  var num = "([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)";