@inlang/paraglide-js 1.2.4 → 1.2.5

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.
Files changed (2) hide show
  1. package/dist/index.js +244 -548
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -30,10 +30,6 @@ var __esm = (fn, res) => function __init() {
30
30
  var __commonJS = (cb, mod) => function __require2() {
31
31
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
32
32
  };
33
- var __export = (target, all) => {
34
- for (var name in all)
35
- __defProp(target, name, { get: all[name], enumerable: true });
36
- };
37
33
  var __copyProps = (to, from3, except, desc) => {
38
34
  if (from3 && typeof from3 === "object" || typeof from3 === "function") {
39
35
  for (let key of __getOwnPropNames(from3))
@@ -42,7 +38,6 @@ var __copyProps = (to, from3, except, desc) => {
42
38
  }
43
39
  return to;
44
40
  };
45
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
46
41
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
47
42
  // If the importer is in node compatibility mode or this is not an ESM
48
43
  // file that has been converted to a CommonJS file using a Babel-
@@ -678,13 +673,13 @@ var require_typebox = __commonJS({
678
673
  return ValueGuard.IsArray(value) ? ArrayType(value) : ValueGuard.IsDate(value) ? DateType(value) : ValueGuard.IsUint8Array(value) ? Uint8ArrayType(value) : ValueGuard.IsObject(value) ? ObjectType(value) : value;
679
674
  }
680
675
  function Rest(schemas) {
681
- return schemas.map((schema) => Type9(schema));
676
+ return schemas.map((schema) => Type10(schema));
682
677
  }
683
678
  TypeClone2.Rest = Rest;
684
- function Type9(schema, options = {}) {
679
+ function Type10(schema, options = {}) {
685
680
  return { ...Visit(schema), ...options };
686
681
  }
687
- TypeClone2.Type = Type9;
682
+ TypeClone2.Type = Type10;
688
683
  })(TypeClone || (exports.TypeClone = TypeClone = {}));
689
684
  var IndexedAccessor;
690
685
  (function(IndexedAccessor2) {
@@ -832,8 +827,8 @@ var require_typebox = __commonJS({
832
827
  KeyResolver2.ResolveKeys = ResolveKeys;
833
828
  function ResolvePattern(schema) {
834
829
  const keys = ResolveKeys(schema, { includePatterns: true });
835
- const pattern = keys.map((key) => `(${UnwrapPattern(key)})`);
836
- return `^(${pattern.join("|")})$`;
830
+ const pattern2 = keys.map((key) => `(${UnwrapPattern(key)})`);
831
+ return `^(${pattern2.join("|")})$`;
837
832
  }
838
833
  KeyResolver2.ResolvePattern = ResolvePattern;
839
834
  })(KeyResolver || (exports.KeyResolver = KeyResolver = {}));
@@ -903,70 +898,70 @@ var require_typebox = __commonJS({
903
898
  exports.TemplateLiteralParserError = TemplateLiteralParserError;
904
899
  var TemplateLiteralParser;
905
900
  (function(TemplateLiteralParser2) {
906
- function IsNonEscaped(pattern, index, char) {
907
- return pattern[index] === char && pattern.charCodeAt(index - 1) !== 92;
901
+ function IsNonEscaped(pattern2, index, char) {
902
+ return pattern2[index] === char && pattern2.charCodeAt(index - 1) !== 92;
908
903
  }
909
- function IsOpenParen(pattern, index) {
910
- return IsNonEscaped(pattern, index, "(");
904
+ function IsOpenParen(pattern2, index) {
905
+ return IsNonEscaped(pattern2, index, "(");
911
906
  }
912
- function IsCloseParen(pattern, index) {
913
- return IsNonEscaped(pattern, index, ")");
907
+ function IsCloseParen(pattern2, index) {
908
+ return IsNonEscaped(pattern2, index, ")");
914
909
  }
915
- function IsSeparator(pattern, index) {
916
- return IsNonEscaped(pattern, index, "|");
910
+ function IsSeparator(pattern2, index) {
911
+ return IsNonEscaped(pattern2, index, "|");
917
912
  }
918
- function IsGroup(pattern) {
919
- if (!(IsOpenParen(pattern, 0) && IsCloseParen(pattern, pattern.length - 1)))
913
+ function IsGroup(pattern2) {
914
+ if (!(IsOpenParen(pattern2, 0) && IsCloseParen(pattern2, pattern2.length - 1)))
920
915
  return false;
921
916
  let count = 0;
922
- for (let index = 0; index < pattern.length; index++) {
923
- if (IsOpenParen(pattern, index))
917
+ for (let index = 0; index < pattern2.length; index++) {
918
+ if (IsOpenParen(pattern2, index))
924
919
  count += 1;
925
- if (IsCloseParen(pattern, index))
920
+ if (IsCloseParen(pattern2, index))
926
921
  count -= 1;
927
- if (count === 0 && index !== pattern.length - 1)
922
+ if (count === 0 && index !== pattern2.length - 1)
928
923
  return false;
929
924
  }
930
925
  return true;
931
926
  }
932
- function InGroup(pattern) {
933
- return pattern.slice(1, pattern.length - 1);
927
+ function InGroup(pattern2) {
928
+ return pattern2.slice(1, pattern2.length - 1);
934
929
  }
935
- function IsPrecedenceOr(pattern) {
930
+ function IsPrecedenceOr(pattern2) {
936
931
  let count = 0;
937
- for (let index = 0; index < pattern.length; index++) {
938
- if (IsOpenParen(pattern, index))
932
+ for (let index = 0; index < pattern2.length; index++) {
933
+ if (IsOpenParen(pattern2, index))
939
934
  count += 1;
940
- if (IsCloseParen(pattern, index))
935
+ if (IsCloseParen(pattern2, index))
941
936
  count -= 1;
942
- if (IsSeparator(pattern, index) && count === 0)
937
+ if (IsSeparator(pattern2, index) && count === 0)
943
938
  return true;
944
939
  }
945
940
  return false;
946
941
  }
947
- function IsPrecedenceAnd(pattern) {
948
- for (let index = 0; index < pattern.length; index++) {
949
- if (IsOpenParen(pattern, index))
942
+ function IsPrecedenceAnd(pattern2) {
943
+ for (let index = 0; index < pattern2.length; index++) {
944
+ if (IsOpenParen(pattern2, index))
950
945
  return true;
951
946
  }
952
947
  return false;
953
948
  }
954
- function Or(pattern) {
949
+ function Or(pattern2) {
955
950
  let [count, start] = [0, 0];
956
951
  const expressions = [];
957
- for (let index = 0; index < pattern.length; index++) {
958
- if (IsOpenParen(pattern, index))
952
+ for (let index = 0; index < pattern2.length; index++) {
953
+ if (IsOpenParen(pattern2, index))
959
954
  count += 1;
960
- if (IsCloseParen(pattern, index))
955
+ if (IsCloseParen(pattern2, index))
961
956
  count -= 1;
962
- if (IsSeparator(pattern, index) && count === 0) {
963
- const range2 = pattern.slice(start, index);
957
+ if (IsSeparator(pattern2, index) && count === 0) {
958
+ const range2 = pattern2.slice(start, index);
964
959
  if (range2.length > 0)
965
960
  expressions.push(Parse(range2));
966
961
  start = index + 1;
967
962
  }
968
963
  }
969
- const range = pattern.slice(start);
964
+ const range = pattern2.slice(start);
970
965
  if (range.length > 0)
971
966
  expressions.push(Parse(range));
972
967
  if (expressions.length === 0)
@@ -975,7 +970,7 @@ var require_typebox = __commonJS({
975
970
  return expressions[0];
976
971
  return { type: "or", expr: expressions };
977
972
  }
978
- function And(pattern) {
973
+ function And(pattern2) {
979
974
  function Group(value, index) {
980
975
  if (!IsOpenParen(value, index))
981
976
  throw new TemplateLiteralParserError(`TemplateLiteralParser: Index must point to open parens`);
@@ -990,23 +985,23 @@ var require_typebox = __commonJS({
990
985
  }
991
986
  throw new TemplateLiteralParserError(`TemplateLiteralParser: Unclosed group parens in expression`);
992
987
  }
993
- function Range(pattern2, index) {
994
- for (let scan = index; scan < pattern2.length; scan++) {
995
- if (IsOpenParen(pattern2, scan))
988
+ function Range(pattern3, index) {
989
+ for (let scan = index; scan < pattern3.length; scan++) {
990
+ if (IsOpenParen(pattern3, scan))
996
991
  return [index, scan];
997
992
  }
998
- return [index, pattern2.length];
993
+ return [index, pattern3.length];
999
994
  }
1000
995
  const expressions = [];
1001
- for (let index = 0; index < pattern.length; index++) {
1002
- if (IsOpenParen(pattern, index)) {
1003
- const [start, end] = Group(pattern, index);
1004
- const range = pattern.slice(start, end + 1);
996
+ for (let index = 0; index < pattern2.length; index++) {
997
+ if (IsOpenParen(pattern2, index)) {
998
+ const [start, end] = Group(pattern2, index);
999
+ const range = pattern2.slice(start, end + 1);
1005
1000
  expressions.push(Parse(range));
1006
1001
  index = end;
1007
1002
  } else {
1008
- const [start, end] = Range(pattern, index);
1009
- const range = pattern.slice(start, end);
1003
+ const [start, end] = Range(pattern2, index);
1004
+ const range = pattern2.slice(start, end);
1010
1005
  if (range.length > 0)
1011
1006
  expressions.push(Parse(range));
1012
1007
  index = end - 1;
@@ -1014,12 +1009,12 @@ var require_typebox = __commonJS({
1014
1009
  }
1015
1010
  return expressions.length === 0 ? { type: "const", const: "" } : expressions.length === 1 ? expressions[0] : { type: "and", expr: expressions };
1016
1011
  }
1017
- function Parse(pattern) {
1018
- return IsGroup(pattern) ? Parse(InGroup(pattern)) : IsPrecedenceOr(pattern) ? Or(pattern) : IsPrecedenceAnd(pattern) ? And(pattern) : { type: "const", const: pattern };
1012
+ function Parse(pattern2) {
1013
+ return IsGroup(pattern2) ? Parse(InGroup(pattern2)) : IsPrecedenceOr(pattern2) ? Or(pattern2) : IsPrecedenceAnd(pattern2) ? And(pattern2) : { type: "const", const: pattern2 };
1019
1014
  }
1020
1015
  TemplateLiteralParser2.Parse = Parse;
1021
- function ParseExact(pattern) {
1022
- return Parse(pattern.slice(1, pattern.length - 1));
1016
+ function ParseExact(pattern2) {
1017
+ return Parse(pattern2.slice(1, pattern2.length - 1));
1023
1018
  }
1024
1019
  TemplateLiteralParser2.ParseExact = ParseExact;
1025
1020
  })(TemplateLiteralParser || (exports.TemplateLiteralParser = TemplateLiteralParser = {}));
@@ -1279,8 +1274,8 @@ var require_typebox = __commonJS({
1279
1274
  /** `[Json]` Creates a KeyOf type */
1280
1275
  KeyOf(schema, options = {}) {
1281
1276
  return TypeGuard.TRecord(schema) ? (() => {
1282
- const pattern = Object.getOwnPropertyNames(schema.patternProperties)[0];
1283
- return pattern === exports.PatternNumberExact ? this.Number(options) : pattern === exports.PatternStringExact ? this.String(options) : this.Throw("Unable to resolve key type from Record key pattern");
1277
+ const pattern2 = Object.getOwnPropertyNames(schema.patternProperties)[0];
1278
+ return pattern2 === exports.PatternNumberExact ? this.Number(options) : pattern2 === exports.PatternStringExact ? this.String(options) : this.Throw("Unable to resolve key type from Record key pattern");
1284
1279
  })() : TypeGuard.TTuple(schema) ? (() => {
1285
1280
  const items = ValueGuard.IsUndefined(schema.items) ? [] : schema.items;
1286
1281
  const literals = items.map((_, index) => exports.Type.Literal(index.toString()));
@@ -1390,8 +1385,8 @@ var require_typebox = __commonJS({
1390
1385
  })() : TypeGuard.TInteger(key) || TypeGuard.TNumber(key) ? (() => {
1391
1386
  return this.Create({ ...options, [exports.Kind]: "Record", type: "object", patternProperties: { [exports.PatternNumberExact]: TypeClone.Type(schema) } });
1392
1387
  })() : TypeGuard.TString(key) ? (() => {
1393
- const pattern = ValueGuard.IsUndefined(key.pattern) ? exports.PatternStringExact : key.pattern;
1394
- return this.Create({ ...options, [exports.Kind]: "Record", type: "object", patternProperties: { [pattern]: TypeClone.Type(schema) } });
1388
+ const pattern2 = ValueGuard.IsUndefined(key.pattern) ? exports.PatternStringExact : key.pattern;
1389
+ return this.Create({ ...options, [exports.Kind]: "Record", type: "object", patternProperties: { [pattern2]: TypeClone.Type(schema) } });
1395
1390
  })() : this.Never();
1396
1391
  }
1397
1392
  /** `[Json]` Creates a Recursive type */
@@ -1433,8 +1428,8 @@ var require_typebox = __commonJS({
1433
1428
  }
1434
1429
  /** `[Json]` Creates a TemplateLiteral type */
1435
1430
  TemplateLiteral(unresolved, options = {}) {
1436
- const pattern = ValueGuard.IsString(unresolved) ? TemplateLiteralPattern.Create(TemplateLiteralDslParser.Parse(unresolved)) : TemplateLiteralPattern.Create(unresolved);
1437
- return this.Create({ ...options, [exports.Kind]: "TemplateLiteral", type: "string", pattern });
1431
+ const pattern2 = ValueGuard.IsString(unresolved) ? TemplateLiteralPattern.Create(TemplateLiteralDslParser.Parse(unresolved)) : TemplateLiteralPattern.Create(unresolved);
1432
+ return this.Create({ ...options, [exports.Kind]: "TemplateLiteral", type: "string", pattern: pattern2 });
1438
1433
  }
1439
1434
  /** `[Json]` Creates a Transform type */
1440
1435
  Transform(schema) {
@@ -1530,8 +1525,8 @@ var require_typebox = __commonJS({
1530
1525
  }
1531
1526
  /** `[Extended]` Creates a String type */
1532
1527
  RegExp(unresolved, options = {}) {
1533
- const pattern = ValueGuard.IsString(unresolved) ? unresolved : unresolved.source;
1534
- return this.Create({ ...options, [exports.Kind]: "String", type: "string", pattern });
1528
+ const pattern2 = ValueGuard.IsString(unresolved) ? unresolved : unresolved.source;
1529
+ return this.Create({ ...options, [exports.Kind]: "String", type: "string", pattern: pattern2 });
1535
1530
  }
1536
1531
  /**
1537
1532
  * @deprecated Use `Type.RegExp`
@@ -1680,13 +1675,13 @@ var require_system = __commonJS({
1680
1675
  exports.TypeSystemDuplicateFormat = TypeSystemDuplicateFormat;
1681
1676
  var TypeSystem;
1682
1677
  (function(TypeSystem2) {
1683
- function Type9(kind, check) {
1678
+ function Type10(kind, check) {
1684
1679
  if (Types.TypeRegistry.Has(kind))
1685
1680
  throw new TypeSystemDuplicateTypeKind(kind);
1686
1681
  Types.TypeRegistry.Set(kind, check);
1687
1682
  return (options = {}) => Types.Type.Unsafe({ ...options, [Types.Kind]: kind });
1688
1683
  }
1689
- TypeSystem2.Type = Type9;
1684
+ TypeSystem2.Type = Type10;
1690
1685
  function Format(format, check) {
1691
1686
  if (Types.FormatRegistry.Has(format))
1692
1687
  throw new TypeSystemDuplicateFormat(format);
@@ -4498,8 +4493,8 @@ var require_transform = __commonJS({
4498
4493
  return Types.TypeGuard.TTransform(schema) || Visit(schema.item, references);
4499
4494
  }
4500
4495
  function TRecord(schema, references) {
4501
- const pattern = Object.getOwnPropertyNames(schema.patternProperties)[0];
4502
- const property = schema.patternProperties[pattern];
4496
+ const pattern2 = Object.getOwnPropertyNames(schema.patternProperties)[0];
4497
+ const property = schema.patternProperties[pattern2];
4503
4498
  return Types.TypeGuard.TTransform(schema) || Visit(property, references) || Types.TypeGuard.TSchema(schema.additionalProperties) && Types.TypeGuard.TTransform(schema.additionalProperties);
4504
4499
  }
4505
4500
  function TRef(schema, references) {
@@ -4617,10 +4612,10 @@ var require_transform = __commonJS({
4617
4612
  function TRecord(schema, references, value) {
4618
4613
  if (!(0, guard_1.IsPlainObject)(value))
4619
4614
  return Default(schema, value);
4620
- const pattern = Object.getOwnPropertyNames(schema.patternProperties)[0];
4621
- const knownKeys = new RegExp(pattern);
4615
+ const pattern2 = Object.getOwnPropertyNames(schema.patternProperties)[0];
4616
+ const knownKeys = new RegExp(pattern2);
4622
4617
  const knownProperties = Object.getOwnPropertyNames(value).reduce((value2, key) => {
4623
- return knownKeys.test(key) ? { ...value2, [key]: Visit(schema.patternProperties[pattern], references, value2[key]) } : value2;
4618
+ return knownKeys.test(key) ? { ...value2, [key]: Visit(schema.patternProperties[pattern2], references, value2[key]) } : value2;
4624
4619
  }, value);
4625
4620
  if (!Types.TypeGuard.TSchema(schema.additionalProperties)) {
4626
4621
  return Default(schema, knownProperties);
@@ -4739,10 +4734,10 @@ var require_transform = __commonJS({
4739
4734
  const defaulted = Default(schema, value);
4740
4735
  if (!(0, guard_1.IsPlainObject)(value))
4741
4736
  return defaulted;
4742
- const pattern = Object.getOwnPropertyNames(schema.patternProperties)[0];
4743
- const knownKeys = new RegExp(pattern);
4737
+ const pattern2 = Object.getOwnPropertyNames(schema.patternProperties)[0];
4738
+ const knownKeys = new RegExp(pattern2);
4744
4739
  const knownProperties = Object.getOwnPropertyNames(value).reduce((value2, key) => {
4745
- return knownKeys.test(key) ? { ...value2, [key]: Visit(schema.patternProperties[pattern], references, value2[key]) } : value2;
4740
+ return knownKeys.test(key) ? { ...value2, [key]: Visit(schema.patternProperties[pattern2], references, value2[key]) } : value2;
4746
4741
  }, defaulted);
4747
4742
  if (!Types.TypeGuard.TSchema(schema.additionalProperties)) {
4748
4743
  return Default(schema, knownProperties);
@@ -5744,7 +5739,7 @@ var require_dist_node2 = __commonJS({
5744
5739
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
5745
5740
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
5746
5741
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
5747
- var __export2 = (target, all) => {
5742
+ var __export = (target, all) => {
5748
5743
  for (var name in all)
5749
5744
  __defProp2(target, name, { get: all[name], enumerable: true });
5750
5745
  };
@@ -5758,7 +5753,7 @@ var require_dist_node2 = __commonJS({
5758
5753
  };
5759
5754
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
5760
5755
  var dist_src_exports = {};
5761
- __export2(dist_src_exports, {
5756
+ __export(dist_src_exports, {
5762
5757
  endpoint: () => endpoint
5763
5758
  });
5764
5759
  module.exports = __toCommonJS(dist_src_exports);
@@ -6179,7 +6174,7 @@ var require_dist_node4 = __commonJS({
6179
6174
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
6180
6175
  var __getProtoOf2 = Object.getPrototypeOf;
6181
6176
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
6182
- var __export2 = (target, all) => {
6177
+ var __export = (target, all) => {
6183
6178
  for (var name in all)
6184
6179
  __defProp2(target, name, { get: all[name], enumerable: true });
6185
6180
  };
@@ -6201,7 +6196,7 @@ var require_dist_node4 = __commonJS({
6201
6196
  ));
6202
6197
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
6203
6198
  var dist_src_exports = {};
6204
- __export2(dist_src_exports, {
6199
+ __export(dist_src_exports, {
6205
6200
  RequestError: () => RequestError2
6206
6201
  });
6207
6202
  module.exports = __toCommonJS(dist_src_exports);
@@ -6270,7 +6265,7 @@ var require_dist_node5 = __commonJS({
6270
6265
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
6271
6266
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
6272
6267
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
6273
- var __export2 = (target, all) => {
6268
+ var __export = (target, all) => {
6274
6269
  for (var name in all)
6275
6270
  __defProp2(target, name, { get: all[name], enumerable: true });
6276
6271
  };
@@ -6284,7 +6279,7 @@ var require_dist_node5 = __commonJS({
6284
6279
  };
6285
6280
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
6286
6281
  var dist_src_exports = {};
6287
- __export2(dist_src_exports, {
6282
+ __export(dist_src_exports, {
6288
6283
  request: () => request
6289
6284
  });
6290
6285
  module.exports = __toCommonJS(dist_src_exports);
@@ -6464,7 +6459,7 @@ var require_dist_node6 = __commonJS({
6464
6459
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
6465
6460
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
6466
6461
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
6467
- var __export2 = (target, all) => {
6462
+ var __export = (target, all) => {
6468
6463
  for (var name in all)
6469
6464
  __defProp2(target, name, { get: all[name], enumerable: true });
6470
6465
  };
@@ -6478,7 +6473,7 @@ var require_dist_node6 = __commonJS({
6478
6473
  };
6479
6474
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
6480
6475
  var dist_src_exports = {};
6481
- __export2(dist_src_exports, {
6476
+ __export(dist_src_exports, {
6482
6477
  GraphqlResponseError: () => GraphqlResponseError,
6483
6478
  graphql: () => graphql2,
6484
6479
  withCustomRequest: () => withCustomRequest
@@ -6603,7 +6598,7 @@ var require_dist_node7 = __commonJS({
6603
6598
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
6604
6599
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
6605
6600
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
6606
- var __export2 = (target, all) => {
6601
+ var __export = (target, all) => {
6607
6602
  for (var name in all)
6608
6603
  __defProp2(target, name, { get: all[name], enumerable: true });
6609
6604
  };
@@ -6617,7 +6612,7 @@ var require_dist_node7 = __commonJS({
6617
6612
  };
6618
6613
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
6619
6614
  var dist_src_exports = {};
6620
- __export2(dist_src_exports, {
6615
+ __export(dist_src_exports, {
6621
6616
  createTokenAuth: () => createTokenAuth
6622
6617
  });
6623
6618
  module.exports = __toCommonJS(dist_src_exports);
@@ -6675,7 +6670,7 @@ var require_dist_node8 = __commonJS({
6675
6670
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
6676
6671
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
6677
6672
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
6678
- var __export2 = (target, all) => {
6673
+ var __export = (target, all) => {
6679
6674
  for (var name in all)
6680
6675
  __defProp2(target, name, { get: all[name], enumerable: true });
6681
6676
  };
@@ -6689,7 +6684,7 @@ var require_dist_node8 = __commonJS({
6689
6684
  };
6690
6685
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
6691
6686
  var dist_src_exports = {};
6692
- __export2(dist_src_exports, {
6687
+ __export(dist_src_exports, {
6693
6688
  Octokit: () => Octokit2
6694
6689
  });
6695
6690
  module.exports = __toCommonJS(dist_src_exports);
@@ -6828,7 +6823,7 @@ var require_dist_node9 = __commonJS({
6828
6823
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
6829
6824
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
6830
6825
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
6831
- var __export2 = (target, all) => {
6826
+ var __export = (target, all) => {
6832
6827
  for (var name in all)
6833
6828
  __defProp2(target, name, { get: all[name], enumerable: true });
6834
6829
  };
@@ -6842,7 +6837,7 @@ var require_dist_node9 = __commonJS({
6842
6837
  };
6843
6838
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
6844
6839
  var dist_src_exports = {};
6845
- __export2(dist_src_exports, {
6840
+ __export(dist_src_exports, {
6846
6841
  composePaginateRest: () => composePaginateRest,
6847
6842
  isPaginatingEndpoint: () => isPaginatingEndpoint,
6848
6843
  paginateRest: () => paginateRest,
@@ -7206,7 +7201,7 @@ var require_dist_node10 = __commonJS({
7206
7201
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
7207
7202
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
7208
7203
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
7209
- var __export2 = (target, all) => {
7204
+ var __export = (target, all) => {
7210
7205
  for (var name in all)
7211
7206
  __defProp2(target, name, { get: all[name], enumerable: true });
7212
7207
  };
@@ -7220,7 +7215,7 @@ var require_dist_node10 = __commonJS({
7220
7215
  };
7221
7216
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
7222
7217
  var dist_src_exports = {};
7223
- __export2(dist_src_exports, {
7218
+ __export(dist_src_exports, {
7224
7219
  paginateGraphql: () => paginateGraphql
7225
7220
  });
7226
7221
  module.exports = __toCommonJS(dist_src_exports);
@@ -7400,7 +7395,7 @@ var require_dist_node11 = __commonJS({
7400
7395
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
7401
7396
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
7402
7397
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
7403
- var __export2 = (target, all) => {
7398
+ var __export = (target, all) => {
7404
7399
  for (var name in all)
7405
7400
  __defProp2(target, name, { get: all[name], enumerable: true });
7406
7401
  };
@@ -7414,7 +7409,7 @@ var require_dist_node11 = __commonJS({
7414
7409
  };
7415
7410
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
7416
7411
  var dist_src_exports = {};
7417
- __export2(dist_src_exports, {
7412
+ __export(dist_src_exports, {
7418
7413
  legacyRestEndpointMethods: () => legacyRestEndpointMethods,
7419
7414
  restEndpointMethods: () => restEndpointMethods
7420
7415
  });
@@ -10820,7 +10815,7 @@ var require_dist_node12 = __commonJS({
10820
10815
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
10821
10816
  var __getProtoOf2 = Object.getPrototypeOf;
10822
10817
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
10823
- var __export2 = (target, all) => {
10818
+ var __export = (target, all) => {
10824
10819
  for (var name in all)
10825
10820
  __defProp2(target, name, { get: all[name], enumerable: true });
10826
10821
  };
@@ -10842,7 +10837,7 @@ var require_dist_node12 = __commonJS({
10842
10837
  ));
10843
10838
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
10844
10839
  var dist_src_exports = {};
10845
- __export2(dist_src_exports, {
10840
+ __export(dist_src_exports, {
10846
10841
  VERSION: () => VERSION,
10847
10842
  retry: () => retry
10848
10843
  });
@@ -10931,7 +10926,7 @@ var require_dist_node13 = __commonJS({
10931
10926
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
10932
10927
  var __getProtoOf2 = Object.getPrototypeOf;
10933
10928
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
10934
- var __export2 = (target, all) => {
10929
+ var __export = (target, all) => {
10935
10930
  for (var name in all)
10936
10931
  __defProp2(target, name, { get: all[name], enumerable: true });
10937
10932
  };
@@ -10953,7 +10948,7 @@ var require_dist_node13 = __commonJS({
10953
10948
  ));
10954
10949
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
10955
10950
  var dist_src_exports = {};
10956
- __export2(dist_src_exports, {
10951
+ __export(dist_src_exports, {
10957
10952
  throttling: () => throttling
10958
10953
  });
10959
10954
  module.exports = __toCommonJS(dist_src_exports);
@@ -11181,7 +11176,7 @@ var require_dist_node14 = __commonJS({
11181
11176
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
11182
11177
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
11183
11178
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
11184
- var __export2 = (target, all) => {
11179
+ var __export = (target, all) => {
11185
11180
  for (var name in all)
11186
11181
  __defProp2(target, name, { get: all[name], enumerable: true });
11187
11182
  };
@@ -11195,7 +11190,7 @@ var require_dist_node14 = __commonJS({
11195
11190
  };
11196
11191
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
11197
11192
  var dist_src_exports = {};
11198
- __export2(dist_src_exports, {
11193
+ __export(dist_src_exports, {
11199
11194
  oauthAuthorizationUrl: () => oauthAuthorizationUrl
11200
11195
  });
11201
11196
  module.exports = __toCommonJS(dist_src_exports);
@@ -11254,7 +11249,7 @@ var require_dist_node15 = __commonJS({
11254
11249
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
11255
11250
  var __getProtoOf2 = Object.getPrototypeOf;
11256
11251
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
11257
- var __export2 = (target, all) => {
11252
+ var __export = (target, all) => {
11258
11253
  for (var name in all)
11259
11254
  __defProp2(target, name, { get: all[name], enumerable: true });
11260
11255
  };
@@ -11276,7 +11271,7 @@ var require_dist_node15 = __commonJS({
11276
11271
  ));
11277
11272
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
11278
11273
  var dist_src_exports = {};
11279
- __export2(dist_src_exports, {
11274
+ __export(dist_src_exports, {
11280
11275
  VERSION: () => VERSION,
11281
11276
  checkToken: () => checkToken,
11282
11277
  createDeviceCode: () => createDeviceCode,
@@ -11596,7 +11591,7 @@ var require_dist_node16 = __commonJS({
11596
11591
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
11597
11592
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
11598
11593
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
11599
- var __export2 = (target, all) => {
11594
+ var __export = (target, all) => {
11600
11595
  for (var name in all)
11601
11596
  __defProp2(target, name, { get: all[name], enumerable: true });
11602
11597
  };
@@ -11610,7 +11605,7 @@ var require_dist_node16 = __commonJS({
11610
11605
  };
11611
11606
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
11612
11607
  var dist_src_exports = {};
11613
- __export2(dist_src_exports, {
11608
+ __export(dist_src_exports, {
11614
11609
  createOAuthDeviceAuth: () => createOAuthDeviceAuth
11615
11610
  });
11616
11611
  module.exports = __toCommonJS(dist_src_exports);
@@ -11756,7 +11751,7 @@ var require_dist_node17 = __commonJS({
11756
11751
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
11757
11752
  var __getProtoOf2 = Object.getPrototypeOf;
11758
11753
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
11759
- var __export2 = (target, all) => {
11754
+ var __export = (target, all) => {
11760
11755
  for (var name in all)
11761
11756
  __defProp2(target, name, { get: all[name], enumerable: true });
11762
11757
  };
@@ -11778,7 +11773,7 @@ var require_dist_node17 = __commonJS({
11778
11773
  ));
11779
11774
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
11780
11775
  var dist_src_exports = {};
11781
- __export2(dist_src_exports, {
11776
+ __export(dist_src_exports, {
11782
11777
  createOAuthUserAuth: () => createOAuthUserAuth2,
11783
11778
  requiresBasicAuth: () => requiresBasicAuth
11784
11779
  });
@@ -11985,7 +11980,7 @@ var require_dist_node18 = __commonJS({
11985
11980
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
11986
11981
  var __getProtoOf2 = Object.getPrototypeOf;
11987
11982
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
11988
- var __export2 = (target, all) => {
11983
+ var __export = (target, all) => {
11989
11984
  for (var name in all)
11990
11985
  __defProp2(target, name, { get: all[name], enumerable: true });
11991
11986
  };
@@ -12007,7 +12002,7 @@ var require_dist_node18 = __commonJS({
12007
12002
  ));
12008
12003
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
12009
12004
  var dist_src_exports = {};
12010
- __export2(dist_src_exports, {
12005
+ __export(dist_src_exports, {
12011
12006
  createOAuthAppAuth: () => createOAuthAppAuth,
12012
12007
  createOAuthUserAuth: () => import_auth_oauth_user3.createOAuthUserAuth
12013
12008
  });
@@ -17840,7 +17835,7 @@ var require_dist_node20 = __commonJS({
17840
17835
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
17841
17836
  var __getProtoOf2 = Object.getPrototypeOf;
17842
17837
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
17843
- var __export2 = (target, all) => {
17838
+ var __export = (target, all) => {
17844
17839
  for (var name in all)
17845
17840
  __defProp2(target, name, { get: all[name], enumerable: true });
17846
17841
  };
@@ -17862,7 +17857,7 @@ var require_dist_node20 = __commonJS({
17862
17857
  ));
17863
17858
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
17864
17859
  var dist_src_exports = {};
17865
- __export2(dist_src_exports, {
17860
+ __export(dist_src_exports, {
17866
17861
  createAppAuth: () => createAppAuth,
17867
17862
  createOAuthUserAuth: () => import_auth_oauth_user2.createOAuthUserAuth
17868
17863
  });
@@ -18305,7 +18300,7 @@ var require_dist_node21 = __commonJS({
18305
18300
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
18306
18301
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
18307
18302
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
18308
- var __export2 = (target, all) => {
18303
+ var __export = (target, all) => {
18309
18304
  for (var name in all)
18310
18305
  __defProp2(target, name, { get: all[name], enumerable: true });
18311
18306
  };
@@ -18319,7 +18314,7 @@ var require_dist_node21 = __commonJS({
18319
18314
  };
18320
18315
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
18321
18316
  var dist_src_exports = {};
18322
- __export2(dist_src_exports, {
18317
+ __export(dist_src_exports, {
18323
18318
  createUnauthenticatedAuth: () => createUnauthenticatedAuth
18324
18319
  });
18325
18320
  module.exports = __toCommonJS(dist_src_exports);
@@ -18402,7 +18397,7 @@ var require_dist_node22 = __commonJS({
18402
18397
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
18403
18398
  var __getProtoOf2 = Object.getPrototypeOf;
18404
18399
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
18405
- var __export2 = (target, all) => {
18400
+ var __export = (target, all) => {
18406
18401
  for (var name in all)
18407
18402
  __defProp2(target, name, { get: all[name], enumerable: true });
18408
18403
  };
@@ -18424,7 +18419,7 @@ var require_dist_node22 = __commonJS({
18424
18419
  ));
18425
18420
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
18426
18421
  var dist_src_exports = {};
18427
- __export2(dist_src_exports, {
18422
+ __export(dist_src_exports, {
18428
18423
  OAuthApp: () => OAuthApp,
18429
18424
  createAWSLambdaAPIGatewayV2Handler: () => createAWSLambdaAPIGatewayV2Handler,
18430
18425
  createNodeMiddleware: () => createNodeMiddleware2,
@@ -19254,7 +19249,7 @@ var require_dist_node23 = __commonJS({
19254
19249
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
19255
19250
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
19256
19251
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
19257
- var __export2 = (target, all) => {
19252
+ var __export = (target, all) => {
19258
19253
  for (var name in all)
19259
19254
  __defProp2(target, name, { get: all[name], enumerable: true });
19260
19255
  };
@@ -19268,7 +19263,7 @@ var require_dist_node23 = __commonJS({
19268
19263
  };
19269
19264
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
19270
19265
  var dist_src_exports = {};
19271
- __export2(dist_src_exports, {
19266
+ __export(dist_src_exports, {
19272
19267
  sign: () => sign,
19273
19268
  verify: () => verify,
19274
19269
  verifyWithFallback: () => verifyWithFallback
@@ -19350,7 +19345,7 @@ var require_dist_node24 = __commonJS({
19350
19345
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
19351
19346
  var __getProtoOf2 = Object.getPrototypeOf;
19352
19347
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
19353
- var __export2 = (target, all) => {
19348
+ var __export = (target, all) => {
19354
19349
  for (var name in all)
19355
19350
  __defProp2(target, name, { get: all[name], enumerable: true });
19356
19351
  };
@@ -19372,7 +19367,7 @@ var require_dist_node24 = __commonJS({
19372
19367
  ));
19373
19368
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
19374
19369
  var dist_src_exports = {};
19375
- __export2(dist_src_exports, {
19370
+ __export(dist_src_exports, {
19376
19371
  Webhooks: () => Webhooks,
19377
19372
  createEventHandler: () => createEventHandler,
19378
19373
  createNodeMiddleware: () => createNodeMiddleware2,
@@ -19976,7 +19971,7 @@ var require_dist_node25 = __commonJS({
19976
19971
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
19977
19972
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
19978
19973
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
19979
- var __export2 = (target, all) => {
19974
+ var __export = (target, all) => {
19980
19975
  for (var name in all)
19981
19976
  __defProp2(target, name, { get: all[name], enumerable: true });
19982
19977
  };
@@ -19990,7 +19985,7 @@ var require_dist_node25 = __commonJS({
19990
19985
  };
19991
19986
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
19992
19987
  var dist_src_exports = {};
19993
- __export2(dist_src_exports, {
19988
+ __export(dist_src_exports, {
19994
19989
  App: () => App,
19995
19990
  createNodeMiddleware: () => createNodeMiddleware2
19996
19991
  });
@@ -20285,7 +20280,7 @@ var require_dist_node26 = __commonJS({
20285
20280
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
20286
20281
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
20287
20282
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
20288
- var __export2 = (target, all) => {
20283
+ var __export = (target, all) => {
20289
20284
  for (var name in all)
20290
20285
  __defProp2(target, name, { get: all[name], enumerable: true });
20291
20286
  };
@@ -20299,7 +20294,7 @@ var require_dist_node26 = __commonJS({
20299
20294
  };
20300
20295
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
20301
20296
  var dist_src_exports = {};
20302
- __export2(dist_src_exports, {
20297
+ __export(dist_src_exports, {
20303
20298
  App: () => App,
20304
20299
  OAuthApp: () => OAuthApp,
20305
20300
  Octokit: () => Octokit2,
@@ -20659,39 +20654,6 @@ import { Command as Command3 } from "commander";
20659
20654
  init_define_ENV_DEFINED_IN_BUILD_STEP();
20660
20655
 
20661
20656
  // ../../sdk/dist/index.js
20662
- var dist_exports2 = {};
20663
- __export(dist_exports2, {
20664
- Expression: () => Expression,
20665
- ExternalProjectSettings: () => ExternalProjectSettings,
20666
- InlangModule: () => InlangModule,
20667
- JSON: () => JSON2,
20668
- JSONObject: () => JSONObject,
20669
- Message: () => Message,
20670
- MessageLintLevel: () => MessageLintLevel,
20671
- MessageLintRule: () => MessageLintRule,
20672
- Pattern: () => Pattern,
20673
- Plugin: () => Plugin,
20674
- PluginLoadMessagesError: () => PluginLoadMessagesError,
20675
- PluginSaveMessagesError: () => PluginSaveMessagesError,
20676
- ProjectSettings: () => ProjectSettings,
20677
- ProjectSettingsFileJSONSyntaxError: () => ProjectSettingsFileJSONSyntaxError,
20678
- ProjectSettingsFileNotFoundError: () => ProjectSettingsFileNotFoundError,
20679
- ProjectSettingsInvalidError: () => ProjectSettingsInvalidError,
20680
- Text: () => Text,
20681
- Translatable: () => Translatable,
20682
- VariableReference: () => VariableReference,
20683
- Variant: () => Variant,
20684
- _MessageLintRuleId: () => _MessageLintRuleId,
20685
- _MessageLintRuleLevel: () => _MessageLintRuleLevel,
20686
- createImport: () => createImport,
20687
- createMessagesQuery: () => createMessagesQuery,
20688
- createVariant: () => createVariant,
20689
- getVariant: () => getVariant,
20690
- listProjects: () => listProjects,
20691
- loadProject: () => loadProject,
20692
- solidAdapter: () => solidAdapter,
20693
- updateVariantPattern: () => updateVariantPattern
20694
- });
20695
20657
  init_define_ENV_DEFINED_IN_BUILD_STEP();
20696
20658
 
20697
20659
  // ../../sdk/dist/resolve-modules/index.js
@@ -20717,44 +20679,74 @@ init_define_ENV_DEFINED_IN_BUILD_STEP();
20717
20679
 
20718
20680
  // ../../versioned-interfaces/translatable/dist/interface.js
20719
20681
  init_define_ENV_DEFINED_IN_BUILD_STEP();
20682
+
20683
+ // ../../versioned-interfaces/language-tag/dist/index.js
20684
+ init_define_ENV_DEFINED_IN_BUILD_STEP();
20685
+
20686
+ // ../../versioned-interfaces/language-tag/dist/interface.js
20687
+ init_define_ENV_DEFINED_IN_BUILD_STEP();
20720
20688
  var import_typebox = __toESM(require_typebox(), 1);
20721
- import { LanguageTag } from "@inlang/language-tag";
20722
- var Translatable = (type) => import_typebox.Type.Union([type, import_typebox.Type.Intersect([import_typebox.Type.Object({ en: type }), import_typebox.Type.Record(LanguageTag, type)])]);
20689
+ var pattern = "^((?<grandfathered>(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang))|((?<language>([A-Za-z]{2,3}(-(?<extlang>[A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?))(-(?<script>[A-Za-z]{4}))?(-(?<region>[A-Za-z]{2}|[0-9]{3}))?(-(?<variant>[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*))$";
20690
+ var LanguageTag = import_typebox.Type.String({
20691
+ pattern,
20692
+ examples: ["en", "de", "en-US", "zh-Hans", "es-419"]
20693
+ });
20694
+
20695
+ // ../../versioned-interfaces/language-tag/dist/lookup.js
20696
+ init_define_ENV_DEFINED_IN_BUILD_STEP();
20697
+ function lookup(languageTag, options) {
20698
+ const fallbackLanguages = [];
20699
+ const languageTagParts = languageTag.split("-").filter(Boolean);
20700
+ for (let i2 = languageTagParts.length; i2 > 0; i2--) {
20701
+ if (languageTagParts[i2 - 1] === "x")
20702
+ continue;
20703
+ const fallbackLanguageTag = languageTagParts.slice(0, i2).join("-");
20704
+ if (!options.languageTags.includes(fallbackLanguageTag))
20705
+ continue;
20706
+ fallbackLanguages.push(fallbackLanguageTag);
20707
+ }
20708
+ return fallbackLanguages[0] ?? options.defaultLanguageTag;
20709
+ }
20710
+
20711
+ // ../../versioned-interfaces/language-tag/dist/validate.js
20712
+ init_define_ENV_DEFINED_IN_BUILD_STEP();
20713
+
20714
+ // ../../versioned-interfaces/translatable/dist/interface.js
20715
+ var import_typebox2 = __toESM(require_typebox(), 1);
20716
+ var Translatable = (type) => import_typebox2.Type.Union([type, import_typebox2.Type.Intersect([import_typebox2.Type.Object({ en: type }), import_typebox2.Type.Record(LanguageTag, type)])]);
20723
20717
 
20724
20718
  // ../../versioned-interfaces/message-lint-rule/dist/interface.js
20725
- var import_typebox4 = __toESM(require_typebox(), 1);
20719
+ var import_typebox5 = __toESM(require_typebox(), 1);
20726
20720
 
20727
20721
  // ../../versioned-interfaces/project-settings/dist/index.js
20728
20722
  init_define_ENV_DEFINED_IN_BUILD_STEP();
20729
20723
 
20730
20724
  // ../../versioned-interfaces/project-settings/dist/interface.js
20731
20725
  init_define_ENV_DEFINED_IN_BUILD_STEP();
20732
- var import_typebox3 = __toESM(require_typebox(), 1);
20733
- import { LanguageTag as LanguageTag2 } from "@inlang/language-tag";
20726
+ var import_typebox4 = __toESM(require_typebox(), 1);
20734
20727
 
20735
20728
  // ../../json-types/dist/index.js
20736
20729
  init_define_ENV_DEFINED_IN_BUILD_STEP();
20737
20730
 
20738
20731
  // ../../json-types/dist/interface.js
20739
20732
  init_define_ENV_DEFINED_IN_BUILD_STEP();
20740
- var import_typebox2 = __toESM(require_typebox(), 1);
20741
- var JSONValue1 = import_typebox2.Type.Union([import_typebox2.Type.String(), import_typebox2.Type.Number(), import_typebox2.Type.Boolean(), import_typebox2.Type.Null()]);
20742
- var JSONArray1 = import_typebox2.Type.Array(JSONValue1);
20743
- var JSONObject1 = import_typebox2.Type.Record(import_typebox2.Type.String(), import_typebox2.Type.Union([JSONArray1, JSONValue1]));
20744
- var JSONValue2 = import_typebox2.Type.Union([JSONValue1, JSONObject1]);
20745
- var JSONArray2 = import_typebox2.Type.Array(JSONValue2);
20746
- var JSONObject2 = import_typebox2.Type.Record(import_typebox2.Type.String(), import_typebox2.Type.Union([JSONValue2, JSONArray2]));
20747
- var JSONValue3 = import_typebox2.Type.Union([JSONValue2, JSONObject2]);
20748
- var JSONArray3 = import_typebox2.Type.Array(JSONValue3);
20749
- var JSONObject3 = import_typebox2.Type.Record(import_typebox2.Type.String(), import_typebox2.Type.Union([JSONValue3, JSONArray3]));
20750
- var JSONValue4 = import_typebox2.Type.Union([JSONValue3, JSONObject3]);
20751
- var JSONArray4 = import_typebox2.Type.Array(JSONValue4);
20752
- var JSONObject4 = import_typebox2.Type.Record(import_typebox2.Type.String(), import_typebox2.Type.Union([JSONValue4, JSONArray4]));
20753
- var JSONObject = JSONObject4;
20754
- var JSON2 = import_typebox2.Type.Union([JSONObject4, JSONValue4, JSONArray4]);
20733
+ var import_typebox3 = __toESM(require_typebox(), 1);
20734
+ var JSONValue1 = import_typebox3.Type.Union([import_typebox3.Type.String(), import_typebox3.Type.Number(), import_typebox3.Type.Boolean(), import_typebox3.Type.Null()]);
20735
+ var JSONArray1 = import_typebox3.Type.Array(JSONValue1);
20736
+ var JSONObject1 = import_typebox3.Type.Record(import_typebox3.Type.String(), import_typebox3.Type.Union([JSONArray1, JSONValue1]));
20737
+ var JSONValue2 = import_typebox3.Type.Union([JSONValue1, JSONObject1]);
20738
+ var JSONArray2 = import_typebox3.Type.Array(JSONValue2);
20739
+ var JSONObject2 = import_typebox3.Type.Record(import_typebox3.Type.String(), import_typebox3.Type.Union([JSONValue2, JSONArray2]));
20740
+ var JSONValue3 = import_typebox3.Type.Union([JSONValue2, JSONObject2]);
20741
+ var JSONArray3 = import_typebox3.Type.Array(JSONValue3);
20742
+ var JSONObject3 = import_typebox3.Type.Record(import_typebox3.Type.String(), import_typebox3.Type.Union([JSONValue3, JSONArray3]));
20743
+ var JSONValue4 = import_typebox3.Type.Union([JSONValue3, JSONObject3]);
20744
+ var JSONArray4 = import_typebox3.Type.Array(JSONValue4);
20745
+ var JSONObject4 = import_typebox3.Type.Record(import_typebox3.Type.String(), import_typebox3.Type.Union([JSONValue4, JSONArray4]));
20746
+ var JSON2 = import_typebox3.Type.Union([JSONObject4, JSONValue4, JSONArray4]);
20755
20747
 
20756
20748
  // ../../versioned-interfaces/project-settings/dist/interface.js
20757
- var _MessageLintRuleId = import_typebox3.Type.String({
20749
+ var _MessageLintRuleId = import_typebox4.Type.String({
20758
20750
  pattern: "^messageLintRule\\.([a-z][a-zA-Z0-9]*)\\.([a-z][a-zA-Z0-9]*(?:[A-Z][a-z0-9]*)*)$",
20759
20751
  description: "The key must be conform to `messageLintRule.{namespace}.{id}` pattern.",
20760
20752
  examples: [
@@ -20762,11 +20754,11 @@ var _MessageLintRuleId = import_typebox3.Type.String({
20762
20754
  "messageLintRule.namespace.missingTranslation"
20763
20755
  ]
20764
20756
  });
20765
- var _MessageLintRuleLevel = import_typebox3.Type.Union([import_typebox3.Type.Literal("error"), import_typebox3.Type.Literal("warning")]);
20766
- var InternalProjectSettings = import_typebox3.Type.Object({
20767
- $schema: import_typebox3.Type.Optional(import_typebox3.Type.Literal("https://inlang.com/schema/project-settings")),
20768
- sourceLanguageTag: LanguageTag2,
20769
- languageTags: import_typebox3.Type.Array(LanguageTag2, { uniqueItems: true }),
20757
+ var _MessageLintRuleLevel = import_typebox4.Type.Union([import_typebox4.Type.Literal("error"), import_typebox4.Type.Literal("warning")]);
20758
+ var InternalProjectSettings = import_typebox4.Type.Object({
20759
+ $schema: import_typebox4.Type.Optional(import_typebox4.Type.Literal("https://inlang.com/schema/project-settings")),
20760
+ sourceLanguageTag: LanguageTag,
20761
+ languageTags: import_typebox4.Type.Array(LanguageTag, { uniqueItems: true }),
20770
20762
  /**
20771
20763
  * The modules to load.
20772
20764
  *
@@ -20776,16 +20768,16 @@ var InternalProjectSettings = import_typebox3.Type.Object({
20776
20768
  * "https://cdn.jsdelivr.net/npm/@inlang/plugin-csv@1/dist/index.js",
20777
20769
  * ]
20778
20770
  */
20779
- modules: import_typebox3.Type.Array(import_typebox3.Type.Intersect([
20780
- import_typebox3.Type.String({
20771
+ modules: import_typebox4.Type.Array(import_typebox4.Type.Intersect([
20772
+ import_typebox4.Type.String({
20781
20773
  pattern: "(?:[A-Za-z][A-Za-z0-9+.-]*:/{2})?(?:(?:[A-Za-z0-9-._~]|%[A-Fa-f0-9]{2})+(?::([A-Za-z0-9-._~]?|[%][A-Fa-f0-9]{2})+)?@)?(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\\.){1,126}[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?::[0-9]+)?(?:/(?:[A-Za-z0-9-._~]|%[A-Fa-f0-9]{2})*)*(?:\\?(?:[A-Za-z0-9-._~]+(?:=(?:[A-Za-z0-9-._~+]|%[A-Fa-f0-9]{2})+)?)(?:&|;[A-Za-z0-9-._~]+(?:=(?:[A-Za-z0-9-._~+]|%[A-Fa-f0-9]{2})+)?)*)?",
20782
20774
  description: "The module must be a valid URI according to RFC 3986."
20783
20775
  }),
20784
- import_typebox3.Type.String({
20776
+ import_typebox4.Type.String({
20785
20777
  pattern: ".*\\.js$",
20786
20778
  description: "The module must end with `.js`."
20787
20779
  }),
20788
- import_typebox3.Type.String({
20780
+ import_typebox4.Type.String({
20789
20781
  pattern: "^(?!.*@\\d\\.)[^]*$",
20790
20782
  description: "The module can only contain a major version number (ComVer, not SemVer). See https://inlang.com/documentation/comver"
20791
20783
  })
@@ -20798,7 +20790,7 @@ var InternalProjectSettings = import_typebox3.Type.Object({
20798
20790
  "./local-testing-plugin.js"
20799
20791
  ]
20800
20792
  }),
20801
- messageLintRuleLevels: import_typebox3.Type.Optional(import_typebox3.Type.Record(_MessageLintRuleId, _MessageLintRuleLevel, {
20793
+ messageLintRuleLevels: import_typebox4.Type.Optional(import_typebox4.Type.Record(_MessageLintRuleId, _MessageLintRuleLevel, {
20802
20794
  description: "The lint rule levels for messages.",
20803
20795
  examples: [
20804
20796
  {
@@ -20808,8 +20800,8 @@ var InternalProjectSettings = import_typebox3.Type.Object({
20808
20800
  ]
20809
20801
  }))
20810
20802
  });
20811
- var ExternalProjectSettings = import_typebox3.Type.Record(
20812
- import_typebox3.Type.String({
20803
+ var ExternalProjectSettings = import_typebox4.Type.Record(
20804
+ import_typebox4.Type.String({
20813
20805
  // pattern includes ProjectSettings keys
20814
20806
  pattern: `^((messageLintRule|plugin|app|library)\\.([a-z][a-zA-Z0-9]*)\\.([a-z][a-zA-Z0-9]*(?:[A-Z][a-z0-9]*)*)|\\$schema|${Object.keys(InternalProjectSettings.properties).map((key) => key.replaceAll(".", "\\.")).join("|")})$`,
20815
20807
  description: "The key must be conform to `{type:app|plugin|messageLintRule}.{namespace:string}.{id:string}`.",
@@ -20821,74 +20813,62 @@ var ExternalProjectSettings = import_typebox3.Type.Record(
20821
20813
  JSON2,
20822
20814
  { additionalProperties: false, description: "Settings defined by apps, plugins, etc." }
20823
20815
  );
20824
- var ProjectSettings = import_typebox3.Type.Intersect([InternalProjectSettings, ExternalProjectSettings]);
20816
+ var ProjectSettings = import_typebox4.Type.Intersect([InternalProjectSettings, ExternalProjectSettings]);
20825
20817
 
20826
20818
  // ../../versioned-interfaces/message-lint-rule/dist/interface.js
20827
- var MessageLintLevel = _MessageLintRuleLevel;
20828
- var MessageLintRule = import_typebox4.Type.Object({
20819
+ var MessageLintRule = import_typebox5.Type.Object({
20829
20820
  id: _MessageLintRuleId,
20830
- displayName: Translatable(import_typebox4.Type.String()),
20831
- description: Translatable(import_typebox4.Type.String()),
20821
+ displayName: Translatable(import_typebox5.Type.String()),
20822
+ description: Translatable(import_typebox5.Type.String()),
20832
20823
  /**
20833
20824
  * Tyepbox is must be used to validate the Json Schema.
20834
20825
  * Github discussion to upvote a plain Json Schema validator and read the benefits of Typebox
20835
20826
  * https://github.com/opral/monorepo/discussions/1503
20836
20827
  */
20837
- settingsSchema: import_typebox4.Type.Optional(import_typebox4.Type.Object({}, { additionalProperties: true }))
20828
+ settingsSchema: import_typebox5.Type.Optional(import_typebox5.Type.Object({}, { additionalProperties: true }))
20838
20829
  });
20839
20830
 
20840
20831
  // ../../versioned-interfaces/plugin/dist/index.js
20841
- var dist_exports = {};
20842
- __export(dist_exports, {
20843
- Expression: () => Expression,
20844
- Message: () => Message,
20845
- Pattern: () => Pattern,
20846
- Plugin: () => Plugin,
20847
- Text: () => Text,
20848
- Translatable: () => Translatable,
20849
- VariableReference: () => VariableReference,
20850
- Variant: () => Variant
20851
- });
20852
20832
  init_define_ENV_DEFINED_IN_BUILD_STEP();
20853
20833
 
20854
20834
  // ../../versioned-interfaces/plugin/dist/customApis/app.inlang.ideExtension.js
20855
20835
  init_define_ENV_DEFINED_IN_BUILD_STEP();
20856
- var import_typebox5 = __toESM(require_typebox(), 1);
20857
- var MessageReferenceMatch = import_typebox5.Type.Object({
20836
+ var import_typebox6 = __toESM(require_typebox(), 1);
20837
+ var MessageReferenceMatch = import_typebox6.Type.Object({
20858
20838
  /**
20859
20839
  * The messages id.
20860
20840
  */
20861
- messageId: import_typebox5.Type.String(),
20841
+ messageId: import_typebox6.Type.String(),
20862
20842
  /**
20863
20843
  * The position from where to where the reference can be found.
20864
20844
  */
20865
- position: import_typebox5.Type.Object({
20866
- start: import_typebox5.Type.Object({
20867
- line: import_typebox5.Type.Number(),
20868
- character: import_typebox5.Type.Number()
20845
+ position: import_typebox6.Type.Object({
20846
+ start: import_typebox6.Type.Object({
20847
+ line: import_typebox6.Type.Number(),
20848
+ character: import_typebox6.Type.Number()
20869
20849
  }),
20870
- end: import_typebox5.Type.Object({
20871
- line: import_typebox5.Type.Number(),
20872
- character: import_typebox5.Type.Number()
20850
+ end: import_typebox6.Type.Object({
20851
+ line: import_typebox6.Type.Number(),
20852
+ character: import_typebox6.Type.Number()
20873
20853
  })
20874
20854
  })
20875
20855
  });
20876
- var IdeExtensionConfigSchema = import_typebox5.Type.Object({
20856
+ var IdeExtensionConfigSchema = import_typebox6.Type.Object({
20877
20857
  /**
20878
20858
  * Defines matchers for message references inside the code.
20879
20859
  *
20880
20860
  * @param args represents the data to conduct the search on
20881
20861
  * @returns a promise with matched message references
20882
20862
  */
20883
- messageReferenceMatchers: import_typebox5.Type.Array(import_typebox5.Type.Function([
20884
- import_typebox5.Type.Object({
20885
- documentText: import_typebox5.Type.String()
20863
+ messageReferenceMatchers: import_typebox6.Type.Array(import_typebox6.Type.Function([
20864
+ import_typebox6.Type.Object({
20865
+ documentText: import_typebox6.Type.String()
20886
20866
  })
20887
- ], import_typebox5.Type.Promise(import_typebox5.Type.Array(MessageReferenceMatch)))),
20867
+ ], import_typebox6.Type.Promise(import_typebox6.Type.Array(MessageReferenceMatch)))),
20888
20868
  /**
20889
20869
  * Defines the options to extract messages.
20890
20870
  */
20891
- extractMessageOptions: import_typebox5.Type.Array(import_typebox5.Type.Object({
20871
+ extractMessageOptions: import_typebox6.Type.Array(import_typebox6.Type.Object({
20892
20872
  /**
20893
20873
  * Function which is called, when the user finished the message extraction command.
20894
20874
  *
@@ -20896,14 +20876,14 @@ var IdeExtensionConfigSchema = import_typebox5.Type.Object({
20896
20876
  * @param selection is the text which was extracted
20897
20877
  * @returns the code which is inserted into the document
20898
20878
  */
20899
- callback: import_typebox5.Type.Function([
20900
- import_typebox5.Type.Object({
20901
- messageId: import_typebox5.Type.String(),
20902
- selection: import_typebox5.Type.String()
20879
+ callback: import_typebox6.Type.Function([
20880
+ import_typebox6.Type.Object({
20881
+ messageId: import_typebox6.Type.String(),
20882
+ selection: import_typebox6.Type.String()
20903
20883
  })
20904
- ], import_typebox5.Type.Object({
20905
- messageId: import_typebox5.Type.String(),
20906
- messageReplacement: import_typebox5.Type.String()
20884
+ ], import_typebox6.Type.Object({
20885
+ messageId: import_typebox6.Type.String(),
20886
+ messageReplacement: import_typebox6.Type.String()
20907
20887
  }))
20908
20888
  })),
20909
20889
  /**
@@ -20914,34 +20894,34 @@ var IdeExtensionConfigSchema = import_typebox5.Type.Object({
20914
20894
  *
20915
20895
  * See https://code.visualstudio.com/api/references/document-selector
20916
20896
  */
20917
- documentSelectors: import_typebox5.Type.Optional(import_typebox5.Type.Array(import_typebox5.Type.Object({
20918
- language: import_typebox5.Type.Optional(import_typebox5.Type.String())
20897
+ documentSelectors: import_typebox6.Type.Optional(import_typebox6.Type.Array(import_typebox6.Type.Object({
20898
+ language: import_typebox6.Type.Optional(import_typebox6.Type.String())
20919
20899
  })))
20920
20900
  });
20921
20901
 
20922
20902
  // ../../versioned-interfaces/plugin/dist/interface.js
20923
20903
  init_define_ENV_DEFINED_IN_BUILD_STEP();
20924
- var import_typebox6 = __toESM(require_typebox(), 1);
20925
- var Plugin = import_typebox6.Type.Object({
20926
- id: import_typebox6.Type.String({
20904
+ var import_typebox7 = __toESM(require_typebox(), 1);
20905
+ var Plugin = import_typebox7.Type.Object({
20906
+ id: import_typebox7.Type.String({
20927
20907
  pattern: "^plugin\\.([a-z][a-zA-Z0-9]*)\\.([a-z][a-zA-Z0-9]*(?:[A-Z][a-z0-9]*)*)$",
20928
20908
  examples: ["plugin.namespace.id"]
20929
20909
  }),
20930
- displayName: Translatable(import_typebox6.Type.String()),
20931
- description: Translatable(import_typebox6.Type.String()),
20910
+ displayName: Translatable(import_typebox7.Type.String()),
20911
+ description: Translatable(import_typebox7.Type.String()),
20932
20912
  /**
20933
20913
  * Tyepbox is must be used to validate the Json Schema.
20934
20914
  * Github discussion to upvote a plain Json Schema validator and read the benefits of Typebox
20935
20915
  * https://github.com/opral/monorepo/discussions/1503
20936
20916
  */
20937
- settingsSchema: import_typebox6.Type.Optional(import_typebox6.Type.Object({}, { additionalProperties: true })),
20938
- loadMessages: import_typebox6.Type.Optional(import_typebox6.Type.Any()),
20939
- saveMessages: import_typebox6.Type.Optional(import_typebox6.Type.Any()),
20917
+ settingsSchema: import_typebox7.Type.Optional(import_typebox7.Type.Object({}, { additionalProperties: true })),
20918
+ loadMessages: import_typebox7.Type.Optional(import_typebox7.Type.Any()),
20919
+ saveMessages: import_typebox7.Type.Optional(import_typebox7.Type.Any()),
20940
20920
  /**
20941
20921
  * @deprecated removed
20942
20922
  */
20943
- detectedLanguageTags: import_typebox6.Type.Optional(import_typebox6.Type.Any()),
20944
- addCustomApi: import_typebox6.Type.Optional(import_typebox6.Type.Any())
20923
+ detectedLanguageTags: import_typebox7.Type.Optional(import_typebox7.Type.Any()),
20924
+ addCustomApi: import_typebox7.Type.Optional(import_typebox7.Type.Any())
20945
20925
  });
20946
20926
 
20947
20927
  // ../../versioned-interfaces/message/dist/index.js
@@ -20949,46 +20929,41 @@ init_define_ENV_DEFINED_IN_BUILD_STEP();
20949
20929
 
20950
20930
  // ../../versioned-interfaces/message/dist/interface.js
20951
20931
  init_define_ENV_DEFINED_IN_BUILD_STEP();
20952
- var import_typebox7 = __toESM(require_typebox(), 1);
20953
- import { LanguageTag as LanguageTag3 } from "@inlang/language-tag";
20954
- var Text = import_typebox7.Type.Object({
20955
- type: import_typebox7.Type.Literal("Text"),
20956
- value: import_typebox7.Type.String()
20932
+ var import_typebox8 = __toESM(require_typebox(), 1);
20933
+ var Text = import_typebox8.Type.Object({
20934
+ type: import_typebox8.Type.Literal("Text"),
20935
+ value: import_typebox8.Type.String()
20957
20936
  });
20958
- var VariableReference = import_typebox7.Type.Object({
20959
- type: import_typebox7.Type.Literal("VariableReference"),
20960
- name: import_typebox7.Type.String()
20937
+ var VariableReference = import_typebox8.Type.Object({
20938
+ type: import_typebox8.Type.Literal("VariableReference"),
20939
+ name: import_typebox8.Type.String()
20961
20940
  });
20962
- var Expression = import_typebox7.Type.Union([VariableReference]);
20963
- var Pattern = import_typebox7.Type.Array(import_typebox7.Type.Union([Text, Expression]));
20964
- var Variant = import_typebox7.Type.Object({
20965
- languageTag: LanguageTag3,
20941
+ var Expression = import_typebox8.Type.Union([VariableReference]);
20942
+ var Pattern = import_typebox8.Type.Array(import_typebox8.Type.Union([Text, Expression]));
20943
+ var Variant = import_typebox8.Type.Object({
20944
+ languageTag: LanguageTag,
20966
20945
  /**
20967
20946
  * The number of keys in each variant match MUST equal the number of expressions in the selectors.
20968
20947
  *
20969
20948
  * Inspired by: https://github.com/unicode-org/message-format-wg/blob/main/spec/formatting.md#pattern-selection
20970
20949
  */
20971
20950
  // a match can always only be string-based because a string is what is rendered to the UI
20972
- match: import_typebox7.Type.Array(import_typebox7.Type.String()),
20951
+ match: import_typebox8.Type.Array(import_typebox8.Type.String()),
20973
20952
  pattern: Pattern
20974
20953
  });
20975
- var Message = import_typebox7.Type.Object({
20976
- id: import_typebox7.Type.String(),
20954
+ var Message = import_typebox8.Type.Object({
20955
+ id: import_typebox8.Type.String(),
20977
20956
  /**
20978
20957
  * The order in which the selectors are placed determines the precedence of patterns.
20979
20958
  */
20980
- selectors: import_typebox7.Type.Array(Expression),
20981
- variants: import_typebox7.Type.Array(Variant)
20959
+ selectors: import_typebox8.Type.Array(Expression),
20960
+ variants: import_typebox8.Type.Array(Variant)
20982
20961
  });
20983
20962
 
20984
- // ../../versioned-interfaces/plugin/dist/index.js
20985
- __reExport(dist_exports, language_tag_star);
20986
- import * as language_tag_star from "@inlang/language-tag";
20987
-
20988
20963
  // ../../versioned-interfaces/module/dist/interface.js
20989
- var import_typebox8 = __toESM(require_typebox(), 1);
20990
- var InlangModule = import_typebox8.Type.Object({
20991
- default: import_typebox8.Type.Union([Plugin, MessageLintRule])
20964
+ var import_typebox9 = __toESM(require_typebox(), 1);
20965
+ var InlangModule = import_typebox9.Type.Object({
20966
+ default: import_typebox9.Type.Union([Plugin, MessageLintRule])
20992
20967
  });
20993
20968
 
20994
20969
  // ../../sdk/dist/resolve-modules/errors.js
@@ -21694,7 +21669,7 @@ function createRenderEffect(fn, value, options) {
21694
21669
  }
21695
21670
  function createEffect(fn, value, options) {
21696
21671
  runEffects = runUserEffects;
21697
- const c = createComputation(fn, value, false, STALE), s = SuspenseContext && lookup(Owner, SuspenseContext.id);
21672
+ const c = createComputation(fn, value, false, STALE), s = SuspenseContext && lookup2(Owner, SuspenseContext.id);
21698
21673
  if (s)
21699
21674
  c.suspense = s;
21700
21675
  c.user = true;
@@ -21739,9 +21714,6 @@ function onCleanup(fn) {
21739
21714
  function getListener() {
21740
21715
  return Listener;
21741
21716
  }
21742
- function getOwner() {
21743
- return Owner;
21744
- }
21745
21717
  function startTransition(fn) {
21746
21718
  if (Transition && Transition.running) {
21747
21719
  fn();
@@ -22201,7 +22173,7 @@ function runErrors(fns, err) {
22201
22173
  }
22202
22174
  function handleError(err) {
22203
22175
  err = castError(err);
22204
- const fns = ERROR && lookup(Owner, ERROR);
22176
+ const fns = ERROR && lookup2(Owner, ERROR);
22205
22177
  if (!fns)
22206
22178
  throw err;
22207
22179
  if (Effects)
@@ -22214,8 +22186,8 @@ function handleError(err) {
22214
22186
  else
22215
22187
  runErrors(fns, err);
22216
22188
  }
22217
- function lookup(owner, key) {
22218
- return owner ? owner.context && owner.context[key] !== void 0 ? owner.context[key] : lookup(owner.owner, key) : void 0;
22189
+ function lookup2(owner, key) {
22190
+ return owner ? owner.context && owner.context[key] !== void 0 ? owner.context[key] : lookup2(owner.owner, key) : void 0;
22219
22191
  }
22220
22192
  function resolveChildren(children3) {
22221
22193
  if (typeof children3 === "function" && !children3.length)
@@ -22242,39 +22214,6 @@ function createProvider(id, options) {
22242
22214
  return res;
22243
22215
  };
22244
22216
  }
22245
- function observable(input) {
22246
- return {
22247
- subscribe(observer) {
22248
- if (!(observer instanceof Object) || observer == null) {
22249
- throw new TypeError("Expected the observer to be an object.");
22250
- }
22251
- const handler = typeof observer === "function" ? observer : observer.next && observer.next.bind(observer);
22252
- if (!handler) {
22253
- return {
22254
- unsubscribe() {
22255
- }
22256
- };
22257
- }
22258
- const dispose = createRoot((disposer) => {
22259
- createEffect(() => {
22260
- const v = input();
22261
- untrack(() => handler(v));
22262
- });
22263
- return disposer;
22264
- });
22265
- if (getOwner())
22266
- onCleanup(dispose);
22267
- return {
22268
- unsubscribe() {
22269
- dispose();
22270
- }
22271
- };
22272
- },
22273
- [Symbol.observable || "@@observable"]() {
22274
- return this;
22275
- }
22276
- };
22277
- }
22278
22217
  var FALLBACK = Symbol("fallback");
22279
22218
  var SuspenseListContext = createContext();
22280
22219
  var DEV;
@@ -22283,7 +22222,6 @@ var DEV;
22283
22222
  var createSignal2 = createSignal;
22284
22223
  var createRoot2 = createRoot;
22285
22224
  var createEffect2 = createEffect;
22286
- var observable2 = observable;
22287
22225
  var batch2 = batch;
22288
22226
  var getListener2 = getListener;
22289
22227
  var onCleanup2 = onCleanup;
@@ -22640,29 +22578,7 @@ function createMessageLintReportsQuery(messagesQuery, settings, installedMessage
22640
22578
  }
22641
22579
 
22642
22580
  // ../../sdk/dist/versionedInterfaces.js
22643
- var versionedInterfaces_exports = {};
22644
- __export(versionedInterfaces_exports, {
22645
- Expression: () => Expression,
22646
- ExternalProjectSettings: () => ExternalProjectSettings,
22647
- JSON: () => JSON2,
22648
- JSONObject: () => JSONObject,
22649
- Message: () => Message,
22650
- MessageLintLevel: () => MessageLintLevel,
22651
- MessageLintRule: () => MessageLintRule,
22652
- Pattern: () => Pattern,
22653
- Plugin: () => Plugin,
22654
- ProjectSettings: () => ProjectSettings,
22655
- Text: () => Text,
22656
- Translatable: () => Translatable,
22657
- VariableReference: () => VariableReference,
22658
- Variant: () => Variant,
22659
- _MessageLintRuleId: () => _MessageLintRuleId,
22660
- _MessageLintRuleLevel: () => _MessageLintRuleLevel
22661
- });
22662
22581
  init_define_ENV_DEFINED_IN_BUILD_STEP();
22663
- __reExport(versionedInterfaces_exports, language_tag_star2);
22664
- __reExport(versionedInterfaces_exports, dist_exports);
22665
- import * as language_tag_star2 from "@inlang/language-tag";
22666
22582
 
22667
22583
  // ../../versioned-interfaces/project-settings/dist/migration/index.js
22668
22584
  init_define_ENV_DEFINED_IN_BUILD_STEP();
@@ -24861,231 +24777,15 @@ function createSubscribable(signal) {
24861
24777
 
24862
24778
  // ../../sdk/dist/listProjects.js
24863
24779
  init_define_ENV_DEFINED_IN_BUILD_STEP();
24864
- var listProjects = async (nodeishFs, from3) => {
24865
- const recursionLimit = 5;
24866
- const projects = [];
24867
- async function searchDir(path4, depth) {
24868
- if (depth > recursionLimit) {
24869
- return;
24870
- }
24871
- const files = await nodeishFs.readdir(path4);
24872
- for (const file of files) {
24873
- const filePath = `${path4}/${file}`;
24874
- try {
24875
- const stats = await nodeishFs.stat(filePath);
24876
- if (stats.isDirectory()) {
24877
- if (file === "node_modules") {
24878
- continue;
24879
- }
24880
- if (file.endsWith(".inlang")) {
24881
- projects.push({ projectPath: filePath });
24882
- } else {
24883
- await searchDir(filePath, depth + 1);
24884
- }
24885
- }
24886
- } catch {
24887
- continue;
24888
- }
24889
- }
24890
- }
24891
- await searchDir(from3, 0);
24892
- for (const project of projects) {
24893
- project.projectPath = project.projectPath.replace(/\/\//g, "/");
24894
- }
24895
- return projects;
24896
- };
24897
24780
 
24898
24781
  // ../../sdk/dist/adapter/solidAdapter.js
24899
24782
  init_define_ENV_DEFINED_IN_BUILD_STEP();
24900
- var solidAdapter = (project, arg) => {
24901
- const convert = (signal) => {
24902
- return arg.from(observable2(signal));
24903
- };
24904
- return {
24905
- id: project.id,
24906
- customApi: convert(project.customApi),
24907
- settings: convert(project.settings),
24908
- errors: convert(project.errors),
24909
- installed: {
24910
- messageLintRules: convert(project.installed.messageLintRules),
24911
- plugins: convert(project.installed.plugins)
24912
- },
24913
- setSettings: project.setSettings,
24914
- query: {
24915
- messages: {
24916
- create: project.query.messages.create,
24917
- update: project.query.messages.update,
24918
- delete: project.query.messages.delete,
24919
- upsert: project.query.messages.upsert,
24920
- get: project.query.messages.get,
24921
- // get: (args) => {
24922
- // const [message, setMessage] = createSignal<Message | undefined>()
24923
- // project.query.messages.get.subscribe(args, setMessage)
24924
- // return message()
24925
- // },
24926
- getAll: convert(project.query.messages.getAll),
24927
- includedMessageIds: convert(project.query.messages.includedMessageIds)
24928
- },
24929
- messageLintReports: {
24930
- get: project.query.messageLintReports.get,
24931
- getAll: convert(project.query.messageLintReports.getAll)
24932
- }
24933
- }
24934
- };
24935
- };
24936
24783
 
24937
24784
  // ../../sdk/dist/messages/variant.js
24938
24785
  init_define_ENV_DEFINED_IN_BUILD_STEP();
24939
24786
 
24940
24787
  // ../../sdk/dist/messages/errors.js
24941
24788
  init_define_ENV_DEFINED_IN_BUILD_STEP();
24942
- var MessageVariantDoesNotExistError = class extends Error {
24943
- #id = "MessageVariantDoesNotExistError";
24944
- constructor(messageId, languageTag) {
24945
- super(`For message '${messageId}' and '${languageTag}', there doesn't exist a variant for this specific matchers.`);
24946
- }
24947
- };
24948
- var MessageVariantAlreadyExistsError = class extends Error {
24949
- #id = "MessageVariantAlreadyExistsError";
24950
- constructor(messageId, languageTag) {
24951
- super(`For message '${messageId}' and '${languageTag}', there already exists a variant for this specific matchers.`);
24952
- }
24953
- };
24954
- var MessagePatternsForLanguageTagDoNotExistError = class extends Error {
24955
- #id = "MessagePatternsForLanguageTagDoNotExistError";
24956
- constructor(messageId, languageTag) {
24957
- super(`For message '${messageId}' there are no patterns with the languageTag '${languageTag}'.`);
24958
- }
24959
- };
24960
-
24961
- // ../../sdk/dist/messages/variant.js
24962
- function getVariant(message, args) {
24963
- const variant = matchMostSpecificVariant(message, args.where.languageTag, args.where.match);
24964
- if (variant) {
24965
- return structuredClone(variant);
24966
- }
24967
- return void 0;
24968
- }
24969
- function createVariant(message, args) {
24970
- const copy = structuredClone(message);
24971
- if (matchVariant(copy, args.data.languageTag, args.data.match)) {
24972
- return { error: new MessageVariantAlreadyExistsError(message.id, args.data.languageTag) };
24973
- }
24974
- copy.variants.push({
24975
- ...args.data,
24976
- match: args.data.match
24977
- });
24978
- return { data: copy };
24979
- }
24980
- function updateVariantPattern(message, args) {
24981
- const copy = structuredClone(message);
24982
- const containsLanguageTag = message.variants.some((variant2) => variant2.languageTag === args.where.languageTag);
24983
- if (!containsLanguageTag) {
24984
- return {
24985
- error: new MessagePatternsForLanguageTagDoNotExistError(message.id, args.where.languageTag)
24986
- };
24987
- }
24988
- const variant = matchVariant(copy, args.where.languageTag, args.where.match);
24989
- if (variant === void 0) {
24990
- return { error: new MessageVariantDoesNotExistError(message.id, args.where.languageTag) };
24991
- }
24992
- if (variant) {
24993
- variant.pattern = args.data;
24994
- return { data: copy };
24995
- }
24996
- return { error: new MessageVariantDoesNotExistError(message.id, args.where.languageTag) };
24997
- }
24998
- var matchVariant = (message, languageTag, match) => {
24999
- const languageVariants = message.variants.filter((variant) => variant.languageTag === languageTag);
25000
- if (languageVariants.length === 0)
25001
- return void 0;
25002
- for (const variant of languageVariants) {
25003
- let isMatch = true;
25004
- if (variant.match.length > 0) {
25005
- variant.match.map((value, index) => {
25006
- if (match && match[index] !== value) {
25007
- isMatch = false;
25008
- }
25009
- });
25010
- }
25011
- if (!message.selectors || !match || match.length !== message.selectors.length) {
25012
- isMatch = false;
25013
- }
25014
- if (isMatch) {
25015
- return variant;
25016
- }
25017
- }
25018
- return void 0;
25019
- };
25020
- var matchMostSpecificVariant = (message, languageTag, match) => {
25021
- const index = {};
25022
- for (const variant of message.variants) {
25023
- if (variant.languageTag !== languageTag)
25024
- continue;
25025
- let isMatch = true;
25026
- if (variant.match.length !== message.selectors.length) {
25027
- return void 0;
25028
- }
25029
- if (variant.match.length > 0) {
25030
- variant.match.map((value, index2) => {
25031
- if (match && match[index2] !== value && value !== "*") {
25032
- isMatch = false;
25033
- }
25034
- });
25035
- }
25036
- if (isMatch && match && match.length > 0) {
25037
- let recursiveAddToIndex2 = function(currentIndex, selectorIndex, selectorLength, variant2) {
25038
- const key = variant2.match[selectorIndex];
25039
- if (key) {
25040
- if (selectorIndex === 1) {
25041
- currentIndex[key] = variant2;
25042
- } else {
25043
- if (!currentIndex[key]) {
25044
- currentIndex[key] = {};
25045
- }
25046
- recursiveAddToIndex2(currentIndex[key], selectorIndex + 1, selectorLength, variant2);
25047
- }
25048
- }
25049
- };
25050
- var recursiveAddToIndex = recursiveAddToIndex2;
25051
- recursiveAddToIndex2(index, 0, message.selectors ? message.selectors.length - 1 : 0, variant);
25052
- } else if (isMatch && !match) {
25053
- return variant;
25054
- }
25055
- }
25056
- if (!message.selectors || !match || match.length !== message.selectors.length) {
25057
- const catchAllMatcher = [];
25058
- const selectorCount = message.selectors.length;
25059
- catchAllMatcher.push("*");
25060
- for (let i2 = 0; i2 < selectorCount - 1; i2++) {
25061
- catchAllMatcher.push("*");
25062
- }
25063
- return message.variants.find((v) => v.languageTag === languageTag && JSON.stringify(v.match) === JSON.stringify(catchAllMatcher));
25064
- }
25065
- if (message.selectors && message.selectors.length === 0) {
25066
- return message.variants.find((v) => v.languageTag === languageTag && JSON.stringify(v.match) === "[]");
25067
- }
25068
- const findOptimalMatch = (index2, selectors) => {
25069
- const keys = Object.keys(index2);
25070
- for (const key of keys) {
25071
- if (key === selectors[0] || key === "*") {
25072
- const nextOptimal = selectors.slice(1);
25073
- if (nextOptimal.length === 0) {
25074
- return index2[key] || void 0;
25075
- }
25076
- const match2 = findOptimalMatch(index2[key], nextOptimal);
25077
- if (match2 !== void 0) {
25078
- return match2;
25079
- }
25080
- }
25081
- }
25082
- return void 0;
25083
- };
25084
- return findOptimalMatch(index, match || []);
25085
- };
25086
-
25087
- // ../../sdk/dist/index.js
25088
- __reExport(dist_exports2, versionedInterfaces_exports);
25089
24789
 
25090
24790
  // src/compiler/compile.ts
25091
24791
  init_define_ENV_DEFINED_IN_BUILD_STEP();
@@ -25185,10 +24885,10 @@ init_define_ENV_DEFINED_IN_BUILD_STEP();
25185
24885
  var backtick = (str) => `\`${str}\``;
25186
24886
 
25187
24887
  // src/compiler/compilePattern.ts
25188
- var compilePattern = (pattern) => {
24888
+ var compilePattern = (pattern2) => {
25189
24889
  let result = "";
25190
24890
  const params = {};
25191
- for (const element of pattern) {
24891
+ for (const element of pattern2) {
25192
24892
  switch (element.type) {
25193
24893
  case "Text":
25194
24894
  result += escapeForTemplateLiteral(element.value);
@@ -25254,7 +24954,6 @@ function i(str) {
25254
24954
  }
25255
24955
 
25256
24956
  // src/compiler/compileMessage.ts
25257
- import { lookup as lookup2 } from "@inlang/language-tag";
25258
24957
  var compileMessage = (message, availableLanguageTags, sourceLanguageTag) => {
25259
24958
  if (!isValidJSIdentifier(message.id)) {
25260
24959
  throw new Error(
@@ -25290,7 +24989,7 @@ To detect this issue during linting, use the valid-js-identifier lint rule: http
25290
24989
  if (compiledPattern) {
25291
24990
  resource[languageTag] = messageFunction({ message, params, languageTag, compiledPattern });
25292
24991
  } else {
25293
- const fallbackLanguage = lookup2(languageTag, {
24992
+ const fallbackLanguage = lookup(languageTag, {
25294
24993
  languageTags: Object.keys(compiledPatterns),
25295
24994
  defaultLanguageTag: sourceLanguageTag
25296
24995
  });
@@ -30100,9 +29799,6 @@ export {
30100
29799
  compile,
30101
29800
  writeOutput
30102
29801
  };
30103
- //! do not return a reference to the message in a resource
30104
- //! modifications to the returned message will leak into the
30105
- //! resource which is considered to be immutable.
30106
29802
  /*! Bundled license information:
30107
29803
 
30108
29804
  is-plain-object/dist/is-plain-object.js: