@chainpatrol/sdk 0.11.0 → 1.1.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.js CHANGED
@@ -614,6 +614,32 @@ zod.z.object({
614
614
  email: zod.z.string().email(),
615
615
  description: zod.z.string().optional().default("")
616
616
  });
617
+ zod.z.object({
618
+ /** Canonicalization algorithm version the client computed its prefixes with. */
619
+ algoVersion: zod.z.number().int().positive(),
620
+ /** 4-byte (8-hex-char) prefixes that hit the client's local index. */
621
+ prefixes: zod.z.array(zod.z.string().regex(/^[0-9a-f]{8}$/)).min(1).max(200)
622
+ }).describe("Blocklist confirm request");
623
+ zod.z.object({
624
+ /** Full 64-char SHA-256 hashes of blocked expressions, grouped by prefix. */
625
+ fullHashes: zod.z.record(zod.z.string(), zod.z.array(zod.z.string()))
626
+ }).describe("Blocklist confirm response");
627
+ zod.z.void().describe("Blocklist version request");
628
+ zod.z.object({
629
+ /** Canonicalization algorithm version the artifacts + confirm are built with. */
630
+ algoVersion: zod.z.number().int().positive(),
631
+ snapshot: zod.z.object({
632
+ token: zod.z.string(),
633
+ url: zod.z.string().url(),
634
+ prefixBytes: zod.z.number().int().positive(),
635
+ count: zod.z.number().int().nonnegative()
636
+ }),
637
+ recent: zod.z.object({
638
+ token: zod.z.string(),
639
+ url: zod.z.string().url(),
640
+ windowSeconds: zod.z.number().int().positive()
641
+ })
642
+ }).describe("Blocklist version response");
617
643
 
618
644
  // ../../node_modules/luxon/src/errors.js
619
645
  var LuxonError = class extends Error {
@@ -7035,12 +7061,17 @@ var BrandType = {
7035
7061
  ORGANIZATION: "ORGANIZATION"
7036
7062
  };
7037
7063
  var SubscriptionStatus = {
7038
- TRIAL: "TRIAL",
7064
+ POC: "POC",
7039
7065
  ACTIVE: "ACTIVE",
7040
7066
  PROSPECT: "PROSPECT",
7041
7067
  INTEGRATION: "INTEGRATION",
7042
7068
  INACTIVE: "INACTIVE"
7043
7069
  };
7070
+ var OrganizationPortalVisibility = {
7071
+ PUBLIC: "PUBLIC",
7072
+ PRIVATE: "PRIVATE",
7073
+ DISABLED: "DISABLED"
7074
+ };
7044
7075
  var AssetType = {
7045
7076
  URL: "URL",
7046
7077
  PAGE: "PAGE",
@@ -7131,7 +7162,8 @@ var AssetType = {
7131
7162
  BANDCAMP: "BANDCAMP",
7132
7163
  ARCHIVE_ORG: "ARCHIVE_ORG",
7133
7164
  FIVE_HUNDRED_PX: "FIVE_HUNDRED_PX",
7134
- LUMA: "LUMA"
7165
+ LUMA: "LUMA",
7166
+ SMARTMONEYMATCH: "SMARTMONEYMATCH"
7135
7167
  };
7136
7168
  var LivenessStatus = {
7137
7169
  UNKNOWN: "UNKNOWN",
@@ -7657,14 +7689,6 @@ zod.z.object({
7657
7689
  warnAgeHours: zod.z.number().int().positive().default(24 * 7),
7658
7690
  failAgeHours: zod.z.number().int().positive().default(24 * 14)
7659
7691
  });
7660
- zod.z.object({
7661
- slug: zod.z.string().min(1),
7662
- warnThreshold: zod.z.number().int().nonnegative().default(200)
7663
- });
7664
- zod.z.object({
7665
- slug: zod.z.string().min(1),
7666
- warnAgeHours: zod.z.number().int().nonnegative().default(24 * 30)
7667
- });
7668
7692
  zod.z.object({
7669
7693
  slug: zod.z.string().min(1),
7670
7694
  warnAgeHours: zod.z.number().int().nonnegative().default(24 * 30),
@@ -7900,6 +7924,26 @@ Returns all brands belonging to the organization associated with your API key,
7900
7924
  including sub-brands (\`ORGANIZATION\`) and individual / employee brands
7901
7925
  (\`INDIVIDUAL\`). Soft-deleted brands are excluded.`
7902
7926
  );
7927
+ var brandLegalDocumentSchema = zod.z.object({
7928
+ present: zod.z.boolean().describe("Whether the brand has this document attached"),
7929
+ fileName: zod.z.string().nullable().describe("Original filename of the uploaded document (null when not present)"),
7930
+ fileUrl: zod.z.string().nullable().describe("Direct URL to view or download the document (null when not present)")
7931
+ });
7932
+ var brandTrademarkRegistrationSchema = zod.z.object({
7933
+ id: zod.z.number().describe("Trademark registration ID"),
7934
+ brandName: zod.z.string().describe("Trademarked brand name as it appears on the registration"),
7935
+ trademarkOffice: zod.z.string().describe("Issuing trademark office (e.g. `USPTO`, `EUIPO`)"),
7936
+ registrationNumber: zod.z.string().describe("Registration number assigned by the office"),
7937
+ goodsAndServicesClass: zod.z.string().describe("Nice Classification class(es) the registration covers"),
7938
+ rightsOwnerName: zod.z.string().nullable().describe("Legal entity the trademark is registered to, if recorded"),
7939
+ registrationPageUrl: zod.z.string().nullable().describe("Public URL on the trademark office's site, if recorded"),
7940
+ certificateFileName: zod.z.string().nullable().describe(
7941
+ "Original filename of the uploaded certificate PDF (null when no certificate is attached)"
7942
+ ),
7943
+ certificateFileUrl: zod.z.string().nullable().describe(
7944
+ "Direct URL to view or download the certificate PDF (null when no certificate is attached)"
7945
+ )
7946
+ });
7903
7947
  var brandItemSchema = zod.z.object({
7904
7948
  id: zod.z.number().describe("Brand ID"),
7905
7949
  slug: zod.z.string().describe("Brand slug (stable, URL-safe identifier)"),
@@ -7916,14 +7960,24 @@ var brandItemSchema = zod.z.object({
7916
7960
  excludedTerms: zod.z.array(zod.z.string()).describe("Terms that should be excluded when matching this brand"),
7917
7961
  tickers: zod.z.array(zod.z.string()).describe("Ticker symbols associated with the brand (e.g. `$JUP`)"),
7918
7962
  brandGroupId: zod.z.number().nullable().describe("Group this brand belongs to (only set for `INDIVIDUAL` brands)"),
7919
- createdAt: zod.z.date().describe("When the brand was created")
7963
+ createdAt: zod.z.date().describe("When the brand was created"),
7964
+ useOrganizationDocs: zod.z.boolean().describe(
7965
+ "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."
7966
+ ),
7967
+ legalDocuments: zod.z.object({
7968
+ letterOfAuthorization: brandLegalDocumentSchema,
7969
+ powerOfAttorney: brandLegalDocumentSchema
7970
+ }).describe("Brand-level Letter of Authorization and Power of Attorney attachments"),
7971
+ trademarkRegistrations: zod.z.array(brandTrademarkRegistrationSchema).describe(
7972
+ "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."
7973
+ )
7920
7974
  });
7921
7975
  zod.z.object({
7922
7976
  brands: zod.z.array(brandItemSchema).describe("List of brands")
7923
7977
  }).describe("Successful operation");
7924
7978
  var FILTERABLE_SUBSCRIPTION_STATUSES = [
7925
7979
  SubscriptionStatus.PROSPECT,
7926
- SubscriptionStatus.TRIAL,
7980
+ SubscriptionStatus.POC,
7927
7981
  SubscriptionStatus.ACTIVE,
7928
7982
  SubscriptionStatus.INTEGRATION
7929
7983
  ];
@@ -7998,6 +8052,30 @@ var UserOrgIntegrationsSchema = zod.z.object({
7998
8052
  intercom: zod.z.boolean(),
7999
8053
  moderation: zod.z.boolean()
8000
8054
  });
8055
+ var UserOrgLegalDocumentSchema = zod.z.object({
8056
+ present: zod.z.boolean().describe("Whether the organization has this document attached"),
8057
+ fileName: zod.z.string().nullable().describe("Original filename of the uploaded document (null when not present)"),
8058
+ fileUrl: zod.z.string().nullable().describe("Direct URL to view or download the document (null when not present)")
8059
+ });
8060
+ var UserOrgLegalDocumentsSchema = zod.z.object({
8061
+ letterOfAuthorization: UserOrgLegalDocumentSchema,
8062
+ powerOfAttorney: UserOrgLegalDocumentSchema
8063
+ });
8064
+ var UserOrgTrademarkRegistrationSchema = zod.z.object({
8065
+ id: zod.z.number().describe("Trademark registration ID"),
8066
+ brandName: zod.z.string().describe("Trademarked brand name as it appears on the registration"),
8067
+ trademarkOffice: zod.z.string().describe("Issuing trademark office (e.g. `USPTO`, `EUIPO`)"),
8068
+ registrationNumber: zod.z.string().describe("Registration number assigned by the office"),
8069
+ goodsAndServicesClass: zod.z.string().describe("Nice Classification class(es) the registration covers"),
8070
+ rightsOwnerName: zod.z.string().nullable().describe("Legal entity the trademark is registered to, if recorded"),
8071
+ registrationPageUrl: zod.z.string().nullable().describe("Public URL on the trademark office's site, if recorded"),
8072
+ certificateFileName: zod.z.string().nullable().describe(
8073
+ "Original filename of the uploaded certificate PDF (null when no certificate is attached)"
8074
+ ),
8075
+ certificateFileUrl: zod.z.string().nullable().describe(
8076
+ "Direct URL to view or download the certificate PDF (null when no certificate is attached)"
8077
+ )
8078
+ });
8001
8079
  var UserOrgSchema = zod.z.object({
8002
8080
  id: zod.z.number(),
8003
8081
  name: zod.z.string(),
@@ -8005,6 +8083,9 @@ var UserOrgSchema = zod.z.object({
8005
8083
  avatarUrl: zod.z.string().nullable(),
8006
8084
  contactUrl: zod.z.string().nullable(),
8007
8085
  subscriptionStatus: zod.z.nativeEnum(SubscriptionStatus),
8086
+ portalVisibility: zod.z.nativeEnum(OrganizationPortalVisibility).describe(
8087
+ "Visibility of the org's public security portal (chainpatrol.io/<slug>). `PUBLIC` is discoverable; `PRIVATE` renders only the report form (no metrics or listings); `DISABLED` returns a 404."
8088
+ ),
8008
8089
  services: zod.z.object({
8009
8090
  reporting: singleServiceSchema,
8010
8091
  reviewing: singleServiceSchema,
@@ -8015,7 +8096,13 @@ var UserOrgSchema = zod.z.object({
8015
8096
  }),
8016
8097
  integrations: UserOrgIntegrationsSchema,
8017
8098
  obligatoryAdminApproval: UserOrgObligatoryAdminApprovalSchema,
8018
- pendingServiceApprovals: zod.z.array(PendingServiceApprovalSchema)
8099
+ pendingServiceApprovals: zod.z.array(PendingServiceApprovalSchema),
8100
+ legalDocuments: UserOrgLegalDocumentsSchema.describe(
8101
+ "Org-level Letter of Authorization and Power of Attorney attachments"
8102
+ ),
8103
+ trademarkRegistrations: zod.z.array(UserOrgTrademarkRegistrationSchema).describe(
8104
+ "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."
8105
+ )
8019
8106
  });
8020
8107
  zod.z.object({
8021
8108
  organizations: zod.z.array(UserOrgSchema)
@@ -8060,7 +8147,7 @@ zod.z.object({
8060
8147
  "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`."
8061
8148
  ),
8062
8149
  subscriptionStatus: zod.z.array(UserOrgsSubscriptionStatusSchema).min(1).optional().describe(
8063
- "Only meaningful with `allMyOrgs: true`. Defaults to the same set `/user/orgs` uses (ACTIVE/TRIAL/PROSPECT/INTEGRATION \u2014 INACTIVE is always excluded)."
8150
+ "Only meaningful with `allMyOrgs: true`. Defaults to the same set `/user/orgs` uses (ACTIVE/POC/PROSPECT/INTEGRATION \u2014 INACTIVE is always excluded)."
8064
8151
  ),
8065
8152
  services: organizationMetricsServicesFilterSchema.describe(
8066
8153
  "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'."
@@ -8229,6 +8316,7 @@ var AssetScanEnrichmentSource = /* @__PURE__ */ ((AssetScanEnrichmentSource2) =>
8229
8316
  AssetScanEnrichmentSource2["REDDIT_API"] = "reddit_api";
8230
8317
  AssetScanEnrichmentSource2["MAILS_API"] = "mails_api";
8231
8318
  AssetScanEnrichmentSource2["TELNYX_LOOKUP"] = "telnyx_lookup";
8319
+ AssetScanEnrichmentSource2["TWILIO_LOOKUP"] = "twilio_lookup";
8232
8320
  AssetScanEnrichmentSource2["DAILYMOTION_API"] = "dailymotion_api";
8233
8321
  AssetScanEnrichmentSource2["VIMEO_API"] = "vimeo_api";
8234
8322
  AssetScanEnrichmentSource2["STACKBLITZ_API"] = "stackblitz_api";
@@ -8330,6 +8418,7 @@ var ASSET_SCAN_ENRICHMENT_SOURCE_LABELS = {
8330
8418
  ["mails_api" /* MAILS_API */]: "Mails.so API",
8331
8419
  // Phone Number
8332
8420
  ["telnyx_lookup" /* TELNYX_LOOKUP */]: "Telnyx Lookup",
8421
+ ["twilio_lookup" /* TWILIO_LOOKUP */]: "Twilio Lookup",
8333
8422
  // DailyMotion
8334
8423
  ["dailymotion_api" /* DAILYMOTION_API */]: "DailyMotion API",
8335
8424
  // Vimeo
@@ -8421,6 +8510,7 @@ var ASSET_SCAN_ENRICHMENT_SOURCE_TO_TYPES = {
8421
8510
  ["mails_api" /* MAILS_API */]: ["email_validation" /* EMAIL_VALIDATION */],
8422
8511
  // Phone Number-related sources
8423
8512
  ["telnyx_lookup" /* TELNYX_LOOKUP */]: ["phone_lookup" /* PHONE_LOOKUP */],
8513
+ ["twilio_lookup" /* TWILIO_LOOKUP */]: ["phone_lookup" /* PHONE_LOOKUP */],
8424
8514
  // DailyMotion-related sources
8425
8515
  ["dailymotion_api" /* DAILYMOTION_API */]: [
8426
8516
  "dailymotion_video" /* DAILYMOTION_VIDEO */
@@ -10814,124 +10904,34 @@ function slugify(string, options) {
10814
10904
  return string;
10815
10905
  }
10816
10906
 
10817
- // ../../internal/utils/src/punycode.ts
10818
- var maxInt = 2147483647;
10819
- var base = 36;
10820
- var tMin = 1;
10821
- var tMax = 26;
10822
- var skew = 38;
10823
- var damp = 700;
10824
- var initialBias = 72;
10825
- var initialN = 128;
10826
- var delimiter = "-";
10827
- var regexPunycode = /^xn--/;
10828
- var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g;
10829
- var errors = {
10830
- overflow: "Overflow: input needs wider integers to process",
10831
- "not-basic": "Illegal input >= 0x80 (not a basic code point)",
10832
- "invalid-input": "Invalid input"
10833
- };
10834
- var baseMinusTMin = base - tMin;
10835
- var floor = Math.floor;
10836
- function error(type) {
10837
- throw new RangeError(errors[type]);
10838
- }
10839
- function mapDomain(domain, callback) {
10840
- const parts = domain.split("@");
10841
- let result = "";
10842
- if (parts.length > 1) {
10843
- result = parts[0] + "@";
10844
- domain = parts[1];
10845
- }
10846
- domain = domain.replace(regexSeparators, ".");
10847
- const labels = domain.split(".");
10848
- const encoded = labels.map(callback).join(".");
10849
- return result + encoded;
10850
- }
10851
- function basicToDigit(codePoint) {
10852
- if (codePoint >= 48 && codePoint < 58) {
10853
- return 26 + (codePoint - 48);
10854
- }
10855
- if (codePoint >= 65 && codePoint < 91) {
10856
- return codePoint - 65;
10857
- }
10858
- if (codePoint >= 97 && codePoint < 123) {
10859
- return codePoint - 97;
10860
- }
10861
- return base;
10862
- }
10863
- function adapt(delta, numPoints, firstTime) {
10864
- let k4 = 0;
10865
- delta = firstTime ? floor(delta / damp) : delta >> 1;
10866
- delta += floor(delta / numPoints);
10867
- for (
10868
- ;
10869
- /* no initialization */
10870
- delta > baseMinusTMin * tMax >> 1;
10871
- k4 += base
10872
- ) {
10873
- delta = floor(delta / baseMinusTMin);
10874
- }
10875
- return floor(k4 + (baseMinusTMin + 1) * delta / (delta + skew));
10876
- }
10877
- function decode(input) {
10878
- const output = [];
10879
- const inputLength = input.length;
10880
- let i = 0;
10881
- let n2 = initialN;
10882
- let bias2 = initialBias;
10883
- let basic = input.lastIndexOf(delimiter);
10884
- if (basic < 0) {
10885
- basic = 0;
10886
- }
10887
- for (let j = 0; j < basic; ++j) {
10888
- if (input.charCodeAt(j) >= 128) {
10889
- error("not-basic");
10890
- }
10891
- output.push(input.charCodeAt(j));
10892
- }
10893
- for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; ) {
10894
- const oldi = i;
10895
- for (let w = 1, k4 = base; ; k4 += base) {
10896
- if (index >= inputLength) {
10897
- error("invalid-input");
10898
- }
10899
- const digit = basicToDigit(input.charCodeAt(index++));
10900
- if (digit >= base) {
10901
- error("invalid-input");
10902
- }
10903
- if (digit > floor((maxInt - i) / w)) {
10904
- error("overflow");
10905
- }
10906
- i += digit * w;
10907
- const t = k4 <= bias2 ? tMin : k4 >= bias2 + tMax ? tMax : k4 - bias2;
10908
- if (digit < t) {
10909
- break;
10910
- }
10911
- const baseMinusT = base - t;
10912
- if (w > floor(maxInt / baseMinusT)) {
10913
- error("overflow");
10914
- }
10915
- w *= baseMinusT;
10916
- }
10917
- const out = output.length + 1;
10918
- bias2 = adapt(i - oldi, out, oldi == 0);
10919
- if (floor(i / out) > maxInt - n2) {
10920
- error("overflow");
10921
- }
10922
- n2 += floor(i / out);
10923
- i %= out;
10924
- output.splice(i++, 0, n2);
10925
- }
10926
- return String.fromCodePoint(...output);
10927
- }
10928
- function toUnicode(input) {
10929
- return mapDomain(input, function(string) {
10930
- return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
10931
- });
10932
- }
10933
-
10934
- // ../../internal/utils/src/url.ts
10907
+ // ../asset-parse/src/model.ts
10908
+ var AssetModel = /* @__PURE__ */ ((AssetModel2) => {
10909
+ AssetModel2["Addon"] = "addon";
10910
+ AssetModel2["App"] = "app";
10911
+ AssetModel2["Bot"] = "bot";
10912
+ AssetModel2["BusinessProfile"] = "business-profile";
10913
+ AssetModel2["Catalog"] = "catalog";
10914
+ AssetModel2["Collection"] = "collection";
10915
+ AssetModel2["Channel"] = "channel";
10916
+ AssetModel2["Group"] = "group";
10917
+ AssetModel2["Post"] = "post";
10918
+ AssetModel2["Profile"] = "profile";
10919
+ AssetModel2["Short"] = "short";
10920
+ AssetModel2["Video"] = "video";
10921
+ AssetModel2["Space"] = "space";
10922
+ AssetModel2["Issue"] = "issue";
10923
+ AssetModel2["PullRequest"] = "pull-request";
10924
+ AssetModel2["Discussion"] = "discussion";
10925
+ AssetModel2["Repository"] = "repository";
10926
+ AssetModel2["Article"] = "Article";
10927
+ AssetModel2["Comment"] = "comment";
10928
+ AssetModel2["List"] = "list";
10929
+ AssetModel2["Subreddit"] = "subreddit";
10930
+ AssetModel2["Community"] = "community";
10931
+ AssetModel2["MiniApp"] = "mini-app";
10932
+ AssetModel2["Developer"] = "developer";
10933
+ return AssetModel2;
10934
+ })(AssetModel || {});
10935
10935
  function isUrl(input) {
10936
10936
  if (input.trim() === "") {
10937
10937
  return false;
@@ -10941,21 +10941,6 @@ function isUrl(input) {
10941
10941
  }
10942
10942
  return URL.canParse(input) || URL.canParse(`https://${input}`);
10943
10943
  }
10944
- function isEmail(input) {
10945
- if (input.trim() === "") {
10946
- return false;
10947
- }
10948
- const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
10949
- return emailRegex.test(input);
10950
- }
10951
- function removeHttpProtocol(input) {
10952
- return input.replace(/^https?:\/\//, "");
10953
- }
10954
- function stripDomainWildcardPrefix(domain) {
10955
- const trimmedDomain = domain.trim();
10956
- const strippedDomain = trimmedDomain.startsWith("*.") ? trimmedDomain.slice(2) : trimmedDomain;
10957
- return strippedDomain.length > 0 ? strippedDomain : null;
10958
- }
10959
10944
  function getNormalizedUrl(input) {
10960
10945
  if (!isUrl(input)) {
10961
10946
  throw new Error(`Invalid URL: ${input}`);
@@ -10979,20 +10964,15 @@ function getNormalizedUrl(input) {
10979
10964
  throw new Error(`Invalid URL: ${input}`);
10980
10965
  }
10981
10966
  }
10982
- function getDefangedUrl(input) {
10983
- if (!isUrl(input)) {
10984
- console.warn(`[getDefangedUrl] Invalid URL: ${input}, returning input as-is`);
10985
- return input;
10967
+ var ensureHttpsPrefix = (url) => {
10968
+ if (!url.startsWith("http")) {
10969
+ return `https://${url}`;
10986
10970
  }
10987
- return input.replace(/\./g, "[.]").replace(/(https:\/\/)/g, "hxxps://").replace(/(http:\/\/)/g, "hxxp://").replace(/:\/\//g, "[://]");
10988
- }
10989
- function getRefangedUrl(input) {
10990
- return input.replace(/hxxps/gi, "https").replace(/hxxp/gi, "http").replace(/\[:\/{2}\]/g, "://").replace(/\[\.\]/g, ".");
10991
- }
10971
+ return url.replace(/^https?:\/{1,2}/, "https://");
10972
+ };
10992
10973
  function getHostname(input) {
10993
10974
  try {
10994
- const normalizedUrl = getNormalizedUrl(input);
10995
- return normalizedUrl.hostname;
10975
+ return getNormalizedUrl(input).hostname;
10996
10976
  } catch (e4) {
10997
10977
  return null;
10998
10978
  }
@@ -11029,62 +11009,8 @@ function trimDomainToLevels(domain, options = { levels: 4 }) {
11029
11009
  const trimmedSubdomains = subdomains.slice(Math.max(eTLDPlusOneIndex - (options.levels - 1), 0)).join(".");
11030
11010
  return trimmedSubdomains;
11031
11011
  }
11032
- var ensureHttpsPrefix = (url) => {
11033
- if (!url.startsWith("http")) {
11034
- return `https://${url}`;
11035
- }
11036
- return url.replace(/^https?:\/{1,2}/, "https://");
11037
- };
11038
- function containsPunycode(url) {
11039
- return url.indexOf("xn--") !== -1;
11040
- }
11041
- function toUnicode2(url) {
11042
- return toUnicode(url);
11043
- }
11044
- function convertHttpsToHttp(url) {
11045
- if (url.startsWith("https://")) {
11046
- const httpUrl = new URL(url);
11047
- httpUrl.protocol = "http:";
11048
- return httpUrl.toString();
11049
- }
11050
- throw new Error(`URL is not HTTPS: ${url}`);
11051
- }
11052
- function generateCanonicalIPFSUrl(content) {
11053
- if (!content) {
11054
- return content;
11055
- }
11056
- if (content.includes("ipfs.io")) {
11057
- return content;
11058
- }
11059
- if (content.startsWith("Qm") || content.startsWith("bafy")) {
11060
- return `ipfs.io/ipfs/${content}`;
11061
- }
11062
- return content;
11063
- }
11064
- function isWalrusSite(content) {
11065
- return content.includes(".walrus.site") || content.includes(".walrus.host") || content.includes(".wal.app") || content.includes(".wal.site");
11066
- }
11067
- function getFaviconUrl(content) {
11068
- const normalizedUrl = getNormalizedUrl(content);
11069
- return `https://icons.duckduckgo.com/ip3/${normalizedUrl.hostname}.ico`;
11070
- }
11071
- function sanitizeHttpUrl(value) {
11072
- if (typeof value !== "string" || value.length === 0) {
11073
- return null;
11074
- }
11075
- try {
11076
- const parsed = new URL(value);
11077
- if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
11078
- return null;
11079
- }
11080
- return parsed.toString();
11081
- } catch (e4) {
11082
- return null;
11083
- }
11084
- }
11085
- var URL_REGEX = /https?:\/\/[^\s"'<>\])]*/g;
11086
11012
 
11087
- // ../../internal/utils/src/phone.ts
11013
+ // ../asset-parse/src/phone.ts
11088
11014
  var phone_exports = {};
11089
11015
  __export(phone_exports, {
11090
11016
  PHONE_NUMBER_REGEX: () => PHONE_NUMBER_REGEX,
@@ -11211,7 +11137,199 @@ function normalizePhoneNumber(phone) {
11211
11137
  return hasPlus ? `+${digitsOnly}` : digitsOnly;
11212
11138
  }
11213
11139
 
11214
- // ../../internal/utils/src/email.ts
11140
+ // ../../internal/utils/src/punycode.ts
11141
+ var maxInt = 2147483647;
11142
+ var base = 36;
11143
+ var tMin = 1;
11144
+ var tMax = 26;
11145
+ var skew = 38;
11146
+ var damp = 700;
11147
+ var initialBias = 72;
11148
+ var initialN = 128;
11149
+ var delimiter = "-";
11150
+ var regexPunycode = /^xn--/;
11151
+ var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g;
11152
+ var errors = {
11153
+ overflow: "Overflow: input needs wider integers to process",
11154
+ "not-basic": "Illegal input >= 0x80 (not a basic code point)",
11155
+ "invalid-input": "Invalid input"
11156
+ };
11157
+ var baseMinusTMin = base - tMin;
11158
+ var floor = Math.floor;
11159
+ function error(type) {
11160
+ throw new RangeError(errors[type]);
11161
+ }
11162
+ function mapDomain(domain, callback) {
11163
+ const parts = domain.split("@");
11164
+ let result = "";
11165
+ if (parts.length > 1) {
11166
+ result = parts[0] + "@";
11167
+ domain = parts[1];
11168
+ }
11169
+ domain = domain.replace(regexSeparators, ".");
11170
+ const labels = domain.split(".");
11171
+ const encoded = labels.map(callback).join(".");
11172
+ return result + encoded;
11173
+ }
11174
+ function basicToDigit(codePoint) {
11175
+ if (codePoint >= 48 && codePoint < 58) {
11176
+ return 26 + (codePoint - 48);
11177
+ }
11178
+ if (codePoint >= 65 && codePoint < 91) {
11179
+ return codePoint - 65;
11180
+ }
11181
+ if (codePoint >= 97 && codePoint < 123) {
11182
+ return codePoint - 97;
11183
+ }
11184
+ return base;
11185
+ }
11186
+ function adapt(delta, numPoints, firstTime) {
11187
+ let k4 = 0;
11188
+ delta = firstTime ? floor(delta / damp) : delta >> 1;
11189
+ delta += floor(delta / numPoints);
11190
+ for (
11191
+ ;
11192
+ /* no initialization */
11193
+ delta > baseMinusTMin * tMax >> 1;
11194
+ k4 += base
11195
+ ) {
11196
+ delta = floor(delta / baseMinusTMin);
11197
+ }
11198
+ return floor(k4 + (baseMinusTMin + 1) * delta / (delta + skew));
11199
+ }
11200
+ function decode(input) {
11201
+ const output = [];
11202
+ const inputLength = input.length;
11203
+ let i = 0;
11204
+ let n2 = initialN;
11205
+ let bias2 = initialBias;
11206
+ let basic = input.lastIndexOf(delimiter);
11207
+ if (basic < 0) {
11208
+ basic = 0;
11209
+ }
11210
+ for (let j = 0; j < basic; ++j) {
11211
+ if (input.charCodeAt(j) >= 128) {
11212
+ error("not-basic");
11213
+ }
11214
+ output.push(input.charCodeAt(j));
11215
+ }
11216
+ for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; ) {
11217
+ const oldi = i;
11218
+ for (let w = 1, k4 = base; ; k4 += base) {
11219
+ if (index >= inputLength) {
11220
+ error("invalid-input");
11221
+ }
11222
+ const digit = basicToDigit(input.charCodeAt(index++));
11223
+ if (digit >= base) {
11224
+ error("invalid-input");
11225
+ }
11226
+ if (digit > floor((maxInt - i) / w)) {
11227
+ error("overflow");
11228
+ }
11229
+ i += digit * w;
11230
+ const t = k4 <= bias2 ? tMin : k4 >= bias2 + tMax ? tMax : k4 - bias2;
11231
+ if (digit < t) {
11232
+ break;
11233
+ }
11234
+ const baseMinusT = base - t;
11235
+ if (w > floor(maxInt / baseMinusT)) {
11236
+ error("overflow");
11237
+ }
11238
+ w *= baseMinusT;
11239
+ }
11240
+ const out = output.length + 1;
11241
+ bias2 = adapt(i - oldi, out, oldi == 0);
11242
+ if (floor(i / out) > maxInt - n2) {
11243
+ error("overflow");
11244
+ }
11245
+ n2 += floor(i / out);
11246
+ i %= out;
11247
+ output.splice(i++, 0, n2);
11248
+ }
11249
+ return String.fromCodePoint(...output);
11250
+ }
11251
+ function toUnicode(input) {
11252
+ return mapDomain(input, function(string) {
11253
+ return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
11254
+ });
11255
+ }
11256
+
11257
+ // ../../internal/utils/src/url.ts
11258
+ function isEmail(input) {
11259
+ if (input.trim() === "") {
11260
+ return false;
11261
+ }
11262
+ const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
11263
+ return emailRegex.test(input);
11264
+ }
11265
+ function removeHttpProtocol(input) {
11266
+ return input.replace(/^https?:\/\//, "");
11267
+ }
11268
+ function stripDomainWildcardPrefix(domain) {
11269
+ const trimmedDomain = domain.trim();
11270
+ const strippedDomain = trimmedDomain.startsWith("*.") ? trimmedDomain.slice(2) : trimmedDomain;
11271
+ return strippedDomain.length > 0 ? strippedDomain : null;
11272
+ }
11273
+ function getDefangedUrl(input) {
11274
+ if (!isUrl(input)) {
11275
+ console.warn(`[getDefangedUrl] Invalid URL: ${input}, returning input as-is`);
11276
+ return input;
11277
+ }
11278
+ return input.replace(/\./g, "[.]").replace(/(https:\/\/)/g, "hxxps://").replace(/(http:\/\/)/g, "hxxp://").replace(/:\/\//g, "[://]");
11279
+ }
11280
+ function getRefangedUrl(input) {
11281
+ return input.replace(/hxxps/gi, "https").replace(/hxxp/gi, "http").replace(/\[:\/{2}\]/g, "://").replace(/\[\.\]/g, ".");
11282
+ }
11283
+ function containsPunycode(url) {
11284
+ return url.indexOf("xn--") !== -1;
11285
+ }
11286
+ function toUnicode2(url) {
11287
+ return toUnicode(url);
11288
+ }
11289
+ function convertHttpsToHttp(url) {
11290
+ if (url.startsWith("https://")) {
11291
+ const httpUrl = new URL(url);
11292
+ httpUrl.protocol = "http:";
11293
+ return httpUrl.toString();
11294
+ }
11295
+ throw new Error(`URL is not HTTPS: ${url}`);
11296
+ }
11297
+ function generateCanonicalIPFSUrl(content) {
11298
+ if (!content) {
11299
+ return content;
11300
+ }
11301
+ if (content.includes("ipfs.io")) {
11302
+ return content;
11303
+ }
11304
+ if (content.startsWith("Qm") || content.startsWith("bafy")) {
11305
+ return `ipfs.io/ipfs/${content}`;
11306
+ }
11307
+ return content;
11308
+ }
11309
+ function isWalrusSite(content) {
11310
+ return content.includes(".walrus.site") || content.includes(".walrus.host") || content.includes(".wal.app") || content.includes(".wal.site");
11311
+ }
11312
+ function getFaviconUrl(content) {
11313
+ const normalizedUrl = getNormalizedUrl(content);
11314
+ return `https://icons.duckduckgo.com/ip3/${normalizedUrl.hostname}.ico`;
11315
+ }
11316
+ function sanitizeHttpUrl(value) {
11317
+ if (typeof value !== "string" || value.length === 0) {
11318
+ return null;
11319
+ }
11320
+ try {
11321
+ const parsed = new URL(value);
11322
+ if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
11323
+ return null;
11324
+ }
11325
+ return parsed.toString();
11326
+ } catch (e4) {
11327
+ return null;
11328
+ }
11329
+ }
11330
+ var URL_REGEX = /https?:\/\/[^\s"'<>\])]*/g;
11331
+
11332
+ // ../../internal/utils/src/email.ts
11215
11333
  var email_exports = {};
11216
11334
  __export(email_exports, {
11217
11335
  extractTextFromGmailPayload: () => extractTextFromGmailPayload,
@@ -11457,816 +11575,6 @@ function countPatternMatches(content, pattern, maxMatches = DEFAULT_MAX_MATCHES)
11457
11575
  return count;
11458
11576
  }
11459
11577
 
11460
- // ../../internal/utils/src/itunes-api.ts
11461
- var itunes_api_exports = {};
11462
- __export(itunes_api_exports, {
11463
- APP_STORE_COUNTRIES: () => APP_STORE_COUNTRIES,
11464
- fetchItunesAppData: () => fetchItunesAppData,
11465
- fetchItunesSearchResults: () => fetchItunesSearchResults,
11466
- getAllAppStoreCountryCodes: () => getAllAppStoreCountryCodes,
11467
- getAppStoreCountryName: () => getAppStoreCountryName,
11468
- isValidAppStoreCountryCode: () => isValidAppStoreCountryCode,
11469
- selectBestArtworkUrl: () => selectBestArtworkUrl
11470
- });
11471
- var APP_STORE_COUNTRIES = [
11472
- { code: "al", name: "Albania" },
11473
- { code: "dz", name: "Algeria" },
11474
- { code: "ao", name: "Angola" },
11475
- { code: "ai", name: "Anguilla" },
11476
- { code: "ag", name: "Antigua and Barbuda" },
11477
- { code: "ar", name: "Argentina" },
11478
- { code: "am", name: "Armenia" },
11479
- { code: "au", name: "Australia" },
11480
- { code: "at", name: "Austria" },
11481
- { code: "az", name: "Azerbaijan" },
11482
- { code: "bs", name: "Bahamas" },
11483
- { code: "bh", name: "Bahrain" },
11484
- { code: "bb", name: "Barbados" },
11485
- { code: "by", name: "Belarus" },
11486
- { code: "be", name: "Belgium" },
11487
- { code: "bz", name: "Belize" },
11488
- { code: "bj", name: "Benin" },
11489
- { code: "bm", name: "Bermuda" },
11490
- { code: "bt", name: "Bhutan" },
11491
- { code: "bo", name: "Bolivia" },
11492
- { code: "bw", name: "Botswana" },
11493
- { code: "br", name: "Brazil" },
11494
- { code: "vg", name: "British Virgin Islands" },
11495
- { code: "bn", name: "Brunei" },
11496
- { code: "bg", name: "Bulgaria" },
11497
- { code: "bf", name: "Burkina Faso" },
11498
- { code: "kh", name: "Cambodia" },
11499
- { code: "ca", name: "Canada" },
11500
- { code: "cv", name: "Cape Verde" },
11501
- { code: "ky", name: "Cayman Islands" },
11502
- { code: "cl", name: "Chile" },
11503
- { code: "td", name: "Chad" },
11504
- { code: "cn", name: "China" },
11505
- { code: "co", name: "Colombia" },
11506
- { code: "cd", name: "Congo" },
11507
- { code: "cr", name: "Costa Rica" },
11508
- { code: "hr", name: "Croatia" },
11509
- { code: "cy", name: "Cyprus" },
11510
- { code: "cz", name: "Czechia" },
11511
- { code: "dk", name: "Denmark" },
11512
- { code: "dm", name: "Dominica" },
11513
- { code: "do", name: "Dominican Republic" },
11514
- { code: "ec", name: "Ecuador" },
11515
- { code: "eg", name: "Egypt" },
11516
- { code: "sv", name: "El Salvador" },
11517
- { code: "ee", name: "Estonia" },
11518
- { code: "fj", name: "Fiji" },
11519
- { code: "fi", name: "Finland" },
11520
- { code: "fr", name: "France" },
11521
- { code: "de", name: "Germany" },
11522
- { code: "gm", name: "Gambia" },
11523
- { code: "gb", name: "United Kingdom" },
11524
- { code: "gh", name: "Ghana" },
11525
- { code: "gr", name: "Greece" },
11526
- { code: "gd", name: "Grenada" },
11527
- { code: "gt", name: "Guatemala" },
11528
- { code: "gw", name: "Guinea-bissau" },
11529
- { code: "gy", name: "Guyana" },
11530
- { code: "hn", name: "Honduras" },
11531
- { code: "hk", name: "Hong Kong" },
11532
- { code: "hu", name: "Hungary" },
11533
- { code: "is", name: "Iceland" },
11534
- { code: "in", name: "India" },
11535
- { code: "id", name: "Indonesia" },
11536
- { code: "ie", name: "Ireland" },
11537
- { code: "il", name: "Israel" },
11538
- { code: "it", name: "Italy" },
11539
- { code: "jm", name: "Jamaica" },
11540
- { code: "jp", name: "Japan" },
11541
- { code: "jo", name: "Jordan" },
11542
- { code: "kz", name: "Kazakhstan" },
11543
- { code: "ke", name: "Kenya" },
11544
- { code: "kw", name: "Kuwait" },
11545
- { code: "kg", name: "Kyrgyzstan" },
11546
- { code: "la", name: "Lao Peoples Democratic Republic" },
11547
- { code: "lv", name: "Latvia" },
11548
- { code: "lb", name: "Lebanon" },
11549
- { code: "li", name: "Liberia" },
11550
- { code: "lt", name: "Lithuania" },
11551
- { code: "lu", name: "Luxembourg" },
11552
- { code: "mo", name: "Macao" },
11553
- { code: "mk", name: "North Macedonia" },
11554
- { code: "mg", name: "Madagascar" },
11555
- { code: "mw", name: "Malawi" },
11556
- { code: "my", name: "Malaysia" },
11557
- { code: "ml", name: "Mali" },
11558
- { code: "mt", name: "Malta" },
11559
- { code: "mr", name: "Mauritania" },
11560
- { code: "mu", name: "Mauritius" },
11561
- { code: "mx", name: "Mexico" },
11562
- { code: "fm", name: "Micronesia" },
11563
- { code: "md", name: "Moldova" },
11564
- { code: "mn", name: "Mongolia" },
11565
- { code: "ms", name: "Montserrat" },
11566
- { code: "mz", name: "Mozambique" },
11567
- { code: "na", name: "Namibia" },
11568
- { code: "np", name: "Nepal" },
11569
- { code: "nl", name: "Netherlands" },
11570
- { code: "nz", name: "New Zealand" },
11571
- { code: "ni", name: "Nicaragua" },
11572
- { code: "ne", name: "Niger" },
11573
- { code: "ng", name: "Nigeria" },
11574
- { code: "no", name: "Norway" },
11575
- { code: "om", name: "Oman" },
11576
- { code: "pk", name: "Pakistan" },
11577
- { code: "pw", name: "Palau" },
11578
- { code: "pa", name: "Panama" },
11579
- { code: "pg", name: "Papua New Guinea" },
11580
- { code: "py", name: "Paraguay" },
11581
- { code: "pe", name: "Peru" },
11582
- { code: "ph", name: "Philippines" },
11583
- { code: "pl", name: "Poland" },
11584
- { code: "pt", name: "Portugal" },
11585
- { code: "qa", name: "Qatar" },
11586
- { code: "ro", name: "Romania" },
11587
- { code: "ru", name: "Russia" },
11588
- { code: "st", name: "Sao Tome & Principe" },
11589
- { code: "sa", name: "Saudi Arabia" },
11590
- { code: "sn", name: "Senegal" },
11591
- { code: "sc", name: "Seychelles" },
11592
- { code: "sl", name: "Sierra Leone" },
11593
- { code: "sg", name: "Singapore" },
11594
- { code: "sk", name: "Slovakia" },
11595
- { code: "si", name: "Slovenia" },
11596
- { code: "sb", name: "Solomon Islands" },
11597
- { code: "za", name: "South Africa" },
11598
- { code: "kr", name: "South Korea" },
11599
- { code: "es", name: "Spain" },
11600
- { code: "lk", name: "Sri Lanka" },
11601
- { code: "kn", name: "St. Kitts and Nevis" },
11602
- { code: "lc", name: "St. Lucia" },
11603
- { code: "vc", name: "St. Vincent & The Grenadines" },
11604
- { code: "sr", name: "Suriname" },
11605
- { code: "sz", name: "Swaziland" },
11606
- { code: "se", name: "Sweden" },
11607
- { code: "ch", name: "Switzerland" },
11608
- { code: "tw", name: "Taiwan" },
11609
- { code: "tj", name: "Tajikistan" },
11610
- { code: "tz", name: "Tanzania" },
11611
- { code: "th", name: "Thailand" },
11612
- { code: "tt", name: "Trinidad and Tobago" },
11613
- { code: "tn", name: "Tunisia" },
11614
- { code: "tr", name: "Turkey" },
11615
- { code: "tm", name: "Turkmenistan" },
11616
- { code: "tc", name: "Turks and Caicos" },
11617
- { code: "ug", name: "Uganda" },
11618
- { code: "ua", name: "Ukraine" },
11619
- { code: "ae", name: "United Arab Emirates" },
11620
- { code: "us", name: "United States" },
11621
- { code: "uy", name: "Uruguay" },
11622
- { code: "uz", name: "Uzbekistan" },
11623
- { code: "ve", name: "Venezuela" },
11624
- { code: "vn", name: "Vietnam" },
11625
- { code: "ye", name: "Yemen" },
11626
- { code: "zw", name: "Zimbabwe" }
11627
- ];
11628
- var APP_STORE_COUNTRY_MAP = new Map(
11629
- APP_STORE_COUNTRIES.map((country) => [country.code, country.name])
11630
- );
11631
- var APP_STORE_CODES_SET = new Set(APP_STORE_COUNTRIES.map((country) => country.code));
11632
- var APP_STORE_CODES_ARRAY = Array.from(APP_STORE_CODES_SET).sort();
11633
- function getAppStoreCountryName(code) {
11634
- return APP_STORE_COUNTRY_MAP.get(code);
11635
- }
11636
- function getAllAppStoreCountryCodes() {
11637
- return APP_STORE_CODES_ARRAY;
11638
- }
11639
- function isValidAppStoreCountryCode(code) {
11640
- return APP_STORE_CODES_SET.has(code);
11641
- }
11642
- function selectBestArtworkUrl(appData) {
11643
- return appData.artworkUrl512 || appData.artworkUrl100 || appData.artworkUrl60;
11644
- }
11645
- function fetchItunesSearchResults(term, country = "us", limit = 10) {
11646
- return __async(this, null, function* () {
11647
- const params = new URLSearchParams({
11648
- media: "software",
11649
- term,
11650
- country,
11651
- lang: "en_us",
11652
- entity: "software",
11653
- explicit: "yes",
11654
- limit: String(limit)
11655
- });
11656
- const response = yield fetch(`https://itunes.apple.com/search?${params.toString()}`, {
11657
- headers: { "User-Agent": "ChainPatrol/1.0 (https://chainpatrol.io)" }
11658
- });
11659
- if (!response.ok) {
11660
- throw new Error(`iTunes API returned ${response.status} ${response.statusText}`);
11661
- }
11662
- const data = yield response.json();
11663
- return data.results.map((r) => ({
11664
- trackId: r.trackId,
11665
- trackName: r.trackName,
11666
- trackViewUrl: r.trackViewUrl,
11667
- releaseDate: r.releaseDate,
11668
- artistName: r.artistName,
11669
- bundleId: r.bundleId
11670
- }));
11671
- });
11672
- }
11673
- function fetchItunesAppData(appId, country = "us") {
11674
- return __async(this, null, function* () {
11675
- try {
11676
- const apiUrl = `https://itunes.apple.com/lookup?id=${appId}&country=${country}&entity=software`;
11677
- const response = yield fetch(apiUrl, {
11678
- headers: {
11679
- "User-Agent": "ChainPatrol/1.0 (https://chainpatrol.io)"
11680
- }
11681
- });
11682
- if (!response.ok) {
11683
- throw new Error(
11684
- `iTunes API request failed: ${response.status} ${response.statusText}`
11685
- );
11686
- }
11687
- const data = yield response.json();
11688
- if (data.resultCount > 0 && data.results.length > 0) {
11689
- return data.results[0];
11690
- }
11691
- return null;
11692
- } catch (error2) {
11693
- console.error("Error fetching iTunes app data", { error: error2 });
11694
- return null;
11695
- }
11696
- });
11697
- }
11698
-
11699
- // ../../internal/utils/src/google-play-api.ts
11700
- var GOOGLE_PLAY_COUNTRIES = [
11701
- { code: "af", name: "Afghanistan" },
11702
- { code: "al", name: "Albania" },
11703
- { code: "dz", name: "Algeria" },
11704
- { code: "as", name: "American Samoa" },
11705
- { code: "ad", name: "Andorra" },
11706
- { code: "ao", name: "Angola" },
11707
- { code: "ai", name: "Anguilla" },
11708
- { code: "aq", name: "Antarctica" },
11709
- { code: "ag", name: "Antigua and Barbuda" },
11710
- { code: "ar", name: "Argentina" },
11711
- { code: "am", name: "Armenia" },
11712
- { code: "aw", name: "Aruba" },
11713
- { code: "au", name: "Australia" },
11714
- { code: "at", name: "Austria" },
11715
- { code: "az", name: "Azerbaijan" },
11716
- { code: "bs", name: "Bahamas" },
11717
- { code: "bh", name: "Bahrain" },
11718
- { code: "bd", name: "Bangladesh" },
11719
- { code: "bb", name: "Barbados" },
11720
- { code: "by", name: "Belarus" },
11721
- { code: "be", name: "Belgium" },
11722
- { code: "bz", name: "Belize" },
11723
- { code: "bj", name: "Benin" },
11724
- { code: "bm", name: "Bermuda" },
11725
- { code: "bt", name: "Bhutan" },
11726
- { code: "bo", name: "Bolivia" },
11727
- { code: "ba", name: "Bosnia and Herzegovina" },
11728
- { code: "bw", name: "Botswana" },
11729
- { code: "bv", name: "Bouvet Island" },
11730
- { code: "br", name: "Brazil" },
11731
- { code: "io", name: "British Indian Ocean Territory" },
11732
- { code: "bn", name: "Brunei Darussalam" },
11733
- { code: "bg", name: "Bulgaria" },
11734
- { code: "bf", name: "Burkina Faso" },
11735
- { code: "bi", name: "Burundi" },
11736
- { code: "kh", name: "Cambodia" },
11737
- { code: "cm", name: "Cameroon" },
11738
- { code: "ca", name: "Canada" },
11739
- { code: "cv", name: "Cape Verde" },
11740
- { code: "ky", name: "Cayman Islands" },
11741
- { code: "cf", name: "Central African Republic" },
11742
- { code: "td", name: "Chad" },
11743
- { code: "cl", name: "Chile" },
11744
- { code: "cn", name: "China" },
11745
- { code: "cx", name: "Christmas Island" },
11746
- { code: "cc", name: "Cocos (Keeling) Islands" },
11747
- { code: "co", name: "Colombia" },
11748
- { code: "km", name: "Comoros" },
11749
- { code: "cg", name: "Congo" },
11750
- { code: "cd", name: "Congo, the Democratic Republic of the" },
11751
- { code: "ck", name: "Cook Islands" },
11752
- { code: "cr", name: "Costa Rica" },
11753
- { code: "ci", name: "Cote D'ivoire" },
11754
- { code: "hr", name: "Croatia" },
11755
- { code: "cu", name: "Cuba" },
11756
- { code: "cy", name: "Cyprus" },
11757
- { code: "cz", name: "Czech Republic" },
11758
- { code: "dk", name: "Denmark" },
11759
- { code: "dj", name: "Djibouti" },
11760
- { code: "dm", name: "Dominica" },
11761
- { code: "do", name: "Dominican Republic" },
11762
- { code: "ec", name: "Ecuador" },
11763
- { code: "eg", name: "Egypt" },
11764
- { code: "sv", name: "El Salvador" },
11765
- { code: "gq", name: "Equatorial Guinea" },
11766
- { code: "er", name: "Eritrea" },
11767
- { code: "ee", name: "Estonia" },
11768
- { code: "et", name: "Ethiopia" },
11769
- { code: "fk", name: "Falkland Islands (Malvinas)" },
11770
- { code: "fo", name: "Faroe Islands" },
11771
- { code: "fj", name: "Fiji" },
11772
- { code: "fi", name: "Finland" },
11773
- { code: "fr", name: "France" },
11774
- { code: "gf", name: "French Guiana" },
11775
- { code: "pf", name: "French Polynesia" },
11776
- { code: "tf", name: "French Southern Territories" },
11777
- { code: "ga", name: "Gabon" },
11778
- { code: "gm", name: "Gambia" },
11779
- { code: "ge", name: "Georgia" },
11780
- { code: "de", name: "Germany" },
11781
- { code: "gh", name: "Ghana" },
11782
- { code: "gi", name: "Gibraltar" },
11783
- { code: "gr", name: "Greece" },
11784
- { code: "gl", name: "Greenland" },
11785
- { code: "gd", name: "Grenada" },
11786
- { code: "gp", name: "Guadeloupe" },
11787
- { code: "gu", name: "Guam" },
11788
- { code: "gt", name: "Guatemala" },
11789
- { code: "gg", name: "Guernsey" },
11790
- { code: "gn", name: "Guinea" },
11791
- { code: "gw", name: "Guinea-Bissau" },
11792
- { code: "gy", name: "Guyana" },
11793
- { code: "ht", name: "Haiti" },
11794
- { code: "hm", name: "Heard Island and Mcdonald Islands" },
11795
- { code: "va", name: "Holy See (Vatican City State)" },
11796
- { code: "hn", name: "Honduras" },
11797
- { code: "hk", name: "Hong Kong" },
11798
- { code: "hu", name: "Hungary" },
11799
- { code: "is", name: "Iceland" },
11800
- { code: "in", name: "India" },
11801
- { code: "id", name: "Indonesia" },
11802
- { code: "ir", name: "Iran, Islamic Republic of" },
11803
- { code: "iq", name: "Iraq" },
11804
- { code: "ie", name: "Ireland" },
11805
- { code: "im", name: "Isle of Man" },
11806
- { code: "il", name: "Israel" },
11807
- { code: "it", name: "Italy" },
11808
- { code: "je", name: "Jersey" },
11809
- { code: "jm", name: "Jamaica" },
11810
- { code: "jp", name: "Japan" },
11811
- { code: "jo", name: "Jordan" },
11812
- { code: "kz", name: "Kazakhstan" },
11813
- { code: "ke", name: "Kenya" },
11814
- { code: "ki", name: "Kiribati" },
11815
- { code: "kp", name: "Korea, Democratic People's Republic of" },
11816
- { code: "kr", name: "Korea, Republic of" },
11817
- { code: "kw", name: "Kuwait" },
11818
- { code: "kg", name: "Kyrgyzstan" },
11819
- { code: "la", name: "Lao People's Democratic Republic" },
11820
- { code: "lv", name: "Latvia" },
11821
- { code: "lb", name: "Lebanon" },
11822
- { code: "ls", name: "Lesotho" },
11823
- { code: "lr", name: "Liberia" },
11824
- { code: "ly", name: "Libyan Arab Jamahiriya" },
11825
- { code: "li", name: "Liechtenstein" },
11826
- { code: "lt", name: "Lithuania" },
11827
- { code: "lu", name: "Luxembourg" },
11828
- { code: "mo", name: "Macao" },
11829
- { code: "mk", name: "Macedonia, the Former Yugoslav Republic of" },
11830
- { code: "mg", name: "Madagascar" },
11831
- { code: "mw", name: "Malawi" },
11832
- { code: "my", name: "Malaysia" },
11833
- { code: "mv", name: "Maldives" },
11834
- { code: "ml", name: "Mali" },
11835
- { code: "mt", name: "Malta" },
11836
- { code: "mh", name: "Marshall Islands" },
11837
- { code: "mq", name: "Martinique" },
11838
- { code: "mr", name: "Mauritania" },
11839
- { code: "mu", name: "Mauritius" },
11840
- { code: "yt", name: "Mayotte" },
11841
- { code: "mx", name: "Mexico" },
11842
- { code: "fm", name: "Micronesia, Federated States of" },
11843
- { code: "md", name: "Moldova, Republic of" },
11844
- { code: "mc", name: "Monaco" },
11845
- { code: "mn", name: "Mongolia" },
11846
- { code: "me", name: "Montenegro" },
11847
- { code: "ms", name: "Montserrat" },
11848
- { code: "ma", name: "Morocco" },
11849
- { code: "mz", name: "Mozambique" },
11850
- { code: "mm", name: "Myanmar" },
11851
- { code: "na", name: "Namibia" },
11852
- { code: "nr", name: "Nauru" },
11853
- { code: "np", name: "Nepal" },
11854
- { code: "nl", name: "Netherlands" },
11855
- { code: "an", name: "Netherlands Antilles" },
11856
- { code: "nc", name: "New Caledonia" },
11857
- { code: "nz", name: "New Zealand" },
11858
- { code: "ni", name: "Nicaragua" },
11859
- { code: "ne", name: "Niger" },
11860
- { code: "ng", name: "Nigeria" },
11861
- { code: "nu", name: "Niue" },
11862
- { code: "nf", name: "Norfolk Island" },
11863
- { code: "mp", name: "Northern Mariana Islands" },
11864
- { code: "no", name: "Norway" },
11865
- { code: "om", name: "Oman" },
11866
- { code: "pk", name: "Pakistan" },
11867
- { code: "pw", name: "Palau" },
11868
- { code: "ps", name: "Palestinian Territory, Occupied" },
11869
- { code: "pa", name: "Panama" },
11870
- { code: "pg", name: "Papua New Guinea" },
11871
- { code: "py", name: "Paraguay" },
11872
- { code: "pe", name: "Peru" },
11873
- { code: "ph", name: "Philippines" },
11874
- { code: "pn", name: "Pitcairn" },
11875
- { code: "pl", name: "Poland" },
11876
- { code: "pt", name: "Portugal" },
11877
- { code: "pr", name: "Puerto Rico" },
11878
- { code: "qa", name: "Qatar" },
11879
- { code: "re", name: "Reunion" },
11880
- { code: "ro", name: "Romania" },
11881
- { code: "ru", name: "Russian Federation" },
11882
- { code: "rw", name: "Rwanda" },
11883
- { code: "sh", name: "Saint Helena" },
11884
- { code: "kn", name: "Saint Kitts and Nevis" },
11885
- { code: "lc", name: "Saint Lucia" },
11886
- { code: "pm", name: "Saint Pierre and Miquelon" },
11887
- { code: "vc", name: "Saint Vincent and the Grenadines" },
11888
- { code: "ws", name: "Samoa" },
11889
- { code: "sm", name: "San Marino" },
11890
- { code: "st", name: "Sao Tome and Principe" },
11891
- { code: "sa", name: "Saudi Arabia" },
11892
- { code: "sn", name: "Senegal" },
11893
- { code: "rs", name: "Serbia" },
11894
- { code: "sc", name: "Seychelles" },
11895
- { code: "sl", name: "Sierra Leone" },
11896
- { code: "sg", name: "Singapore" },
11897
- { code: "sk", name: "Slovakia" },
11898
- { code: "si", name: "Slovenia" },
11899
- { code: "sb", name: "Solomon Islands" },
11900
- { code: "so", name: "Somalia" },
11901
- { code: "za", name: "South Africa" },
11902
- { code: "gs", name: "South Georgia and the South Sandwich Islands" },
11903
- { code: "es", name: "Spain" },
11904
- { code: "lk", name: "Sri Lanka" },
11905
- { code: "sd", name: "Sudan" },
11906
- { code: "sr", name: "Suriname" },
11907
- { code: "sj", name: "Svalbard and Jan Mayen" },
11908
- { code: "sz", name: "Swaziland" },
11909
- { code: "se", name: "Sweden" },
11910
- { code: "ch", name: "Switzerland" },
11911
- { code: "sy", name: "Syrian Arab Republic" },
11912
- { code: "tw", name: "Taiwan, Province of China" },
11913
- { code: "tj", name: "Tajikistan" },
11914
- { code: "tz", name: "Tanzania, United Republic of" },
11915
- { code: "th", name: "Thailand" },
11916
- { code: "tl", name: "Timor-Leste" },
11917
- { code: "tg", name: "Togo" },
11918
- { code: "tk", name: "Tokelau" },
11919
- { code: "to", name: "Tonga" },
11920
- { code: "tt", name: "Trinidad and Tobago" },
11921
- { code: "tn", name: "Tunisia" },
11922
- { code: "tr", name: "Turkiye" },
11923
- { code: "tm", name: "Turkmenistan" },
11924
- { code: "tc", name: "Turks and Caicos Islands" },
11925
- { code: "tv", name: "Tuvalu" },
11926
- { code: "ug", name: "Uganda" },
11927
- { code: "ua", name: "Ukraine" },
11928
- { code: "ae", name: "United Arab Emirates" },
11929
- { code: "uk", name: "United Kingdom" },
11930
- { code: "gb", name: "United Kingdom" },
11931
- { code: "us", name: "United States" },
11932
- { code: "um", name: "United States Minor Outlying Islands" },
11933
- { code: "uy", name: "Uruguay" },
11934
- { code: "uz", name: "Uzbekistan" },
11935
- { code: "vu", name: "Vanuatu" },
11936
- { code: "ve", name: "Venezuela" },
11937
- { code: "vn", name: "Viet Nam" },
11938
- { code: "vg", name: "Virgin Islands, British" },
11939
- { code: "vi", name: "Virgin Islands, U.S." },
11940
- { code: "wf", name: "Wallis and Futuna" },
11941
- { code: "eh", name: "Western Sahara" },
11942
- { code: "ye", name: "Yemen" },
11943
- { code: "zm", name: "Zambia" },
11944
- { code: "zw", name: "Zimbabwe" }
11945
- ];
11946
- var GOOGLE_PLAY_COUNTRY_MAP = new Map(
11947
- GOOGLE_PLAY_COUNTRIES.map((country) => [country.code, country.name])
11948
- );
11949
- var GOOGLE_PLAY_CODES_SET = new Set(
11950
- GOOGLE_PLAY_COUNTRIES.map((country) => country.code)
11951
- );
11952
- Array.from(GOOGLE_PLAY_CODES_SET).sort();
11953
- function getGooglePlayCountryName(code) {
11954
- return GOOGLE_PLAY_COUNTRY_MAP.get(code);
11955
- }
11956
-
11957
- // ../../internal/utils/src/country-codes.ts
11958
- var country_codes_exports = {};
11959
- __export(country_codes_exports, {
11960
- APPLE_ONLY_COUNTRY_CODES: () => APPLE_ONLY_COUNTRY_CODES,
11961
- COUNTRY_NAMES: () => COUNTRY_NAMES,
11962
- GOOGLE_ONLY_COUNTRY_CODES: () => GOOGLE_ONLY_COUNTRY_CODES,
11963
- SHARED_COUNTRY_CODES: () => SHARED_COUNTRY_CODES,
11964
- countryCodeToFlag: () => countryCodeToFlag,
11965
- getAllCountryCodes: () => getAllCountryCodes,
11966
- getCountryName: () => getCountryName,
11967
- isValidAppleCountryCode: () => isValidAppleCountryCode,
11968
- isValidGoogleCountryCode: () => isValidGoogleCountryCode
11969
- });
11970
- function createCountryLists() {
11971
- const appleCodesSet = new Set(APP_STORE_COUNTRIES.map((c2) => c2.code));
11972
- const googleCodesSet = new Set(GOOGLE_PLAY_COUNTRIES.map((c2) => c2.code));
11973
- const shared2 = [];
11974
- const appleOnly2 = [];
11975
- const googleOnly2 = [];
11976
- appleCodesSet.forEach((code) => {
11977
- if (googleCodesSet.has(code)) {
11978
- shared2.push(code);
11979
- } else {
11980
- appleOnly2.push(code);
11981
- }
11982
- });
11983
- googleCodesSet.forEach((code) => {
11984
- if (!appleCodesSet.has(code)) {
11985
- googleOnly2.push(code);
11986
- }
11987
- });
11988
- return {
11989
- shared: shared2.sort(),
11990
- appleOnly: appleOnly2.sort(),
11991
- googleOnly: googleOnly2.sort()
11992
- };
11993
- }
11994
- var { shared, appleOnly, googleOnly } = createCountryLists();
11995
- var SHARED_COUNTRY_CODES = shared;
11996
- var APPLE_ONLY_COUNTRY_CODES = appleOnly;
11997
- var GOOGLE_ONLY_COUNTRY_CODES = googleOnly;
11998
- function isValidGoogleCountryCode(code) {
11999
- return SHARED_COUNTRY_CODES.includes(code) || GOOGLE_ONLY_COUNTRY_CODES.includes(code);
12000
- }
12001
- function isValidAppleCountryCode(code) {
12002
- return SHARED_COUNTRY_CODES.includes(code) || APPLE_ONLY_COUNTRY_CODES.includes(code);
12003
- }
12004
- function getCountryName(code) {
12005
- return getAppStoreCountryName(code) || getGooglePlayCountryName(code);
12006
- }
12007
- function getAllCountryCodes(platform) {
12008
- if (platform === "apple") {
12009
- return [...SHARED_COUNTRY_CODES, ...APPLE_ONLY_COUNTRY_CODES].sort();
12010
- } else {
12011
- return [...SHARED_COUNTRY_CODES, ...GOOGLE_ONLY_COUNTRY_CODES].sort();
12012
- }
12013
- }
12014
- var COUNTRY_NAMES = {
12015
- AD: "Andorra",
12016
- AE: "United Arab Emirates",
12017
- AF: "Afghanistan",
12018
- AG: "Antigua and Barbuda",
12019
- AI: "Anguilla",
12020
- AL: "Albania",
12021
- AM: "Armenia",
12022
- AO: "Angola",
12023
- AQ: "Antarctica",
12024
- AR: "Argentina",
12025
- AS: "American Samoa",
12026
- AT: "Austria",
12027
- AU: "Australia",
12028
- AW: "Aruba",
12029
- AX: "\xC5land Islands",
12030
- AZ: "Azerbaijan",
12031
- BA: "Bosnia and Herzegovina",
12032
- BB: "Barbados",
12033
- BD: "Bangladesh",
12034
- BE: "Belgium",
12035
- BF: "Burkina Faso",
12036
- BG: "Bulgaria",
12037
- BH: "Bahrain",
12038
- BI: "Burundi",
12039
- BJ: "Benin",
12040
- BL: "Saint Barth\xE9lemy",
12041
- BM: "Bermuda",
12042
- BN: "Brunei",
12043
- BO: "Bolivia",
12044
- BQ: "Caribbean Netherlands",
12045
- BR: "Brazil",
12046
- BS: "Bahamas",
12047
- BT: "Bhutan",
12048
- BV: "Bouvet Island",
12049
- BW: "Botswana",
12050
- BY: "Belarus",
12051
- BZ: "Belize",
12052
- CA: "Canada",
12053
- CC: "Cocos (Keeling) Islands",
12054
- CD: "DR Congo",
12055
- CF: "Central African Republic",
12056
- CG: "Republic of the Congo",
12057
- CH: "Switzerland",
12058
- CI: "C\xF4te d'Ivoire",
12059
- CK: "Cook Islands",
12060
- CL: "Chile",
12061
- CM: "Cameroon",
12062
- CN: "China",
12063
- CO: "Colombia",
12064
- CR: "Costa Rica",
12065
- CU: "Cuba",
12066
- CV: "Cape Verde",
12067
- CW: "Cura\xE7ao",
12068
- CX: "Christmas Island",
12069
- CY: "Cyprus",
12070
- CZ: "Czechia",
12071
- DE: "Germany",
12072
- DJ: "Djibouti",
12073
- DK: "Denmark",
12074
- DM: "Dominica",
12075
- DO: "Dominican Republic",
12076
- DZ: "Algeria",
12077
- EC: "Ecuador",
12078
- EE: "Estonia",
12079
- EG: "Egypt",
12080
- EH: "Western Sahara",
12081
- ER: "Eritrea",
12082
- ES: "Spain",
12083
- ET: "Ethiopia",
12084
- FI: "Finland",
12085
- FJ: "Fiji",
12086
- FK: "Falkland Islands",
12087
- FM: "Micronesia",
12088
- FO: "Faroe Islands",
12089
- FR: "France",
12090
- GA: "Gabon",
12091
- GB: "United Kingdom",
12092
- GD: "Grenada",
12093
- GE: "Georgia",
12094
- GF: "French Guiana",
12095
- GG: "Guernsey",
12096
- GH: "Ghana",
12097
- GI: "Gibraltar",
12098
- GL: "Greenland",
12099
- GM: "Gambia",
12100
- GN: "Guinea",
12101
- GP: "Guadeloupe",
12102
- GQ: "Equatorial Guinea",
12103
- GR: "Greece",
12104
- GS: "South Georgia",
12105
- GT: "Guatemala",
12106
- GU: "Guam",
12107
- GW: "Guinea-Bissau",
12108
- GY: "Guyana",
12109
- HK: "Hong Kong",
12110
- HM: "Heard Island and McDonald Islands",
12111
- HN: "Honduras",
12112
- HR: "Croatia",
12113
- HT: "Haiti",
12114
- HU: "Hungary",
12115
- ID: "Indonesia",
12116
- IE: "Ireland",
12117
- IL: "Israel",
12118
- IM: "Isle of Man",
12119
- IN: "India",
12120
- IO: "British Indian Ocean Territory",
12121
- IQ: "Iraq",
12122
- IR: "Iran",
12123
- IS: "Iceland",
12124
- IT: "Italy",
12125
- JE: "Jersey",
12126
- JM: "Jamaica",
12127
- JO: "Jordan",
12128
- JP: "Japan",
12129
- KE: "Kenya",
12130
- KG: "Kyrgyzstan",
12131
- KH: "Cambodia",
12132
- KI: "Kiribati",
12133
- KM: "Comoros",
12134
- KN: "Saint Kitts and Nevis",
12135
- KP: "North Korea",
12136
- KR: "South Korea",
12137
- KW: "Kuwait",
12138
- KY: "Cayman Islands",
12139
- KZ: "Kazakhstan",
12140
- LA: "Laos",
12141
- LB: "Lebanon",
12142
- LC: "Saint Lucia",
12143
- LI: "Liechtenstein",
12144
- LK: "Sri Lanka",
12145
- LR: "Liberia",
12146
- LS: "Lesotho",
12147
- LT: "Lithuania",
12148
- LU: "Luxembourg",
12149
- LV: "Latvia",
12150
- LY: "Libya",
12151
- MA: "Morocco",
12152
- MC: "Monaco",
12153
- MD: "Moldova",
12154
- ME: "Montenegro",
12155
- MF: "Saint Martin",
12156
- MG: "Madagascar",
12157
- MH: "Marshall Islands",
12158
- MK: "North Macedonia",
12159
- ML: "Mali",
12160
- MM: "Myanmar",
12161
- MN: "Mongolia",
12162
- MO: "Macau",
12163
- MP: "Northern Mariana Islands",
12164
- MQ: "Martinique",
12165
- MR: "Mauritania",
12166
- MS: "Montserrat",
12167
- MT: "Malta",
12168
- MU: "Mauritius",
12169
- MV: "Maldives",
12170
- MW: "Malawi",
12171
- MX: "Mexico",
12172
- MY: "Malaysia",
12173
- MZ: "Mozambique",
12174
- NA: "Namibia",
12175
- NC: "New Caledonia",
12176
- NE: "Niger",
12177
- NF: "Norfolk Island",
12178
- NG: "Nigeria",
12179
- NI: "Nicaragua",
12180
- NL: "Netherlands",
12181
- NO: "Norway",
12182
- NP: "Nepal",
12183
- NR: "Nauru",
12184
- NU: "Niue",
12185
- NZ: "New Zealand",
12186
- OM: "Oman",
12187
- PA: "Panama",
12188
- PE: "Peru",
12189
- PF: "French Polynesia",
12190
- PG: "Papua New Guinea",
12191
- PH: "Philippines",
12192
- PK: "Pakistan",
12193
- PL: "Poland",
12194
- PM: "Saint Pierre and Miquelon",
12195
- PN: "Pitcairn Islands",
12196
- PR: "Puerto Rico",
12197
- PS: "Palestine",
12198
- PT: "Portugal",
12199
- PW: "Palau",
12200
- PY: "Paraguay",
12201
- QA: "Qatar",
12202
- RE: "R\xE9union",
12203
- RO: "Romania",
12204
- RS: "Serbia",
12205
- RU: "Russia",
12206
- RW: "Rwanda",
12207
- SA: "Saudi Arabia",
12208
- SB: "Solomon Islands",
12209
- SC: "Seychelles",
12210
- SD: "Sudan",
12211
- SE: "Sweden",
12212
- SG: "Singapore",
12213
- SH: "Saint Helena",
12214
- SI: "Slovenia",
12215
- SJ: "Svalbard and Jan Mayen",
12216
- SK: "Slovakia",
12217
- SL: "Sierra Leone",
12218
- SM: "San Marino",
12219
- SN: "Senegal",
12220
- SO: "Somalia",
12221
- SR: "Suriname",
12222
- SS: "South Sudan",
12223
- ST: "S\xE3o Tom\xE9 and Pr\xEDncipe",
12224
- SV: "El Salvador",
12225
- SX: "Sint Maarten",
12226
- SY: "Syria",
12227
- SZ: "Eswatini",
12228
- TC: "Turks and Caicos Islands",
12229
- TD: "Chad",
12230
- TF: "French Southern Territories",
12231
- TG: "Togo",
12232
- TH: "Thailand",
12233
- TJ: "Tajikistan",
12234
- TK: "Tokelau",
12235
- TL: "Timor-Leste",
12236
- TM: "Turkmenistan",
12237
- TN: "Tunisia",
12238
- TO: "Tonga",
12239
- TR: "Turkey",
12240
- TT: "Trinidad and Tobago",
12241
- TV: "Tuvalu",
12242
- TW: "Taiwan",
12243
- TZ: "Tanzania",
12244
- UA: "Ukraine",
12245
- UG: "Uganda",
12246
- UM: "U.S. Minor Outlying Islands",
12247
- US: "United States",
12248
- UY: "Uruguay",
12249
- UZ: "Uzbekistan",
12250
- VA: "Vatican City",
12251
- VC: "Saint Vincent and the Grenadines",
12252
- VE: "Venezuela",
12253
- VG: "British Virgin Islands",
12254
- VI: "U.S. Virgin Islands",
12255
- VN: "Vietnam",
12256
- VU: "Vanuatu",
12257
- WF: "Wallis and Futuna",
12258
- WS: "Samoa",
12259
- XK: "Kosovo",
12260
- YE: "Yemen",
12261
- YT: "Mayotte",
12262
- ZA: "South Africa",
12263
- ZM: "Zambia",
12264
- ZW: "Zimbabwe"
12265
- };
12266
- function countryCodeToFlag(code) {
12267
- return code.toUpperCase().split("").map((c2) => String.fromCodePoint(127462 + c2.charCodeAt(0) - 65)).join("");
12268
- }
12269
-
12270
11578
  // ../../internal/utils/src/text.ts
12271
11579
  var text_exports = {};
12272
11580
  __export(text_exports, {
@@ -12820,241 +12128,6 @@ zod.z.object({
12820
12128
  })
12821
12129
  )
12822
12130
  });
12823
-
12824
- // ../../internal/asset/src/parse/caip2.ts
12825
- var SUPPORTED_CHAINS = {
12826
- // EIP155 chains (Ethereum Virtual Machine compatible)
12827
- ETHEREUM_MAINNET: {
12828
- chainId: "eip155:1",
12829
- namespace: "eip155",
12830
- reference: "1",
12831
- name: "Ethereum Mainnet",
12832
- shortName: "Ethereum",
12833
- explorerUrl: "https://etherscan.io",
12834
- explorerName: "Etherscan"
12835
- },
12836
- OPTIMISM: {
12837
- chainId: "eip155:10",
12838
- namespace: "eip155",
12839
- reference: "10",
12840
- name: "Optimism",
12841
- shortName: "Optimism",
12842
- explorerUrl: "https://optimistic.etherscan.io",
12843
- explorerName: "Optimism Explorer"
12844
- },
12845
- POLYGON: {
12846
- chainId: "eip155:137",
12847
- namespace: "eip155",
12848
- reference: "137",
12849
- name: "Polygon",
12850
- shortName: "Polygon",
12851
- explorerUrl: "https://polygonscan.com",
12852
- explorerName: "PolygonScan"
12853
- },
12854
- ARBITRUM: {
12855
- chainId: "eip155:42161",
12856
- namespace: "eip155",
12857
- reference: "42161",
12858
- name: "Arbitrum",
12859
- shortName: "Arbitrum",
12860
- explorerUrl: "https://arbiscan.io",
12861
- explorerName: "Arbiscan"
12862
- },
12863
- BASE: {
12864
- chainId: "eip155:8453",
12865
- namespace: "eip155",
12866
- reference: "8453",
12867
- name: "Base",
12868
- shortName: "Base",
12869
- explorerUrl: "https://basescan.org",
12870
- explorerName: "BaseScan"
12871
- },
12872
- CELO: {
12873
- chainId: "eip155:42220",
12874
- namespace: "eip155",
12875
- reference: "42220",
12876
- name: "Celo",
12877
- shortName: "Celo",
12878
- explorerUrl: "https://celoscan.io",
12879
- explorerName: "CeloScan"
12880
- },
12881
- PLASMA: {
12882
- chainId: "eip155:9745",
12883
- namespace: "eip155",
12884
- reference: "9745",
12885
- name: "Plasma",
12886
- shortName: "Plasma",
12887
- explorerUrl: "https://plasmascan.to",
12888
- explorerName: "PlasmaScan"
12889
- },
12890
- BSC: {
12891
- chainId: "eip155:56",
12892
- namespace: "eip155",
12893
- reference: "56",
12894
- name: "Binance Smart Chain",
12895
- shortName: "BSC",
12896
- explorerUrl: "https://bscscan.com",
12897
- explorerName: "BscScan"
12898
- },
12899
- LINEA: {
12900
- chainId: "eip155:59144",
12901
- namespace: "eip155",
12902
- reference: "59144",
12903
- name: "Linea",
12904
- shortName: "Linea",
12905
- explorerUrl: "https://lineascan.build",
12906
- explorerName: "LineaScan"
12907
- },
12908
- MONAD: {
12909
- chainId: "eip155:143",
12910
- namespace: "eip155",
12911
- reference: "143",
12912
- name: "Monad",
12913
- shortName: "Monad",
12914
- explorerUrl: "https://monadvision.com",
12915
- explorerName: "MonadVision"
12916
- },
12917
- INK: {
12918
- chainId: "eip155:57073",
12919
- namespace: "eip155",
12920
- reference: "57073",
12921
- name: "Ink",
12922
- shortName: "Ink",
12923
- explorerUrl: "https://explorer.inkonchain.com",
12924
- explorerName: "Ink Explorer"
12925
- },
12926
- SHAPE: {
12927
- chainId: "eip155:360",
12928
- namespace: "eip155",
12929
- reference: "360",
12930
- name: "Shape",
12931
- shortName: "Shape",
12932
- explorerUrl: "https://shapescan.xyz",
12933
- explorerName: "ShapeScan"
12934
- },
12935
- SONEIUM: {
12936
- chainId: "eip155:1868",
12937
- namespace: "eip155",
12938
- reference: "1868",
12939
- name: "Soneium",
12940
- shortName: "Soneium",
12941
- explorerUrl: "https://soneium.blockscout.com",
12942
- explorerName: "Soneium Blockscout"
12943
- },
12944
- UNICHAIN: {
12945
- chainId: "eip155:130",
12946
- namespace: "eip155",
12947
- reference: "130",
12948
- name: "Unichain",
12949
- shortName: "Unichain",
12950
- explorerUrl: "https://unichain.blockscout.com",
12951
- explorerName: "Unichain Blockscout"
12952
- },
12953
- WORLD_CHAIN: {
12954
- chainId: "eip155:480",
12955
- namespace: "eip155",
12956
- reference: "480",
12957
- name: "World Chain",
12958
- shortName: "World Chain",
12959
- explorerUrl: "https://worldscan.org",
12960
- explorerName: "WorldScan"
12961
- },
12962
- // Non-EVM chains
12963
- SOLANA_MAINNET: {
12964
- chainId: "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
12965
- namespace: "solana",
12966
- reference: "5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
12967
- name: "Solana Mainnet",
12968
- shortName: "Solana",
12969
- explorerUrl: "https://solscan.io",
12970
- explorerName: "Solscan"
12971
- },
12972
- STELLAR_PUBNET: {
12973
- chainId: "stellar:pubnet",
12974
- namespace: "stellar",
12975
- reference: "pubnet",
12976
- name: "Stellar",
12977
- shortName: "Stellar",
12978
- explorerUrl: "https://stellar.expert/explorer/public",
12979
- explorerName: "Stellar Expert"
12980
- },
12981
- TRON_MAINNET: {
12982
- chainId: "tron:mainnet",
12983
- namespace: "tron",
12984
- reference: "mainnet",
12985
- name: "Tron",
12986
- shortName: "Tron",
12987
- explorerUrl: "https://tronscan.org",
12988
- explorerName: "TronScan"
12989
- },
12990
- BITCOIN_MAINNET: {
12991
- chainId: "bip122:000000000019d6689c085ae165831e93-p2wpkh",
12992
- namespace: "bip122",
12993
- reference: "000000000019d6689c085ae165831e93-p2wpkh",
12994
- name: "Bitcoin (P2WPKH)",
12995
- shortName: "Bitcoin",
12996
- explorerUrl: "https://mempool.space",
12997
- explorerName: "Mempool"
12998
- },
12999
- CARDANO_MAINNET: {
13000
- chainId: "cip34:1-764824073",
13001
- namespace: "cip34",
13002
- reference: "1-764824073",
13003
- name: "Cardano",
13004
- shortName: "Cardano",
13005
- explorerUrl: "https://cardanoscan.io",
13006
- explorerName: "CardanoScan"
13007
- },
13008
- SUI_MAINNET: {
13009
- chainId: "sui:mainnet",
13010
- namespace: "sui",
13011
- reference: "mainnet",
13012
- name: "Sui Mainnet",
13013
- shortName: "Sui",
13014
- explorerUrl: "https://suiscan.xyz",
13015
- explorerName: "SuiScan"
13016
- }
13017
- };
13018
- Object.fromEntries(
13019
- Object.values(SUPPORTED_CHAINS).map((chain) => [chain.shortName, chain])
13020
- );
13021
- Object.fromEntries(
13022
- Object.values(SUPPORTED_CHAINS).map((chain) => [chain.chainId, chain])
13023
- );
13024
- Object.values(SUPPORTED_CHAINS).filter(
13025
- (chain) => chain.namespace === "eip155"
13026
- );
13027
-
13028
- // ../../internal/asset/src/parse/model.ts
13029
- var AssetModel = /* @__PURE__ */ ((AssetModel2) => {
13030
- AssetModel2["Addon"] = "addon";
13031
- AssetModel2["App"] = "app";
13032
- AssetModel2["Bot"] = "bot";
13033
- AssetModel2["BusinessProfile"] = "business-profile";
13034
- AssetModel2["Catalog"] = "catalog";
13035
- AssetModel2["Collection"] = "collection";
13036
- AssetModel2["Channel"] = "channel";
13037
- AssetModel2["Group"] = "group";
13038
- AssetModel2["Post"] = "post";
13039
- AssetModel2["Profile"] = "profile";
13040
- AssetModel2["Short"] = "short";
13041
- AssetModel2["Video"] = "video";
13042
- AssetModel2["Space"] = "space";
13043
- AssetModel2["Issue"] = "issue";
13044
- AssetModel2["PullRequest"] = "pull-request";
13045
- AssetModel2["Discussion"] = "discussion";
13046
- AssetModel2["Repository"] = "repository";
13047
- AssetModel2["Article"] = "Article";
13048
- AssetModel2["Comment"] = "comment";
13049
- AssetModel2["List"] = "list";
13050
- AssetModel2["Subreddit"] = "subreddit";
13051
- AssetModel2["Community"] = "community";
13052
- AssetModel2["MiniApp"] = "mini-app";
13053
- AssetModel2["Developer"] = "developer";
13054
- return AssetModel2;
13055
- })(AssetModel || {});
13056
-
13057
- // ../../internal/validation/src/assets/parse.ts
13058
12131
  zod.z.object({
13059
12132
  content: zod.z.string().min(1, "Input string is required").describe("The asset content to parse (URL, address, etc.)")
13060
12133
  }).describe("Parse asset request body");
@@ -13151,6 +12224,7 @@ zod.z.object({
13151
12224
  }).optional(),
13152
12225
  isOverviewManuallyEdited: zod.z.boolean().optional(),
13153
12226
  overviewDisplayLocation: zod.z.enum(["cover", "separate"]).default("cover"),
12227
+ coverVersion: zod.z.enum(["v1", "v2"]).default("v1"),
13154
12228
  showCaseStudyOrgNames: zod.z.boolean().default(true),
13155
12229
  showSimilarThreats: zod.z.boolean().default(true),
13156
12230
  threatAnalysisType: zod.z.enum(["threats_blocked", "takedowns_completed"]).default("threats_blocked"),
@@ -13441,11 +12515,11 @@ var parseNamed_default = parseNamed;
13441
12515
 
13442
12516
  // ../../node_modules/culori/src/rgb/parseHex.js
13443
12517
  var hex = /^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i;
13444
- var parseHex2 = (color) => {
12518
+ var parseHex = (color) => {
13445
12519
  let match2;
13446
12520
  return (match2 = color.match(hex)) ? parseNumber_default(parseInt(match2[1], 16), match2[1].length) : void 0;
13447
12521
  };
13448
- var parseHex_default = parseHex2;
12522
+ var parseHex_default = parseHex;
13449
12523
 
13450
12524
  // ../../node_modules/culori/src/util/regex.js
13451
12525
  var num = "([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)";